summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.12.4v3.12.4Thomas Wouters2024-06-0671-165/+0
|
* [3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) ↵Jelle Zijlstra2024-06-042-0/+4
| | | | | | | | | | (#119644) * [3.12] gh-119311: Fix name mangling with PEP 695 generic classes (#119464) Fixes #119311. Fixes #119395. (cherry picked from commit a9a74da4a0ca0645f049e67b6434a95e30592c32)
* [3.12] gh-89928: Fix integer conversion of device numbers (GH-31794) (GH-120054)Serhiy Storchaka2024-06-041-0/+3
| | | | | | Fix os.major(), os.minor() and os.makedev(). Support device numbers larger than 2**63-1. Support non-existent device number (NODEV). (cherry picked from commit 7111d9605f9db7aa0b095bb8ece7ccc0b8115c3f)
* [3.12] gh-119819: Fix regression to allow logging configuration with ↵Miss Islington (bot)2024-06-041-0/+2
| | | | | multipr… (GH-120030) (GH-120034) (cherry picked from commit 99d945c0c006e3246ac00338e37c443c6e08fc5c)
* [3.12] gh-118868: logging QueueHandler fix passing of kwargs (GH-118869) ↵Miss Islington (bot)2024-06-041-0/+2
| | | | | (GH-120031) (cherry picked from commit dce14bb2dce7887df40ae5c13b0d13e0dafceff7)
* [3.12] gh-116145: Update macOS installer to Tcl/Tk 8.6.14 (GH-116151) ↵Miss Islington (bot)2024-06-011-0/+1
| | | | | | (GH-119922) (cherry picked from commit 4fa95c6ec392b9fc80ad720cc4a8bd2786fc2835) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* [3.12] GH-89727: Fix `shutil.rmtree()` recursion error on deep trees ↵Barney Gale2024-06-011-0/+2
| | | | | | | | | (GH-119808) (#119919) Implement `shutil._rmtree_safe_fd()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. `shutil._rmtree_unsafe()` was fixed in a150679f90. (cherry picked from commit 53b1981fb0cda6c656069e992f172fc6aad7c99c)
* [3.12] gh-113892: Add a extra check to `ProactorEventLoop.sock_connect` to ↵Miss Islington (bot)2024-06-011-0/+3
| | | | | | | ensure that the given socket is in non-blocking mode (GH-119519) (#119913) (cherry picked from commit cf3bba3f0671d2c9fee099e3ab0f78b98b176131) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) ↵Victor Stinner2024-06-011-3/+0
| | | | | | | | | | (#1… (#119905) Revert "[3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)" This reverts commit 078da88ad19e8f7474b6943edd39b7e61511bd20. The change modified how negative values, like termios.TIOCSWINSZ, was treated and is actually backward incompatible.
* [3.12] gh-119821: Support non-dict globals in LOAD_FROM_DICT_OR_GLOBALS ↵Jelle Zijlstra2024-06-011-0/+2
| | | | | | | | | | | (#119822) (#119890) The implementation basically copies LOAD_GLOBAL. Possibly it could be deduplicated, but that seems like it may get hairy since the two operations have different operands. This is important to fix in 3.14 for PEP 649, but it's a bug in earlier versions too, and we should backport to 3.13 and 3.12 if possible. (cherry picked from commit 80a4e3899420faaa012c82b4e82cdb6675a6a944)
* [3.12] gh-119585: Fix crash involving `PyGILState_Release()` and ↵Sam Gross2024-05-311-0/+5
| | | | | | | | | | | `PyThreadState_Clear()` (GH-119753) (#119861) Make sure that `gilstate_counter` is not zero in when calling `PyThreadState_Clear()`. A destructor called from `PyThreadState_Clear()` may call back into `PyGILState_Ensure()` and `PyGILState_Release()`. If `gilstate_counter` is zero, it will try to create a new thread state before the current active thread state is destroyed, leading to an assertion failure or crash. (cherry picked from commit bcc1be39cb1d04ad9fc0bd1b9193d3972835a57c)
* [3.12] gh-103194: Fix Tkinter’s Tcl value type handling for Tcl 8.7/9.0 ↵Serhiy Storchaka2024-05-311-0/+4
| | | | | | | | | | | (GH-103846) (GH-119831) Some of standard Tcl types were renamed, removed, or no longer registered in Tcl 8.7/9.0. This change fixes automatic conversion of Tcl values to Python values to avoid returning a Tcl_Obj where the primary Python types (int, bool, str, bytes) were returned in older Tcl. (cherry picked from commit 94e9585e99abc2d060cedc77b3c03e06b4a0a9c4) Co-authored-by: Christopher Chavez <chrischavez@gmx.us>
* gh-119690: Adds Unicode support for named pipes in _winapi (GH-119717)Steve Dower2024-05-301-0/+1
| | | Also backports a minor improvement to test_audit.
* [3.12] GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) ↵Miss Islington (bot)2024-05-301-0/+3
| | | | | | | | | | | (#119765) GH-89727: Fix `os.fwalk()` recursion error on deep trees (GH-119638) Implement `os.fwalk()` using a list as a stack to avoid emitting recursion errors on deeply nested trees. (cherry picked from commit 3c890b503c740767d0eb9a0e74b47f17a1e69452) Co-authored-by: Barney Gale <barney.gale@gmail.com>
* [3.12] GH-89727: Partially fix `shutil.rmtree()` recursion error on deep ↵Barney Gale2024-05-291-0/+3
| | | | | | | | | | | | | | trees (GH-119634) (#119749) * GH-89727: Partially fix `shutil.rmtree()` recursion error on deep trees (#119634) Make `shutil._rmtree_unsafe()` call `os.walk()`, which is implemented without recursion. `shutil._rmtree_safe_fd()` is not affected and can still raise a recursion error. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit a150679f90c6e3f017bd75cac3b8f727063cc4aa)
* gh-119070: Fix py.exe handling of /usr/bin/env commands missing extension ↵Steve Dower2024-05-291-0/+3
| | | | (GH-119426)
* [3.12] gh-119118: Fix performance regression in tokenize module (GH-119615) ↵Miss Islington (bot)2024-05-281-0/+2
| | | | | | | | | | | | | (#119683) - Cache line object to avoid creating a Unicode object for all of the tokens in the same line. - Speed up byte offset to column offset conversion by using the smallest buffer possible to measure the difference. (cherry picked from commit d87b0151062e36e67f9e42e1595fba5bf23a485c) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
* [3.12] gh-119011: `type.__type_params__` now return an empty tuple ↵Jelle Zijlstra2024-05-281-0/+2
| | | | | | | (GH-119296) (#119681) (cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* gh-118263: Add additional arguments to path_t (Argument Clinic type) in ↵Nice Zombies2024-05-281-0/+1
| | | | posixmodule (GH-119608)
* [3.12] gh-69214: Fix fcntl.ioctl() request type (#119498) (#119505)Victor Stinner2024-05-241-0/+3
| | | | | | | | gh-69214: Fix fcntl.ioctl() request type (#119498) Use an 'unsigned long' instead of an 'unsigned int' for the request parameter of fcntl.ioctl() to support requests larger than UINT_MAX. (cherry picked from commit 92fab3356f4c61d4c73606e4fae705c6d8f6213b)
* [3.12] gh-119213: Be More Careful About _PyArg_Parser.kwtuple Across ↵Eric Snow2024-05-221-0/+3
| | | | | | | | | | | Interpreters (gh-119331) (gh-119425) _PyArg_Parser holds static global data generated for modules by Argument Clinic. The _PyArg_Parser.kwtuple field is a tuple object, even though it's stored within a static global. In some cases the tuple is statically allocated and thus it's okay that it gets shared by multiple interpreters. However, in other cases the tuple is set lazily, allocated from the heap using the active interprepreter at the point the tuple is needed. This is a problem once that interpreter is destroyed since _PyArg_Parser.kwtuple becomes at dangling pointer, leading to crashes. It isn't a problem if the tuple is allocated under the main interpreter, since its lifetime is bound to the lifetime of the runtime. The solution here is to temporarily switch to the main interpreter. The alternative would be to always statically allocate the tuple. This change also fixes a bug where only the most recent parser was added to the global linked list. (cherry picked from commit 81865002aee8eaaeb3c7e402f86183afa6de77bf)
* gh-118507 : Refactor ntpath native functions (gh-119381)Nice Zombies2024-05-221-0/+1
| | | | This refactoring will make future backports easier without changing behaviours, apart from correcting a bug when passing a pipe to `ntpath.isfile`.
* [3.12] gh-118643: Fix AttributeError in the email module (GH-119099) (GH-119390)Miss Islington (bot)2024-05-221-0/+2
| | | | | | | | | | Fix regression introduced in gh-100884: AttributeError when re-fold a long address list. Also fix more cases of incorrect encoding of the address separator in the address list missed in gh-100884. (cherry picked from commit 858b9e85fcdd495947c9e892ce6e3734652c48f2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] Docs: Ensure no warnings are found in the NEWS file before a given ↵Hugo van Kemenade2024-05-215-7/+7
| | | | line number (GH-119221) (#119266)
* [3.12] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) ↵Miss Islington (bot)2024-05-211-0/+3
| | | | | | | | | | | windows blurry (GH-119175) (#119290) gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) ------ (cherry picked from commit 538ed5e4818aa0d0aa759634e8bfa23e317434a1) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
* [3.12] gh-119050: Add XML support to libregrtest refleak checker (#119148) ↵Victor Stinner2024-05-201-0/+2
| | | | | | | | | | | | | | | (#119272) gh-119050: Add XML support to libregrtest refleak checker (#119148) regrtest test runner: Add XML support to the refleak checker (-R option). * run_unittest() now stores XML elements as string, rather than objects, in support.junit_xml_list. * runtest_refleak() now saves/restores XML strings before/after checking for reference leaks. Save XML into a temporary file. (cherry picked from commit 9257731f5d3e9d4f99e314b23a14506563e167d7)
* [3.12] gh-92081: Fix for email.generator.Generator with whitespace between ↵Miss Islington (bot)2024-05-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | encoded words. (GH-92281) (#119246) * Fix for email.generator.Generator with whitespace between encoded words. email.generator.Generator currently does not handle whitespace between encoded words correctly when the encoded words span multiple lines. The current generator will create an encoded word for each line. If the end of the line happens to correspond with the end real word in the plaintext, the generator will place an unencoded space at the start of the subsequent lines to represent the whitespace between the plaintext words. A compliant decoder will strip all the whitespace from between two encoded words which leads to missing spaces in the round-tripped output. The fix for this is to make sure that whitespace between two encoded words ends up inside of one or the other of the encoded words. This fix places the space inside of the second encoded word. A second problem happens with continuation lines. A continuation line that starts with whitespace and is followed by a non-encoded word is fine because the newline between such continuation lines is defined as condensing to a single space character. When the continuation line starts with whitespace followed by an encoded word, however, the RFCs specify that the word is run together with the encoded word on the previous line. This is because normal words are filded on syntactic breaks by encoded words are not. The solution to this is to add the whitespace to the start of the encoded word on the continuation line. Test cases are from GH-92081 * Rename a variable so it's not confused with the final variable. (cherry picked from commit a6fdb31b6714c9f3c65fefbb3fe388b2b139a75f) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
* [3.12] gh-118997: Fix _Py_ClearImmortal() assertion (#119001)Victor Stinner2024-05-181-0/+4
| | | | | | Fix _Py_ClearImmortal() assertion: use _Py_IsImmortal() to tolerate reference count lower than _Py_IMMORTAL_REFCNT. Fix the assertion for the stable ABI, when a C extension is built with Python 3.11 or lower.
* [3.12] gh-67693: Fix urlunparse() and urlunsplit() for URIs with path ↵Miss Islington (bot)2024-05-141-0/+2
| | | | | | | starting with multiple slashes and no authority (GH-113563) (GH-119024) (cherry picked from commit e237b25a4fa5626fcd1b1848aa03f725f892e40e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-58933: Make pdb return to caller frame correctly when f_trace is ↵Tian Gao2024-05-131-0/+1
| | | | | | | | | | not set (GH-118979) (#119008) * [3.12] gh-58933: Make pdb return to caller frame correctly when f_trace is not set (GH-118979) (cherry picked from commit f526314194f7fd15931025f8a4439c1765666e42) Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
* [3.12] gh-87106: Fix inspect.signature.bind() handling of positional-only ↵Miss Islington (bot)2024-05-131-0/+3
| | | | | | | arguments with **kwargs (GH-103404) (GH-118984) (cherry picked from commit 9c1520244151f36e010c1b04bedf14747a28517d) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* gh-118486: Support mkdir(mode=0o700) on Windows (GH-118488)Steve Dower2024-05-091-0/+4
|
* [3.12] gh-103956: Fix `trace` output in case of missing source line ↵Miss Islington (bot)2024-05-091-0/+1
| | | | | | | | (GH-103958) (GH-118832) Print only filename with lineno if linecache.getline() returns an empty string. (cherry picked from commit 7c87ce777b3fd9055b118a58ec8614901ecb45e9) Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
* [3.12] gh-118033: Fix `__weakref__` not set for generic dataclasses ↵Miss Islington (bot)2024-05-091-0/+2
| | | | | | | | (GH-118099) (#118822) gh-118033: Fix `__weakref__` not set for generic dataclasses (GH-118099) (cherry picked from commit fa9b9cb11379806843ae03b1e4ad4ccd95a63c02) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode ↵Miss Islington (bot)2024-05-071-0/+1
| | | | | | | | | | | | | | (GH-118320) (GH-118691) gh-118314: Fix padding edge case in binascii.a2b_base64 strict mode (GH-118320) Fix an edge case in `binascii.a2b_base64` strict mode, where excessive padding was not detected when no padding is necessary. (cherry picked from commit fe47d9bee319528ffeb5fd60a615d7f02c7b5585) Co-authored-by: Youfu Zhang <1315097+zhangyoufu@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
* [3.12] gh-118164: Break a loop between _pydecimal and _pylong and optimize ↵Miss Islington (bot)2024-05-061-0/+4
| | | | | | | | | | | | | | | | | | | | | | | int to str conversion (GH-118483) (GH-118590) For converting large ints to strings, CPython invokes a function in _pylong.py, which uses the decimal module to implement an asymptotically waaaaay sub-quadratic algorithm. But if the C decimal module isn't available, CPython uses _pydecimal.py instead. Which in turn frequently does str(int). If the int is very large, _pylong ends up doing the work, which in turn asks decimal to do "big" arithmetic, which in turn calls str(big_int), which in turn ... it can become infinite mutual recursion. This change introduces a different int->str function that doesn't use decimal. It's asymptotically worse, "Karatsuba time" instead of quadratic time, so still a huge improvement. _pylong switches to that when the C decimal isn't available. It is also used for not too large integers (less than 450_000 bits), where it is faster (up to 2 times for 30_000 bits) than the asymptotically better implementation that uses the C decimal. (cherry picked from commit 711c80bfca5dd17cb7c6ec26f0e44848b33aec04) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Tim Peters <tim.peters@gmail.com>
* [3.12] gh-78955: Use user-selected color theme for Help => IDLE Doc ↵Miss Islington (bot)2024-05-061-0/+1
| | | | | | | | (GH-9502) (#118632) gh-78955: Use user-selected color theme for Help => IDLE Doc (GH-9502) (cherry picked from commit 7758be431807d574e0f1bbab003796585ae46719) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.12] gh-118164: str(10**10000) hangs if the C _decimal module is missing ↵Miss Islington (bot)2024-05-051-0/+1
| | | | | | | | | | | | | (GH-118503) (GH-118584) Serhiy and I independently concluded that exact powers of 10 aren't possible in these contexts, so just checking the string length is sufficient. (cherry picked from commit 999f0c512281995fb61a0d9eda075fd846e8c505) Co-authored-by: Tim Peters <tim.peters@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-118513: Fix sibling comprehensions with a name bound in one and ↵Miss Islington (bot)2024-05-031-0/+1
| | | | | | | | | | global in the other (GH-118526) (#118548) gh-118513: Fix sibling comprehensions with a name bound in one and global in the other (GH-118526) (cherry picked from commit c8deb1e4b495bf97ab00c710dfd63f227e1fb645) Co-authored-by: Carl Meyer <carl@oddbird.net> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-90848: Fixed create_autospec ignoring configure_mock style kwargs ↵Miss Islington (bot)2024-05-021-0/+1
| | | | | | | | (GH-118163) (#118517) gh-90848: Fixed create_autospec ignoring configure_mock style kwargs (GH-118163) (cherry picked from commit b28a3339e4c63ea3a801dba9bbbc6af5af42c3a0) Co-authored-by: infohash <46137868+infohash@users.noreply.github.com>
* [3.12] gh-118272: Clear generator frame's locals when the generator is ↵Irit Katriel2024-05-021-0/+2
| | | | closed (#118451)
* [3.12] GH-117881: fix athrow().throw()/asend().throw() concurrent access ↵Thomas Grainger2024-05-021-0/+1
| | | | | | | (GH-117882) (#118458) GH-117881: fix athrow().throw()/asend().throw() concurrent access (GH-117882) (cherry picked from commit fc7e1aa3c001bbce25973261fba457035719a559)
* [3.12] gh-116767: fix crash on 'async with' with many context managers ↵Irit Katriel2024-05-011-0/+1
| | | | | | | | | | | | (GH-118348) (#118477) gh-116767: fix crash on 'async with' with many context managers (GH-118348) Account for `add_stopiteration_handler` pushing a block for `async with`. To allow generator functions that previously almost hit the `CO_MAXBLOCKS` limit by nesting non-async blocks, the limit is increased by 1. This increase allows one more block in non-generator functions. (cherry picked from commit c1bf4874c1e9db2beda1d62c8c241229783c789b)
* [3.12] gh-118404: Fix inspect.signature() for non-comparable callables ↵Miss Islington (bot)2024-04-301-0/+1
| | | | | | | (GH-118405) (GH-118424) (cherry picked from commit 11f8348d78c22f85694d7a424541b34d6054a8ee) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-118347: Fix Windows installer not updating launcher (GH-118386)Miss Islington (bot)2024-04-291-0/+1
| | | | | (cherry picked from commit 96d8ca7ad6c4f23f023dd6ed0abd042b29dff4a2) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks ↵Miss Islington (bot)2024-04-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | (GH-117567) (GH-118391) gh-117566: fix IPv6Address.is_loopback for IPv4-mapped loopbacks (GH-117567) While properties like IPv6Address.is_private account for IPv4-mapped IPv6 addresses, such as for example: >>> ipaddress.ip_address("192.168.0.1").is_private True >>> ipaddress.ip_address("::ffff:192.168.0.1").is_private True ...the same doesn't currently apply to the is_loopback property: >>> ipaddress.ip_address("127.0.0.1").is_loopback True >>> ipaddress.ip_address("::ffff:127.0.0.1").is_loopback False At minimum, this inconsistency between different properties is counter-intuitive. Moreover, ::ffff:127.0.0.0/104 is for all intents and purposes a loopback address, and should be treated as such. (cherry picked from commit fb7f79b4da35b75cdc82ff3cf20816d2bf93d416) Co-authored-by: Faidon Liambotis <paravoid@debian.org>
* [3.12] gh-117928: Bump the minimum Sphinx version to 6.2.1 (GH-117853) (#118321)Kirill Podoprigora2024-04-261-0/+1
| | | | Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.12] gh-118042: Fix error in Telnet.__del__ when __init__() was not called ↵Serhiy Storchaka2024-04-261-0/+2
| | | | (GH-118274)
* [3.12] gh-118221: Always use the default row factory in sqlite3.iterdump() ↵Erlend E. Aasland2024-04-251-0/+2
| | | | | | | | | | | | | | (#118223) (#118270) sqlite3.iterdump() depends on the row factory returning resulting rows as tuples; it will fail with custom row factories like for example a dict factory. With this commit, we explicitly reset the row factory of the cursor used by iterdump(), so we always get predictable results. This does not affect the row factory of the parent connection. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] GH-117894: prevent aclose()/athrow() being re-used after ↵Thomas Grainger2024-04-251-0/+1
| | | | | | StopIteration (GH-117851) (GH-118226) (cherry picked from commit 7d369d471cf2b067c4d795d70b75201c48b46f5b)