summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* [3.12] gh-128078: Use `PyErr_SetRaisedException` in ↵Miss Islington (bot)2025-02-031-22/+10
| | | | | | | | | `_PyGen_SetStopIterationValue` (GH-128287) (#128790) gh-128078: Use `PyErr_SetRaisedException` in `_PyGen_SetStopIterationValue` (GH-128287) (cherry picked from commit 402b91da87052878b4e7e8946ba91bdf4ee4bebe) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* [3.12] gh-128078: Clear exception in `anext` before calling ↵Miss Islington (bot)2025-01-132-0/+3
| | | | | | | | | `_PyGen_SetStopIterationValue` (GH-128780) (#128784) gh-128078: Clear exception in `anext` before calling `_PyGen_SetStopIterationValue` (GH-128780) (cherry picked from commit 76ffaef729c91bb79da6df2ade48f3ec51118300) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com> Co-authored-by: Kumar Aditya <kumaraditya@python.org>
* [3.12] gh-126862: Use `Py_ssize_t` instead of `int` when processing the ↵Miss Islington (bot)2025-01-101-4/+4
| | | | | | | | number of super-classes (GH-127523) (#128700) gh-126862: Use `Py_ssize_t` instead of `int` when processing the number of super-classes (GH-127523) (cherry picked from commit 2fcdc8488c32d18f4567f797094068a994777f16) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-127903: Fix a crash on debug builds when calling ↵Miss Islington (bot)2025-01-031-3/+6
| | | | | | | | `Objects/unicodeobject::_copy_characters` (GH-127876) (#128459) gh-127903: Fix a crash on debug builds when calling `Objects/unicodeobject::_copy_characters`` (GH-127876) (cherry picked from commit 46cb6340d7bad955edfc0a20f6a52dabc03b0932) Co-authored-by: Alexander Shadchin <shadchin@yandex-team.com>
* [3.12] gh-128198: Add missing error checks for usages of PyIter_Next() ↵Serhiy Storchaka2024-12-261-0/+4
| | | | | | | (GH-128199) (GH-128273) (cherry picked from commit 5c814c83cdd3dc42bd9682106ffb7ade7ce6b5b3) Co-authored-by: Yan Yanchii <yyanchiy@gmail.com>
* [3.12] gh-127563: use `dk_log2_index_bytes=3` in empty dicts (GH-127568) ↵Miss Islington (bot)2024-12-121-1/+4
| | | | | | | | (GH-127813) This fixes a UBSan failure (unaligned zero-size memcpy) in `dictobject.c`. (cherry picked from commit 9af96f440618304e7cc609c246e1f8c8b2d7a119) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220) ↵Miss Islington (bot)2024-12-111-2/+5
| | | | | | | | (#127605) GH-117195: Avoid assertion error in `object.__sizeof__` (GH-117220) (cherry picked from commit 406ffb5293a8c9ca315bf63de1ee36a9b33f9aaf) Co-authored-by: Mark Shannon <mark@hotpy.org>
* [3.12] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings ↵Miss Islington (bot)2024-12-032-10/+60
| | | | | | | | | | | | | | | | (gh-125205) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter. This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS failures identified by gh-124785 (i.e. backporting gh-125709 too). (cherry picked from commit f2cb39947093feda3ff85b8dc820922cc5e5f954, AKA gh-124865) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-113841: fix possible undefined division by 0 in _Py_c_pow() ↵Miss Islington (bot)2024-12-021-1/+1
| | | | | | | | | | | | | | | (GH-127211) (GH-127216) (GH-127530) [3.13] gh-113841: fix possible undefined division by 0 in _Py_c_pow() (GH-127211) (GH-127216) Note, that transformed expression is not an equivalent for original one (1/exp(-x) != exp(x) in general for floating-point numbers). Though, the difference seems to be ~1ULP for good libm implementations. It's more interesting why division was used from beginning. Closest algorithm I've found (no error checks, of course;)) - it's Algorithm 190 from ACM: https://dl.acm.org/doi/10.1145/366663.366679. It uses subtraction in the exponent. (cherry picked from commit f7bb658124aba74be4c13f498bf46cfded710ef9) (cherry picked from commit f41d8d89e79d634895868656f50a0e16e339f9d6) Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
* [3.12] Fix Unicode encode_wstr_utf8() (#127420) (#127504)Bénédikt Tran2024-12-021-1/+1
| | | | | | | Fix Unicode encode_wstr_utf8() (#127420) Raise RuntimeError instead of RuntimeWarning. Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-127208: Reject null character in _imp.create_dynamic() (#127400) ↵Victor Stinner2024-11-291-0/+12
| | | | | | | | | | | | (#127419) gh-127208: Reject null character in _imp.create_dynamic() (#127400) _imp.create_dynamic() now rejects embedded null characters in the path and in the module name. Backport also the _PyUnicode_AsUTF8NoNUL() function. (cherry picked from commit b14fdadc6c620875a20b7ccc3c9b069e85d8557a)
* [3.12] gh-126594: Fix typeobject.c wrap_buffer() cast (GH-126754) (#127005)Miss Islington (bot)2024-11-191-3/+3
| | | | | | | | | | gh-126594: Fix typeobject.c wrap_buffer() cast (GH-126754) Reject flags smaller than INT_MIN. (cherry picked from commit 84f07c3a4cbcfe488ccfb4030571be0bc4de7e45) Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* [3.12] gh-126341: add release check to `__iter__` method of `memoryview` ↵Miss Islington (bot)2024-11-131-0/+1
| | | | | | | | | | | | (GH-126759) (#126779) gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759) (cherry picked from commit a12690ef49e8fc8a3af4c5f1757eb3caffb35e03) Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Peter Bierma <zintensitydev@gmail.com> Co-authored-by: Victor Stinner <vstinner@python.org> Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.12] gh-126303: Fix pickling and copying of os.sched_param objects ↵Serhiy Storchaka2024-11-051-0/+6
| | | | | (GH-126336) (GH-126424) (cherry picked from commit d3840503b0f590ee574fbdf3c96626ff8b3c45f6)
* [3.12] gh-116938: Fix `dict.update` docstring and remove erraneous full stop ↵Miss Islington (bot)2024-10-291-2/+2
| | | | | | | | | from `dict` documentation (GH-125421) (#126151) gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421) (cherry picked from commit 5527c4051c0b58218ce69044f92b45f1d66ed43f) Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com> Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
* [3.12] gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (#125098)Miss Islington (bot)2024-10-081-45/+66
| | | | | | gh-123378: fix a crash in `UnicodeError.__str__` (GH-124935) (cherry picked from commit ba14dfafd97d1fd03938ac8ddec4ca5b2f12985d) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-113993: For string interning, do not rely on (or assert) ↵Petr Viktorin2024-10-041-6/+10
| | | | | | | | | | | _Py_IsImmortal (GH-121358) (GH-124938) gh-113993: For string interning, do not rely on (or assert) _Py_IsImmortal (GH-121358) Older stable ABI extensions are allowed to make immortal objects mortal. Instead, use `_PyUnicode_STATE` (`interned` and `statically_allocated`). (cherry picked from commit 956270d08d5c23f59937e2f29f8e0b7f63d68afd) Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
* [3.12] gh-124785: Revert "[3.12] gh-116510: Fix a crash due to shared ↵Neil Schemenauer2024-10-011-42/+6
| | | | | | | immortal interned strings. (gh-124541)" (#124814) Revert "[3.12] gh-116510: Fix a crash due to shared immortal interned strings. (gh-124541)" This reverts commit 5dd07ebc0c27e2fffdfd041401c8cc7f0cda0dfc.
* [3.12] gh-113993: Make interned strings mortal (GH-120520, GH-121364, ↵Petr Viktorin2024-09-275-115/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GH-121903, GH-122303) (#123065) This backports several PRs for gh-113993, making interned strings mortal so they can be garbage-collected when no longer needed. * Allow interned strings to be mortal, and fix related issues (GH-120520) * 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. * Beef up the tests. Cover internal details (marked with `@cpython_only`). * Add lots of assertions * Don't immortalize in PyUnicode_InternInPlace; keep immortalizing in other API (GH-121364) * Switch PyUnicode_InternInPlace to _PyUnicode_InternMortal, clarify docs * Document immortality in some functions that take `const char *` This is PyUnicode_InternFromString; PyDict_SetItemString, PyObject_SetAttrString; PyObject_DelAttrString; PyUnicode_InternFromString; and the PyModule_Add convenience functions. Always point out a non-immortalizing alternative. * Don't immortalize user-provided attr names in _ctypes * Immortalize names in code objects to avoid crash (GH-121903) * Intern latin-1 one-byte strings at startup (GH-122303) There are some 3.12-specific changes, mainly to allow statically allocated strings in deepfreeze. (In 3.13, deepfreeze switched to the general `_Py_ID`/`_Py_STR`.) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] gh-119004: fix a crash in equality testing between `OrderedDict` ↵Miss Islington (bot)2024-09-271-8/+25
| | | | | | | | (GH-121329) (#124508) gh-119004: fix a crash in equality testing between `OrderedDict` (GH-121329) (cherry picked from commit 38a887dc3ec52c4a7222279bf4b3ca2431b86de9) Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* [3.12] gh-116510: Fix a crash due to shared immortal interned strings. ↵Neil Schemenauer2024-09-271-6/+42
| | | | | | | | | (gh-124541) Fix a crash caused by immortal interned strings being shared between sub-interpreters that use basic single-phase init. In that case, the string can be used by an interpreter that outlives the interpreter that created and interned it. For interpreters that share obmalloc state, also share the interned dict with the main interpreter.
* [3.12] gh-124498: Fix `TypeAliasType` not to be generic, when ↵Miss Islington (bot)2024-09-261-1/+10
| | | | | | | | `type_params=()` (GH-124499) (#124604) gh-124498: Fix `TypeAliasType` not to be generic, when `type_params=()` (GH-124499) (cherry picked from commit abe5f799e6ce1d177f79554f1b84d348b6141045) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.12] gh-77894: Fix a crash when the GC breaks a loop containing a ↵Serhiy Storchaka2024-09-111-28/+27
| | | | | | | memoryview (GH-123898) (GH-123937) Now a memoryview object can only be cleared if there are no buffers that refer it. (cherry picked from commit a1dbf2ea69acc6ccee6292709af1dadd55c068be)
* [3.12] gh-122527: Fix a crash on deallocation of `PyStructSequence` ↵Sam Gross2024-09-061-6/+22
| | | | | | | | | | | | | | | | (GH-122577) (#122626) The `PyStructSequence` destructor would crash if it was deallocated after its type's dictionary was cleared by the GC, because it couldn't compute the "real size" of the instance. This could occur with relatively straightforward code in the free-threaded build or with a reference cycle involving the type in the default build, due to differing orders in which `tp_clear()` was called. Account for the non-sequence fields in `tp_basicsize` and use that, along with `Py_SIZE()`, to compute the "real" size of a `PyStructSequence` in the dealloc function. This avoids the accesses to the type's dictionary during dealloc, which were unsafe. (cherry picked from commit 4b63cd170e5dd840bffc80922f09f2d69932ff5c)
* [3.12] gh-122982: Extend the deprecation period for bool inversion by two ↵Miss Islington (bot)2024-08-251-2/+2
| | | | | | | | years (GH-123306) (#123317) gh-122982: Extend the deprecation period for bool inversion by two years (GH-123306) (cherry picked from commit 249b083ed8b3cfdff30bf578d7f9d3c5e982a4eb) Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
* [3.12] gh-122208: Don't delivery PyDict_EVENT_ADDED until it can't fail ↵Dino Viehland2024-07-301-10/+11
| | | | | (#122327) Don't delivery PyDict_EVENT_ADDED until it can't fail
* [3.12] gh-117482: Fix the Slot Wrapper Inheritance Tests (gh-122250)Eric Snow2024-07-291-4/+19
| | | | | The tests were only checking cases where the slot wrapper was present in the initial case. They were missing when the slot wrapper was added in the additional initializations. This fixes that. (cherry-picked from commit 490e0ad83ac72c5688dfbbab4eac61ccfd7be5fd, AKA gh-122248)
* [3.12] gh-117482: Simplify the Fix For Builtin Types Slot Wrappers (gh-122241)Eric Snow2024-07-241-30/+92
| | | | | | | | | | | | | | | | | In gh-121602, I applied a fix to a builtin types initialization bug. That fix made sense in the context of some broader future changes, but introduced a little bit of extra complexity. For earlier versions those future changes are not relevant; we can avoid the extra complexity. Thus we can revert that earlier change and replace it with this one, which is more focused and conceptually simpler. This is essentially the implementation of an idea that @markshannon pointed out to me. Note that this change would be much smaller if we didn't have to deal with repr compatibility for builtin types that explicitly inherit tp slots (see expect_manually_inherited()). The alternative is to stop *explicitly* inheriting tp slots in static PyTypeObject values, which is churn that we can do separately. (cherry picked from commit 716c6771fcfd3be90bba9f888a579b36c02cdb13, AKA gh-121932)
* [3.12] gh-121905: Consistently use "floating-point" instead of "floating ↵Serhiy Storchaka2024-07-194-10/+10
| | | | | point" (GH-121907) (GH-122013) (cherry picked from commit 1a0c7b9ba48a2dffb70bb0c7327abae1d3e87356)
* [3.12] gh-121153: Fix some errors with use of _PyLong_CompactValue() (GH-121154)Serhiy Storchaka2024-07-171-13/+55
| | | | | | | * The result has type Py_ssize_t, not intptr_t. * Type cast between unsigned and signed integer types should be explicit. * Downcasting should be explicit. * Fix integer overflow check in sum(). (cherry picked from commit 1801545)
* [3.12] gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result ↵Miss Islington (bot)2024-07-141-0/+4
| | | | | | | | (GH-121661) (#121762) gh-121660: Fix `ga_getitem` by explicitly checking for `NULL` result (GH-121661) (cherry picked from commit bb802db8cfa35a88582be32fae05fe1cf8f237b1) Co-authored-by: sobolevn <mail@sobolevn.me>
* [3.12] gh-117482: Fix Builtin Types Slot Wrappers (gh-121632)Eric Snow2024-07-111-9/+32
| | | | | | | When builtin static types are initialized for a subinterpreter, various "tp" slots have already been inherited (for the main interpreter). This was interfering with the logic in add_operators() (in Objects/typeobject.c), causing a wrapper to get created when it shouldn't. This change fixes that by preserving the original data from the static type struct and checking that. (cherry picked from commit 5250a031332eb9499d5fc190d7287642e5a144b9, AKA gh-121602) Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.12] GH-121439: Allow PyTupleObjects with an ob_size of 20 in the ↵Miss Islington (bot)2024-07-101-1/+1
| | | | | | | | free_list to be reused (gh-121428) (#121566) GH-121439: Allow PyTupleObjects with an ob_size of 20 in the free_list to be reused (gh-121428) (cherry picked from commit 9585a1a2a251aaa15baf6579e13dd3be0cb05f1f) Co-authored-by: satori1995 <132636720+satori1995@users.noreply.github.com>
* [3.12] gh-120384: Fix array-out-of-bounds crash in `list_ass_subscript` ↵Miss Islington (bot)2024-06-211-12/+33
| | | | | | | | (GH-120442) (#120825) 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.12] gh-119897: Revert buggy optimization which was removed in 3.13 (#120467)Irit Katriel2024-06-181-4/+2
|
* gh-120198: Fix race condition when editing __class__ with an audit hook ↵Ken Jin2024-06-121-1/+2
| | | | | active (GH-120195) Co-authored-by: Nadeshiko Manju <me@manjusaka.me>
* [3.12] gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303) ↵Miss Islington (bot)2024-06-111-1/+8
| | | | | | | | | (#120339) gh-120298: Fix use-after-free in `list_richcompare_impl` (GH-120303) (cherry picked from commit 141babad9b4eceb83371bf19ba3a36b50dd05250) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] bpo-24766: doc= argument to subclasses of property not handled ↵Serhiy Storchaka2024-06-101-15/+4
| | | | | | | correctly (GH-2487) (GH-120312) (cherry picked from commit 4829522b8d3e1a28930f1cccfcc9635e035a0eb4) Co-authored-by: E. M. Bray <erik.bray@lri.fr>
* [3.12] gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() ↵Miss Islington (bot)2024-06-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | (GH-120228) (#120240) gh-120155: Fix copy/paste error in HAVE_SUBOFFSETS_IN_LAST_DIM() (GH-120228) Don't hardcode 'dest' in HAVE_SUBOFFSETS_IN_LAST_DIM() macro of memoryobject.c, but use its 'view' parameter instead. Fix the Coverity issue: Error: COPY_PASTE_ERROR (CWE-398): Python-3.12.2/Objects/memoryobject.c:273:14: original: ""dest->suboffsets + (dest->ndim - 1)"" looks like the original copy. Python-3.12.2/Objects/memoryobject.c:274:14: copy_paste_error: ""dest"" in ""src->suboffsets + (dest->ndim - 1)"" looks like a copy-paste error. Python-3.12.2/Objects/memoryobject.c:274:14: remediation: Should it say ""src"" instead? GH- 272| assert(dest->ndim > 0 && src->ndim > 0); GH- 273| return (!HAVE_SUBOFFSETS_IN_LAST_DIM(dest) && GH- 274|-> !HAVE_SUBOFFSETS_IN_LAST_DIM(src) && GH- 275| dest->strides[dest->ndim-1] == dest->itemsize && GH- 276| src->strides[src->ndim-1] == src->itemsize); (cherry picked from commit 90b75405260467814c93738a3325645918d4ea51) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.12] gh-109218: Improve documentation for the complex() constructor ↵Serhiy Storchaka2024-05-302-6/+12
| | | | | | | | | | | | | | | | (GH-119687) (ПР-119805) * Remove the equivalence with real+imag*1j which can be incorrect in corner cases (non-finite numbers, the sign of zeroes). * Separately document the three roles of the constructor: parsing a string, converting a number, and constructing a complex from components. * Document positional-only parameters of complex(), float(), int() and bool() as positional-only. * Add examples for complex() and int(). * Specify the grammar of the string for complex(). * Improve the grammar of the string for float(). * Describe more explicitly the behavior when real and/or imag arguments are complex numbers. (This will be deprecated in future.) (cherry picked from commit ec1ba264607b2b7b98d2602f5536a1d02981efc6)
* [3.12] gh-119011: `type.__type_params__` now return an empty tuple ↵Jelle Zijlstra2024-05-281-1/+4
| | | | | | | (GH-119296) (#119681) (cherry picked from commit 6b240c2308a044e38623900ccb8fa58c3549d4ae) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Fix some missing null checks. (GH-118721)Miss Islington (bot)2024-05-101-5/+8
| | | | | (cherry picked from commit 7e6fcab20003b07621dc02ea78d6ea2fda500371) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.12] gh-118272: Clear generator frame's locals when the generator is ↵Irit Katriel2024-05-021-0/+1
| | | | closed (#118451)
* [3.12] GH-117881: fix athrow().throw()/asend().throw() concurrent access ↵Thomas Grainger2024-05-021-0/+37
| | | | | | | (GH-117882) (#118458) GH-117881: fix athrow().throw()/asend().throw() concurrent access (GH-117882) (cherry picked from commit fc7e1aa3c001bbce25973261fba457035719a559)
* [3.12] GH-117894: prevent aclose()/athrow() being re-used after ↵Thomas Grainger2024-04-251-1/+8
| | | | | | StopIteration (GH-117851) (GH-118226) (cherry picked from commit 7d369d471cf2b067c4d795d70b75201c48b46f5b)
* [3.12] gh-113964: Don't prevent new threads until all non-daemon threads ↵Sam Gross2024-03-191-1/+1
| | | | | | | | | | | | | | exit (GH-116677) (#117029) Starting in Python 3.12, we prevented calling fork() and starting new threads during interpreter finalization (shutdown). This has led to a number of regressions and flaky tests. We should not prevent starting new threads (or `fork()`) until all non-daemon threads exit and finalization starts in earnest. This changes the checks to use `_PyInterpreterState_GetFinalizing(interp)`, which is set immediately before terminating non-daemon threads. (cherry picked from commit 60e105c1c11ecca1680d03c38aa06bcc77a28714)
* [3.12] gh-116714: Handle errors correctly in `PyFloat_GetInfo` (GH-116715) ↵Miss Islington (bot)2024-03-131-8/+13
| | | | | | | | | (#116722) gh-116714: Handle errors correctly in `PyFloat_GetInfo` (GH-116715) (cherry picked from commit fcd49b4f47f1edd9a2717f6619da7e7af8ea73cf) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.12] gh-110819: Fix ‘kind’ may be used uninitialized warning in ↵Miss Islington (bot)2024-03-121-28/+35
| | | | | | | | `longobject` (GH-116599) (#116648) gh-110819: Fix ‘kind’ may be used uninitialized warning in `longobject` (GH-116599) (cherry picked from commit eb947cdc1374842a32fa82249ba3c688abf252dc) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.12] gh-116296: Fix refleak in reduce_newobj() corner case (GH-116297) ↵Miss Islington (bot)2024-03-041-0/+1
| | | | | | | | (#116299) (cherry picked from commit 17c4849981905fb1c9bfbb2b963b6ee12e3efb2c) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
* [3.12] gh-100762: Fix optimization in gen_close (GH-111069) (#115818)Miss Islington (bot)2024-02-221-2/+3
| | | | | | gh-100762: Fix optimization in gen_close (GH-111069) (cherry picked from commit 0db2517687efcf5ec0174a32398ec1564b3204f1) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>