summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [3.12] GH-112215: Backport C recursion changes (GH-115083)Mark Shannon2024-02-137-18/+36
|
* [3.12] gh-114563: C decimal falls back to pydecimal for unsupported format ↵John Belmonte2024-02-121-0/+22
| | | | | | | | | | | | | | | | | | | | | strings (GH-114879) (GH-115353) Immediate merits: * eliminate complex workarounds for 'z' format support (NOTE: mpdecimal recently added 'z' support, so this becomes efficient in the long term.) * fix 'z' format memory leak * fix 'z' format applied to 'F' * fix missing '#' format support Suggested and prototyped by Stefan Krah. Fixes gh-114563, gh-91060 (cherry picked from commit 72340d15cdfdfa4796fdd7c702094c852c2b32d2) Co-authored-by: John Belmonte <john@neggie.net> Co-authored-by: Stefan Krah <skrah@bytereef.org>
* [3.12] gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286) (#115359)Miss Islington (bot)2024-02-121-0/+3
| | | | | | gh-115285: Fix `test_dataclasses` with `-OO` mode (GH-115286) (cherry picked from commit 4297d7301b97aba2e0df9f9cc5fa4010e53a8950) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115233: Fix an example in the Logging Cookbook (GH-115325) (GH-115355)Serhiy Storchaka2024-02-122-17/+101
| | | | | | Also add more tests for LoggerAdapter. Also support stacklevel in LoggerAdapter._log(). (cherry picked from commit 91822018eeba12a6c9eabbc748363b2fd4291b30)
* [3.12] gh-97959: Fix rendering of routines in pydoc (GH-113941) (GH-115296)Serhiy Storchaka2024-02-114-52/+315
| | | | | | | | | | * Class methods no longer have "method of builtins.type instance" note. * Corresponding notes are now added for class and unbound methods. * Method and function aliases now have references to the module or the class where the origin was defined if it differs from the current. * Bound methods are now listed in the static methods section. * Methods of builtin classes are now supported as well as methods of Python classes. (cherry picked from commit 2939ad02be62110ffa2ac6c4d9211c85e1d1720f)
* [3.12] gh-115011: Improve support of __index__() in setters of members with ↵Serhiy Storchaka2024-02-111-30/+14
| | | | | | | | | | | | | | unsigned integer type (GH-115029) (GH-115294) Setters for members with an unsigned integer type now support the same range of valid values for objects that has a __index__() method as for int. Previously, Py_T_UINT, Py_T_ULONG and Py_T_ULLONG did not support objects that has a __index__() method larger than LONG_MAX. Py_T_ULLONG did not support negative ints. Now it supports them and emits a RuntimeWarning. (cherry picked from commit d9d6909697501a2604d5895f9f88aeec61274ab0)
* [3.12] gh-79382: Fix recursive glob() with trailing "**" (GH-115134) (GH-115290)Miss Islington (bot)2024-02-112-1/+13
| | | | | | | Trailing "**" no longer allows to match files and non-existing paths in recursive glob(). (cherry picked from commit aeffc7f8951e04258f0fd8cadfa6cd8b704730f6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-115133: Fix tests for XMLPullParser with Expat 2.6.0 (GH-115164) ↵Miss Islington (bot)2024-02-111-22/+36
| | | | | | | | | (GH-115288) Feeding the parser by too small chunks defers parsing to prevent CVE-2023-52425. Future versions of Expat may be more reactive. (cherry picked from commit 4a08e7b3431cd32a0daf22a33421cd3035343dc4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-115274: Fix direct invocation of `testmock/testpatch.py` ↵Miss Islington (bot)2024-02-111-1/+1
| | | | | | | | (GH-115275) (#115280) gh-115274: Fix direct invocation of `testmock/testpatch.py` (GH-115275) (cherry picked from commit f8e9c57067e32baab4ed2fd824b892c52ecb7225) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (#115277)Miss Islington (bot)2024-02-111-1/+5
| | | | | | gh-115249: Fix `test_descr` with `-OO` mode (GH-115250) (cherry picked from commit 1f23837277e604f41589273aeb3a10377d416510) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115254: Fix `test_property` with `-00` mode (GH-115255) (#115261)Miss Islington (bot)2024-02-111-0/+1
| | | | | | gh-115254: Fix `test_property` with `-00` mode (GH-115255) (cherry picked from commit b70a68fbd6b72a25b5ef430603e39c9e40f40d29) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115252: Fix `test_enum` with `-OO` mode (GH-115253) (GH-115260)Miss Islington (bot)2024-02-111-3/+14
| | | | | (cherry picked from commit 33f56b743285f8419e92cfabe673fa165165a580) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115059: Remove debugging code in test_io (GH-115240) (GH-115244)Miss Islington (bot)2024-02-101-30/+0
| | | | | (cherry picked from commit 597fad07f7bf709ac7084ac20aa3647995759b01) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114552: Update `__dir__` method docs: it allows returning an ↵Miss Islington (bot)2024-02-101-0/+8
| | | | | | | | iterable (GH-114662) (#115234) gh-114552: Update `__dir__` method docs: it allows returning an iterable (GH-114662) (cherry picked from commit e19103a346f0277c44a43dfaebad9a5aa468bf1e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) ↵Miss Islington (bot)2024-02-092-1/+24
| | | | | | | | | | | (#115227) gh-115165: Fix `typing.Annotated` for immutable types (GH-115213) The return value from an annotated callable can raise any exception from __setattr__ for the `__orig_class__` property. (cherry picked from commit 564385612cdf72c2fa8e629a68225fb2cd3b3d99) Co-authored-by: dave-shawley <daveshawley@gmail.com>
* [3.12] gh-115059: Flush the underlying write buffer in ↵Miss Islington (bot)2024-02-091-0/+52
| | | | | | | io.BufferedRandom.read1() (GH-115163) (GH-115205) (cherry picked from commit 846fd721d518dda88a7d427ec3d2c03c45d9fa90) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114071: [Enum] update docs and code for tuples/subclasses ↵Miss Islington (bot)2024-02-082-2/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | (GH-114871) (GH-114993) Update documentation with `__new__` and `__init__` entries. Support use of `auto()` in tuple subclasses on member assignment lines. Previously, auto() was only supported on the member definition line either solo or as part of a tuple: RED = auto() BLUE = auto(), 'azul' However, since Python itself supports using tuple subclasses where tuples are expected, e.g.: from collections import namedtuple T = namedtuple('T', 'first second third') def test(one, two, three): print(one, two, three) test(*T(4, 5, 6)) GH- 4 5 6 it made sense to also support tuple subclasses in enum definitions. (cherry picked from commit ff7588b729a2a414ea189a2012904da3fbd1401c) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.12] gh-115146: Fix typo in pickletools.py documentation (GH-115148) ↵Miss Islington (bot)2024-02-081-1/+1
| | | | | | | (GH-115155) (cherry picked from commit 4a7f63869aa61b24a7cc2d33f8a5e5a7fd0d76a4) Co-authored-by: Justin Applegate <70449145+Legoclones@users.noreply.github.com>
* [3.12] gh-114828: Fix __class__ in class-scope inlined comprehensions ↵Miss Islington (bot)2024-02-071-0/+12
| | | | | | | | (GH-115139) (#115140) gh-114828: Fix __class__ in class-scope inlined comprehensions (GH-115139) (cherry picked from commit fedbf77191ea9d6515b39f958cc9e588d23517c9) Co-authored-by: Carl Meyer <carl@oddbird.net>
* [3.12] gh-103224: Resolve paths properly in test_sysconfig (GH-103292) ↵Miss Islington (bot)2024-02-071-14/+23
| | | | | | | | | | (GH-115100) To pass tests when executed through a Python symlink. (cherry picked from commit 71239d50b54c90afd3fdde260848e0c6d73a5c27) Co-authored-by: Artem Mukhin <artem.m.mukhin@gmail.com> Co-authored-by: Miro Hrončok <miro@hroncok.cz>
* Python 3.12.2v3.12.2Thomas Wouters2024-02-061-278/+354
|
* [3.12] GH-gh-75705: Set unixfrom envelope in mailbox._mboxMMDF (GH-107117) ↵Miss Islington (bot)2024-02-062-3/+14
| | | | | | | (GH-115098) (cherry picked from commit 76108b8b05040fc49a6bc50eb2e990576595c57c) Co-authored-by: Matthieu Caneill <matthieucan@users.noreply.github.com>
* [3.12] gh-106233: Fix stacklevel in zoneinfo.InvalidTZPathWarning ↵Miss Islington (bot)2024-02-062-11/+30
| | | | | | | (GH-106234) (GH-115081) (cherry picked from commit d7334e2c2012defaf7aae920d6a56689464509d1) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-115015: Argument Clinic: fix generated code for METH_METHOD ↵Erlend E. Aasland2024-02-062-2/+23
| | | | | methods without params (#115016) (#115067) (cherry picked from commit 09096a1647913526a3d4fa69a9d2056ec82a8f37)
* [3.12] gh-109475: Fix support of explicit option value "--" in argparse ↵Miss Islington (bot)2024-02-052-1/+17
| | | | | | | | (GH-114814) (GH-115036) For example "--option=--". (cherry picked from commit 4aa4f0906df9fc9c6c6f6657f2c521468c6b1688) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114887 Reject only sockets of type SOCK_STREAM in create_da… ↵Travis Howse2024-02-042-3/+3
| | | | | | | | | (#114980) Also improve exception message. (cherry picked from commit 94ec2b9c9ce898723c3fe61fbc64d6c8f4f68700) Co-authored-by: Donghee Na <donghee.na92@gmail.com>
* [3.12] gh-114392: Improve test_capi.test_structmembers (GH-114393) (GH-115010)Miss Islington (bot)2024-02-041-124/+93
| | | | | | | | Test all integer member types with extreme values and values outside of the valid range. Test support of integer-like objects. Test warnings for wrapped out values. (cherry picked from commit 15f6f048a6ecdf0f6f4fc076d013be3d110f8ed6) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113803: Fix inaccurate documentation for shutil.move when dst is ↵Miss Islington (bot)2024-02-041-5/+5
| | | | | | | | | an existing directory (GH-113837) (#115006) * fix the usage of dst and destination in shutil.move doc * update shutil.move doc (cherry picked from commit da8f9fb2ea65cc2784c2400fc39ad8c800a67a42) Co-authored-by: Dai Wentao <dwt136@gmail.com>
* [3.12] gh-114388: Fix warnings when assign an unsigned integer member ↵Serhiy Storchaka2024-02-041-0/+37
| | | | | | | | | | (GH-114391) (GH-115001) * Fix a RuntimeWarning emitted when assign an integer-like value that is not an instance of int to an attribute that corresponds to a C struct member of type T_UINT and T_ULONG. * Fix a double RuntimeWarning emitted when assign a negative integer value to an attribute that corresponds to a C struct member of type T_UINT. (cherry picked from commit 3ddc5152550ea62280124c37d0b4339030ff7df4)
* [3.12] gh-113951: Tkinter: "tag_unbind(tag, sequence, funcid)" now only ↵Miss Islington (bot)2024-02-042-11/+110
| | | | | | | | | | | | | | unbinds "funcid" (GH-113955) (GH-114997) Previously, "tag_unbind(tag, sequence, funcid)" methods of Text and Canvas widgets destroyed the current binding for "sequence", leaving "sequence" unbound, and deleted the "funcid" command. Now they remove only "funcid" from the binding for "sequence", keeping other commands, and delete the "funcid" command. They leave "sequence" unbound only if "funcid" was the last bound command. (cherry picked from commit 7e42fddf608337e83b30401910d76fd75d5cf20a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113280: Always close socket if SSLSocket creation failed ↵Miss Islington (bot)2024-02-042-64/+76
| | | | | | | | (GH-114659) (GH-114995) (cherry picked from commit 0ea366240b75380ed7568acbe95d72e481a734f7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* [3.12] gh-113267: Revert "gh-106584: Fix exit code for unittest in Python ↵Miss Islington (bot)2024-02-044-16/+12
| | | | | | | | 3.12 (GH-106588)" (GH-114470) (GH-114994) This reverts commit 8fc071345b50dd3de61ebeeaa287ccef21d061b2. (cherry picked from commit ecabff98c41453f15ecd26ac255d531b571b9bc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114965: Updated bundled pip to 24.0 (gh-114966) (gh-114971)Stéphane Bidoul2024-02-032-1/+1
| | | | | | | gh-114965: Updated bundled pip to 24.0 (gh-114966) Updated bundled pip to 24.0 (cherry picked from commit a4c298c1494b602a9650b597aad50b48e3fa1f41)
* [3.12] gh-114959: tarfile: do not ignore errors when extract a directory on ↵Miss Islington (bot)2024-02-034-1/+218
| | | | | | | | top of a file (GH-114960) (GH-114963) Also, add tests common to tarfile and zipfile. (cherry picked from commit 96bce033c4a4da7112792ba335ef3eb9a3eb0da0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Bump ruff to 0.2.0 (GH-114932) (#114935)Miss Islington (bot)2024-02-021-3/+5
| | | | | | Bump ruff to 0.2.0 (GH-114932) (cherry picked from commit 920b89f62751e64a35fa1bebc03701af6d6f31f2) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.12] gh-103820: IDLE: Do not interpret buttons 4/5 as scrolling on non-X11 ↵Miss Islington (bot)2024-02-023-14/+23
| | | | | | | | | (GH-103821) (GH-114901) Also fix test_mousewheel: do not skip a check which was broken due to incorrect delta on Aqua and XQuartz, and probably not because of `.update_idletasks()`. (cherry picked from commit d25d4ee60cc789a8b9c222859bb720ade1ab2e30) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.12] gh-105089: Fix test_create_directory_with_write test failure in AIX ↵Miss Islington (bot)2024-02-011-1/+1
| | | | | | | (GH-105228) (GH-114860) (cherry picked from commit 4dbb198d279a06fed74ea4c38f93d658baf38170) Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
* [3.12] gh-107461 ctypes: Add a testcase for nested `_as_parameter_` lookup ↵Miss Islington (bot)2024-02-011-0/+11
| | | | | | | (GH-107462) (GH-114858) (cherry picked from commit 0bf42dae7e73febc76ea96fd58af6b765a12b8a7) Co-authored-by: Tomas R <tomas.roun8@gmail.com>
* [3.12] gh-109534: fix reference leak when SSL handshake fails (GH-114074) ↵Miss Islington (bot)2024-02-012-0/+5
| | | | | | | | (#114829) gh-109534: fix reference leak when SSL handshake fails (GH-114074) (cherry picked from commit 80aa7b3688b8fdc85cd53d4113cb5f6ce5500027) Co-authored-by: Jamie Phan <jamie@ordinarylab.dev>
* [3.12] gh-114737: Revert change to ElementTree.iterparse "root" attribute ↵Miss Islington (bot)2024-01-312-1/+3
| | | | | | | | | | (GH-114755) (GH-114798) Prior to gh-114269, the iterator returned by ElementTree.iterparse was initialized with the root attribute as None. This restores the previous behavior. (cherry picked from commit 66f95ea6a65deff547cab0d312b8c8c8a4cf8beb) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.12] gh-106392: Fix inconsistency in deprecation warnings in datetime ↵Miss Islington (bot)2024-01-311-3/+3
| | | | | | | | module (GH-114761) (#114767) gh-106392: Fix inconsistency in deprecation warnings in datetime module (GH-114761) (cherry picked from commit dc4cd2c9ba60e2ee7e534e2f6e93c4c135df23b9) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Remove limit in calendar CLI help message for year arg (GH-114719) ↵Miss Islington (bot)2024-01-291-1/+1
| | | | | | | | (GH-114722) The limit was removed in 66c88ce30ca2b23daa37038e1a3c0de98f241f50 (GH-4109). (cherry picked from commit 0f54ee4c6cdba74492183eb2dd142393c7dba403) Co-authored-by: Steven Ward <planet36@users.noreply.github.com>
* [3.12] gh-114100: Remove superfluous writing to fd 1 in test_pty (GH-114647) ↵Miss Islington (bot)2024-01-271-1/+21
| | | | | | | (GH-114655) (cherry picked from commit 7a470541e2bbc6f3e87a6d813e2ec42cf726de7a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-77749: Fix inconsistent behavior of non-ASCII handling in ↵Miss Islington (bot)2024-01-262-1/+25
| | | | | | | | | | EmailPolicy.fold() (GH-6986) (GH-114606) It now always encodes non-ASCII characters in headers if utf8 is false. (cherry picked from commit 504334c7be5a56237df2598d338cd494a42fca4c) Co-authored-by: Rito Takeuchi <licht-t@outlook.jp> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-114561: Mark some tests in `test_wincosoleio` with ↵Miss Islington (bot)2024-01-251-1/+4
| | | | | | | `requires_resource('console')` decorator (GH-114565) (cherry picked from commit 33ae9895d4ac0d88447e529038bc4725ddd8c291) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-77465: Increase test coverage for the numbers module (GH-111738) ↵Miss Islington (bot)2024-01-251-1/+157
| | | | | | | | (GH-114556) (cherry picked from commit e721adf4bd47b20ba0a93ad6471084de31bf20c7) Co-authored-by: AN Long <aisk@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-114440: Close writer pipe in multiprocessing.Queue, not ↵Petr Viktorin2024-01-242-5/+5
| | | | | | | | | | | | | | | concurrent.futures (GH-114489) This was left out of the 3.12 backport for three related issues: - gh-107219 (which adds `self.call_queue._writer.close()` to `_ExecutorManagerThread` in `concurrent.futures`) - gh-109370 (which changes this to be only called on Windows) - gh-109047 (which moves the call to `multiprocessing.Queue`'s `_terminate_broken`) Without this change, ProcessPoolExecutor sometimes hangs on Windows when a worker process is terminated. Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-113205: test_multiprocessing.test_terminate: Give tasks a chance ↵Miss Islington (bot)2024-01-241-0/+1
| | | | | | | to start (GH-114249) (GH-114516) (cherry picked from commit ce75b4c26d18dcd840fd2e7ee362a84209648d06) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-101438: Avoid reference cycle in ElementTree.iterparse. ↵Miss Islington (bot)2024-01-231-10/+17
| | | | | | | | | | (GH-114269) (GH-114499) The iterator returned by ElementTree.iterparse() may hold on to a file descriptor. The reference cycle prevented prompt clean-up of the file descriptor if the returned iterator was not exhausted. (cherry picked from commit ce01ab536f22a3cf095d621f3b3579c1e3567859) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.12] gh-108303: Move `.whl` test files to `Lib/test/wheeldata/` ↵Miss Islington (bot)2024-01-233-1/+3
| | | | | | | | (GH-114343) (#114488) gh-108303: Move `.whl` test files to `Lib/test/wheeldata/` (GH-114343) (cherry picked from commit ba253a4794ae2d35a6f6df46a98a1ed38bd61268) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>