]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
4 months agogh-136315: Fix skipped multithreading test in test_zstd (#136320)
Emma Smith [Sat, 5 Jul 2025 17:32:28 +0000 (10:32 -0700)] 
gh-136315: Fix skipped multithreading test in test_zstd (#136320)

Fix skipped test in test_zstd

4 months agogh-136047: Allow typing._allow_reckless_class_checks to check `_py_abc` (#136115)
Jeong, YunWon [Sat, 5 Jul 2025 14:24:33 +0000 (23:24 +0900)] 
gh-136047: Allow typing._allow_reckless_class_checks to check `_py_abc` (#136115)

4 months agogh-130870: Preserve `GenericAlias` subclasses in `typing.get_type_hints()` (#131583)
Victorien [Sat, 5 Jul 2025 13:55:39 +0000 (15:55 +0200)] 
gh-130870: Preserve `GenericAlias` subclasses in `typing.get_type_hints()` (#131583)

4 months agogh-101100: Fix references in `http.cookiejar` docs (GH-136238)
Weilin Du [Sat, 5 Jul 2025 13:29:02 +0000 (21:29 +0800)] 
gh-101100: Fix references in `http.cookiejar` docs (GH-136238)

4 months agogh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (#136298)
sobolevn [Sat, 5 Jul 2025 06:14:40 +0000 (09:14 +0300)] 
gh-136297: Test all `pickle` protocols in `test_zoneinfo_property.py` (#136298)

4 months agogh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258)
William S Fulton [Fri, 4 Jul 2025 15:54:00 +0000 (16:54 +0100)] 
gh-136288: Fix error message in `_testcapi/vectorcall.c` (GH-136258)

Use the %N format specifier instead of %s and `PyType_GetName`.

4 months agoDocs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)
Rafael Fontenelle [Fri, 4 Jul 2025 14:40:32 +0000 (11:40 -0300)] 
Docs: Move "or" outside monospace syntax in `tarfile.rst` (GH-136263)

4 months agogh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (#135831)
Richard Levasseur [Fri, 4 Jul 2025 13:44:37 +0000 (06:44 -0700)] 
gh-135773: have pyvenv.cfg without home key anchor a venv and deduce home (#135831)

This is still formally undefined behaviour, but we may as well
keep the *same* undefined behaviour as previous versions.

PEP 796 proposes a cleaner and more consistent replacement for 3.15+

4 months agogh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH...
Serhiy Storchaka [Fri, 4 Jul 2025 07:00:23 +0000 (10:00 +0300)] 
gh-102555: Fix comment parsing in HTMLParser according to the HTML5 standard (GH-135664)

* "--!>" now ends the comment.
* "-- >" no longer ends the comment.
* Support abnormally ended empty comments "<-->" and "<--->".

---------

Co-author: Kerim Kabirov <the.privat33r+gh@pm.me>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
4 months agogh-129824: fix data races in subinterpreters under TSAN (#135794)
Kumar Aditya [Fri, 4 Jul 2025 03:48:55 +0000 (09:18 +0530)] 
gh-129824: fix data races in subinterpreters under TSAN (#135794)

This fixes the data races in typeobject.c in subinterpreters under free-threading. The type flags and slots are only modified in the main interpreter as all static types are first initialised in main interpreter.

4 months agogh-115999: remove redundant check in free-threading from `_STORE_ATTR_WITH_HINT`...
Kumar Aditya [Fri, 4 Jul 2025 03:34:47 +0000 (09:04 +0530)] 
gh-115999: remove redundant check in free-threading from `_STORE_ATTR_WITH_HINT` (#136249)

4 months agogh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218)
Cody Maloney [Fri, 4 Jul 2025 02:27:21 +0000 (19:27 -0700)] 
gh-133982: Test _pyio.BytesIO in free-threaded tests (gh-136218)

4 months agoClarify some details regarding `sys.monitoring` (#133981)
Brett Cannon [Thu, 3 Jul 2025 21:04:01 +0000 (14:04 -0700)] 
Clarify some details regarding `sys.monitoring` (#133981)

4 months agogh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standa...
Serhiy Storchaka [Thu, 3 Jul 2025 20:33:02 +0000 (23:33 +0300)] 
gh-135661: Fix parsing start and end tags in HTMLParser according to the HTML5 standard (GH-135930)

* Whitespaces no longer accepted between `</` and the tag name.
  E.g. `</ script>` does not end the script section.

* Vertical tabulation (`\v`) and non-ASCII whitespaces no longer recognized
  as whitespaces. The only whitespaces are `\t\n\r\f `.

* Null character (U+0000) no longer ends the tag name.

* Attributes and slashes after the tag name in end tags are now ignored,
  instead of terminating after the first `>` in quoted attribute value.
  E.g. `</script/foo=">"/>`.

* Multiple slashes and whitespaces between the last attribute and closing `>`
  are now ignored in both start and end tags. E.g. `<a foo=bar/ //>`.

* Multiple `=` between attribute name and value are no longer collapsed.
  E.g. `<a foo==bar>` produces attribute "foo" with value "=bar".

* Whitespaces between the `=` separator and attribute name or value are no
  longer ignored. E.g. `<a foo =bar>` produces two attributes "foo" and
  "=bar", both with value None; `<a foo= bar>` produces two attributes:
  "foo" with value "" and "bar" with value None.

* Fix Sphinx errors.

* Apply suggestions from code review

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Address review comments.

* Move to Security.

---------

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
4 months agogh-135252: Document Zstandard integration across zipfile, shutil, and tarfile (#135311)
Emma Smith [Thu, 3 Jul 2025 20:28:25 +0000 (13:28 -0700)] 
gh-135252: Document Zstandard integration across zipfile, shutil, and tarfile (#135311)

Document Zstandard integration across zipfile, shutil, and tarfile

4 months agogh-135075: Make PyObject_SetAttr() fail with NULL value and exception (#136180)
Victor Stinner [Thu, 3 Jul 2025 12:51:44 +0000 (14:51 +0200)] 
gh-135075: Make PyObject_SetAttr() fail with NULL value and exception (#136180)

Make PyObject_SetAttr() and PyObject_SetAttrString() fail if called
with NULL value and an exception set.

4 months agogh-115119: Recommend upstream libmpdec in build requirements (#136205)
Sergey B Kirpichev [Thu, 3 Jul 2025 12:44:59 +0000 (15:44 +0300)] 
gh-115119: Recommend upstream libmpdec in build requirements (#136205)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months ago`Python/gc.c`: Refer to `InternalDocs` instead of devguide. (#136243)
Kirill Podoprigora [Thu, 3 Jul 2025 12:14:14 +0000 (15:14 +0300)] 
`Python/gc.c`: Refer to `InternalDocs` instead of devguide. (#136243)

4 months agogh-130664: Treat '0' fill character with align '=' as zero-padding for Fraction's...
Sergey B Kirpichev [Thu, 3 Jul 2025 10:57:31 +0000 (13:57 +0300)] 
gh-130664: Treat '0' fill character with align '=' as zero-padding for Fraction's (GH-131067)

4 months agogh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237)
Serhiy Storchaka [Thu, 3 Jul 2025 10:39:14 +0000 (13:39 +0300)] 
gh-133740: Fix regression in locale.nl_langinfo(ALT_DIGITS) (GH-136237)

There is no need to temporary switch locale for items ALT_DIGITS and ERA
if the nl_langinfo() result is empty (most locales).

4 months ago gh-135069: Fix exception message in encodings.idna module (#135071)
Daniel Hollas [Thu, 3 Jul 2025 09:53:37 +0000 (10:53 +0100)] 
 gh-135069: Fix exception message in encodings.idna module (#135071)

4 months agoFix comments for `heapq.siftup_max` (#135359)
Alper [Thu, 3 Jul 2025 09:51:41 +0000 (02:51 -0700)] 
Fix comments for `heapq.siftup_max` (#135359)

Co-authored-by: mpage <mpage@meta.com>
4 months agogh-135640: Adds more type checking to ElementTree (GH-135643)
Kira [Thu, 3 Jul 2025 07:48:47 +0000 (03:48 -0400)] 
gh-135640: Adds more type checking to ElementTree (GH-135643)

4 months agogh-135836: Fix `IndexError` in `asyncio.create_connection()` (#135875)
Serhiy Storchaka [Thu, 3 Jul 2025 04:08:39 +0000 (07:08 +0300)] 
gh-135836: Fix `IndexError` in `asyncio.create_connection()` (#135875)

4 months agogh-136135: Doc: Fix some broken links (GH-136137)
Weilin Du [Thu, 3 Jul 2025 00:51:31 +0000 (08:51 +0800)] 
gh-136135: Doc: Fix some broken links (GH-136137)

4 months agoReplace `capi-sig` mailing list with `discuss.python.org` (#136211)
sobolevn [Wed, 2 Jul 2025 17:43:43 +0000 (20:43 +0300)] 
Replace `capi-sig` mailing list with `discuss.python.org` (#136211)

4 months agogh-136203: Improve `TypeError` msg when comparing two `MappingProxyType`s (#136204)
sobolevn [Wed, 2 Jul 2025 16:05:28 +0000 (19:05 +0300)] 
gh-136203: Improve `TypeError` msg when comparing two `MappingProxyType`s (#136204)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-127705: Move Py_INCREF_MORTAL() to the internal C API (GH-136178)
Victor Stinner [Wed, 2 Jul 2025 13:40:41 +0000 (15:40 +0200)] 
gh-127705: Move Py_INCREF_MORTAL() to the internal C API (GH-136178)

Rename Py_INCREF_MORTAL() to _Py_INCREF_MORTAL() and move it to
pycore_object.h internal header.

4 months agogh-136193: Improve `TypeError` msg when comparing two `SimpleNamespace`s (#136195)
sobolevn [Wed, 2 Jul 2025 11:32:41 +0000 (14:32 +0300)] 
gh-136193: Improve `TypeError` msg when comparing two `SimpleNamespace`s (#136195)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months agogh-134567: Add the formatter parameter in unittest.TestCase.assertLogs (GH-134570)
Garry Cairns [Wed, 2 Jul 2025 09:51:19 +0000 (10:51 +0100)] 
gh-134567: Add the formatter parameter in unittest.TestCase.assertLogs (GH-134570)

4 months agogh-115119: Defer removal of bundled libmpdec to 3.16 (#133997)
Sergey B Kirpichev [Wed, 2 Jul 2025 09:20:00 +0000 (12:20 +0300)] 
gh-115119: Defer removal of bundled libmpdec to 3.16 (#133997)

Rename libmpdecimal -> libmpdec

see https://www.bytereef.org/mpdecimal/doc/libmpdec/index.html

4 months agogh-136183: Deal with escapes in JIT optimizer's constant evaluator (GH-136184)
Ken Jin [Wed, 2 Jul 2025 06:08:25 +0000 (14:08 +0800)] 
gh-136183: Deal with escapes in JIT optimizer's constant evaluator (GH-136184)

4 months agogh-134009: Expose `PyMutex_IsLocked` in the public C API (gh-134365)
Sam Gross [Tue, 1 Jul 2025 17:26:13 +0000 (13:26 -0400)] 
gh-134009: Expose `PyMutex_IsLocked` in the public C API (gh-134365)

The `PyMutex_IsLocked()` function is useful in assertions for verifying
that code maintains certain locking invariants.

4 months agogh-134280: Disable constant folding for ~ with a boolean argument (GH-134982)
Serhiy Storchaka [Tue, 1 Jul 2025 17:24:04 +0000 (20:24 +0300)] 
gh-134280: Disable constant folding for ~ with a boolean argument (GH-134982)

This moves the deprecation warning from compile time to run time.

4 months agogh-136125: Use `_PyObject_GetMethodStackRef` for `LOAD_ATTR` (GH-136127)
Ken Jin [Tue, 1 Jul 2025 17:20:46 +0000 (01:20 +0800)] 
gh-136125: Use `_PyObject_GetMethodStackRef` for  `LOAD_ATTR` (GH-136127)

4 months agogh-115119: Remove implicit fallback to the bundled libmpdec (#134078)
Sergey B Kirpichev [Tue, 1 Jul 2025 15:50:51 +0000 (18:50 +0300)] 
gh-115119: Remove implicit fallback to the bundled libmpdec (#134078)

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months agogh-105456: Remove 3 deprecated `sre_*` modules (#135994)
Stan Ulbrych [Tue, 1 Jul 2025 15:31:07 +0000 (16:31 +0100)] 
gh-105456: Remove 3 deprecated `sre_*` modules (#135994)

4 months agogh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo (GH-24829)
Zackery Spytz [Tue, 1 Jul 2025 14:55:24 +0000 (07:55 -0700)] 
gh-87298: Add tests for find_in_strong_cache() bug in _zoneinfo (GH-24829)

Co-authored-by: Paul Ganssle <p.ganssle@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
4 months agogh-136169: Update parameter name in fractions.from_float method (#136172)
Vladyslav Lazoryk [Tue, 1 Jul 2025 13:23:48 +0000 (16:23 +0300)] 
gh-136169: Update parameter name in fractions.from_float method (#136172)

Update parameter name in fractions.from_float method

4 months agogh-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (#135928)
Victor Stinner [Tue, 1 Jul 2025 13:18:17 +0000 (15:18 +0200)] 
gh-130396: Move PYOS_LOG2_STACK_MARGIN to internal headers (#135928)

Move PYOS_LOG2_STACK_MARGIN, PYOS_STACK_MARGIN,
PYOS_STACK_MARGIN_BYTES and PYOS_STACK_MARGIN_SHIFT macros to
pycore_pythonrun.h internal header. Add underscore (_) prefix to the
names to make them private. Rename _PYOS to _PyOS.

4 months agogh-135836: Fix `IndexError` in `asyncio.create_connection` with empty exceptions...
heliang666s [Tue, 1 Jul 2025 11:50:11 +0000 (19:50 +0800)] 
gh-135836: Fix `IndexError` in `asyncio.create_connection` with empty exceptions list (#135845)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 months agogh-133447: Update `sqlite3` What's New 3.15 entry (GH-136079)
Stan Ulbrych [Tue, 1 Jul 2025 10:30:51 +0000 (11:30 +0100)] 
gh-133447: Update `sqlite3` What's New 3.15 entry (GH-136079)

4 months agogh-87135: threading.Lock: Raise rather than hang on Python finalization (GH-135991)
Petr Viktorin [Tue, 1 Jul 2025 08:57:42 +0000 (10:57 +0200)] 
gh-87135: threading.Lock: Raise rather than hang on Python finalization (GH-135991)

After Python finalization gets to the point where no other thread
can attach thread state, attempting to acquire a Python lock must hang.
Raise PythonFinalizationError instead of hanging.

4 months agogh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `pyexpat` (#135346)
Petr Viktorin [Tue, 1 Jul 2025 08:54:08 +0000 (10:54 +0200)] 
gh-133157: remove usage of `_Py_NO_SANITIZE_UNDEFINED` in `pyexpat` (#135346)

This was the last usage, so the macro is removed as well.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months agogh-133982: Use implementation-specific `open` in `test_fileio.OtherFileTests` (GH...
Cody Maloney [Mon, 30 Jun 2025 21:56:11 +0000 (14:56 -0700)] 
gh-133982: Use implementation-specific `open` in `test_fileio.OtherFileTests` (GH-135364)

4 months agogh-135422: Fix regression in `SyntaxError` messages after #134036 (#135423)
sobolevn [Mon, 30 Jun 2025 18:52:26 +0000 (21:52 +0300)] 
gh-135422: Fix regression in `SyntaxError` messages after #134036 (#135423)

4 months agogh-134939: Fill Out the concurrent.interpreters Docs (gh-135902)
Eric Snow [Mon, 30 Jun 2025 16:54:53 +0000 (10:54 -0600)] 
gh-134939: Fill Out the concurrent.interpreters Docs (gh-135902)

4 months agogh-63207: Update `time.time` documentation after #116822 (#136068)
Stan Ulbrych [Mon, 30 Jun 2025 16:10:24 +0000 (17:10 +0100)] 
gh-63207: Update `time.time` documentation after #116822 (#136068)

4 months agogh-136122: Fix video link for math.tau documentation (#136129)
sedram [Mon, 30 Jun 2025 14:43:39 +0000 (10:43 -0400)] 
gh-136122: Fix video link for math.tau documentation (#136129)

4 months agogh-85702: Catch PermissionError in zoneinfo.load_tzdata() (#136117)
Victor Stinner [Mon, 30 Jun 2025 14:33:01 +0000 (16:33 +0200)] 
gh-85702: Catch PermissionError in zoneinfo.load_tzdata() (#136117)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
4 months agogh-48181: Document `codecs.charmap_build` (#135997)
Stan Ulbrych [Mon, 30 Jun 2025 13:42:08 +0000 (14:42 +0100)] 
gh-48181: Document `codecs.charmap_build` (#135997)

4 months agogh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)
Adam Dangoor [Mon, 30 Jun 2025 13:32:51 +0000 (14:32 +0100)] 
gh-131885: Update documented signatures for `csv.{writer,reader}` (GH-136085)

4 months agogh-123471: Make itertools.product and itertools.combinations thread-safe (#132814)
Pieter Eendebak [Mon, 30 Jun 2025 11:31:59 +0000 (13:31 +0200)] 
gh-123471: Make itertools.product and itertools.combinations thread-safe (#132814)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
4 months agogh-135607: remove null checking of weakref list in dealloc of extension modules and...
Xuanteng Huang [Mon, 30 Jun 2025 11:14:31 +0000 (19:14 +0800)] 
gh-135607: remove null checking of weakref list in dealloc of extension modules and objects (#135614)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-123471: Make itertools.chain thread-safe (#135689)
Pieter Eendebak [Mon, 30 Jun 2025 11:06:58 +0000 (13:06 +0200)] 
gh-123471: Make itertools.chain thread-safe (#135689)

4 months agogh-132813: Fix the csv documentation for quoting and escaping (#133209)
Serhiy Storchaka [Mon, 30 Jun 2025 07:42:00 +0000 (10:42 +0300)] 
gh-132813: Fix the csv documentation for quoting and escaping (#133209)

4 months agogh-136087: Remove `\r` from documented `os.linesep` values (#136088)
sobolevn [Mon, 30 Jun 2025 07:12:05 +0000 (10:12 +0300)] 
gh-136087: Remove `\r` from documented `os.linesep` values (#136088)

4 months agogh-130160: use `.. program::` directive for documenting `venv` CLI (GH-130699)
Kanishk Pachauri [Mon, 30 Jun 2025 05:41:57 +0000 (11:11 +0530)] 
gh-130160: use `.. program::` directive for documenting `venv` CLI (GH-130699)

Co-authored-by: Semyon Moroz <donbarbos@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
4 months agoDoc: fix duplicated words (#136086)
Weilin Du [Sun, 29 Jun 2025 22:04:02 +0000 (06:04 +0800)] 
Doc: fix duplicated words (#136086)

---------

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 months agogh-123299: Provide replacement for removed sqlite3 attributes in What's New 3.14...
fry69 [Sun, 29 Jun 2025 15:34:45 +0000 (17:34 +0200)] 
gh-123299: Provide replacement for removed sqlite3 attributes in What's New 3.14 (#125566)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
4 months agogh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)
Peter Bierma [Sun, 29 Jun 2025 14:58:26 +0000 (10:58 -0400)] 
gh-127604: Docs: Include a C stack in the `faulthandler` example (GH-136081)

4 months agogh-136066: simplify `platform._platform()` (#136069)
Bénédikt Tran [Sun, 29 Jun 2025 07:56:52 +0000 (09:56 +0200)] 
gh-136066: simplify `platform._platform()` (#136069)

4 months agogh-136053: Check error for TYPE_SLICE in marshal.c (GH-136054)
Akshat Gupta [Sun, 29 Jun 2025 07:07:24 +0000 (12:37 +0530)] 
gh-136053: Check error for TYPE_SLICE in marshal.c (GH-136054)

Fix a possible crash when deserializing a large marshal data
(at least several GiBs) containing a slice.

4 months agoDoc: Fix duplicate words in idlelib (#136089)
Weilin Du [Sun, 29 Jun 2025 06:47:38 +0000 (14:47 +0800)] 
Doc: Fix duplicate words in idlelib (#136089)

4 months agogh-91048: Fix external inspection multi-threaded performance (#136005)
Pablo Galindo Salgado [Sat, 28 Jun 2025 13:11:31 +0000 (14:11 +0100)] 
gh-91048: Fix external inspection multi-threaded performance (#136005)

4 months agogh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)
Nicolas Trangez [Sat, 28 Jun 2025 13:01:41 +0000 (15:01 +0200)] 
gh-76595: Add note on `PyCapsule_Import` behavior (GH-134022)

4 months agogh-135853: add `math.signbit` (#135877)
Bénédikt Tran [Sat, 28 Jun 2025 12:46:07 +0000 (14:46 +0200)] 
gh-135853: add `math.signbit` (#135877)

4 months agogh-132732: Fix up pure types in JIT (GH-136050)
Ken Jin [Sat, 28 Jun 2025 10:30:30 +0000 (18:30 +0800)] 
gh-132732: Fix up pure types in JIT (GH-136050)

Fix up pure types in JIT

4 months agoFix a typo in Lib/unittest/mock.py (#136067)
Weilin Du [Sat, 28 Jun 2025 09:25:07 +0000 (17:25 +0800)] 
Fix a typo in Lib/unittest/mock.py (#136067)

4 months agogh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)
Ken Jin [Fri, 27 Jun 2025 16:18:44 +0000 (00:18 +0800)] 
gh-132732: JIT: Only allow compact ints in pure evaluation (GH-136040)

4 months agoGH-135904: Optimize the JIT's assembly control flow (GH-135905)
Brandt Bucher [Fri, 27 Jun 2025 15:20:51 +0000 (08:20 -0700)] 
GH-135904: Optimize the JIT's assembly control flow (GH-135905)

4 months agogh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (#136027)
Lee Dogeon [Fri, 27 Jun 2025 15:15:11 +0000 (00:15 +0900)] 
gh-108765: fix comment about macro definitions in `_stat.c` post GH-108854 (#136027)

4 months agogh-135755: rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros (#135847)
Bénédikt Tran [Fri, 27 Jun 2025 15:12:21 +0000 (17:12 +0200)] 
gh-135755: rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros (#135847)

Rename undocumented `HACL_CAN_COMPILE_SIMD{128,256}` macros
to `_Py_HACL_CAN_COMPILE_VEC{128,256}`. These macros are private.

4 months agogh-135571: Guard `_hashlib` usage in `test_hashlib.py` (#135572)
Will Childs-Klein [Fri, 27 Jun 2025 15:01:16 +0000 (11:01 -0400)] 
gh-135571: Guard `_hashlib` usage in `test_hashlib.py` (#135572)

4 months agogh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029)
Serhiy Storchaka [Fri, 27 Jun 2025 13:47:03 +0000 (16:47 +0300)] 
gh-136028: Fix parsing month names containing "İ" (U+0130) in strptime() (GH-136029)

This affects locales az_AZ, ber_DZ, ber_MA and crh_UA.

4 months agogh-92266: Replace tabs with four spaces in Python files (#135983)
Hugo van Kemenade [Fri, 27 Jun 2025 13:23:33 +0000 (16:23 +0300)] 
gh-92266: Replace tabs with four spaces in Python files (#135983)

4 months agogh-132732: Automatically constant evaluate pure operations (GH-132733)
Ken Jin [Fri, 27 Jun 2025 11:37:44 +0000 (19:37 +0800)] 
gh-132732: Automatically constant evaluate pure operations (GH-132733)

This adds a "macro" to the optimizer DSL called "REPLACE_OPCODE_IF_EVALUATES_PURE", which allows automatically constant evaluating a bytecode body if certain inputs have no side effects upon evaluations (such as ints, strings, and floats).

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
4 months agogh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable...
Serhiy Storchaka [Fri, 27 Jun 2025 11:35:55 +0000 (14:35 +0300)] 
gh-78465: Fix error message for cls.__new__(cls, ...) where cls is not instantiable (GH-135981)

Previous error message suggested to use cls.__new__(), which
obviously does not work. Now the error message is the same as for
cls(...).

4 months agogh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)
Sergey B Kirpichev [Fri, 27 Jun 2025 10:00:25 +0000 (13:00 +0300)] 
gh-128051: Fix tests if sys.float_repr_style is 'legacy' (#135908)

Co-authored-by: Victor Stinner <vstinner@python.org>
4 months agogh-136017: avoid decref in rich compare for bool objects (#136018)
Pieter Eendebak [Fri, 27 Jun 2025 09:01:51 +0000 (11:01 +0200)] 
gh-136017: avoid decref in rich compare for bool objects (#136018)

4 months agogh-53203: Fix strptime() for %c, %x and %X formats on some locales (#135971)
Serhiy Storchaka [Fri, 27 Jun 2025 07:50:59 +0000 (10:50 +0300)] 
gh-53203: Fix strptime() for %c, %x and %X formats on some locales (#135971)

* Add detection of decimal non-ASCII alt digits.
* Add support of non-decimal alt digits on locale lzh_TW.
* Accept only numbers in correct range if alt digits are known.
* Fix bug in detecting the position of the week day name on locales byn_ER and wal_ET.
* Fix support of single-digit hour on locales ar_SA and bg_BG.
* Add support for %T, %R, %r, %C, %OC.
* Prepare code to use nl_langinfo().

4 months agogh-135968: Add iOS binary stubs for strip (#135970)
Russell Keith-Magee [Fri, 27 Jun 2025 04:58:20 +0000 (12:58 +0800)] 
gh-135968: Add iOS binary stubs for strip (#135970)

Adds iOS binary stubs for invoking `strip`

4 months agogh-135551: Change how sorting picks minimum run length (#135553)
Tim Peters [Fri, 27 Jun 2025 04:48:05 +0000 (23:48 -0500)] 
gh-135551: Change how sorting picks minimum run length (#135553)

New scheme from Stefan Pochmann for picking minimum run lengths.

By allowing them to change a little from one run to the next, it's possible to
arrange for that all merges, at all levels, strongly tend to be as evenly balanced
as possible, for randomly ordered data. Meaning the number of initial runs is a
power of 2, and all merges involve runs whose lengths differ by no more than 1.

4 months agogh-135966: Modify iOS testbed to make app_packages a site directory (#135967)
Russell Keith-Magee [Fri, 27 Jun 2025 04:46:49 +0000 (12:46 +0800)] 
gh-135966: Modify iOS testbed to make app_packages a site directory (#135967)

The iOS testbed now treats the app_packages folder as a site folder. This ensures it is
on the path, but also ensures any .pth files are processed on app startup.

4 months agoDocs: Fix duplicate word typos (GH-135958)
Brian Schubert [Fri, 27 Jun 2025 00:00:19 +0000 (20:00 -0400)] 
Docs: Fix duplicate word typos (GH-135958)

4 months agogh-135995: Fix missing char in palmos encoding (#135990)
Nathan Korth [Thu, 26 Jun 2025 22:35:45 +0000 (18:35 -0400)] 
gh-135995: Fix missing char in palmos encoding (#135990)

0x8b correctly encodes to ‹, but 0x9b was mistakenly marked as a control character instead of ›.
---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
4 months agoIDLE: Update NEWS2x.txt with 2.7.0 release date (#129908)
Stan Ulbrych [Thu, 26 Jun 2025 20:20:07 +0000 (21:20 +0100)] 
IDLE: Update NEWS2x.txt with 2.7.0 release date (#129908)

4 months agogh-135927: Check _MSC_VER to define _Py_NULL macro (#135987)
Victor Stinner [Thu, 26 Jun 2025 16:11:49 +0000 (18:11 +0200)] 
gh-135927: Check _MSC_VER to define _Py_NULL macro (#135987)

4 months agogh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH...
Duane Griffin [Thu, 26 Jun 2025 14:18:32 +0000 (02:18 +1200)] 
gh-91555: add warning to docs about possibility of deadlock/infinite recursion (GH-135954)

* gh-91555: add warning to docs about possibility of deadlock/infinite recursion

Attempt to clarify in the documentation that care must be taken when using
multiprocessing classes to implement logging since they have builtin internal
logging, and hence may cause deadlock/infinite recursion.

* Update Doc/library/logging.handlers.rst

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
* Change whitespace.

---------

Co-authored-by: Vinay Sajip <vinay_sajip@yahoo.co.uk>
4 months agogh-135110: Fix misleading `generator.close()` documentation (GH-135152)
Connor Denihan [Thu, 26 Jun 2025 13:27:25 +0000 (09:27 -0400)] 
gh-135110: Fix misleading `generator.close()` documentation (GH-135152)

The documentation incorrectly stated that generator.close() 'raises' a
GeneratorExit exception. This was misleading because the method doesn't
raise the exception to the caller - it sends the exception internally
to the generator and returns None.

4 months agogh-129958: New syntax error in format spec applies to both f-strings and t-strings...
Dylan [Thu, 26 Jun 2025 13:02:50 +0000 (08:02 -0500)] 
gh-129958: New syntax error in format spec applies to both f-strings and t-strings (#135570)

Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
4 months agogh-135965: Delete duplicate word in isolating-extensions howto (#135964)
Weilin Du [Thu, 26 Jun 2025 11:41:41 +0000 (19:41 +0800)] 
gh-135965: Delete duplicate word in isolating-extensions howto (#135964)

Change use use to use.

4 months agogh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921)
Petr Viktorin [Thu, 26 Jun 2025 11:05:01 +0000 (13:05 +0200)] 
gh-135755: Use private names (_Py*) for header file guards new in 3.14 (GH-135921)

These are private API; let's name new ones accordingly.

4 months agogh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)
Petr Viktorin [Thu, 26 Jun 2025 09:48:37 +0000 (11:48 +0200)] 
gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)

4 months agogh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)
Peter Bierma [Thu, 26 Jun 2025 09:43:08 +0000 (05:43 -0400)] 
gh-135755: Move `PyFunction_GET_BUILTINS` to the private API (GH-135938)

4 months agogh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed struct tag ...
Petr Viktorin [Thu, 26 Jun 2025 07:25:41 +0000 (09:25 +0200)] 
gh-131591: Add Py_ prefix to MAX_SCRIPT_PATH_SIZE; remove unprefixed struct tag (GH-135924)

Names/macros defined in public headers should have `Py`/`_Py` prefixes.

4 months agogh-135956: Remove duplicate word in _pydatetime docstring (#135957)
Terry Jan Reedy [Thu, 26 Jun 2025 03:44:08 +0000 (23:44 -0400)] 
gh-135956: Remove duplicate word in _pydatetime docstring (#135957)

_pydatetime.isoformat docstring repeats 'giving'.

4 months agoAdd whatsnew text for warnings module changes. (gh-135869)
Neil Schemenauer [Thu, 26 Jun 2025 03:03:24 +0000 (20:03 -0700)] 
Add whatsnew text for warnings module changes. (gh-135869)

4 months agogh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)
Stan Ulbrych [Thu, 26 Jun 2025 03:01:25 +0000 (04:01 +0100)] 
gh-125142: remove duplicated import in `Lib/pydoc.py` (gh-135215)

4 months agoDocs: Fix indentation in `slice` class of `functions.rst` (GH-134393)
Rob Reynolds [Wed, 25 Jun 2025 17:40:00 +0000 (11:40 -0600)] 
Docs: Fix indentation in `slice` class of `functions.rst` (GH-134393)

Paragraph should not be under `slice.step`. It applies to the whole class.

---------

Co-authored-by: Rob Reynolds <13379223+reynoldsnlp@users.noreply.github.com>