Commit graph

130668 commits

Author SHA1 Message Date
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
Victor Stinner
90f9991abb
gh-146056: Rework ref counting in treebuilder_handle_end() (#146167)
Use more regular code to handle reference counting in
treebuilder_handle_end().

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2026-03-23 12:17:54 +01:00
Stan Ulbrych
fb8d8d9c9f
Add a warning about untrusted input to configparser docs (#146276) 2026-03-22 19:58:31 -04:00
Serhiy Storchaka
4561f6418a
gh-145264: Do not ignore excess Base64 data after the first padded quad (GH-145267)
Base64 decoder (see binascii.a2b_base64(), base64.b64decode(), etc)
no longer ignores excess data after the first padded quad in non-strict
(default) mode.  Instead, in conformance with RFC 4648, it ignores the
pad character, "=", if it is present before the end of the encoded data.
2026-03-22 23:12:58 +02:00
Pablo Galindo Salgado
ae6adc9079
gh-146308: Fix error handling issues in _remote_debugging module (#146309) 2026-03-22 21:12:02 +00: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
flow
a17301ab3d
gh-135953: Properly obtain main thread identifier in Gecko Collector (#146045) 2026-03-22 18:53:00 +00:00
reiden
e36f8db7e5
gh-143414: Implement unique reference tracking for JIT, optimize unpacking of such tuples (GH-144300)
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-03-23 00:57:23 +08:00
Sacul
1ceb1fb284
gh-146261: Fix bug in _Py_uop_sym_set_func_version (GH-146291) 2026-03-23 00:11:37 +08:00
Serhiy Storchaka
161329cde2
gh-145144: Add more tests for UserList, UserDict, etc (GH-145145) 2026-03-22 16:22:25 +02:00
Serhiy Storchaka
97c725cd39
gh-143959: Fix test_datetime if _datetime is unavailable (GH-145248) 2026-03-22 16:15:35 +02:00
AN Long
c30fae4bea
gh-146245: Fix reference and buffer leaks via audit hook in socket module (GH-146248) 2026-03-22 13:29:34 +02:00
Stan Ulbrych
f0aeabc6f9
gh-140049: Colorize exception notes in traceback.py (#140051)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2026-03-22 08:54:43 +00:00
Serhiy Storchaka
3776aba204
Update docs for gh-146056 (GH-146213) 2026-03-22 09:29:04 +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
Jonathan Dung
f6b5eed47d
gh-146153: Use frozendict in pure python fallback for curses.has_key (#146154)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-03-21 14:06:07 +01:00
andreuu-tsai
8a531f89df
gh-138234: clarify returncode behavior for subprocesses created with shell=True (#138536)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 12:32:28 +00:00
Kumar Aditya
60fbc20ef9
gh-140947: fix contextvars handling for server tasks in asyncio (#141158) 2026-03-21 17:44:08 +05:30
Sergey Miryanov
897fa231a7
GH-100108: Add async generators best practices section (#141885)
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-03-21 11:59:15 +00:00
Mark Shannon
879c85f6e4
GH-145667: Merge GET_ITER and GET_YIELD_FROM_ITER (GH-146120)
* Merge GET_ITER and GET_YIELD_FROM_ITER. Modify SEND to make it a bit more like FOR_ITER
2026-03-21 10:48:13 +00:00
Jason R. Coombs
b5e4c46be2
gh-146228: Better fork support in cached FastPath (#146231)
* Apply changes from importlib_metadata 8.9.0
* Suppress deprecation warning in fork.
2026-03-20 20:10:50 +00:00
Sam Gross
1eff27f2c0
gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h (gh-146229)
Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.
2026-03-20 15:38:35 -04:00
Victor Stinner
b36b87bcbb
gh-145980: Fix copy/paste mistake in binascii.c (#146230) 2026-03-20 18:12:10 +00:00
Victor Stinner
6450b1d142
gh-146092: Raise MemoryError on allocation failure in _zoneinfo (#146165) 2026-03-20 17:17:22 +01:00
Wulian233
5ad738f8fb
gh-91279: Note SOURCE_DATE_EPOCH support in ZipFile.writestr() doc (#139396)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-20 16:14:25 +00:00
Shamil
cd10a2e65c
gh-146196: Fix Undefined Behavior in _PyUnicodeWriter_WriteASCIIString() (#146201)
Avoid calling memcpy(data + writer->pos, NULL, 0)
which has an undefined behavior.

Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-20 15:58:41 +00:00
Seth Michael Larson
82a24a4442
gh-143930: Reject leading dashes in webbrowser URLs 2026-03-20 14:47:13 +00:00
Petr Viktorin
b38127f3d6
gh-145916: Soft-deprecate ctypes.util.find_library (GH-145919)
* Put the "Loading shared libraries" section first
  * Adjust formatting at the end of the section
* In "Finding shared libraries", add more text about what's going on
* Move the stub function doc for find_library into "Finding shared libraries"
  * Also move the sister function, find_msvcrt. That's on the chopping block,
    but not removed now.
2026-03-20 15:00:10 +01:00
AN Long
9f9faa2d1a
gh-146205: Check the errno with != 0 in close impls in select module (#146206)
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2026-03-20 14:44:01 +01:00
Pablo Galindo Salgado
2f4eb34bd2
gh-146171: Fix nested AttributeError suggestions (#146188) 2026-03-20 12:47:59 +00:00
Ken Jin
acfb4528de
gh-146099: Optimize _GUARD_CODE_VERSION+IP via function version symbols (GH-146101) 2026-03-20 12:26:41 +00: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
Matthias Schoettle
d357a7dbf3
gh-145754: Update signature retrieval in unittest.mock to use forwardref annotation format (#145756) 2026-03-19 19:39:41 -07:00
Hood Chatham
6b5511d66b
gh-145177: Add emscripten run --test, uses test args from config.toml (#146160)
This allows us to change the test arguments from the python repo rather
than having to change buildmaster-config.

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
2026-03-19 22:14:13 +00:00
Mingzhu Yan
98977ca433
gh-131798: JIT: optimize _LOAD_COMMON_CONSTANT (GH-146104) 2026-03-20 05:55:22 +08:00
Hood Chatham
db11623694
gh-145177: Add make-dependencies command to emscripten build script (#146158)
Adds a standalone target for building all dependencies so that the buildbot
script is independent of a specific dependency list.
2026-03-20 05:40:01 +08:00
Serhiy Storchaka
ab47892c32
Improve tests for the PyUnicodeWriter C API (GH-146157)
Add tests for corner cases: NULL pointers and out of range values.
2026-03-19 19:15:30 +02:00
Sacul
d5b26816d0
gh-145866 : Update JIT contributor list (GH-146170) 2026-03-19 21:40:09 +08:00
Sergey B Kirpichev
52c01864c4
gh-145633: Refine notes on non-IEEE platforms (#145845)
* We don't specify what happens on non-IEEE platforms.
* Use rather PY_LITTLE_ENDIAN to get native endianness.
* Mention that unpack functions don't fail in CPython.
* Mention that PyFloat_Pack8 doesn't fail in CPython.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-19 11:42:25 +00:00
Sergey Miryanov
ced64605be
GH-146096: Fix segfault in BaseExceptionGroup repr (#146141) 2026-03-19 11:25:15 +00:00
Carlos Sousa
004ce8d97b
gh-137696: Rename 'fort' parameter to 'order' in PyBuffer_* functions (#137866) 2026-03-19 16:54:27 +05:30
Sacul
0d37e423d5
gh-145866: Convert SET_UPDATE to leave its inputs on the stack to be cleaned up by _POP_TOP (GH-145979) 2026-03-19 19:17:58 +08:00
Tan Long
982459132b
gh-145394: Remove duplicated isearch_add_character in _pyrepl/historical_reader.py (#145396) 2026-03-19 16:38:01 +05:30
Lysandros Nikolaou
580043dfae
gh-145254: Fix formatting of thread safety annotations (#146111)
- Add leading space so that the spacing between the previous annotation
  and the thread safety annotation looks correct.
- Remove trailing period from the link to the thread safety level.
2026-03-19 12:01:24 +01:00
Okiemute Enato
89a154a0c0
gh-146091: Fix NULL check in termios.tcsetwinsize (#146147) 2026-03-19 16:20:18 +05:30
Hood Chatham
91e1312b95
gh-145177: Put node version into emscripten/config.toml. (#146156)
Configure node version as part of the emscripten build script, and install 
that node version if it isn't available.
2026-03-19 09:38:22 +00:00
Serhiy Storchaka
becd7a967f
gh-146143: Fix the PyUnicodeWriter_WriteUCS4() signature (GH-146144)
It now accepts a pointer to constant buffer of Py_UCS4.
2026-03-19 08:23:01 +00:00
Serhiy Storchaka
0f2246b155
gh-146056: Fix list.__repr__() for lists containing NULLs (GH-146129)
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-03-19 09:59:48 +02:00
Hood Chatham
abd5246305
gh-145805: Add python Platforms/emscripten run subcommand (#146051)
Provides a `run` command in the Emscripten build tooling, and adds 
environment variable configuration for EMSDK_CACHE, CROSS_BUILD_DIR
and QUIET.
2026-03-19 09:06:17 +08:00
Victor Stinner
b9d43188e9
gh-145410: Add _sysconfig.get_platform() function (#146145)
On Windows, sysconfig.get_platform() now gets the platform from the
_sysconfig module instead of parsing sys.version string.
2026-03-19 00:28:21 +01:00