126346 Commits

Author SHA1 Message Date
Ken Jin
bc0b94b30c
gh-132257: Remove -flto-partition=none for Linux LTO builds (GH-132258)
Change the default LTO flags on GCC to not pass -flto-partition=none, and allow parallelization of LTO. This has a multiple factor speedup for LTO build times on GCC, with no noticeable loss in performance.

On newer make and newer GCC, this passes the jobserver automatically to GCC (or more like GCC grabs it from the env vars).

On older make, this will have benign warnings about serial compilation. It's safe to ignore them.
2025-04-11 16:06:05 +08:00
Jelle Zijlstra
07b8d3117f
gh-132261: Store annotations at hidden internal keys in the class dict (#132345) 2025-04-10 21:13:26 -07:00
Chris Eibl
e5f68fd29b
GH-131296: Suppress "unused label" warning for clang-cl closer to actual occurrence (GH-131900) 2025-04-10 23:17:33 +01:00
Barney Gale
66cdb2bd8a
GH-123599: url2pathname(): handle authority section in file URL (#126844)
In `urllib.request.url2pathname()`, if the authority resolves to the
current host, discard it. If an authority is present but resolves somewhere
else, then on Windows we return a UNC path (as before), and on other
platforms we raise `URLError`.

Affects `pathlib.Path.from_uri()` in the same way.

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-04-10 19:58:04 +00:00
Stan Ulbrych
a214db0c54
gh-132307: Remove unnecessary check in asyncio/base_events.py (#132324) 2025-04-10 15:41:32 +00:00
Serhiy Storchaka
1557da622c
gh-106482: Clarify documentation of character set in RE (#106517)
Co-authored-by: Martin Panter <vadmium@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-10 16:41:41 +03:00
Jiayu Yi
5fbe23ee4e
Fix example code in curses tutorial (#126446) 2025-04-10 15:06:38 +03:00
Chu
3d83c1ec61
Fix a typo in Python/pylifecycle.c (#132350) 2025-04-10 17:27:37 +05:30
Tomas R.
4d58c8cb24
gh-130320: gettext: Test fallback translations (GH-130321) 2025-04-10 14:56:21 +03:00
Liam DeVoe
4a88bbacb3
Docs: Add a missing trailing full stop (#130561) 2025-04-10 14:51:20 +03:00
sobolevn
fcf2d07228
gh-132316: Require socket and GITHUB_TOKEN env to use GitHubArtifactDatabase (#132348)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-04-10 14:30:58 +03:00
180909
65357032e8
gh-72631: Fix wrong documentation for GzipFile.peek (#29820)
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend@python.org>
2025-04-10 14:21:32 +03:00
Tomas R.
b6760b7fa5
gh-130453: pygettext: Allow specifying multiple keywords with the same function name (GH-131380) 2025-04-10 11:06:40 +00:00
mpage
619edb802e
gh-132336: Mark a few "slow path" functions used by the interpreter loop as noinline (#132337)
Mark a few functions used by the interpreter loop as noinline

These are all the slow path and should not be inlined into the interpreter
loop. Unfortunately, they end up being inlined with LTO and the current PGO
task.
2025-04-10 10:41:15 +02:00
Jo
5f1aed1c7e
docs: Fix typo in context_aware_warnings flag (#132340) 2025-04-10 05:19:01 +01:00
Adam Turner
e329f74e7d
GH-132330: Synchronise `Doc/includes/typestruct.h with PyTypeObject` (#132332) 2025-04-10 01:51:56 +01:00
Neil Schemenauer
d687900f98
gh-128384: Use a context variable for warnings.catch_warnings (gh-130010)
Make `warnings.catch_warnings()` use a context variable for holding
the warning filtering state if the `sys.flags.context_aware_warnings`
flag is set to true.  This makes using the context manager thread-safe in
multi-threaded programs.

Add the `sys.flags.thread_inherit_context` flag.  If true, starting a new
thread with `threading.Thread` will use a copy of the context
from the caller of `Thread.start()`.

Both these flags are set to true by default for the free-threaded build
and false for the default build.

Move the Python implementation of warnings.py into _py_warnings.py.

Make _contextvars a builtin module.

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
2025-04-09 16:18:54 -07:00
Stefano Rivera
e5237541a0
Escape hyphens in manpage (#132291) 2025-04-09 22:41:16 +00:00
Brandt Bucher
20926c73b5
GH-131798: Remove JIT guards for dict, frozenset, list, set, and tuple (GH-132289) 2025-04-09 14:32:21 -07:00
Kumar Aditya
d47584aae6
gh-131336: fix thread safety for ctypes functions (#132232) 2025-04-09 18:18:40 +00:00
Karolina Surma
a26d58ce52
gh-130587: Invoke regen-token rst with rstfile as an argument (#132304) 2025-04-09 19:14:57 +01:00
Serhiy Storchaka
487cf3c170
gh-132305: Make Argument Clinic code compatible with Python 3.10 (#132306) 2025-04-09 19:10:02 +01:00
Chu
4a919dd6ee
Remove a duplicate word in the Makefile (#132301) 2025-04-09 18:47:52 +01:00
sobolevn
254110356d
gh-132285: Fix that __annotate__ is not deleted when __annotations__ is deleted (#132286) 2025-04-09 10:36:08 -07:00
mpage
1f5682f3a2
gh-129987: Disable GCC SLP autovectorization for the interpreter loop on x86-64 (#132295)
The SLP autovectorizer can cause poor code generation for opcode dispatch, negating any benefit we get from vectorization elsewhere in the interpreter loop.
2025-04-09 10:34:12 -07:00
h-vetinari
67ded6a4fa
update comment about LLVM bug relevant for --with-tail-call-interp performance (#132297) 2025-04-09 22:50:38 +08:00
Ken Jin
bd3aa0b9f7
gh-126703: Fix possible use after free in pycfunction freelist (GH-132319) 2025-04-09 22:49:33 +08:00
Serhiy Storchaka
3feac7a093
gh-131434: Improve error reporting for incorrect format in strptime() (GH-131568)
In particularly, fix regression in detecting stray % at the end of the
format string.
2025-04-09 13:26:50 +03:00
Serhiy Storchaka
7ebbd27144
gh-130631: Make join_header_words() more similar to the original Perl version (GH-130632)
* Always quote strings with non-ASCII characters.
* Allow some non-separator and non-control characters (like "." or "-")
  be unquoted.
* Always quote strings that end with "\n".
* Use the fullmatch() method for clarity and optimization.
2025-04-09 11:08:04 +03:00
Łukasz Langa
16dcb576f7
gh-131507: Add a way to recreate the Misc/mypy symlinks if missing (#132274)
They will be removed in source tarballs so they don't appear
in the SBOM.

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
2025-04-09 01:01:36 +02:00
Serhiy Storchaka
f5f1ac84b3
gh-112068: C API: Add support of nullable arguments in PyArg_Parse (GH-121303) 2025-04-08 22:08:00 +03:00
Cody Maloney
8421b648e9
gh-132246: Add PEP 688 to C Buffer Protocol docs (#132249) 2025-04-08 10:43:27 -07:00
Tian Gao
ab64130b57
gh-132250: Clear error in lsprof callback when method descriptor raises an excep… (#132251) 2025-04-08 13:36:47 -04:00
Tian Gao
efd8aca62c
gh-106670: Fix a typo in doc of pdb's exceptions command (#132277) 2025-04-08 12:19:16 -04:00
Nadeshiko Manju
d753d8aed7
GH-131798: Narrow the result of _CONTAINS_OP_DICT to bool in the JIT (GH-132269)
Co-authored-by: Tomas R. <tomas.roun8@gmail.com>
2025-04-08 09:12:09 -07:00
Tomas R.
71009cb835
GH-131798: Narrow the result type of _BINARY_OP_SUBSCR_STR_INT to str in the JIT (GH-132153) 2025-04-08 08:22:54 -07:00
Duprat
933c6653cb
gh-132063: ensure that ProcessPoolExecutor does not swallow falsey exceptions (#132129) 2025-04-08 15:11:13 +00:00
Hugo van Kemenade
c5e856a5dc Merge branch 'main' of https://github.com/python/cpython 2025-04-08 17:08:21 +03:00
Hugo van Kemenade
b6b5767e9b Post 3.14.0a7 2025-04-08 17:06:51 +03:00
Bénédikt Tran
f5a7037c32
gh-93096: fix test_mimetypes.test_invocation_error tests on iOS ARM64 (#132266) 2025-04-08 15:03:43 +02:00
Serhiy Storchaka
0e4cf9ce7c
gh-50333: Deprecate support of non-tuple sequences in PyArg_ParseTuple() (GH-128374)
Non-tuple sequences are deprecated as argument for the "(items)" format unit
in PyArg_ParseTuple() and other argument parsing functions if items contains
format units which store borrowed buffer or reference (e.g. "s" and "O").

str and bytearray are no longer accepted as valid sequences.
2025-04-08 14:26:32 +03:00
Hugo van Kemenade
29af6cee02 Python 3.14.0a7 v3.14.0a7 2025-04-08 14:20:51 +03:00
Serhiy Storchaka
0f04f2456a
gh-117779: Fix reading duplicated entries in zipfile by name (GH-129254) 2025-04-08 13:56:42 +03:00
Peter Bierma
ac3c439cdf
gh-131998: Fix NULL dereference when using an unbound method descriptor in a specialized code path (#132000)
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
2025-04-08 10:31:43 +00:00
Bénédikt Tran
3eda146035
gh-74598: add fnmatch.filterfalse for excluding names matching a patern (#121185) 2025-04-08 10:11:25 +00:00
Adam Turner
ee3657209b
gh-118761: Optimise import time for `string` (#132037)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2025-04-08 10:05:48 +00:00
Bénédikt Tran
53908bd790
gh-93096: fix test_mimetypes.test_guess_type_conflicting_with_mimetypes (#131408) 2025-04-08 09:08:59 +00:00
Irit Katriel
8c9ef8f1f8
gh-100239: more stats for BINARY_OP/SUBSCR specialization (#132230) 2025-04-08 08:50:51 +00:00
David Brochart
297e05932d
Fixed a typo in the documentation (#132005) 2025-04-08 11:43:11 +03:00
Srinivas Reddy Thatiparthy (తాటిపర్తి శ్రీనివాస్ రెడ్డి)
403886c28d
gh-132021: Add bool type to the list of allowed JSON key types (#132048)
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
2025-04-08 11:25:46 +03:00