summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] gh-113602: Bail out when the parser tries to override existing errors ↵Miss Islington (bot)2024-01-021-0/+2
| | | | | | | | | (GH-113607) (#113652) gh-113602: Bail out when the parser tries to override existing errors (GH-113607) (cherry picked from commit 9ed36d533ab8b256f0a589b5be6d7a2fdcf4aff2) Signed-off-by: Pablo Galindo <pablogsal@gmail.com> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.12] bpo-26791: Update shutil.move() to provide the same symlink move ↵Miss Islington (bot)2023-12-271-0/+29
| | | | | | | behavior as the mv shell when moving a symlink into a directory that is the target of the symlink (GH-21759) (GH-113517) (cherry picked from commit c66b577d9f7a11ffab57985fd6fb22e9dfd4f245) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
* [3.12] gh-111615: Fix regression in QueueHandler configuration. (GH-111638) ↵Miss Islington (bot)2023-12-271-0/+19
| | | | (GH-113507)
* [3.12] bpo-36959: Fix error messages for invalid ISO format string in ↵Miss Islington (bot)2023-12-261-26/+46
| | | | | | | | | | | _strptime() (GH-13408) (GH-113495) Previously some error messages complained about incompatible combinations of directives that are not contained in the format string. (cherry picked from commit 4b2c3e8e436b5191039cbe8cd9932654a60803e6) Co-authored-by: Gordon P. Hemsley <me@gphemsley.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113468: Remove the "_new_ suffix from class names in pydocfodder ↵Miss Islington (bot)2023-12-261-8/+8
| | | | | | | (GH-113469) (GH-113483) (cherry picked from commit 8a3d0e4a661e6c27e4c17c818ce4187a36579e5f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] bpo-37013: Fix the error handling in socket.if_indextoname() ↵Miss Islington (bot)2023-12-251-0/+13
| | | | | | | | | (GH-13503) (GH-112597) * Fix a crash when pass UINT_MAX. * Fix an integer overflow on 64-bit non-Windows platforms. (cherry picked from commit 0daf555c6fb3feba77989382135a58215e1d70a5) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* [3.12] gh-76785: Make test.test_interpreters executable (GH-112982) (GH-113470)Jeff Allen2023-12-251-0/+4
| | | | | This is so that we can run python -m test.test_interpreters. As such it backports that aspect of commit 86a77f4e1a5ceaff1036b0072521e12752b5df47, where it is implemented by a package __main__.py.
* [3.12] gh-113440: Ignore the "ver" command failure with exit code 0xc0000142 ↵Miss Islington (bot)2023-12-241-0/+2
| | | | | | | (GH-113435) (GH-113453) (cherry picked from commit 53330f167792a2947ab8b0faafb11019d7fb09b6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113421: Fix multiprocessing logger for "%(filename)s" (GH-113423) ↵Miss Islington (bot)2023-12-241-0/+23
| | | | | | | (GH-113450) (cherry picked from commit ce77ee50358c0668eda5078f50b38f0770a370ab) Co-authored-by: Xu Song <xusong.vip@gmail.com>
* [3.12] gh-113028: Correctly memoize str in pickle when escapes added ↵Miss Islington (bot)2023-12-241-0/+8
| | | | | | | | | | (GH-113436) (GH-113448) This fixes a divergence between the Python and C implementations of pickle for protocol 0, such that it pickle.py fails to re-use the first pickled representation of strings involving characters that have to be escaped. (cherry picked from commit 08398631a0298dcf785ee7bd0e26c7844823ce59) Co-authored-by: Jeff Allen <ja.py@farowl.co.uk>
* [3.12] gh-112559: Avoid unnecessary conversion attempts to enum_klass in ↵Miss Islington (bot)2023-12-242-0/+44
| | | | | | | signal.py (GH-113040) (#113443) (cherry picked from commit 050783cb37d6a09d8238fa640814df8a915f6a68) Co-authored-by: Yilei Yang <yileiyang@google.com>
* [3.12] gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set ↵Miss Islington (bot)2023-12-231-5/+49
| | | | | | | | | | | | | | | | | | (GH-113378) (#113398) gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set (GH-113378) * gh-109989: Fix test_c_locale_coercion when PYTHONIOENCODING is set This fixes the existing tests when PYTHONIOENCODING is set by unsetting PYTHONIOENCODING. Also add a test that explicitly checks what happens when PYTHONIOENCODING is set. (cherry picked from commit 5f665e99e0b8a52415f83c2416eaf28abaacc3ae) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-113297: Fix segfault in compiler for with statement with 19 ↵Irit Katriel2023-12-231-0/+26
| | | | context managers (#113327) (#113404)
* [3.12] gh-81682: Fix test failures when CPython is built without docstrings ↵Serhiy Storchaka2023-12-2311-16/+37
| | | | | (GH-113410) (GH-113429) (cherry picked from commit 4e5b27e6a3be85853bd04d45128dd7cc706bb1c8)
* [3.12] gh-113188: Fix shutil.copymode() and shutil.copystat() on Windows ↵Serhiy Storchaka2023-12-231-21/+23
| | | | | | | | | (GH-113285) Previously they worked differenly if dst is a symbolic link: they modified the permission bits of dst itself rather than the file it points to if follow_symlinks is true or src is not a symbolic link, and did nothing if follow_symlinks is false and src is a symbolic link.
* [3.12] gh-113384: Skip test_freeze for framework builds on macOS (GH-113390) ↵Miss Islington (bot)2023-12-221-0/+2
| | | | | | | | (#113395) gh-113384: Skip test_freeze for framework builds on macOS (GH-113390) (cherry picked from commit bee627c1e29a070562d1a540a6e513d0daa322f5) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.12] GH-113214: Fix SSLProto exception handling in SSL-over-SSL scenarios ↵Miss Islington (bot)2023-12-211-1/+14
| | | | | | | | | | | (GH-113334) (#113339) When wrapped, `_SSLProtocolTransport._force_close(exc)` is called just like in the unwrapped scenario `_SelectorTransport._force_close(exc)` or `_ProactorBasePipeTransport._force_close(exc)` would be called, except here the exception needs to be passed through the `SSLProtocol._abort()` method, which didn't accept an exception object. This commit ensures that this path works, in the same way that the uvloop implementation of SSLProto passes on the exception (on which the current implementation of SSLProto is based). (cherry picked from commit 1ff02385944924db7e683a607da2882462594764) Co-authored-by: Martijn Pieters <mj@zopatista.com>
* [3.12] gh-113199: Make read1() and readline() of HTTPResponse close IO after ↵Miss Islington (bot)2023-12-181-2/+14
| | | | | | | reading all data (GH-113200) (GH-113259) (cherry picked from commit 41336a72b90634d5ac74a57b6826e4dd6fe78eac) Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
* [3.12] gh-61648: Detect line numbers of properties in doctests (GH-113161) ↵Miss Islington (bot)2023-12-152-0/+18
| | | | | | | (GH-113164) (cherry picked from commit 8f8f0f97e126db9ca470fd7e7b2944c150db6305) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112716: Fix SystemError when __builtins__ is not a dict ↵Serhiy Storchaka2023-12-141-0/+26
| | | | | | | | | (GH-112770) (GH-113103) It was raised in two cases: * in the import statement when looking up __import__ * in pickling some builtin type when looking up built-ins iter, getattr, etc. (cherry picked from commit 1161c14e8c68296fc465cd48970b32be9bee012e)
* [3.12] gh-113090: Fix test.support.os_support.can_chmod() on Windows ↵Miss Islington (bot)2023-12-144-6/+12
| | | | | | | (GH-113091) (GH-113099) (cherry picked from commit c6e953be125c491226adc1a5bc9c804ce256aa17) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-111049: Fix crash during garbage collection of the BytesIO buffer ↵Miss Islington (bot)2023-12-141-0/+21
| | | | | | | object (GH-111221) (GH-113096) (cherry picked from commit bb36f72efcc6a656e0907ffa83620a1e44044895) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113086: Add tests for os.chmod() and os.lchmod() (GH-113087) ↵Miss Islington (bot)2023-12-142-1/+118
| | | | | | | | (GH-113088) Also make test_copymode_symlink_to_symlink in test_shutil more strict. (cherry picked from commit b4f2c89118d5a48ce6c495ba931d7f6493422029) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] bpo-40648: Test modes that file can get with chmod() on Windows ↵Miss Islington (bot)2023-12-131-0/+7
| | | | | | | | | (GH-20130) (GH-113070) Order of tests matter second part makes testing file writable and possible to remove again. (cherry picked from commit f5c05e015c178975f24b77e5a8975a22d694e019) Co-authored-by: Pavol Babinčák‏ <scroolik@gmail.com>
* [3.12] gh-108303: Move `double_const` to `test_import` where it belongs ↵Miss Islington (bot)2023-12-112-3/+6
| | | | | | | | (GH-112108) (#112976) gh-108303: Move `double_const` to `test_import` where it belongs (GH-112108) (cherry picked from commit 0738b9a338fd27ff2d4456dd9c15801a8858ffd9) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-94606: Fix error when message with Unicode surrogate not ↵Miss Islington (bot)2023-12-111-0/+29
| | | | | | | | surrogateescaped string (GH-94641) (GH-112971) (cherry picked from commit 27a5fd8cb8c88537216d7a498eba9d9177951d76) Co-authored-by: Sidney Markowitz <sidney@sidney.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112943: Correctly compute end offsets for multiline tokens in the ↵Pablo Galindo Salgado2023-12-111-0/+10
| | | | | tokenize module (GH-112949) (#112957) (cherry picked from commit a135a6d2c6d503b186695f01efa7eed65611b04e)
* [3.12] Fix SyntaxWarning in test_syntax.py (GH-112944) (GH-112955)Miss Islington (bot)2023-12-111-1/+1
| | | | | (cherry picked from commit 97cd45bfdbb6525457ba9d6824386f1e0eea6657) Co-authored-by: Anthony Sottile <asottile@umich.edu>
* [3.12] gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905) (#112927)Miss Islington (bot)2023-12-101-0/+11
| | | | | | | | | | | | gh-109980: Fix test_tarfile_vs_tar on macOS (GH-112905) On recentish macOS versions the system tar command includes system metadata (ACLs, extended attributes and resource forks) in the tar archive, which shutil.make_archive will not do. This can cause spurious test failures. (cherry picked from commit dd2ebdf89ff144e89db180bd552c50615f712cb2) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.12] gh-110017: Disable test_signal.test_stress_modifying_handlers on ↵Miss Islington (bot)2023-12-081-0/+1
| | | | | | | | | | | | macOS (GH-112834) (#112851) gh-110017: Disable test_signal.test_stress_modifying_handlers on macOS (GH-112834) Test test_stress_modifying_handlers in test_signal can crash the interpreter due to a bug in macOS. Filed as FB13453490 with Apple. (cherry picked from commit bf0beae6a05f3266606a21e22a4d803abbb8d731) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
* [3.12] gh-112826: Fix the threading Module When _thread is Missing ↵Eric Snow2023-12-071-0/+28
| | | | | | | _is_main_interpreter() (#112850) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* [3.12] gh-79325: Fix recursion error in TemporaryDirectory cleanup on ↵Miss Islington (bot)2023-12-071-0/+11
| | | | | | | Windows (GH-112762) (GH-112847) (cherry picked from commit b2923a61a10dc2717f4662b590cc9f6d181c6983) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-91133: tempfile.TemporaryDirectory: fix symlink bug in cleanup ↵Miss Islington (bot)2023-12-071-6/+105
| | | | | | | | (GH-99930) (GH-112838) (cherry picked from commit 81c16cd94ec38d61aa478b9a452436dc3b1b524d) Co-authored-by: Søren Løvborg <sorenl@unity3d.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-110190: Temporarily skip new test introduced in gh-112604 on ↵Łukasz Langa2023-12-071-45/+52
| | | | | | | PPC64LE (GH-112818) (#112829) (cherry picked from commit 9f67042f28bf886a9bf30fed6795d26cff255f1e) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
* [3.12] gh-112125: Fix None.__ne__(None) returning NotImplemented instead of ↵Victor Stinner2023-12-071-0/+5
| | | | | | | | | … (#112827) gh-112125: Fix None.__ne__(None) returning NotImplemented instead of False (#112504) (cherry picked from commit 9c3458e05865093dd55d7608810a9d0ef0765978) Co-authored-by: andrewluotechnologies <44252973+andrewluotechnologies@users.noreply.github.com>
* [3.12] gh-109981: Fix support.fd_count() on macOS 14 (GH-112797) (#112824)Miss Islington (bot)2023-12-071-2/+9
| | | | | | | | | | | | gh-109981: Fix support.fd_count() on macOS 14 (GH-112797) Use scanning "/dev/fd/" on macOS in support.fd_count(). That's both more efficient than scanning all possible file descriptors, and avoids crashing the interpreter when there are open "guarded" file descriptors. "Guarded" file descriptors are a macOS feature where file descriptors used by system libraries are marked and cause hard crashes when used by "user" code. (cherry picked from commit 953ee622b3901d3467e65e3484dcfa75ba6fcddf) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com> Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-110190: Fix ctypes structs with array on Arm (#112604) (#112767)Diego Russo2023-12-061-2/+125
| | | | | | | | | Set MAX_STRUCT_SIZE to 32 in stgdict.c when on Arm platforms. This because on Arm platforms structs with at most 4 elements of any floating point type values can be passed through registers. If the type is double the maximum size of the struct is 32 bytes. On x86-64 Linux, it's maximum 16 bytes hence we need to differentiate. (cherry picked from commit bc68f4a4abcfbea60bb1db1ccadb07613561931c)
* [3.12] gh-75666: Tkinter: "unbind(sequence, funcid)" now only unbinds ↵Miss Islington (bot)2023-12-061-7/+27
| | | | | | | | | | | | | | | | "funcid" (GH-111322) (GH-112802) Previously, "widget.unbind(sequence, funcid)" destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now it removes only "funcid" from the binding for "sequence", keeping other commands, and deletes the "funcid" command. It leaves "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit cc7e45cc572dd818412a649970fdee579417701f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: GiovanniL <13402461+GiovaLomba@users.noreply.github.com>
* [3.12] gh-112769: test_zlib: Fix comparison of ZLIB_RUNTIME_VERSION with ↵Miss Islington (bot)2023-12-051-12/+17
| | | | | | | | non-int suffix (GH-112771) (GH-112773) zlib-ng defines the version as "1.3.0.zlib-ng". (cherry picked from commit d384813ff18b33280a90b6d2011654528a2b6ad1) Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* [3.12] bpo-35332: Handle os.close() errors in shutil.rmtree() (GH-23766) ↵Miss Islington (bot)2023-12-051-0/+35
| | | | | | | | | | | | (GH-112763) * Ignore os.close() errors when ignore_errors is True. * Pass os.close() errors to the error handler if specified. * os.close no longer retried after error. (cherry picked from commit 11d88a178b077e42025da538b890db3151a47070) Co-authored-by: Zackery Spytz <zspytz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] bpo-43153: Don't mask `PermissionError` with `NotADirectoryError` ↵Miss Islington (bot)2023-12-051-0/+11
| | | | | | | | | during tempdirectory cleanup (GH-29940) (GH-112753) (cherry picked from commit 8cdfee1bb902fd1e38d79170b751ef13a0907262) Co-authored-by: Ken Jin <kenjin@python.org> Co-authored-by: andrei kulakov <andrei.avk@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112334: Restore subprocess's use of `vfork()` & fix ↵Miss Islington (bot)2023-12-041-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | `extra_groups=[]` behavior (GH-112617) (#112731) Restore `subprocess`'s intended use of `vfork()` by default for performance on Linux; also fixes the behavior of `extra_groups=[]` which was unintentionally broken in 3.12.0: Fixed a performance regression in 3.12's :mod:`subprocess` on Linux where it would no longer use the fast-path ``vfork()`` system call when it could have due to a logic bug, instead falling back to the safe but slower ``fork()``. Also fixed a security bug introduced in 3.12.0. If a value of ``extra_groups=[]`` was passed to :mod:`subprocess.Popen` or related APIs, the underlying ``setgroups(0, NULL)`` system call to clear the groups list would not be made in the child process prior to ``exec()``. The security issue was identified via code inspection in the process of fixing the first bug. Thanks to @vain for the detailed report and analysis in the initial bug on Github. (cherry picked from commit 9fe7655c6ce0b8e9adc229daf681b6d30e6b1610) + Reword NEWS for the bugfix/security release. (mentions the assigned CVE number) Co-authored-by: Gregory P. Smith [Google LLC] <greg@krypto.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-108927: Fix removing testing modules from sys.modules (GH-108952) ↵Miss Islington (bot)2023-12-047-9/+63
| | | | | | | | | (ПР-112711) It breaks import machinery if the test module has submodules used in other tests. (cherry picked from commit e08b70fab1fbc45fa498020aac522ae1d5da6136) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-109786: Fix leaks and crash when re-enter ↵Miss Islington (bot)2023-12-041-0/+72
| | | | | | | itertools.pairwise.__next__() (GH-109788) (GH-112699) (cherry picked from commit 6ca9d3e0173c38e2eac50367b187d4c1d43f9892) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-112625: Protect bytearray from being freed by misbehaving iterator ↵Miss Islington (bot)2023-12-041-0/+17
| | | | | | | inside bytearray.join (GH-112626) (GH-112693) (cherry picked from commit 0e732d0997cff08855d98c17af4dd5527f10e419) Co-authored-by: chilaxan <chilaxan@gmail.com>
* [3.12] gh-112645: remove deprecation warning for use of onerror in ↵Irit Katriel2023-12-031-10/+5
| | | | | | | shutil.rmtree (#112659) (#112665) gh-112645: remove deprecation warning for use of onerror in shutil.rmtree (#112659) (cherry picked from commit 97857ac0580057c3a4f75d34209841c81ee11a96)
* [3.12] gh-112618: Make Annotated cache typed (#112619) (#112628)Alex Waygood2023-12-031-0/+34
|
* [3.12] gh-109413: libregrtest: Backport `.py`-file changes from #112558 ↵Alex Waygood2023-12-017-12/+18
| | | | (#112605)
* [3.12] gh-109413: libregrtest: enable mypy's `--strict-optional` check on ↵Alex Waygood2023-12-014-4/+48
| | | | | | | most files (#112586) (#112602) gh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (#112586) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-109413: regrtest: add WorkerRunTests class (GH-112588) (#112593)Miss Islington (bot)2023-12-014-22/+28
| | | | | | gh-109413: regrtest: add WorkerRunTests class (GH-112588) (cherry picked from commit f8ff80f63536e96b004d29112452a8f1738fde37) Co-authored-by: Victor Stinner <vstinner@python.org>