Commit graph

125045 commits

Author SHA1 Message Date
Tomas R.
256d6d2131
gh-97850: Suggest TraversableResources as the alternative for ResourceLoader (GH-128601)
Suggest TraversableResources as the alternative for ResourceLoader.

Previously, ResourceReader was the suggested alternative, but it
is itself deprecated in favour of TraversableResources.
2025-01-15 12:47:36 -08:00
Victor Stinner
36c5e3bcc2
gh-128679: Redesign tracemalloc locking (#128888)
* Use TABLES_LOCK() to protect 'tracemalloc_config.tracing'.
* Hold TABLES_LOCK() longer while accessing tables.
* tracemalloc_realloc() and tracemalloc_free() no longer
  remove the trace on reentrant call.
* _PyTraceMalloc_Stop() unregisters _PyTraceMalloc_TraceRef().
* _PyTraceMalloc_GetTraces() sets the reentrant flag.
* tracemalloc_clear_traces_unlocked() sets the reentrant flag.
2025-01-15 20:22:44 +00:00
Neil Schemenauer
080f444a58
gh-128807: Add marking phase for free-threaded cyclic GC (gh-128808) 2025-01-15 11:27:28 -08:00
Umar Butler
8d8b854824
gh-128016: Improved invalid escape sequence warning message (#128020) 2025-01-15 18:00:54 +01:00
Victor Stinner
40a4d88a14
gh-128874: Fix the documentation for blurb 2.0 (#128875) 2025-01-15 15:12:40 +01:00
Thomas Grainger
599be687ec
gh-128816: Fix warnings in test_doctest (GH-128817)
* Fix a deprecation warning for using importlib.resources.abc.ResourceReader.
* Fix an import warning when importing readline (if it has not yet been imported).
2025-01-15 15:05:59 +02:00
Wang Ran (汪然)
1a1056d394
Fix typo in Lib/asyncio/futures.py (#128819) 2025-01-15 17:54:31 +05:30
Yan Yanchii
ae7f621c33
gh-128438: Use EnvironmentVarGuard for test_{builtin,io,locale}.py (#128476)
Modifying locale-related environment variables in `Lib/test/test_builtin.py`,
`Lib/test/test_io.py` and `Lib/test/test_locale.py` is now achieved by using
an `EnvironmentVarGuard` context instead of an explicit `try-finally` block.
2025-01-15 10:38:43 +01:00
Zanie Blue
6e4f64109b
gh-128473: Skip segfaulting test_embed tests when BOLT instrumented (gh-128474)
* Skip segfaulting `test_embed` tests when BOLT instrumented

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>

* NEWS

---------

Co-authored-by: Gregory Szorc <gregory.szorc@gmail.com>
2025-01-15 10:49:02 +09:00
Tomas R.
bd3baa8b1a
gh-121604: Make sure all deprecated items in importlib raise DeprecationWarning (#128007)
Co-authored-by: rashansmith <smith.rashan@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2025-01-14 16:48:46 -08:00
Serhiy Storchaka
b52de22ac3
gh-71339: Use new assertion methods in the multiprocessing tests (GH-128847) 2025-01-15 01:17:11 +02:00
Serhiy Storchaka
f7ceb317ae
gh-71339: Use new assertion methods in test_logging (GH-128828) 2025-01-14 22:40:45 +02:00
mpage
b5ee0258bf
gh-115999: Specialize LOAD_ATTR for instance and class receivers in free-threaded builds (#128164)
Finish specialization for LOAD_ATTR in the free-threaded build by adding support for class and instance receivers.
2025-01-14 11:56:11 -08:00
Neil Schemenauer
1c13c56a34
gh-128384: Add locking to warnings.py. (gh-128386)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-14 11:43:42 -08:00
Bénédikt Tran
d906bde250
gh-67206: Document that string.printable is not printable in the POSIX sense (#128820) 2025-01-14 17:07:37 +01:00
Victor Stinner
d786ac7f58
gh-59705: Document OS thread name change (#128800) 2025-01-14 16:31:13 +01:00
Victor Stinner
43ef9587ae
gh-106320: Document replacement for removed C API (#128787) 2025-01-14 16:29:21 +01:00
Rafael Fontenelle
1598e18a65
Fix a "doctest" block in Doc/library/turtle.rst (#128831) 2025-01-14 16:17:24 +01:00
Hugo van Kemenade
7fc0f86098 Merge branch 'main' of https://github.com/python/cpython 2025-01-14 17:12:21 +02:00
Hugo van Kemenade
aa805887cf Post 3.14.0a4 2025-01-14 17:10:53 +02:00
Mark Shannon
f49a1df6f3
GH-128682: Convert explicit loops closing arrays into DECREF_INPUTS. (GH-128822)
* Mark Py_DECREF and Py_XDECREF as escaping

* Remove explicit loops for clearing array inputs
2025-01-14 15:08:56 +00:00
Bénédikt Tran
bbd3300ae8
gh-118761: substitute re import in base64.b16decode for a more efficient alternative (#128736)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-14 13:25:33 +00:00
Serhiy Storchaka
859db49029
gh-71339: Use new assertion methods in test_typing (GH-128825) 2025-01-14 15:19:32 +02:00
Serhiy Storchaka
75bd42c737
gh-71339: Use new assertion methods in test_sqlite3 (GH-128830) 2025-01-14 15:18:25 +02:00
Hugo van Kemenade
f26daa9470 Python 3.14.0a4 2025-01-14 13:52:58 +02:00
Bénédikt Tran
ff3e145b27
gh-118761: Improve import time of the pickle module. (#128732)
Importing `pickle` is now roughly 25% faster.

Importing the `re` module is no longer needed and
thus `re` is no more implicitly exposed as `pickle.re`.

---------

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-01-14 12:26:26 +01:00
Victor Stinner
1153e66e20
gh-109959: Skip test_glob.test_selflink() flaky test (#128812) 2025-01-14 11:18:52 +01:00
Victor Stinner
24a8d920c1
gh-127787: Move _PyUnicodeError_GetParams() to the internal C API (#128803) 2025-01-14 11:17:20 +01:00
Bénédikt Tran
eefd4a0bc7
Update cryptographic primitives code owners. (#128747) 2025-01-14 11:16:43 +02:00
Hugo van Kemenade
98301326e4
gh-123299: Copyedit "What's New in Python 3.14" (#128814) 2025-01-14 08:53:03 +00:00
Bénédikt Tran
99327d1241
Skip CI expensive checks on CODEOWNERS update (#128754)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-01-14 10:40:59 +02:00
Serhiy Storchaka
06cad77a5b
gh-71339: Add additional assertion methods for unittest (GH-128707)
Add the following methods:

* assertHasAttr() and assertNotHasAttr()
* assertIsSubclass() and assertNotIsSubclass()
* assertStartsWith() and assertNotStartsWith()
* assertEndsWith() and assertNotEndsWith()

Also improve error messages for assertIsInstance() and
assertNotIsInstance().
2025-01-14 10:02:38 +02:00
Victor Stinner
41f73501ec
gh-106320: Document private C APIs promoted to public C API (#128788) 2025-01-14 08:44:20 +01:00
Bénédikt Tran
b70a567575
gh-125997: Increase test coverage for time.sleep() (#128751)
- Add tests for durations of invalid types.
- Add tests for `int` and `float` durations, including signed zeroes durations.
- Add tests for nonzero very small durations and durations close to the clock resolution.

---------

Co-authored-by: Victor Stinner <vstinner@python.org>
2025-01-13 17:58:11 +01:00
Bénédikt Tran
53e8942e69
Explicitly import urllib.error in urllib.robotparser (#128737) 2025-01-13 17:14:59 +01:00
Zhikang Yan
da8825ea95
gh-128562: Fix generation of the tkinter widget names (GH-128604)
There were possible conflicts if the widget class name ends with a digit.
2025-01-13 15:54:46 +00:00
Bénédikt Tran
402b91da87
gh-128078: Use PyErr_SetRaisedException in _PyGen_SetStopIterationValue (#128287)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-13 21:24:13 +05:30
Kumar Aditya
3efe28a40b
gh-128002: add more thread safety tests for asyncio (#128480) 2025-01-13 15:36:55 +00:00
Kumar Aditya
75214f87f1
gh-128421: make getters and setters of BaseException thread safe (#128728) 2025-01-13 20:08:33 +05:30
Peter Bierma
bf64a582f0
gh-128400: Only show the current thread in Py_FatalError on the free-threaded build (#128758) 2025-01-13 20:06:54 +05:30
Bénédikt Tran
4533036e50
gh-111178: fix UBSan failures in Objects/codeobject.c (GH-128240) 2025-01-13 14:25:04 +01:00
Peter Bierma
8dfc743a1d
gh-128182: Add per-object memory access synchronization to ctypes (GH-128490) 2025-01-13 14:17:38 +01:00
Cheryl Sabella
5044c2245c
gh-67748: DOC:Add summary table for str methods in stdtypes.rst (GH-1709)
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
2025-01-13 14:14:59 +01:00
Petr Viktorin
aa6579cb60
gh-127773: Disable attribute cache on incompatible MRO entries (GH-127924) 2025-01-13 14:10:41 +01:00
Bénédikt Tran
76ffaef729
gh-128078: Clear exception in anext before calling _PyGen_SetStopIterationValue (#128780)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-01-13 18:25:09 +05:30
Mark Shannon
517dc65ffc
GH-128682: Stronger checking of PyStackRef_CLOSE and DEAD. (GH-128683) 2025-01-13 12:37:48 +00:00
Bénédikt Tran
6ff8f82f92
gh-128150: Improve performances of uuid.uuid* constructor functions. (#128151)
We introduce a private constructor `UUID._from_int()` for RFC 4122/9562 UUIDs,
which takes the integral UUID value as input. The latter must have correctly set
its variant and version bits. We also make `UUID.__init__()` slightly more efficient.
2025-01-13 12:46:13 +01:00
Mark Shannon
39fc7ef4fe
GH-124483: Mark Py_DECREF, etc. as escaping for the JIT (GH-128678) 2025-01-13 11:42:45 +00:00
Hugo van Kemenade
afb9dc887c
gh-128595: Add test class helper to force no terminal colour (#128687)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2025-01-13 11:05:02 +00:00
Mark Shannon
ddd959987c
GH-128685: Specialize (rather than quicken) LOAD_CONST into LOAD_CONST_[IM]MORTAL (GH-128708) 2025-01-13 10:30:28 +00:00