| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
`QueueHandler` (GH-120872) (GH-121078)
(cherry picked from commit 7d9c68513d112823a9a6cdc7453b998b2c24eb4c)
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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)
|
|
|
|
|
|
|
| |
raises instead of exiting when given unrecognized arguments (GH-121019) (GH-121032)
(cherry picked from commit 0654336dd5138aec04e3017e15ccbb90a44e053d)
Co-authored-by: blhsing <blhsing@gmail.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
and PEP 563 (GH-120272) (#121003)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
|
|
|
|
|
| |
(GH-120114) (#121000)
(cherry picked from commit 42b2c9d78da7ebd6bd5925a4d4c78aec3c9e78e6)
|
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remove from public API/ABI (GH-119680, GH-120955) (GH-120944)
- gh-119521: Rename IncompleteInputError to _IncompleteInputError and remove from public API/ABI (GH-119680)
(cherry picked from commit ce1064e4c9bcfd673323ad690e60f86e1ab907bb)
- gh-119521: Use `PyAPI_DATA`, not `extern`, for `_PyExc_IncompleteInputError` (GH-120955)
(cherry picked from commit ac61d58db0753a3b37de21dbc6e86b38f2a93f1b)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
| |
(#120800)
(cherry picked from commit 3af7263037de1d0ef63b070fc7bfc2cf042eaebe)
|
|
|
|
|
| |
GH-120731. (#120748)
* Remove uses of Py_TPFLAGS_VALID_VERSION_TAG
|
|
|
|
|
|
|
|
| |
behaviour correctly (GH-120151) (#120777)
(cherry picked from commit b8a8e04fec76ad7f7c3e5149114dd2ee8a5caecc)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
|
|
| |
(cherry picked from commit 285f42c850da0d8ca31850088eb7b9247cbbbc71)
Co-authored-by: Xarblu <xarblu@protonmail.com>
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
(cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
| |
op replacement (GH-120714) (#120716)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
parameters expressions (GH-119976) (#120641)
(cherry picked from commit 4bf17c381fb7b465f0f26aecb94a6c54cf9be2d3)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
|
|
|
|
|
| |
(#120533)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
(#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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
`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>
|
|
|
|
|
|
|
|
|
| |
`_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>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
|
|
|
|
| |
(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>
|
|
|
|
| |
(GH-120354) (#120368)
|
|
|
|
|
|
|
| |
active (GH-120195)
(cherry picked from commit 203565b2f9c74656ba519780049b46d4e5afcba1)
Co-authored-by: Ken Jin <kenjin@python.org>
|