]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
8 days agogh-130415: Narrowing to constants in branches involving `is` comparisons with a const...
reiden [Thu, 22 Jan 2026 09:37:45 +0000 (17:37 +0800)] 
gh-130415: Narrowing to constants in branches involving `is` comparisons with a constant (GH-143895)

8 days agoGH-143941: Move WASI-related files to Platforms/WASI (GH-143942)
Brett Cannon [Wed, 21 Jan 2026 22:31:58 +0000 (14:31 -0800)] 
GH-143941: Move WASI-related files to Platforms/WASI (GH-143942)

Along the way, leave a deprecated Tools/wasm/wasi/__main__.py behind for backwards-compatibility.

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
9 days agogh-77188: Add pickle tests for objects with slots (GH-144116)
Serhiy Storchaka [Wed, 21 Jan 2026 17:21:02 +0000 (19:21 +0200)] 
gh-77188: Add pickle tests for objects with slots (GH-144116)

9 days agoGH-138245: Perform boolean guards by testing a single bit, rather than a full pointer...
Mark Shannon [Wed, 21 Jan 2026 15:58:27 +0000 (15:58 +0000)] 
GH-138245: Perform boolean guards by testing a single bit, rather than a full pointer comparison. (GH-143810)

9 days agoUpdate install manager docs (python/pymanager#227) (GH-144079)
Steve Dower [Wed, 21 Jan 2026 15:33:05 +0000 (15:33 +0000)] 
Update install manager docs (python/pymanager#227) (GH-144079)

9 days agogh-144030: Add check that argument is callable to Python version of functools.lru_cac...
CF Bolz-Tereick [Wed, 21 Jan 2026 14:19:19 +0000 (15:19 +0100)] 
gh-144030: Add check that argument is callable to Python version of functools.lru_cache (#144031)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: AN Long <aisk@users.noreply.github.com>
9 days agogh-143869: Add PEP 757 functions to the limited API (#143906)
Sergey B Kirpichev [Wed, 21 Jan 2026 13:47:14 +0000 (16:47 +0300)] 
gh-143869: Add PEP 757 functions to the limited API (#143906)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
9 days agogh-144085: Add `{gi,cr}_suspended` to `inspect` comments and `generator/coroutine...
Yongtao Huang [Wed, 21 Jan 2026 10:33:56 +0000 (18:33 +0800)] 
gh-144085: Add `{gi,cr}_suspended` to `inspect` comments and `generator/coroutine` tests (#144086)

9 days agogh-125346: Deprecate accepting standard Base64 alphabet when alternative alphabet...
Serhiy Storchaka [Wed, 21 Jan 2026 07:41:58 +0000 (09:41 +0200)] 
gh-125346: Deprecate accepting standard Base64 alphabet when alternative alphabet is used (GH-141128)

Emit a warning in base64.urlsafe_b64decode() and base64.b64decode() when
the "+" or "/" characters occur in the Base64 data with alternative
alphabet if they are not the part of the alternative alphabet.

It is a DeprecationWarning in the strict mode (will be error) and
a FutureWarning in non-strict mode (will be ignored).

9 days agoGH-143948: Explain graphlib's cycle-finding code (#143950)
Tim Peters [Wed, 21 Jan 2026 01:28:48 +0000 (19:28 -0600)] 
GH-143948: Explain graphlib's cycle-finding code (#143950)

Explain topsort's cycle-finding algorithm, and why it's written that way.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
9 days agogh-143919: Reject control characters in http cookies
Seth Michael Larson [Tue, 20 Jan 2026 21:23:42 +0000 (15:23 -0600)] 
gh-143919: Reject control characters in http cookies

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
9 days agogh-143923: Reject control characters in POP3 commands
Seth Michael Larson [Tue, 20 Jan 2026 20:46:32 +0000 (14:46 -0600)] 
gh-143923: Reject control characters in POP3 commands

9 days agogh-143925: Reject control characters in data: URL mediatypes
Seth Michael Larson [Tue, 20 Jan 2026 20:45:58 +0000 (14:45 -0600)] 
gh-143925: Reject control characters in data: URL mediatypes

9 days agogh-143921: Reject control characters in IMAP commands
Seth Michael Larson [Tue, 20 Jan 2026 20:45:42 +0000 (14:45 -0600)] 
gh-143921: Reject control characters in IMAP commands

9 days agogh-141504: Move PYTHON_UOPS_OPTIMIZE to policy object (GH-144082)
Donghee Na [Tue, 20 Jan 2026 18:47:38 +0000 (03:47 +0900)] 
gh-141504: Move PYTHON_UOPS_OPTIMIZE to policy object (GH-144082)

10 days agogh-144054: no deferred refcount for untracked (gh-144081)
Neil Schemenauer [Tue, 20 Jan 2026 18:01:09 +0000 (10:01 -0800)] 
gh-144054: no deferred refcount for untracked (gh-144081)

This reverts gh-144055 and fixes the bug in a different way.  Deferred
reference counting relies on the object being tracked by the GC,
otherwise the object will live until interpreter shutdown.  So, take
care that we do not enable deferred reference counting for objects that
are untracked.  Also, if a tuple has deferred reference counting
enabled, don't untrack it.

10 days agogh-143939: Fix assignment to `_PyThreadStateImpl.generator_return_kind` (gh-143951)
Sam Gross [Tue, 20 Jan 2026 17:51:55 +0000 (12:51 -0500)] 
gh-143939: Fix assignment to `_PyThreadStateImpl.generator_return_kind` (gh-143951)

The assignment to generator_return_kind has to be after any potentially
escaping calls to ensure that it's not overwritten.

10 days agogh-143960: Add support for OpenSSL 3.6, drop EOL 3.2 (#143961)
Hugo van Kemenade [Tue, 20 Jan 2026 15:25:31 +0000 (17:25 +0200)] 
gh-143960: Add support for OpenSSL 3.6, drop EOL 3.2 (#143961)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
10 days agogh-144054: shutdown fix for deferred ref counting (GH-144055)
Neil Schemenauer [Tue, 20 Jan 2026 13:45:12 +0000 (05:45 -0800)] 
gh-144054: shutdown fix for deferred ref counting (GH-144055)

When shutting down, disable deferred refcounting for all GC objects. It
is important to do this also for untracked objects, which before this
change were getting missed.

Small code cleanup:
We can remove the shutdown case disable_deferred_refcounting() call
inside scan_heap_visitor() if we are careful about it.  The key is
that frame_disable_deferred_refcounting() might fail if the object
is untracked.

10 days agoUpdate struct.__doc__: _Bool available unconditionally (#143716)
Sergey B Kirpichev [Tue, 20 Jan 2026 12:09:20 +0000 (15:09 +0300)] 
Update struct.__doc__: _Bool available unconditionally (#143716)

This amends commit a9296e7f3be4d6c22271b25c86467ff867c63bbb.

10 days agogh-144050: Fix stat.filemode pure Python file type detection (GH-144059)
VanshAgarwal24036 [Tue, 20 Jan 2026 12:05:42 +0000 (17:35 +0530)] 
gh-144050: Fix stat.filemode pure Python file type detection (GH-144059)

10 days agogh-143999: Fix: handle suspended state on types.coroutine wrappers (GH-144000)
Yongtao Huang [Tue, 20 Jan 2026 10:20:06 +0000 (18:20 +0800)] 
gh-143999: Fix: handle suspended state on types.coroutine wrappers (GH-144000)

10 days agogh-144023: Prevent follow_symlinks from being allowed with an fd of 0 (GH-144022)
AZero13 [Tue, 20 Jan 2026 09:50:51 +0000 (04:50 -0500)] 
gh-144023: Prevent follow_symlinks from being allowed with an fd of 0 (GH-144022)

The check was (fd > 0), should be (fd >= 0).

10 days agogh-143774 - Improve IDLE Format Paragraph doc (#143775)
Terry Jan Reedy [Tue, 20 Jan 2026 09:07:29 +0000 (04:07 -0500)] 
gh-143774 - Improve IDLE Format Paragraph doc (#143775)

Add a reminder to not rewrap code line to the Menu => Format => Reformat Paragraph entry.
In Editing and Nagivagion, add a new 'Format block' subsection that defines 'paragraph'
to better match what is dependably handled as more or less expected.
In particular, specify equal indents and that the resulting indent equals original indent.
Also mention that selections are expanded to complete lines and how to modify max length.

(Also fix a couple case errors in cross references.)

10 days agogh-143754: Add Tkinter methods pack_content(), place_content() and grid_content(...
Serhiy Storchaka [Tue, 20 Jan 2026 07:16:36 +0000 (09:16 +0200)] 
gh-143754: Add Tkinter methods pack_content(), place_content() and grid_content() (GH-143845)

They use Tk commands with new name like "pack content instead of old
"pack slaves".

10 days agoFix typo: 'exept' -> 'except' in Lib/dbm/dumb.py (GH-144060)
Bodhi Silberling [Tue, 20 Jan 2026 06:50:34 +0000 (22:50 -0800)] 
Fix typo: 'exept' -> 'except' in Lib/dbm/dumb.py (GH-144060)

10 days agogh-143874: Use self.message instead of raw print in `_exec_in_closure()` (#143875)
Yongtao Huang [Tue, 20 Jan 2026 00:11:07 +0000 (08:11 +0800)] 
gh-143874: Use self.message instead of raw print in `_exec_in_closure()`  (#143875)

11 days agogh-102809: No longer mention `Misc/gdbinit` in the code (#143980)
Bartosz Sławecki [Mon, 19 Jan 2026 17:36:55 +0000 (18:36 +0100)] 
gh-102809: No longer mention `Misc/gdbinit` in the code (#143980)

Fix misleading comment on `PyObject_Dump`.

11 days agogh-106318: Add examples for str.rpartition() method (#143891)
Adorilson Bezerra [Mon, 19 Jan 2026 14:15:55 +0000 (14:15 +0000)] 
gh-106318: Add examples for str.rpartition() method (#143891)

11 days agogh-143689: Fix BufferedReader.read1 leaving object in reentrant state on error (...
Yongtao Huang [Mon, 19 Jan 2026 14:09:30 +0000 (22:09 +0800)] 
gh-143689: Fix BufferedReader.read1 leaving object in reentrant state on error (#143690)

BufferedReader.read1() could leave the buffered object in a
reentrant (locked) state when an exception was raised while
allocating the output buffer.

This change ensures the internal buffered lock is always released
on error, keeping the object in a consistent state after failures.

Signed-off-by: Yongtao Huang <yongtaoh2022@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
11 days agogh-142461: Move misplaced NEWS entries to an appropriate section (GH-143392)
Aniket [Mon, 19 Jan 2026 12:59:26 +0000 (18:29 +0530)] 
gh-142461: Move misplaced NEWS entries to an appropriate section (GH-143392)

11 days agogh-143935: Email preserve parens when folding comments (#143936)
Seth Michael Larson [Mon, 19 Jan 2026 12:38:22 +0000 (06:38 -0600)] 
gh-143935: Email preserve parens when folding comments (#143936)

Fix a bug in the folding of comments when flattening an email message
using a modern email policy. Comments consisting of a very long sequence of
non-foldable characters could trigger a forced line wrap that omitted the
required leading space on the continuation line, causing the remainder of
the comment to be interpreted as a new header field. This enabled header
injection with carefully crafted inputs.

Co-authored-by: Denis Ledoux <dle@odoo.com>
11 days agogh-143897: Remove the isxidstart() and isxidcontinue() methods of unicodedata.ucd_3_2...
Serhiy Storchaka [Mon, 19 Jan 2026 12:37:41 +0000 (14:37 +0200)] 
gh-143897: Remove the isxidstart() and isxidcontinue() methods of unicodedata.ucd_3_2_0 (GH-143898)

They are now only exposed as the unicodedata function.

11 days agogh-142440: Fix _decimal builds configured with EXTRA_FUNCTIONALITY (GH-142441)
AZero13 [Mon, 19 Jan 2026 12:19:20 +0000 (07:19 -0500)] 
gh-142440: Fix _decimal builds configured with EXTRA_FUNCTIONALITY (GH-142441)

There was a typo in _decimal.Context.apply().

11 days agogh-143754: Modernize Tkinter docs (GH-143841)
Serhiy Storchaka [Mon, 19 Jan 2026 12:01:29 +0000 (14:01 +0200)] 
gh-143754: Modernize Tkinter docs (GH-143841)

Use more relevant terminology instead of "master"/"slave" widgets where possible.

11 days agogh-143866: Verify return value of `pathlib.write_{bytes,text}` methods in tests ...
b9788213 [Mon, 19 Jan 2026 11:24:20 +0000 (14:24 +0300)] 
gh-143866: Verify return value of `pathlib.write_{bytes,text}` methods in tests (#143870)

Co-authored-by: sobolevn <mail@sobolevn.me>
11 days agogh-75459: versionadded for PyObject_CallFinalizer*() API (GH-143982)
Sergey B Kirpichev [Mon, 19 Jan 2026 10:22:16 +0000 (13:22 +0300)] 
gh-75459: versionadded for PyObject_CallFinalizer*() API (GH-143982)

11 days agogh-143831: Compare cells by identity in forward references (#143848)
Bartosz Sławecki [Mon, 19 Jan 2026 05:29:11 +0000 (06:29 +0100)] 
gh-143831: Compare cells by identity in forward references (#143848)

11 days agoNotify Sviat of GHA changes through codeowners (#143945)
🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) [Sun, 18 Jan 2026 22:28:38 +0000 (23:28 +0100)] 
Notify Sviat of GHA changes through codeowners (#143945)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
11 days agogh-141860: Add on_error= keyword arg to `multiprocessing.set_forkserver_preload`...
Gregory P. Smith [Sun, 18 Jan 2026 22:04:18 +0000 (14:04 -0800)] 
gh-141860: Add on_error= keyword arg to `multiprocessing.set_forkserver_preload` (GH-141859)

Add a keyword-only `on_error` parameter to `multiprocessing.set_forkserver_preload()`. This allows the user to have exceptions during optional `forkserver` start method module preloading cause the forkserver subprocess to warn (generally to stderr) or exit with an error (preventing use of the forkserver) instead of being silently ignored.

This _also_ fixes an oversight, errors when preloading a `__main__` module are now treated the similarly. Those would always raise unlike other modules in preload, but that had gone unnoticed as up until bug fix PR GH-135295 in 3.14.1 and 3.13.8, the `__main__` module was never actually preloaded.

Based on original work by Nick Neumann @aggieNick02 in GH-99515.

11 days agogh-144012: Check null binary op extend (#144014)
AN Long [Sun, 18 Jan 2026 18:38:37 +0000 (03:38 +0900)] 
gh-144012: Check null binary op extend (#144014)

12 days agogh-143952: Fix asyncio tools to work with the new remote debugging API (#143954)
Bartosz Sławecki [Sun, 18 Jan 2026 00:16:12 +0000 (01:16 +0100)] 
gh-143952: Fix asyncio tools to work with the new remote debugging API (#143954)

13 days agoFix UBSan error in _testcapi: correct create_attr_from_spec signature (#143097)
Shamil [Sat, 17 Jan 2026 18:05:09 +0000 (21:05 +0300)] 
Fix UBSan error in _testcapi: correct create_attr_from_spec signature (#143097)

Co-authored-by: sobolevn <mail@sobolevn.me>
13 days ago gh-143916: Reject control characters in wsgiref.headers.Headers (GH-143917)
Seth Michael Larson [Sat, 17 Jan 2026 17:46:21 +0000 (11:46 -0600)] 
 gh-143916: Reject control characters in wsgiref.headers.Headers  (GH-143917)

* Add 'test.support' fixture for C0 control characters
* gh-143916: Reject control characters in wsgiref.headers.Headers

13 days agogh-143421: Use new buffer to save optimized uops (GH-143682)
Hai Zhu [Sat, 17 Jan 2026 15:52:16 +0000 (23:52 +0800)] 
gh-143421: Use new buffer to save  optimized uops (GH-143682)

13 days agogh-141004: Document `PyException_HEAD` and `PyDescr_COMMON` (GH-143896)
Peter Bierma [Sat, 17 Jan 2026 15:39:29 +0000 (07:39 -0800)] 
gh-141004: Document `PyException_HEAD` and `PyDescr_COMMON` (GH-143896)

13 days agogh-143946: Show `JitOptSymbol` on abstract stack when set PYTHON_OPT_DEBUG > 4 (GH...
Hai Zhu [Sat, 17 Jan 2026 15:20:35 +0000 (23:20 +0800)] 
gh-143946: Show `JitOptSymbol` on abstract stack when set PYTHON_OPT_DEBUG > 4 (GH-143957)

13 days agogh-142913: Export JIT functions for _testinternalcapi (#143958)
Ken Jin [Sat, 17 Jan 2026 13:31:38 +0000 (21:31 +0800)] 
gh-142913: Export JIT functions for _testinternalcapi (#143958)

* Export JIT functions for _testinternalcapi

* Add testinternalcapi to paths to run JIT CI on

13 days agogh-143943: add missing header file for `pycore_optimizer_types.h` (GH-143947)
Hai Zhu [Sat, 17 Jan 2026 12:26:19 +0000 (20:26 +0800)] 
gh-143943: add missing header file for `pycore_optimizer_types.h` (GH-143947)

13 days agogh-132657: Add maybe_enable_deferred_ref_count() (gh-142843)
Neil Schemenauer [Sat, 17 Jan 2026 01:54:43 +0000 (17:54 -0800)] 
gh-132657: Add maybe_enable_deferred_ref_count() (gh-142843)

If we are specializing to `LOAD_GLOBAL_MODULE` or `LOAD_ATTR_MODULE`, try
to enable deferred reference counting for the value, if the object is owned by
a different thread.  This applies to the free-threaded build only and should
improve scaling of multi-threaded programs.

13 days agogh-142913: Remove JIT interpreter for interpreter generator tests (GH-143944)
Ken Jin [Sat, 17 Jan 2026 00:34:39 +0000 (08:34 +0800)] 
gh-142913: Remove JIT interpreter for interpreter generator tests (GH-143944)

13 days agogh-138122: Default highlight to sh (#143782)
Hugo van Kemenade [Fri, 16 Jan 2026 19:40:28 +0000 (21:40 +0200)] 
gh-138122: Default highlight to sh (#143782)

13 days ago gh-142913: Update generated code that conflicted with other landed change (#143932)
Dino Viehland [Fri, 16 Jan 2026 19:10:15 +0000 (11:10 -0800)] 
 gh-142913: Update generated code that conflicted with other landed change (#143932)

Update test cases

2 weeks agogh-142913: Add test case for interpreter generator w/ overridden opcodes (#142911)
Dino Viehland [Fri, 16 Jan 2026 18:33:29 +0000 (10:33 -0800)] 
gh-142913: Add test case for interpreter generator w/ overridden opcodes (#142911)

Add test case for interpreter generator w/ overridden opcodes

2 weeks agogh-143674: Document F/D complex format characters in struct module (#143675)
Muneeb Ullah [Fri, 16 Jan 2026 17:09:56 +0000 (22:09 +0500)] 
gh-143674: Document F/D complex format characters in struct module (#143675)

Add documentation for the F (complex from two floats) and D (complex
from two doubles) format characters in the struct module docstring.
These format characters were implemented but not documented.

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 weeks agogh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570)
Serhiy Storchaka [Fri, 16 Jan 2026 16:38:38 +0000 (18:38 +0200)] 
gh-65784: Add support for parametrized resource wantobjects in regrtests (GH-143570)

This allows to run Tkinter tests with the specified value of
tkinter.wantobjects, for example "-u wantobjects=0".

2 weeks agogh-143572: Run 'python3-libraries' fuzzer in CI using CIFuzz (#143749)
Seth Michael Larson [Fri, 16 Jan 2026 16:09:39 +0000 (10:09 -0600)] 
gh-143572: Run 'python3-libraries' fuzzer in CI using CIFuzz (#143749)

Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <578543+webknjaz@users.noreply.github.com>
Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2 weeks agogh-141070: Rename `PyUnstable_Object_Dump` to `PyObject_Dump` (GH-142848)
Peter Bierma [Fri, 16 Jan 2026 14:19:43 +0000 (09:19 -0500)] 
gh-141070: Rename `PyUnstable_Object_Dump` to `PyObject_Dump` (GH-142848)

2 weeks agogh-143672: Finish conversion of the struct module to Argument Clinic (GH-143857)
Serhiy Storchaka [Fri, 16 Jan 2026 11:35:23 +0000 (13:35 +0200)] 
gh-143672: Finish conversion of the struct module to Argument Clinic (GH-143857)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2 weeks agogh-143672: Add more tests for struct.pack_into() (GH-143901)
Serhiy Storchaka [Fri, 16 Jan 2026 11:24:43 +0000 (13:24 +0200)] 
gh-143672: Add more tests for struct.pack_into() (GH-143901)

Add tests for negative offset, out of bound offset, invalid type of offset,
non-writeable buffer, non-continuous buffer, invalid type of buffer.

Repeat all tests for struct.Struct.pack_into().

2 weeks agoGH-143493: Conform to spec for generator expressions while supporting virtual iterato...
Mark Shannon [Fri, 16 Jan 2026 09:11:58 +0000 (09:11 +0000)] 
GH-143493: Conform to spec for generator expressions while supporting virtual iterators (GH-143569)

* Moves the `GET_ITER` instruction into the generator function preamble.
  This means the the iterable is converted into an iterator during generator
  creation, as documented, but keeps it in the same code object allowing
  optimization.

2 weeks agogh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629)
zhong [Thu, 15 Jan 2026 15:08:55 +0000 (07:08 -0800)] 
gh-143602: Fix duplicate buffer exports in io.BytesIO.write (#143629)

Fix an inconsistency issue in io.BytesIO.write() where the buffer was exported
twice, which could lead to unexpected data overwrites and position drift when
the buffer changes between exports.

2 weeks agogh-142434: Use ppoll() if available in select.poll (#143529)
Victor Stinner [Thu, 15 Jan 2026 12:49:46 +0000 (13:49 +0100)] 
gh-142434: Use ppoll() if available in select.poll (#143529)

2 weeks agogh-141004: Mark up docs of old PyMem macros (GH-143783)
Petr Viktorin [Thu, 15 Jan 2026 11:37:30 +0000 (12:37 +0100)] 
gh-141004: Mark up docs of old PyMem macros (GH-143783)

These had a docs-only deprecation notice since the first version of the docs in this repo. Nowadays we call things “soft deprecated” if there's just a note in the docs.

The deprecated directive needs a version, I went with the first one that had the notice (2.0; it's not in 1.6):
- https://docs.python.org/release/2.0/api/memoryInterface.html
- https://docs.python.org/release/1.6/api/memoryInterface.html

Since PEP 445, they are now direct aliases; there are no (additional) binary compatibility concerns over the preferred names.

2 weeks agogh-80620: Fix test_time.test_gmtime() for 32-bit time_t (#143861)
Victor Stinner [Thu, 15 Jan 2026 10:54:30 +0000 (11:54 +0100)] 
gh-80620: Fix test_time.test_gmtime() for 32-bit time_t (#143861)

2 weeks agogh-80620: Support negative timestamps on windows in `time.gmtime`, `time.localtime... 143862/head
Peter Gessler [Thu, 15 Jan 2026 09:51:11 +0000 (03:51 -0600)] 
gh-80620: Support negative timestamps on windows in `time.gmtime`, `time.localtime`, and `datetime` module (#143463)

Previously, negative timestamps (representing dates before 1970-01-01) were
not supported on Windows due to platform limitations. The changes introduce a
fallback implementation using the Windows FILETIME API, allowing negative
timestamps to be correctly handled in both UTC and local time conversions.
Additionally, related test code is updated to remove Windows-specific skips
and error handling, ensuring consistent behavior across platforms.

Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agoAdd regression test for add() after remove() with hash collision in set (GH-143781)
Serhiy Storchaka [Thu, 15 Jan 2026 08:41:08 +0000 (10:41 +0200)] 
Add regression test for add() after remove() with hash collision in set (GH-143781)

2 weeks agogh-143834: Fix PyLong_AsNativeBytes docs for negative number padding (GH-143840)
Muneeb Ullah [Thu, 15 Jan 2026 08:22:01 +0000 (13:22 +0500)] 
gh-143834: Fix PyLong_AsNativeBytes docs for negative number padding  (GH-143840)

2 weeks agogh-143635: Fix crash in `ga_repr_items_list` (#143670)
sobolevn [Thu, 15 Jan 2026 03:50:47 +0000 (06:50 +0300)] 
gh-143635: Fix crash in `ga_repr_items_list` (#143670)

2 weeks agogh-141504: Refactor policy object into a single opt_config (gh-143644)
Donghee Na [Thu, 15 Jan 2026 00:53:00 +0000 (09:53 +0900)] 
gh-141504: Refactor policy object into a single opt_config (gh-143644)

2 weeks agogh-143632: Skip unittest for mmap.set_name at musl environment (gh-143839)
Donghee Na [Thu, 15 Jan 2026 00:52:29 +0000 (09:52 +0900)] 
gh-143632: Skip unittest for mmap.set_name at musl environment (gh-143839)

2 weeks agogh-141805: Fix crash after concurrent addition objects with the same hash to set...
Serhiy Storchaka [Wed, 14 Jan 2026 21:29:17 +0000 (23:29 +0200)] 
gh-141805: Fix crash after concurrent addition objects with the same hash to set (GH-143815)

This happens when the set contained several elements with the same hash,
and then some of them were removed.

2 weeks agogh-143825: Micro-optimizations to _make_key. (gh-143844)
Raymond Hettinger [Wed, 14 Jan 2026 21:20:53 +0000 (15:20 -0600)] 
gh-143825: Micro-optimizations to _make_key. (gh-143844)

2 weeks agoGH-143842: Make optimizer color table static (GH-143846)
Mohammad Miadh Angkad [Wed, 14 Jan 2026 20:37:13 +0000 (04:37 +0800)] 
GH-143842: Make optimizer color table static (GH-143846)

2 weeks agoAdd Savannah to CODEOWNERS for WASI (#143847)
Savannah Ostrowski [Wed, 14 Jan 2026 20:08:32 +0000 (12:08 -0800)] 
Add Savannah to CODEOWNERS for WASI (#143847)

2 weeks agoFix refleaks in new unicodedata classes added in gh-74902 (GH-143843)
Serhiy Storchaka [Wed, 14 Jan 2026 19:55:11 +0000 (21:55 +0200)] 
Fix refleaks in new unicodedata classes added in gh-74902 (GH-143843)

2 weeks agogh-143632: Disable PR_SET_VMA_ANON_NAME on musl libc (gh-143730)
Priyanshu Singh [Wed, 14 Jan 2026 17:47:55 +0000 (23:17 +0530)] 
gh-143632: Disable PR_SET_VMA_ANON_NAME on musl libc (gh-143730)

2 weeks agoPost 3.15.0a5
Hugo van Kemenade [Wed, 14 Jan 2026 17:30:22 +0000 (19:30 +0200)] 
Post 3.15.0a5

2 weeks agoPython 3.15.0a5 v3.15.0a5
Hugo van Kemenade [Wed, 14 Jan 2026 14:41:12 +0000 (16:41 +0200)] 
Python 3.15.0a5

2 weeks agogh-74902: Add Unicode Grapheme Cluster Break algorithm (GH-143076)
Serhiy Storchaka [Wed, 14 Jan 2026 14:37:57 +0000 (16:37 +0200)] 
gh-74902: Add Unicode Grapheme Cluster Break algorithm (GH-143076)

Add the unicodedata.iter_graphemes() function to iterate over grapheme
clusters according to rules defined in Unicode Standard Annex #29.

Add unicodedata.grapheme_cluster_break(), unicodedata.indic_conjunct_break()
and unicodedata.extended_pictographic() functions to get the properties
of the character which are related to the above algorithm.

Co-authored-by: Guillaume "Vermeille" Sanchez <guillaume.v.sanchez@gmail.com>
2 weeks agogh-141004: Document several soft-deprecated C APIs (GH-141634)
Peter Bierma [Wed, 14 Jan 2026 13:20:33 +0000 (08:20 -0500)] 
gh-141004: Document several soft-deprecated C APIs (GH-141634)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2 weeks agogh-143214: Add the wrapcol parameter in binascii.b2a_base64() and base64.b64encode...
Serhiy Storchaka [Wed, 14 Jan 2026 12:44:53 +0000 (14:44 +0200)] 
gh-143214: Add the wrapcol parameter in binascii.b2a_base64() and base64.b64encode() (GH-143216)

2 weeks agogh-143123: Protect against recursive tracer calls/finalization (GH-143126)
Ken Jin [Wed, 14 Jan 2026 12:23:14 +0000 (20:23 +0800)] 
gh-143123: Protect against recursive tracer calls/finalization (GH-143126)

* Stronger check for recursive traces

* Add a stop_tracing field

* Stop early when tracing exceptions

2 weeks agoGH-143613: Add colours and some more edges to executor visualization graph (GH-143809)
Mark Shannon [Wed, 14 Jan 2026 11:34:58 +0000 (11:34 +0000)] 
GH-143613: Add colours and some more edges to executor visualization graph (GH-143809)

2 weeks agogh-106287: Do not write objects after an unmarshalling error (GH-132715)
Duane Griffin [Wed, 14 Jan 2026 11:25:46 +0000 (00:25 +1300)] 
gh-106287: Do not write objects after an unmarshalling error (GH-132715)

Writing out an object may involve a slot lookup, which is not safe to do with
an exception raised. In debug mode an assertion failure will occur if this
happens.

2 weeks agogh-138050: Use cold flag instead of warm flag in `MAKE_WARM` (GH-143827)
Hai Zhu [Wed, 14 Jan 2026 10:27:33 +0000 (18:27 +0800)] 
gh-138050: Use cold flag instead of warm flag in `MAKE_WARM` (GH-143827)

2 weeks agogh-141004: Document old provisional names for vectorcall/code API (GH-143568)
Petr Viktorin [Wed, 14 Jan 2026 09:54:45 +0000 (10:54 +0100)] 
gh-141004: Document old provisional names for vectorcall/code API (GH-143568)

gh-141004: Document old provisional names for vectorcall & code API

For vectorcall API, the underscore-prefixed provisional names
continue to be available per PEP 590:
https://peps.python.org/pep-0590/#finalizing-the-api
Use `versionadded`, `versionchanged`, and `:no-typesetting:`
to mark this up.

For PyCode API, use `:no-typesetting:` rather than `index::` so that
these are semantically documented as C functions.

2 weeks agogh-143460: Correct unlimited stack size skip for Emscripten (#143765)
Russell Keith-Magee [Tue, 13 Jan 2026 22:03:04 +0000 (06:03 +0800)] 
gh-143460: Correct unlimited stack size skip for Emscripten (#143765)

Modifies the test skip for unlimited stack size to add Emscripten to the
exclusion list.

2 weeks agogh-131798: JIT optimizer: Support custom binary op and property frames (GH-143735)
Ken Jin [Tue, 13 Jan 2026 19:11:53 +0000 (03:11 +0800)] 
gh-131798: JIT optimizer: Support custom binary op and property frames (GH-143735)

2 weeks agoMerge branch 'main' of https://github.com/python/cpython
Hugo van Kemenade [Tue, 13 Jan 2026 18:44:19 +0000 (20:44 +0200)] 
Merge branch 'main' of https://github.com/python/cpython

2 weeks agoPost 3.15.0a4
Hugo van Kemenade [Tue, 13 Jan 2026 18:39:00 +0000 (20:39 +0200)] 
Post 3.15.0a4

2 weeks agogh-116738: Make `lzma` module thread-safe (#142947)
Alper [Tue, 13 Jan 2026 14:02:27 +0000 (06:02 -0800)] 
gh-116738: Make `lzma` module thread-safe (#142947)

2 weeks agogh-143728: Keep `TypedDict` and `NamedTuple` in `class` role in docs (#143702)
Bartosz Sławecki [Tue, 13 Jan 2026 13:52:29 +0000 (14:52 +0100)] 
gh-143728: Keep `TypedDict` and `NamedTuple` in `class` role in docs (#143702)

2 weeks agoBump GitHub Actions (#143757)
Hugo van Kemenade [Tue, 13 Jan 2026 13:43:26 +0000 (15:43 +0200)] 
Bump GitHub Actions (#143757)

2 weeks agoremove duplicate error constants in `_winapi` (#143684)
Yongtao Huang [Tue, 13 Jan 2026 13:41:38 +0000 (21:41 +0800)] 
remove duplicate error constants in `_winapi` (#143684)

2 weeks agogh-141045: Document that shutil.Error is a subclass of OSError (#141152)
Lakshya Upadhyaya [Tue, 13 Jan 2026 13:38:26 +0000 (19:08 +0530)] 
gh-141045: Document that shutil.Error is a subclass of OSError (#141152)

2 weeks agogh-143249: Fix buffer leak when overlapped operation fails to start on windows (...
Yongtao Huang [Tue, 13 Jan 2026 13:31:24 +0000 (21:31 +0800)] 
gh-143249: Fix buffer leak when overlapped operation fails to start on windows (#143250)

2 weeks agogh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt...
Stan Ulbrych [Tue, 13 Jan 2026 13:28:09 +0000 (13:28 +0000)] 
gh-141004: Don't trigger `run-tests` when `Tools/check-c-api-docs/ignored_c_api.txt` is changed (GH-143583)

2 weeks agogh-143054: Disallow non-top-level Cut for now (GH-143622)
Petr Viktorin [Tue, 13 Jan 2026 12:21:59 +0000 (13:21 +0100)] 
gh-143054: Disallow non-top-level Cut for now (GH-143622)

The behaviour of Cut in nested parentheses, Repeat, Opt, and similar
is somewhat chaotic. Apparently even the academic papers on PEG aren't
as clear as they could be.

And it doesn't really matter. Python only uses top-level cuts.
When that changes, we can clarify as much as necessary (and even
change the implementation to make sense for what we'll need).

Document that this is deliberately unspecified, and add a test to
make sure any decision is deliberate, tested and documented.

2 weeks agogh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCA...
Yashraj [Tue, 13 Jan 2026 12:15:02 +0000 (17:45 +0530)] 
gh-141004: Document symbol visibility macros (PyAPI_DATA, Py_EXPORTED_SYMBOL, Py_LOCAL_SYMBOL,Py_IMPORTED_SYMBOL) (GH-143508)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>