Raymond Hettinger
718c15fa95
Add derangements() recipe (gh-143671)
2026-01-10 19:47:27 -06:00
emmanuel
aa8578dc54
Doc: remove duplicate GitHub issue reference in "What's New in Python 3.13" ( #143654 )
2026-01-10 14:34:30 +01:00
Bénédikt Tran
ce6bae92da
gh-143377: fix crashes in _interpreters.capture_exception ( #143418 )
2026-01-10 12:37:54 +01:00
Nadeshiko Manju
e2f0160026
gh-143604: Hold strong reference to executor during JIT tracing (GH-143646)
...
Co-authored-by: Ken Jin <kenjin4096@gmail.com>
2026-01-10 11:15:48 +00:00
Jeong, YunWon
e7f5ffa0de
gh-143641: Make ready_to_import always remove tempdir from sys.path ( #143642 )
...
Make ready_to_import always remove tempdir from sys.path
2026-01-10 12:51:42 +03:00
Heikki Toivonen
78e868fa28
gh-143586: Add Counter comparison tests to enforce missing element semantics (gh-143587)
2026-01-10 00:17:57 -06:00
Ken Jin
95259116ec
gh-142764: Restore REPLACE_OPCODE_IF_EVALUATES_PURE optimization for some ops (GH-143335)
2026-01-09 23:18:22 +00:00
Ken Jin
e0fb278064
gh-143421: Allocate all JIT state in one go (GH-143626)
2026-01-09 19:00:49 +00:00
Petr Viktorin
1932127ec7
gh-141004: Document remaining constants from patchlevel.h (GH-143598)
...
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-09 17:40:07 +00:00
Semyon Moroz
499d3a8d50
gh-136438: Make sure test_interpreters pass with all optimization levels (GH-136499)
2026-01-09 18:06:54 +01:00
Serhiy Storchaka
66bca383bd
gh-143006: Fix and optimize mixed comparison of float and int (GH-143084)
...
When comparing negative non-integer float and int with the same number
of bits in the integer part, __neg__() in the int subclass returning
not an int caused an assertion error.
Now the integer is no longer negated. Also, reduced the number of
temporary created Python objects.
2026-01-09 19:06:45 +02:00
Ken Jin
b852236b26
gh-143421: Lazily allocate tracer code and opt buffers (GH-143597)
2026-01-09 16:56:19 +00:00
Jan André Reuter
61e036691c
gh-143460: Skip infinite recusion tests for infinite stack size ( #143606 )
...
Avoid tests being killed due to OOM on Linux if a system is configured with
'ulimit -s unlimited' by skipping tests relying on infinite recursion.
While unclear if Python should support 'ulimit -s unlimited', we should at
least try to avoid failing a PGO build running tests due to an unlimited
stack size being set.
Signed-off-by: Jan André Reuter <j.reuter@fz-juelich.de>
2026-01-09 16:11:37 +00:00
Adorilson Bezerra
c696f33d9e
gh-106318: Add examples for str.rfind() method ( #143582 )
2026-01-09 16:24:31 +01:00
Adorilson Bezerra
6d6c7ed737
gh-106318: Improve str.removeprefix() and str.removesuffix() docs ( #143580 )
...
Add doctest role and 'See also'.
2026-01-09 16:22:50 +01:00
Victor Stinner
ba10100c39
gh-143191: Use _PyOS_MIN_STACK_SIZE in _thread.stack_size() ( #143601 )
...
The stack size must be at least _PyOS_MIN_STACK_SIZE+SYSTEM_PAGE_SIZE
bytes.
2026-01-09 16:08:40 +01:00
A.Ibrahim
a4086d7f89
gh-142829: Fix use-after-free in Context.__eq__ via re-entrant ContextVar.set ( #142905 )
2026-01-09 17:57:34 +05:30
AN Long
a9ca49d9c6
gh-72239: Add note distinguishing concurrent.futures.Future from asyncio.Future ( #143288 )
2026-01-09 17:48:32 +05:30
Victor Stinner
39a2bcf949
gh-143547: Fix PyErr_FormatUnraisable() fallback ( #143557 )
...
Hold a strong reference to 'hook' while calling the default
unraisable took to log hook failure.
Fix test_sys.UnraisableHookTest: use the right decorator function to
disable colors. Previously, tests were always skipped.
2026-01-09 13:16:22 +01:00
zhong
6d54b6ac7d
gh-143378: Fix use-after-free when BytesIO is concurrently mutated during write operations (GH-143408)
...
PyObject_GetBuffer() can execute user code (e.g. via __buffer__), which may
close or otherwise mutate a BytesIO object while write() or writelines()
is in progress. This could invalidate the internal buffer and lead to a
use-after-free.
Ensure that PyObject_GetBuffer() is called before validation checks.
2026-01-09 13:50:56 +02:00
Henry Chen
dcdb23f9db
gh-143429: Use compile-time NaN encoding detection for test_struct ( #143432 )
2026-01-09 10:46:48 +00:00
Petr Viktorin
234a15dc4e
gh-141004: Improve make check-c-api-docs (GH-143564)
...
- Gather all documented names into a set in a single pass.
This makes the check much faster.
- Do not match substrings (e.g. documenting `PyErr_WarnEx`
doesn't mean that `PyErr_Warn` is documented)
- Consider `PY`-prefixed names (a lot of old macros use this)
2026-01-09 11:16:50 +01:00
Yongtao Huang
fd6d41b292
Test: remove unintended unittest.main() in live collector tests ( #143590 )
2026-01-09 08:49:54 +00:00
Adorilson Bezerra
af9f783a7e
gh-106318: Add examples for str.replace() method (GH-143581)
2026-01-09 09:01:00 +01:00
Savannah Ostrowski
68a01f901f
GH-43374: Fix urlretrieve reporthook to report actual bytes read ( #142653 )
2026-01-09 00:32:05 +00:00
Brett Cannon
dfeefbe8ea
GH-139686: Revert "gh-139686: Make reloading a lazy module no-op (GH-139857)" ( #143584 )
...
This reverts commits 57db12514a and 0a97941245 .
2026-01-08 22:08:03 +00:00
Russell Keith-Magee
b54a1d272e
Add Emscripten test skips for recently added tests. ( #143551 )
...
Some recent changes introduced tests that can't run on Emscripten.
This change adds test skips for those tests.
2026-01-09 05:47:38 +08:00
Sam Gross
e2f15aec16
gh-120321: Make gen.gi_frame.clear() thread-safe (gh-143112)
2026-01-08 14:45:54 -05:00
Hai Zhu
aeb3403563
gh-143421: Move JitOptContext from stack allocation to per-thread heap allocation (GH-143536)
...
* move JitOptContext to _PyThreadStateImpl
* make _PyUOpInstruction buffer a part of _PyThreadStateImpl
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2026-01-08 19:38:21 +00:00
Heikki Toivonen
cea2d2475d
gh-143445: Optimize deepcopy for 1.04x speedup ( #143449 )
...
Gains according to pyperformance:
```
deepcopy:
Mean +- std dev: 411 us +- 2 us -> 396 us +- 3 us: 1.04x faster
Significant (t=28.94)
deepcopy_reduce:
Mean +- std dev: 4.38 us +- 0.05 us -> 4.23 us +- 0.04 us: 1.04x faster
Significant (t=20.05)
```
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2026-01-08 16:28:02 +01:00
Sam Gross
8cf5c4d89a
gh-142908: Don't use DK_IS_UNICODE in interpreter (gh-142909)
...
`DK_IS_UNICODE()` includes split keys and we don't want to specialize on
those accesses..
2026-01-08 09:32:20 -05:00
Sam Gross
49c3b0a67a
gh-142095: Use thread local frame info in py-bt and py-bt-full when available (gh-143371)
...
In optimized and `-Og` builds, arguments and local variables are frequently
unavailable in gdb. This makes `py-bt` fail to print anything useful. Use the
`PyThreadState*` pointers `_Py_tss_gilstate` and `Py_tss_tstate` to find the
interpreter frame if we can't get the frame from the
`_PyEval_EvalFrameDefault` call.
Co-authored-by: Victor Stinner <vstinner@python.org>
2026-01-08 09:18:24 -05:00
Alex Willmer
5462002bbe
gh-143513: Clarify changed argument name of ResourceReader.is_resource (GH-143523)
2026-01-08 08:40:17 -05:00
Victor Stinner
efaa56f73c
gh-143528: Fix test_time.test_thread_time() ( #143558 )
...
Tolerate 100 ms instead of 20 ms to support slow CIs.
2026-01-08 14:05:57 +01:00
Aniket
f3e069a7ab
gh-140025: Fix queue.SimpleQueue.__sizeof__() to return correct size ( #143137 )
2026-01-08 12:40:25 +00:00
Serhiy Storchaka
c07e5ec0a9
gh-143553: Add support for parametrized resources in regrtests (GH-143554)
...
For example, "-u xpickle=2.7" will run test_xpickle only against Python 2.7.
2026-01-08 13:51:38 +02:00
Bartosz Sławecki
6c9f7b4406
gh-143517: Fix an edge case in rewriting stringified starred annotations ( #143518 )
2026-01-07 19:41:27 -08:00
VanshAgarwal24036
67d3d0344f
gh-143089: Fix ParamSpec default examples to use list instead of tuple ( #143179 )
2026-01-07 19:32:44 -08:00
Sam Gross
f11f5ebfe6
gh-129824: Fix data race on runtime->gilstate.check_enabled (gh-143530)
2026-01-07 17:56:14 -05:00
Tomas R.
228d95582e
Fix a typo in STORE_SLICE docs ( #143500 )
2026-01-07 23:36:22 +01:00
Dino Viehland
bfc3d8d77f
gh-143531: Use macro to check if PEP 523 is hooked ( #143532 )
...
Use macro to check if PEP 523 is hooked
2026-01-07 13:26:19 -08:00
Savannah Ostrowski
9a3263ff8f
GH-142950: Process format specifiers before colourization in argparse help ( #142960 )
2026-01-07 17:39:47 +00:00
Sam Gross
d04394929b
gh-117657: Remove remaining TSan suppressions (gh-143499)
2026-01-07 17:34:05 +00:00
Adorilson Bezerra
51a56a3a7b
gh-106318: Add examples for str.casefold() and str.lower() methods ( #142154 )
...
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2026-01-07 16:16:25 +00:00
T. Wouters
b2827de18f
gh-141536: Fix a crash when running test_capi *after* test_code in the same process ( #141537 )
2026-01-07 16:40:33 +01:00
Łukasz Langa
b3e4a3462f
gh-138568: Make help mode in PyREPL not exit on empty line input ( #143512 )
...
Signed-off-by: yihong0618 <zouzou0208@gmail.com>
Co-authored-by: yihong0618 <zouzou0208@gmail.com>
2026-01-07 16:30:58 +01:00
Giampaolo Rodola
a1eedaee98
gh-94172: delete mention of ssl_version from ftplib doc ( #143515 )
...
`FTP_TLS.ssl_version` class attribute was removed in ef0e72b31d .
2026-01-07 15:11:50 +01:00
Petr Viktorin
8565ddd288
gh-141671: PyMODINIT_FUNC: apply __declspec(dllexport) on Windows (GH-141672)
2026-01-07 13:09:48 +01:00
Serhiy Storchaka
b866a1c73f
gh-75572: Fix test_xpickle and disable it by default (GH-143503)
2026-01-06 23:51:12 +00:00
Adorilson Bezerra
4fb6a31bce
gh-106318: Add example for str.index() ( #137023 )
2026-01-06 23:42:11 +02:00