Commit graph

130311 commits

Author SHA1 Message Date
Savannah Ostrowski
819ea3ca68
Refactor jit.yml (#144577)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-22 18:43:35 +00:00
Chris Eibl
5944a539b9
Fix warnings on main (GH-145104) 2026-02-22 19:02:15 +08:00
Rudi Heitbaum
faea32b729
gh-145092: Fix compiler warning for memchr() and wcschr() returning const pointer (GH-145093) 2026-02-22 10:01:27 +02:00
Victor Stinner
2be2dd5fc2
gh-145076: Check globals type in __lazy_import__() (#145086) 2026-02-21 22:06:59 +01:00
Victor Stinner
fbd3b25e00
gh-141510: Change dict_unhashable_type() error message for frozendict (#145085) 2026-02-21 20:08:28 +01:00
Victor Stinner
25fc04d041
gh-141510: Test frozendict in test_capi.test_dict (#145084)
Complete PyDict_Clear() documentation.
2026-02-21 20:07:30 +01:00
Victor Stinner
c9380aebbe
gh-141510: Check argument in PyDict_Contains() (#145083)
PyDict_Contains() and PyDict_ContainsString() now fail with
SystemError if the first argument is not a dict, frozendict, dict
subclass or frozendict subclass.
2026-02-21 18:36:02 +01:00
Stan Ulbrych
f1f61bf872
gh-66802: Add unicodedata.block() function (#145042)
Closes #66802
2026-02-21 18:27:55 +01:00
Victor Stinner
6940c1dc0c
gh-141510: Check argument in PyDict_MergeFromSeq2() (#145082)
PyDict_MergeFromSeq2() now fails with SystemError if the first
argument is not a dict or a dict subclass.

PyDict_Update(), PyDict_Merge() and _PyDict_MergeEx() no longer
accept frozendict.
2026-02-21 17:21:43 +01:00
Victor Stinner
770d354549
gh-141510: Support frozendict in pprint (#144908)
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
2026-02-21 17:08:24 +01:00
Victor Stinner
9e083b57ee
gh-141510: Test frozendict C API (#145081)
Add tests on functions:

* PyAnyDict_Check()
* PyAnyDict_CheckExact()
* PyFrozenDict_Check()
* PyFrozenDict_CheckExact()
* PyFrozenDict_New()
2026-02-21 17:00:23 +01:00
Victor Stinner
646bd86e3b
gh-141510: Fix copy.deepcopy() for recursive frozendict (#145027) 2026-02-21 15:30:40 +00:00
Raymond Hettinger
7258dbc518
Use lazy imports in collections (gh-145054) 2026-02-21 08:14:53 -06:00
Stan Ulbrych
e1bd0cd37b
gh-145058: Add input validation to _PyImport_LazyImportModuleLevelObject (#145068) 2026-02-21 12:52:40 +00:00
Bartosz Sławecki
0499a0c17f
gh-144285: Update *What's New* entry after GH-144299 (#145077) 2026-02-21 12:50:55 +00:00
Victor Stinner
2133e16bfe
gh-141510: Fix test_xpickle for Python 3.14 and older (#145069)
Skip tests on frozendict on Python 3.14 and older.
2026-02-21 13:05:35 +01:00
Bénédikt Tran
34f4fa8425
gh-141226: Deprecate PEP-456 support for embedders (#141287)
Deprecate PEP-456 [1] support for providing an external definition
of the string hashing scheme. Removal is scheduled for Python 3.19.

Previously, embedders could define the ``Py_HASH_ALGORITHM`` macro to be
``Py_HASH_EXTERNAL`` [2] to indicate that the hashing scheme was provided
externally but this feature was undocumented, untested and most likely
unused.

[1]: https://peps.python.org/pep-0456/
[2]: https://peps.python.org/pep-0456/#hash-function-selection
2026-02-21 12:42:13 +01:00
Bénédikt Tran
3a2a686cc4
gh-142516: fix reference leaks in ssl.SSLContext objects (#143685) 2026-02-21 12:31:16 +01:00
Victor Stinner
7b0bd9eb91
gh-141510, PEP 814: Add frozendict support to json (#144903) 2026-02-21 12:22:47 +01:00
Bénédikt Tran
347fc438cf
gh-143698: correctly check scheduler and setpgroup values for os.posix_spawn[p] (#143699)
Fix an issue where passing invalid arguments to `os.posix_spawn[p]` functions
raised a SystemError instead of a TypeError, and allow to explicitly use `None`
for `scheduler` and `setpgroup` as specified in the docs.
2026-02-21 11:20:42 +00:00
Victor Stinner
20b1535ca4
gh-141510, PEP 814: Add frozendict support to pickle (#144967)
Add frozendict.__getnewargs__() method.
2026-02-21 11:07:55 +01:00
Mohsin Mehmood
85021bc247
gh-144694: Fix re.Match.group() doc claiming [1..99] range limit (#144696)
The documentation incorrectly stated that numeric group arguments
must be in the range [1..99]. This limit was removed in Python 3.5
(bpo-22437). Replace with "a positive integer" since the next
sentence already documents the IndexError for out-of-range values.
2026-02-20 21:36:26 -08:00
Rafael Santos
273d5062ca
gh-145028: Fix blake2 tests in test_hashlib when it is missing due to build config (GH-145029)
specifically configure --without-builtin-hashlib-hashes means the otherwise guaranteed available blake2 family will not exist.  this allows the test suite to still pass.
2026-02-20 20:57:29 -08:00
Peter Bierma
06292614ff
gh-144748: Document 3.12 and 3.14 changes to PyErr_CheckSignals (GH-144982)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-02-20 19:25:45 -05:00
Sam Gross
70da972f97
gh-144809: Make deque copy atomic in free-threaded build (gh-144966) 2026-02-20 14:31:58 -05:00
Stan Ulbrych
75c5753199
Fix errors in CODEOWNERS (#145049)
Fix erros in CODEOWNERS
2026-02-20 21:02:14 +02:00
Alper
a56532771a
gh-144981: Make PyUnstable_Code_SetExtra/GetExtra thread-safe (#144980)
* Make PyUnstable_Code_SetExtra/GetExtra thread-safe
2026-02-20 10:52:18 -08:00
Raymond Hettinger
8246d588e4
Simplify summary tables in the itertools docs (gh-145050)
Combine two dispatch tables into once.
2026-02-20 12:44:30 -06:00
Peter Bierma
60f3c396fe
gh-141811: Split up init.rst into multiple pages (GH-144844)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2026-02-20 16:37:39 +00:00
Anton Ryzhov
175ab31377
Update comments in _strptime module (GH-144979)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-20 08:56:56 +01:00
Ned Batchelder
852ec18978
Docs: remove unneeded author attributions (#145002)
These directives are not maintained and misleadingly indicate individual
rather than community ownership.

See https://github.com/python/docs-community/issues/180 for discussion,
and https://github.com/python/devguide/pull/1740 for an update to the
devguide.

Also ensured that everyone is in the Misc/ACKS file.
2026-02-19 18:45:28 -05:00
J Berg
4141f0a1ee
Correct MAX_N in Lib/zipfile ZipExtFile (GH-144973)
"<<" has lower precedence than "-".
2026-02-20 00:48:01 +02:00
Victor Stinner
beb8e3f276
gh-141510: Document ParameterizedMIMEHeader.params change (#145003)
Document also the dataclasses.field() metadata change.
2026-02-19 22:13:16 +01:00
Shamil
50c14719fb
gh-144986: Fix memory leak in atexit.register() (#144987) 2026-02-19 20:42:55 +00:00
Peter Bierma
87c4fc1321
Add myself as a codeowner for the C API documentation (#145017)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2026-02-19 15:18:37 -05:00
Chris Eibl
b5c8e6e133
gh-100239: Use `PyFloat_AS_DOUBLE and _PyLong_IsZero`` in the float / compactlong specializations (#144826) 2026-02-19 21:45:59 +02:00
Robsdedude
0f7cd5544a
gh-144156: Fix email header folding concatenating encoded words (#144692)
The fix for gh-92081 (gh-92281) was unfortunately flawed, and broke whitespace handling for encoded word patterns that had previously been working correctly but had no corresponding tests, unfortunately in a way that made the resulting headers not RFC compliant, in such a way that Yahoo started rejecting the resulting emails.  This fix was released in 3.14 alpha 1, 3.13 beta 2 and 3.12.5.   This PR fixes the original problem in a way that does not break anything, and in fact fixes a small pre-existing bug (a spurious whitespace after the ':' of the header label if the header value is immediately wrapped on to the next line).  (RDM)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: R. David Murray <rdmurray@bitdance.com>
2026-02-19 13:29:05 -05:00
Chris Eibl
6485c8583a
GH-144679: Switch to windows-2025-vs2026 build image in GitHub Actions (GH-145005) 2026-02-19 18:10:00 +00:00
Stan Ulbrych
930b3fd1df
compute-changes.py: Fix & test process_changed_files() (#144674)
Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
2026-02-19 18:49:34 +02:00
Chris Eibl
0341b10a5d
GH-144679: MSVC tailcall CI no longer needs to specify PlatformToolset (GH-145004)
MSVC tailcall CI no longer needs to specify PlatformToolset
2026-02-19 16:38:26 +00:00
Filipe Laíns
f282f7aed9
GH-134872: add ModuleNotFoundError suggestions (#142512)
* gh-134872: Add traceback suggestions for ModuleNotFoundError

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add news

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
2026-02-19 16:10:58 +00:00
Filipe Laíns
157f271de3
gh-139899: Introduce MetaPathFinder.discover and PathEntryFinder.discover (#139900)
* gh-139899: Introduce MetaPathFinder.discover and PathEntryFinder.discover

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix doc reference

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Remove specific doc references

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix docstrings

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Revert "Remove specific doc references"

This reverts commit 31d1a8f551.

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Fix news references

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Add docs warning

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Raise ValueError on invalid parent

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Dedupe __path__ in PathFinder.discover

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Use context manager and add error handling to os.scandir

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Raise ValueError on invalid parent

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Dedupe when package exists with multiple suffixes

Signed-off-by: Filipe Laíns <lains@riseup.net>

* Apply suggestions from code review

Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>

* Add tests

Signed-off-by: Filipe Laíns <lains@riseup.net>

---------

Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
2026-02-19 15:25:50 +00:00
Petr Viktorin
f1cf762ee7
gh-84393: Remove AIX workaround: re-enable posix_fadvise and f_allocate (GH-144784)
Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com>
2026-02-19 15:11:21 +01:00
Donghee Na
28b3a8ac08
gh-141510: Update ftscalingbench to support frozendict (gh-144999) 2026-02-19 23:06:15 +09:00
David Peter
1d099164bc
gh-144702: Use standard terminology in class pattern error message (#144703) 2026-02-19 13:31:13 +00:00
Donghee Na
52794cba13
gh-141510: Update Whats News for frozendict (gh-144961) 2026-02-19 12:48:57 +00:00
Chris Eibl
c06f4f4301
GH-144679: When building with VS 2026 on Windows, use PlatformToolset v145 by default (GH-144680) 2026-02-19 12:38:46 +00:00
Mark Shannon
3f37b94c73
GH-144651: Optimize the new uops added when recording values during tracing. (GH-144948)
* Handle dependencies in the optimizer, not the tracer
* Strengthen some checks to avoid relying on optimizer for correctness
2026-02-19 11:52:57 +00:00
Stan Ulbrych
20caf1c084
Remove unused :platform: in module's docs (GH-144988)
It has not been outputted since Sphinx 1.1.
2026-02-19 13:45:30 +02:00
Ken Jin
e84a2cc83c
gh-144888: Don't invalidate executors during function deallocation (#144974) 2026-02-19 03:44:50 +00:00