125033 Commits

Author SHA1 Message Date
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 v3.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
Bénédikt Tran
29fe8072cf
gh-123345: improve fnmatch docs (#123346) 2025-01-13 11:21:22 +01:00
Ned Deily
b00e1254fc
gh-128690: temporarily do not use test_embed in PGO profile builds (#128771)
Temporarily do not use test_embed in PGO profile builds until the problem with test_init_pyvenv_cfg failing in some configurations is resolved.
2025-01-13 04:02:18 -05:00
Zanie Blue
6ecb620a0c
gh-90905: Allow cross-compilation on macOS (#128385) 2025-01-13 03:38:28 -05:00
sobolevn
6e1e780540
gh-128759: fix data race in type_modified_unlocked (#128764) 2025-01-13 07:40:52 +00:00
Hood Chatham
d0ecbdd838
gh-128627: Emscripten: Use wasm-gc based call adaptor if available (#128628)
Replaces the trampoline mechanism in Emscripten with an implementation that uses a
recently added feature of wasm-gc instead of JS type reflection, when that feature is
available.
2025-01-13 07:09:39 +08:00
Serhiy Storchaka
5e65a1acc0
gh-128731: Fix ResourceWarning in robotparser.RobotFileParser.read() (GH-128733) 2025-01-12 15:14:46 +02:00
Peter Bierma
f6c61bf2d7
gh-128717: Stop-the-world when setting the recursion limit (#128741) 2025-01-12 18:34:30 +05:30
Pieter Eendebak
ff39e3ff7b
gh-126703: Add freelist for PyMethodObject (#128594) 2025-01-12 18:31:49 +05:30
Serhiy Storchaka
5ace71713b
gh-128734: Fix ResourceWarning in urllib tests (GH-128735) 2025-01-12 12:53:17 +02:00
Serhiy Storchaka
cb72feb8a3
gh-128729: Fix RuntimeWarning in test_unittest (GH-128730) 2025-01-12 12:22:43 +02:00
Yan Yanchii
30268b5d2f
gh-128377: Skip test_cmd_line.test_non_interactive_output_buffering when PYTHONUNBUFFERED=1 (#128378)
The `test_cmd_line.test_non_interactive_output_buffering` test assumes a buffered `stdio`
without checking the `PYTHONUNBUFFERED` value. Instead of changing the environment
variable for the duration of the test, it is better to simply skip it.
2025-01-12 09:27:28 +01:00
Barney Gale
22a442181d
GH-128520: Divide pathlib ABCs into three classes (#128523)
In the private pathlib ABCs, rename `PurePathBase` to `JoinablePath`, and
split `PathBase` into `ReadablePath` and `WritablePath`. This improves the
API fit for read-only virtual filesystems.

The split of `PathBase` entails a similar split of `CopyWorker` (implements
copying) and the test cases in `test_pathlib_abc`.

In a later patch, we'll make `WritablePath` inherit directly from
`JoinablePath` rather than `ReadablePath`. For a couple of reasons,
this isn't quite possible yet.
2025-01-11 19:27:47 +00:00