Commit graph

5028 commits

Author SHA1 Message Date
johnthagen
4447f23f40
Fix typo in 3.14 What's New tail call interpreter docs (GH-146425) 2026-03-25 14:53:25 -04:00
Sergey B Kirpichev
68c7fad757
gh-138580: Add sys.float_info.iec_60559 boolean flag (#138811)
This value indicating support the IEC 60559 floating-point standard (the
Annex F of C99).  If enabled, the float type characteristics matches the
IEC 60559 double format and exceptional cases for the math's functions
follow to the section F.10 of the C99 standard.

Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-24 11:36:15 +00:00
Hugo van Kemenade
07a555d4fc
gh-133879: Copyedit "What's new in Python 3.15" (#146345) 2026-03-24 11:01:26 +02:00
Charlie Lin
821581adae
gh-145719: Add .efi file detection in mimetypes (#145720)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-23 22:16:41 +02:00
Petr Viktorin
91cd2e5806
gh-146175: Soft-deprecate outdated macros; convert internal usage (GH-146178)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-23 12:42:09 +01:00
kangtastic
b4e5bc2164
gh-146192: Add base32 support to binascii (GH-146193)
Add base32 encoder and decoder functions implemented in
C to the binascii module and use them to greatly improve the
performance and reduce the memory usage of the existing
base32 codec functions in the base64 module.
2026-03-22 23:10:28 +02:00
Hugo van Kemenade
83360b5869
Docs: replace all datetime imports with import datetime as dt (#145640) 2026-03-21 18:02:06 +02:00
Serhiy Storchaka
4507d496b4
gh-145980: Add support for alternative alphabets in the binascii module (GH-145981)
* Add the alphabet parameter in functions b2a_base64(), a2b_base64(),
  b2a_base85(), and a2b_base85().
* And a number of "*_ALPHABET" constants.
* Remove b2a_z85() and a2b_z85().
2026-03-20 13:07:00 +02:00
Sacul
d5b26816d0
gh-145866 : Update JIT contributor list (GH-146170) 2026-03-19 21:40:09 +08:00
Victor Stinner
656abe3c9a
gh-141510: Document isinstance change for frozendict in What's New (#146107) 2026-03-18 23:09:18 +01:00
Michiel W. Beijen
d42a04c045
GH-60729: Add IEEE format wave audio support (GH-145931)
(this re-applies reverted commit 61f2a1a599,
with a test fix)

Co-authored-by: Lionel Koenig <lionelk@google.com>
2026-03-18 12:46:26 +00:00
Ken Jin
e2e62033aa
gh-139038: Link to Savannah's webpage for JIT results (#146013) 2026-03-16 11:10:34 +01:00
Shahar Naveh
f7cb789dc5
gh-145998: Remove duplicated "What's New in 3.15" entry (#145994) 2026-03-15 22:54:19 +01:00
Petr Viktorin
747ef70faa
GH-60729: Revert "Add IEEE format wave audio support (GH-145384)" (GH-145928)
Revert "GH-60729: Add IEEE format wave audio support (GH-145384)"

This reverts commit 61f2a1a599 for now;
as tests fail on big-endian machines.
2026-03-13 17:51:23 +00:00
Michiel W. Beijen
61f2a1a599
GH-60729: Add IEEE format wave audio support (GH-145384)
Co-authored-by: Lionel Koenig <lionelk@google.com>
2026-03-13 14:10:48 +01:00
Furkan Onder
9162238511
gh-99631: Add shelve custom serialization to What's New in 3.15 (#145253) 2026-03-13 14:38:06 +02:00
Charlie Lin
7a65900764
gh-145717: Add a few Microsoft-specific MIME types, and synchronize between mimetypes module and tests (#145718)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-12 18:56:07 +02:00
Serhiy Storchaka
72456309e9
gh-143715: Deprecate incomplete initialization of struct.Struct() (GH-145580)
* Struct.__new__() will require a mandatory argument (format)
* Calls of __init__() method with a different format argument on initialized
  Struct are deprecated

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
2026-03-12 09:44:11 +02:00
Charlie Lin
467507a651
gh-145697: Add .sql and .sqlite3 recognition in mimetypes (GH-145698)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2026-03-10 16:21:33 +01:00
Hugo van Kemenade
55b36fdb3d
gh-133879: Copyedit "What's new in Python 3.15" (#145737) 2026-03-10 13:11:43 +02:00
Stan Ulbrych
bdf0105291
gh-103997: Remove incorrect statements about -c dedenting (gh-138624) 2026-03-10 09:56:00 +01:00
Victor Stinner
9159287f58
gh-144175: Add PyArg_ParseArray() function (#144283)
Add PyArg_ParseArray() and PyArg_ParseArrayAndKeywords()
functions to parse arguments of functions using the METH_FASTCALL
calling convention.

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-03-06 21:57:44 +00:00
Victor Stinner
37e421bb43
gh-141510: Complete What's New in Python 3.15 for frozendict (#145537)
Mention updated stdlib modules and built-in functions.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-03-05 17:44:58 +01:00
Victor Stinner
31343cf2bc
gh-142417: Restore private _Py_InitializeMain() function (#145472)
This reverts commit 07c3518ffb.

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2026-03-04 11:00:08 +01:00
Jelle Zijlstra
3484ef6003
gh-145033: Implement PEP 747 (#145034) 2026-02-28 19:52:04 -08:00
Stan Ulbrych
4d89056ed0
gh-76007: Deprecate tarfile.version (#145326)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-02-27 18:46:02 +00:00
Matthias Kievernagel
f8ce51a522
gh-47655: Add support for user data and detail of Tk events to tkinter (GH-7142)
Expose the %d substitution as the tkinter.Event attributes:

* "detail" for Enter, Leave, FocusIn, FocusOut, and ConfigureRequest events
* "user_data" for virtual events

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-25 10:34:00 +02:00
Bartosz Sławecki
97181bb336
gh-143535: Dispatch on the second argument if generic method is instance-bindable (GH-144615)
Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2026-02-24 17:04:37 +01:00
Stan Ulbrych
f1f61bf872
gh-66802: Add unicodedata.block() function (#145042)
Closes #66802
2026-02-21 18:27:55 +01:00
Bartosz Sławecki
0499a0c17f
gh-144285: Update *What's New* entry after GH-144299 (#145077) 2026-02-21 12:50:55 +00: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
Donghee Na
52794cba13
gh-141510: Update Whats News for frozendict (gh-144961) 2026-02-19 12:48:57 +00:00
Kumar Aditya
836f2c97f9
gh-144914: use mimalloc for raw allocations on free-threading (#144916) 2026-02-18 04:16:27 +00:00
Victor Stinner
696cdfc0a2
gh-141510, PEP 814: Add built-in frozendict type (#144757)
Add TYPE_FROZENDICT to the marshal module.

Add C API functions:

* PyAnyDict_Check()
* PyAnyDict_CheckExact()
* PyFrozenDict_Check()
* PyFrozenDict_CheckExact()
* PyFrozenDict_New()

Add PyFrozenDict_Type C type.

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Johnson <me@adamj.eu>
Co-authored-by: Benedikt Johannes <benedikt.johannes.hofer@gmail.com>
2026-02-17 10:54:41 +01:00
Gregory P. Smith
300de1e98a
gh-86519: Add prefixmatch APIs to the re module (GH-31137)
Adds `prefixmatch` APIs to the re module as an alternate name for our long existing `match` APIs to help alleviate a common Python confusion for those coming from other languages regular expression libraries.

These alleviate common confusion around what "match" means as Python is different than other popular languages regex libraries in our use of the term as an API name.  The original `match` names are **NOT being deprecated**.  Source tooling like linters, IDEs, and LLMs could suggest using `prefixmatch` instead of match to improve code health and reduce cognitive burden of understanding the intent of code when configured for a modern minimum Python version.

See the documentation changes for a better description.

Discussions took place in the PR, in the issue, and finally at https://discuss.python.org/t/add-re-prefixmatch-deprecate-re-match/105927

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 17:43:39 -08:00
Kumar Aditya
50c479e613
add whatsnew entry for PyUnstable_SetImmortal and PyDatetime_IMPORT (#144830) 2026-02-15 20:21:54 +05:30
Pablo Galindo Salgado
46d5106cfa
gh-142349: Implement PEP 810 - Explicit lazy imports (#142351)
Co-authored-by: T. Wouters <twouters@meta.com >
Co-authored-by: Brittany Reynoso <breynoso@meta.com>
Co-authored-by: Dino Viehland <dinoviehland@meta.com>
2026-02-12 00:15:33 +00:00
Hugo van Kemenade
b4a620d2d7
gh-133879: Copyedit "What's new in Python 3.15" (#144661)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-10 18:49:20 +02:00
kangtastic
45d4a34720
gh-101178: Add Ascii85, Base85, and Z85 support to binascii (GH-102753)
Add Ascii85, Base85, and Z85 encoders and decoders to binascii,
replacing the existing pure Python implementations in base64.

This makes the codecs two orders of magnitude faster and consume
two orders of magnitude less memory.

Note that attempting to decode Ascii85 or Base85 data of length 1 mod 5
(after accounting for Ascii85 quirks) now produces an error, as no
encoder would emit such data. This should be the only significant
externally visible difference compared to the old implementation.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-06 16:43:16 +02:00
Zackery Spytz
01a1dd283b
gh-77188: Add support for pickling private methods and nested classes (GH-21480)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-02-05 19:50:51 +00:00
Serhiy Storchaka
67ddba9aa9
gh-144148: Update the urllib.parse documentation (GH-144497)
Document urlsplit() as the main parsing function and urlparse() as
an obsolete variant.
2026-02-05 16:32:17 +02:00
Serhiy Storchaka
f73d2e7003
gh-144386: Add support for descriptors in ExitStack and AsyncExitStack (#144420)
__enter__(), __exit__(), __aenter__(), and __aexit__() can now be
arbitrary descriptors, not only normal methods, for consistency with the
"with" and "async with" statements.
2026-02-04 13:20:18 +02:00
Taneli Hukkinen
bb917d83b1
gh-142956: Update tomllib to parse TOML 1.1.0 (#144243)
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-02-03 13:41:57 +01:00
adam j hartz
ccbe41e27c
gh-143055: Implementation of PEP 798 (#143056)
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2026-01-30 20:37:52 -08:00
Pablo Galindo Salgado
96e4cd698a
gh-144319: Fix huge page safety in pymalloc arenas (#144331)
The pymalloc huge page support had two problems. First, on
architectures where the default huge page size exceeds the arena
size (e.g. 32 MiB on PPC, 512 MiB on ARM64 with 64 KB base
pages), mmap with MAP_HUGETLB silently allocates a full huge page
even when the requested size is smaller. The subsequent munmap
with the original arena size then fails with EINVAL, permanently
leaking the entire huge page. Second, huge pages were always
attempted when compiled in, with no way to disable them at
runtime. On Linux, if the huge page pool is exhausted, page
faults including copy-on-write faults after fork deliver SIGBUS
and kill the process.

The arena allocator now queries the system huge page size from
/proc/meminfo and skips MAP_HUGETLB when the arena size is not a
multiple of it. Huge pages also now require explicit opt-in at
runtime via the PYTHON_PYMALLOC_HUGEPAGES environment variable,
which is read through PyConfig and respects -E and -I flags.
The config field pymalloc_hugepages is propagated to the runtime
allocators struct so the low-level arena allocator can check it
without calling getenv directly.
2026-01-30 18:18:56 +00:00
Pablo Galindo Salgado
b1bc868fba
gh-144319: Add huge pages support for pymalloc (#144320) 2026-01-29 12:26:11 +00:00
Giampaolo Rodola
9b154aba7d
gh-83069: Use efficient event-driven subprocess.Popen.wait() on Linux / macOS / BSD (#144047) 2026-01-28 15:04:40 +01:00
Serhiy Storchaka
7febbe6b60
gh-144001: Support ignorechars in binascii.a2b_base64() and base64.b64decode() (GH-144024) 2026-01-26 20:11:40 +02:00
FooIbar
1f55caf97e
gh-144212: Add image/jxl to mimetypes (GH-144213) 2026-01-26 15:26:55 +01:00
benediktjohannes
76d3ae71ba
gh-144217: Add dicom support (medical imaging) to mimetypes (GH-144218)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2026-01-25 22:22:43 +00:00