Serhiy Storchaka
e18829a8ad
gh-132629: Deprecate accepting out-of-range values for unsigned integers in PyArg_Parse (GH-132630)
...
For unsigned integer formats in the PyArg_Parse* functions,
accepting Python integers with value that is larger than
the maximal value the corresponding C type or less than
the minimal value for the corresponding signed integer type
is now deprecated.
2025-07-13 12:44:54 +03:00
Bénédikt Tran
9be3649f5e
gh-136591: avoid using deprecated features for OpenSSL 3.0+ ( #136592 )
...
Since OpenSSL 3.0, `ERR_func_error_string()` always returns NULL and
`EVP_MD_CTX_get0_md()` should be preferred over `EVP_MD_CTX_md()`.
2025-07-12 16:33:07 +00:00
Serhiy Storchaka
be2c3d284e
gh-136549: Fix signature of threading.excepthook() (GH-136559)
2025-07-12 18:54:26 +03:00
Illia Volochii
5a20e79725
gh-99813: Start using SSL_sendfile when available ( #99907 )
...
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
2025-07-12 12:42:35 +00:00
Bénédikt Tran
2301cdb559
gh-135853: add math.fmax and math.fmin ( #135888 )
2025-07-12 11:31:10 +00:00
Weilin Du
561212a033
Doc: More duplicate word fixes (GH-136299)
2025-07-11 21:18:47 +03:00
William S Fulton
7de8ea7be6
gh-136300: Modify C tests to conform to PEP-737 (GH-136301)
...
- Use %T format specifier instead of %s and Py_TYPE(x)->tp_name.
- Remove legacy %.200s format specifier for truncating type names.
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-07-11 15:18:35 +02:00
Petr Viktorin
b44316a097
gh-136476: Remove creation of unused list (GH-136494)
2025-07-10 08:12:23 +00:00
Pablo Galindo Salgado
ea45a2f97c
gh-136476: Show the full stack in get_async_stack_trace in _remote_debugging ( #136483 )
2025-07-09 23:11:17 +00:00
dgpb
f9932f542e
gh-119109: improve functools.partial vectorcall with keywords ( #124584 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-07-09 12:55:45 +05:30
Pablo Galindo Salgado
77d25e5b16
gh-91048: Revert the memory cache removal for remote debugging ( #136440 )
...
gh-91048: Reintroduce the memory cache for remote debugging
2025-07-09 00:31:17 +00:00
Petr Viktorin
fb170cf50d
gh-120713: Make _Py_NORMALIZE_CENTURY private (GH-135933)
2025-07-07 17:57:48 +02:00
William S Fulton
d1d5dce14f
gh-136288: Fix error message in _testcapi/vectorcall.c (GH-136258)
...
Use the %N format specifier instead of %s and `PyType_GetName`.
2025-07-04 11:54:00 -04:00
Richard Levasseur
93263d4314
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+
2025-07-04 23:44:37 +10:00
Victor Stinner
da79ac9d26
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.
2025-07-03 14:51:44 +02:00
Serhiy Storchaka
5c984ae35e
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).
2025-07-03 10:39:14 +00:00
Alper
8f8bdf251a
Fix comments for heapq.siftup_max ( #135359 )
...
Co-authored-by: mpage <mpage@meta.com>
2025-07-03 15:21:41 +05:30
Victor Stinner
28940e8e48
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.
2025-07-01 15:18:17 +02:00
Petr Viktorin
fe119a0817
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.
2025-07-01 10:57:42 +02:00
Petr Viktorin
845263adc6
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>
2025-07-01 10:54:08 +02:00
Pieter Eendebak
847d1c2cb4
gh-123471: Make itertools.product and itertools.combinations thread-safe ( #132814 )
...
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-06-30 11:31:59 +00:00
Xuanteng Huang
b1056c2a44
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>
2025-06-30 11:14:31 +00:00
Pieter Eendebak
0533c1faf2
gh-123471: Make itertools.chain thread-safe ( #135689 )
2025-06-30 16:36:58 +05:30
Pablo Galindo Salgado
5334732f9c
gh-91048: Fix external inspection multi-threaded performance ( #136005 )
2025-06-28 14:11:31 +01:00
Bénédikt Tran
42ccac2d7f
gh-135853: add math.signbit ( #135877 )
2025-06-28 14:46:07 +02:00
Lee Dogeon
0141e7f9e6
gh-108765: fix comment about macro definitions in _stat.c post GH-108854 ( #136027 )
2025-06-27 15:15:11 +00:00
Bénédikt Tran
1e975aee28
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.
2025-06-27 17:12:21 +02:00
Petr Viktorin
9193efdeab
gh-125206: Make _Py_FFI_SUPPORT_C_COMPLEX private (GH-135932)
2025-06-26 11:48:37 +02:00
Peter Bierma
10a3d43188
gh-135755: Move PyFunction_GET_BUILTINS to the private API (GH-135938)
2025-06-26 11:43:08 +02:00
Petr Viktorin
a1da208eec
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.
2025-06-26 09:25:41 +02:00
Ken Jin
a88b49c3f2
gh-135927: Fix MSVC Clatest C builds (GH-135935)
2025-06-25 23:02:53 +08:00
sobolevn
bcc2cbaa7f
gh-135839: Fix module_traverse and module_clear in subinterp modules ( #135937 )
2025-06-25 14:17:02 +00:00
Petr Viktorin
1b1ae82fab
gh-135755: Move SPECIAL_ constants to a private header (GH-135922)
...
Macros without a `Py`/`_Py` prefix should not be defined in public headers.
2025-06-25 13:03:05 +02:00
sobolevn
dd59c786cf
gh-135839: Fix module_traverse and module_clear in _interpchannelsmodule ( #135840 )
2025-06-25 11:54:42 +03:00
Brian Schubert
4e6f0d116e
gh-135855: Raise TypeError When Passing Non-dict Object to _interpreters.set___main___attrs (gh-135856)
2025-06-24 12:53:14 -06:00
Bénédikt Tran
ef4fc86afa
gh-135532: use defining_class for copying BLAKE-2 and SHA-3 objects ( #135838 )
2025-06-24 09:58:07 +02:00
Bénédikt Tran
621a8bd6a8
gh-135532: cleanup clinic module directives for cryptographic modules ( #135822 )
2025-06-22 20:04:38 +00:00
Bénédikt Tran
e7295a89b8
gh-135239: simpler use of mutexes in cryptographic modules ( #135267 )
2025-06-22 16:59:57 +02:00
Bénédikt Tran
d08b4b2333
gh-135532: optimize calls to PyMem_Malloc in SHAKE digest computation ( #135744 )
...
- Add a fast path when the digest length is 0 to avoid calling useless functions.
- Directly allocate via `PyBytes_FromStringAndSize(NULL, length)` when possible.
2025-06-21 14:32:00 +02:00
Bénédikt Tran
7c4361564c
gh-135759: consistently reject negative sizes in SHAKE digests ( #135767 )
...
Passing a negative digest length to `_hashilb.HASHXOF.[hex]digest()` now
raises a ValueError instead of a MemoryError or a SystemError. This makes
the behavior consistent with that of `_sha3.shake_{128,256}.[hex]digest`.
2025-06-21 09:43:30 +00:00
Xuanteng Huang
13cac83347
gh-135557: use atomic stores in heapq operations in free-threading ( #135601 )
2025-06-21 14:13:15 +05:30
Eric Snow
c5ea8e8e8f
gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135724)
...
We weren't handling non-positive maxsize values (including the default) properly
in Queue.full(). This change fixes that and adjusts an associated assert.
2025-06-20 14:26:32 -06:00
Kumar Aditya
c825b5d989
gh-135748: use argument clinic for more socket methods ( #135749 )
2025-06-20 12:02:37 +00:00
Bénédikt Tran
eec7a8ff22
gh-135532: use _Py_strhex in HACL-MD5's hexdigest ( #135742 )
2025-06-20 09:50:09 +00:00
Bénédikt Tran
57dba7c9a5
gh-135532: update Modules/_hacl/python_hacl_namespaces.h ( #135741 )
2025-06-20 11:32:38 +02:00
Bénédikt Tran
2dbada179f
gh-135532: simplify handling of HACL* errors in _hmac ( #135740 )
2025-06-20 10:57:16 +02:00
Bénédikt Tran
c765683398
gh-135561: ensure that the GIL is held when handling an HACL* error in _hmac ( #135562 )
2025-06-19 17:27:19 +00:00
sobolevn
9c3c02019c
gh-135709: Fix two compile warnings on WASM buildbot ( #135712 )
2025-06-19 18:46:40 +03:00
Sam Gross
17ac3933c3
gh-135641: Fix flaky test_capi.test_lock_two_threads test case (gh-135642)
...
The mutex may have the `_Py_HAS_PARKED` bit set.
2025-06-18 14:24:05 -04:00
Eric Snow
269e19e0a7
gh-132775: Fix Interpreter.call() __main__ Visibility (gh-135595)
...
As noted in the new tests, there are a few situations we must carefully accommodate
for functions that get pickled during interp.call(). We do so by running the script
from the main interpreter's __main__ module in a hidden module in the other
interpreter. That hidden module is used as the function __globals__.
2025-06-17 13:16:59 -06:00