summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.13.0b3v3.13.0b3Thomas Wouters2024-06-2766-136/+664
|
* [3.13] gh-121027: Add a future warning in functools.partial.__get__ ↵Miss Islington (bot)2024-06-271-0/+2
| | | | | | | | (GH-121086) (#121092) gh-121027: Add a future warning in functools.partial.__get__ (GH-121086) (cherry picked from commit db96edd6d1a58045196a71aff565743f493b5fbb) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-120888: Bump bundled pip to 24.1.1 (GH-120889) (#121080)Miss Islington (bot)2024-06-271-0/+1
| | | | | | | | | | | gh-120888: Bump bundled pip to 24.1.1 (GH-120889) (cherry picked from commit 4999e0bda091826fcdf303dd439364e1d303a5ce) Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com> Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-113433: Automatically Clean Up Subinterpreters in Py_Finalize() ↵Miss Islington (bot)2024-06-262-0/+4
| | | | | | | | | (gh-121067) This change makes things a little less painful for some users. It also fixes a failing assert (gh-120765), by making sure all subinterpreters are destroyed before the main interpreter. As part of that, we make sure Py_Finalize() always runs with the main interpreter active. (cherry picked from commit 4be1f37b20bd51498d3adf8ad603095c0f38d6e5, AKA gh-121060) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-120642: Move private PyCode APIs to the internal C API (#120643) ↵Victor Stinner2024-06-262-0/+13
| | | | | | | | | | | | | | | | | | | | | (#121043) gh-120642: Move private PyCode APIs to the internal C API (#120643) * Move _Py_CODEUNIT and related functions to pycore_code.h. * Move _Py_BackoffCounter to pycore_backoff.h. * Move Include/cpython/optimizer.h content to pycore_optimizer.h. * Remove Include/cpython/optimizer.h. * Remove PyUnstable_Replace_Executor(). Rename functions: * PyUnstable_GetExecutor() => _Py_GetExecutor() * PyUnstable_GetOptimizer() => _Py_GetOptimizer() * PyUnstable_SetOptimizer() => _Py_SetTier2Optimizer() * PyUnstable_Optimizer_NewCounter() => _PyOptimizer_NewCounter() * PyUnstable_Optimizer_NewUOpOptimizer() => _PyOptimizer_NewUOpOptimizer() (cherry picked from commit 9e4a81f00fef689c6e18a64245aa064eaadc7ac7)
* [3.13] gh-121018: Ensure ArgumentParser.parse_args with exit_on_error=False ↵Miss Islington (bot)2024-06-261-0/+2
| | | | | | | raises instead of exiting when given unrecognized arguments (GH-121019) (GH-121032) (cherry picked from commit 0654336dd5138aec04e3017e15ccbb90a44e053d) Co-authored-by: blhsing <blhsing@gmail.com>
* [3.13] gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` ↵Miss Islington (bot)2024-06-261-0/+3
| | | | | | | | and `bytearray` objects in protocol version 5. (GH-120422) (GH-120832) gh-120380: fix Python implementation of `pickle.Pickler` for `bytes` and `bytearray` objects in protocol version 5. (GH-120422) (cherry picked from commit 7595e6743ac78ac0dd19418176f66d251668fafc) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-121025: Improve partialmethod.__repr__ (GH-121033) (#121037)Miss Islington (bot)2024-06-261-0/+2
| | | | | | | | gh-121025: Improve partialmethod.__repr__ (GH-121033) It no longer contains redundant commas and spaces. (cherry picked from commit d2646e3f45e3e4e831ee2ae84d55b161a361d592) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-114053: Fix another edge case involving `get_type_hints`, PEP 695 ↵Miss Islington (bot)2024-06-251-0/+4
| | | | | | and PEP 563 (GH-120272) (#121003) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.13] gh-120108: Fix deepcopying of AST trees with .parent attributes ↵Jelle Zijlstra2024-06-251-0/+2
| | | | | (GH-120114) (#121000) (cherry picked from commit 42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6)
* [3.13] gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) ↵Miss Islington (bot)2024-06-251-0/+1
| | | | | | | | | | (#120985) gh-120671: Fix PY_CHECK_CC_WARNING() in configure.ac (GH-120822) Add missing space in AS_VAR_APPEND() on CFLAGS. (cherry picked from commit 2106c9bef0c18ff35db7d6c083cb8f189507758e) Co-authored-by: Michael Allwright <allsey87@gmail.com>
* [3.13] gh-120858: PyDict_Next should not lock the dict (GH-120859) (#120964)Miss Islington (bot)2024-06-241-0/+3
| | | | | | | | | | | | PyDict_Next no longer locks the dictionary in the free-threaded build. Locking around individual PyDict_Next calls is not sufficient because the function returns borrowed references and because it allows concurrent modifications during the iteraiton loop. The internal locking also interferes with correct external synchronization because it may suspend outer critical sections created by the caller. (cherry picked from commit 375b723d5873f948696c7e85a97f4778d9e00ff0) Co-authored-by: Sam Gross <colesbury@gmail.com>
* [3.13] gh-113993: Allow interned strings to be mortal, and fix related ↵Petr Viktorin2024-06-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issues (GH-120520) (GH-120945) * Add an InternalDocs file describing how interning should work and how to use it. * Add internal functions to *explicitly* request what kind of interning is done: - `_PyUnicode_InternMortal` - `_PyUnicode_InternImmortal` - `_PyUnicode_InternStatic` * Switch uses of `PyUnicode_InternInPlace` to those. * Disallow using `_Py_SetImmortal` on strings directly. You should use `_PyUnicode_InternImmortal` instead: - Strings should be interned before immortalization, otherwise you're possibly interning a immortalizing copy. - `_Py_SetImmortal` doesn't handle the `SSTATE_INTERNED_MORTAL` to `SSTATE_INTERNED_IMMORTAL` update, and those flags can't be changed in backports, as they are now part of public API and version-specific ABI. * Add private `_only_immortal` argument for `sys.getunicodeinternedsize`, used in refleak test machinery. * Make sure the statically allocated string singletons are unique. This means these sets are now disjoint: - `_Py_ID` - `_Py_STR` (including the empty string) - one-character latin-1 singletons Now, when you intern a singleton, that exact singleton will be interned. * Add a `_Py_LATIN1_CHR` macro, use it instead of `_Py_ID`/`_Py_STR` for one-character latin-1 singletons everywhere (including Clinic). * Intern `_Py_STR` singletons at startup. * For free-threaded builds, intern `_Py_LATIN1_CHR` singletons at startup. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-119614: Fix truncation of strings with embedded null characters in ↵Miss Islington (bot)2024-06-241-0/+2
| | | | | | | | | Tkinter (GH-120909) (GH-120938) Now the null character is always represented as \xc0\x80 for Tcl_NewStringObj(). (cherry picked from commit c38e2f64d012929168dfef7363c9e48bd1a6c731) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-120683: Fix an error in logging.LogRecord timestamp (GH-120709) ↵Miss Islington (bot)2024-06-241-0/+4
| | | | | | | | | | (GH-120933) The integer part of the timestamp can be rounded up, while the millisecond calculation truncates, causing the log timestamp to be wrong by up to 999 ms (affected roughly 1 in 8 million timestamps). (cherry picked from commit 1500a23f33f5a6d052ff1ef6383d9839928b8ff1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-119824: Revert the `where` solution and use meta commands (#120919)Tian Gao2024-06-232-1/+1
|
* [3.13] gh-120910: Fix issue resolving relative paths outside site-packages. ↵Miss Islington (bot)2024-06-231-0/+2
| | | | | | | | | | (GH-120911) (#120917) gh-120910: Fix issue resolving relative paths outside site-packages. (GH-120911) Incorporates changes from importlib_metadata 7.2.1. (cherry picked from commit 1ba0bb21ed4eb54023fdfccc9cb20be8fff946b1) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* [3.13] gh-101830: Fix Tcl_Obj to string conversion (GH-120884) (GH-120905)Miss Islington (bot)2024-06-231-0/+2
| | | | | | | Accessing the Tkinter object's string representation no longer converts the underlying Tcl object to a string on Windows. (cherry picked from commit f4ddaa396715855ffbd94590f89ab7d55feeec07) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] Amend categories of @nineteendo's news entries (GH-120735) (#120850)Nice Zombies2024-06-223-113/+113
|
* [3.13] gh-120811: Fix reference leak upon `_PyContext_Exit` failure ↵Miss Islington (bot)2024-06-221-0/+1
| | | | | | | | | (GH-120812) (#120843) gh-120811: Fix reference leak upon `_PyContext_Exit` failure (GH-120812) (cherry picked from commit aed31beca9a54b85a1392631a48da80602210f18) Co-authored-by: Peter <zintensitydev@gmail.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* [3.13] gh-119344: Make critical section API public (GH-119353) (#120856)Sam Gross2024-06-211-0/+1
| | | | | | | | | | | This makes the following macros public as part of the non-limited C-API for locking a single object or two objects at once. * `Py_BEGIN_CRITICAL_SECTION(op)` / `Py_END_CRITICAL_SECTION()` * `Py_BEGIN_CRITICAL_SECTION2(a, b)` / `Py_END_CRITICAL_SECTION2()` The supporting functions and structs used by the macros are also exposed for cases where C macros are not available. (cherry picked from commit 8f17d69b7bc906e8407095317842cc0fd52cd84a)
* [3.13] gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` ↵Miss Islington (bot)2024-06-211-0/+3
| | | | | | | | (GH-120442) (#120826) gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` (GH-120442) (cherry picked from commit 8334a1b55c93068f5d243852029baa83377ff6c9) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-117511: Make PyMutex public in the non-limited API (GH-117731) ↵Sam Gross2024-06-201-0/+1
| | | | | (#120800) (cherry picked from commit 3af7263037de1d0ef63b070fc7bfc2cf042eaebe)
* [3.13] GH-119462: Enforce invariants of type versioning. Backport of ↵Mark Shannon2024-06-201-0/+4
| | | | | GH-120731. (#120748) * Remove uses of Py_TPFLAGS_VALID_VERSION_TAG
* [3.13] gh-119698: fix `symtable.Class.get_methods` and document its ↵Jelle Zijlstra2024-06-201-0/+2
| | | | | | | | behaviour correctly (GH-120151) (#120777) (cherry picked from commit b8a8e04fec76ad7f7c3e5149114dd2ee8a5caecc) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] GH-120602: Support LLVM_VERSION_SUFFIX for JIT builds (GH-120768)Miss Islington (bot)2024-06-201-0/+2
| | | | | (cherry picked from commit 285f42c850da0d8ca31850088eb7b9247cbbbc71) Co-authored-by: Xarblu <xarblu@protonmail.com>
* [3.13] gh-120732: Fix `name` passing to `Mock`, when using kwargs to ↵Miss Islington (bot)2024-06-191-0/+2
| | | | | | | | `create_autospec` (GH-120737) (#120760) gh-120732: Fix `name` passing to `Mock`, when using kwargs to `create_autospec` (GH-120737) (cherry picked from commit 1e4815692f6c8a37a3974d0d7d2025494d026d76) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.13] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced ↵Nadeshiko Manju2024-06-191-0/+1
| | | | | | | | in gh-118322 (GH-120712) (#120747) [3.13] gh-120437: Fix `_CHECK_STACK_SPACE` optimization problems introduced in gh-118322 (GH-120712) Signed-off-by: Manjusaka <me@manjusaka.me> Co-authored-by: Ken Jin <kenjin4096@gmail.com>
* [3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120738)Miss Islington (bot)2024-06-191-0/+2
| | | | | (cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.13] gh-119506: fix `_io.TextIOWrapper.write()` write during flush ↵Miss Islington (bot)2024-06-191-0/+1
| | | | | | | | | (GH-119507) (#119964) gh-119506: fix `_io.TextIOWrapper.write()` write during flush (GH-119507) (cherry picked from commit 52586f930f62bd80374f0f240a4ecce0c0238174) Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com> Co-authored-by: Inada Naoki <songofacandy@gmail.com>
* [3.13] gh-120381: Fix inspect.ismethoddescriptor() (GH-120684)Miss Islington (bot)2024-06-191-0/+2
| | | | | | | | | | | The `inspect.ismethoddescriptor()` function did not check for the lack of `__delete__()` and, consequently, erroneously returned True when applied to *data* descriptors with only `__get__()` and `__delete__()` defined. (cherry picked from commit dacc5ac71a8e546f9ef76805827cb50d4d40cabf) Co-authored-by: Jan Kaliszewski <zuo@kaliszewski.net> Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
* [3.13] gh-120633: Move scrollbar and remove tear-off menus in turtledemo ↵Miss Islington (bot)2024-06-191-0/+1
| | | | | | | | | (GH-120634) (#120725) gh-120633: Move scrollbar and remove tear-off menus in turtledemo (GH-120634) (cherry picked from commit 89f7208f672be635e923f04c19a7480eb8eb414c) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com> Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* [3.13] gh-120367: fix bug where compiler detects redundant jump after pseudo ↵Miss Islington (bot)2024-06-181-0/+1
| | | | op replacement (GH-120714) (#120716)
* [3.13] gh-118789: Add `PyUnstable_Object_ClearWeakRefsNoCallbacks` ↵Miss Islington (bot)2024-06-181-0/+2
| | | | | | | | | | | | | | | | | (GH-118807) (#120695) This exposes `PyUnstable_Object_ClearWeakRefsNoCallbacks` as an unstable C-API function to provide a thread-safe mechanism for clearing weakrefs without executing callbacks. Some C-API extensions need to clear weakrefs without calling callbacks, such as after running finalizers like we do in subtype_dealloc. Previously they could use `_PyWeakref_ClearRef` on each weakref, but that's not thread-safe in the free-threaded build. (cherry picked from commit e8752d7b80775ec2a348cd4bf38cbe26a4a07615) Co-authored-by: Sam Gross <colesbury@gmail.com> Co-authored-by: Petr Viktorin <encukou@gmail.com>
* [3.13] gh-120367: fix removal of redundant NOPs and jumps after reordering ↵Miss Islington (bot)2024-06-171-0/+2
| | | | | | | | hot-cold blocks (GH-120425) (#120621) gh-120367: fix removal of redundant NOPs and jumps after reordering hot-cold blocks (GH-120425) (cherry picked from commit 21866c8ed296524f0ca175c0f55b43744c2b30df) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-119933: Improve ``SyntaxError`` message for invalid type ↵Jelle Zijlstra2024-06-172-0/+7
| | | | | | | parameters expressions (GH-119976) (#120641) (cherry picked from commit 4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.13] gh-119824: Print stack entry when user input is needed (GH-119882) ↵Tian Gao2024-06-161-0/+1
| | | | | (#120533) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-112346: Always set OS byte to 255, simpler gzip.compress function. ↵Miss Islington (bot)2024-06-151-0/+2
| | | | | | | | | | (GH-120486) (#120563) gh-112346: Always set OS byte to 255, simpler gzip.compress function. (GH-120486) This matches the output behavior in 3.10 and earlier; the optimization in 3.11 allowed the zlib library's "os" value to be filled in instead in the circumstance when mtime was 0. this keeps things consistent. (cherry picked from commit 08d09cf5ba041c9c5c3860200b56bab66fd44a23) Co-authored-by: Ruben Vorderman <r.h.p.vorderman@lumc.nl>
* [3.13] gh-120541: Improve the "less" prompt in pydoc (GH-120543) (GH-120562)Miss Islington (bot)2024-06-151-0/+2
| | | | | | | When help() is called with non-string argument, use __qualname__ or __name__ if available, otherwise use "{typename} object". (cherry picked from commit 31d1d72d7e24e0427df70f7dd14b9baff28a4f89) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.13] gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) ↵Miss Islington (bot)2024-06-151-0/+1
| | | | | | | | | (#120548) gh-120495: Fix incorrect exception handling in Tab Nanny (GH-120498) (cherry picked from commit c501261c919ceb97c850ef9427a93326f06a8f2e) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* [3.13] gh-120161: Fix a Crash in the _datetime Module (gh-120518)Miss Islington (bot)2024-06-141-0/+2
| | | | | | | | | | | In gh-120009 I used an atexit hook to finalize the _datetime module's static types at interpreter shutdown. However, atexit hooks are executed very early in finalization, which is a problem in the few cases where a subclass of one of those static types is still alive until the final GC collection. The static builtin types don't have this probably because they are finalized toward the end, after the final GC collection. To avoid the problem for _datetime, I have applied a similar approach here. Also, credit goes to @mgorny and @neonene for the new tests. FYI, I would have liked to take a slightly cleaner approach with managed static types, but wanted to get a smaller fix in first for the sake of backporting. I'll circle back to the cleaner approach with a future change on the main branch. (cherry picked from commit b2e71ff4f8fa5b7d8117dd8125137aee3d01f015, AKA gh-120182) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-120400 :Support Linux perf profile to see Python calls on RISC-V ↵Miss Islington (bot)2024-06-142-0/+2
| | | | | | | | | architecture (GH-120089) (#120413) gh-120400 :Support Linux perf profile to see Python calls on RISC-V architecture (GH-120089) (cherry picked from commit 4b1e85bafc5bcb8cb70bb17164e07aebf7ad7e8e) Co-authored-by: ixgbe00 <yangwang@iscas.ac.cn> Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* [3.13] gh-114053: Fix bad interaction of PEP 695, PEP 563 and ↵Miss Islington (bot)2024-06-131-0/+4
| | | | | | | | `inspect.get_annotations` (GH-120270) (#120474) gh-114053: Fix bad interaction of PEP 695, PEP 563 and `inspect.get_annotations` (GH-120270) (cherry picked from commit 42351c3b9a357ec67135b30ed41f59e6f306ac52) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
* [3.13] gh-71587: Drop local reference cache to `_strptime` module in ↵Miss Islington (bot)2024-06-121-0/+2
| | | | | | | | | `_datetime` (gh-120424) The _strptime module object was cached in a static local variable (in the datetime.strptime() implementation). That's a problem when it crosses isolation boundaries, such as reinitializing the runtme or between interpreters. This change fixes the problem by dropping the static variable, instead always relying on the normal sys.modules cache (via PyImport_Import()). (cherry picked from commit 127c1d2771749853e287632c086b6054212bf12a, AKA gh-120224) Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
* [3.13] gh-120326: Include <intrin.h> on Windows with Free Threading ↵Miss Islington (bot)2024-06-121-0/+2
| | | | | | | | (GH-120329) (#120414) gh-120326: Include <intrin.h> on Windows with Free Threading (GH-120329) (cherry picked from commit 939c201e00943c6dc2d515185168c30606ae522c) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.13] gh-93691: fix too broad source locations of for statement iterators ↵Miss Islington (bot)2024-06-121-0/+2
| | | | | | | | (GH-120330) (#120399) gh-93691: fix too broad source locations of for statement iterators (GH-120330) (cherry picked from commit 97b69db167be28a33688db436551a6c3c3ea4662) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* [3.13] gh-120221: Deliver real singals on Ctrl-C and Ctrl-Z in the new REPL ↵Miss Islington (bot)2024-06-111-0/+2
| | | | (GH-120354) (#120368)
* gh-120198: Fix race condition when editing __class__ with an audit hook ↵Miss Islington (bot)2024-06-111-0/+1
| | | | | | | active (GH-120195) (cherry picked from commit 203565b2f9c74656ba519780049b46d4e5afcba1) Co-authored-by: Ken Jin <kenjin@python.org>
* [3.13] gh-118908: Limit exposed globals from internal imports and ↵Miss Islington (bot)2024-06-111-0/+2
| | | | definitions on new REPL startup (GH-119547) (#120362)
* [3.13] gh-120343: Do not reset byte_col_offset_diff after multiline tokens ↵Miss Islington (bot)2024-06-111-0/+1
| | | | | | | | (GH-120352) (#120355) (cherry picked from commit 1b62bcee941e54244b3ce6476aef8913604987c9) Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>