Serhiy Storchaka
add0ca9ea0
gh-133306: Use \z instead of \Z in fnmatch.translate() and glob.translate() (GH-133338)
2025-05-03 17:58:21 +03:00
sobolevn
cb3174113e
gh-133117: Enable stricter mypy checks for tomllib
( #133206 )
2025-05-03 16:57:09 +03:00
Semyon Moroz
1550c30fd5
gh-130160: use .. program::
directive for documenting platform
CLI ( #133335 )
2025-05-03 15:05:04 +03:00
Harry
77c391a1b1
gh-131524: Update platform CLI to use argparse ( #131542 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-03 08:58:59 +00:00
Serhiy Storchaka
ac56f8cc8d
gh-133306: Support \z as a synonym for \Z in regular expressions (GH-133314)
...
\Z was an error inherited from PCRE 0.95. It was fixed in PCRE 2.0.
In other engines, \Z means not “anchor at string end”, but
“anchor before optional newline at string end”.
\z means “anchor at string end” in most RE engines.
2025-05-03 07:54:33 +00:00
Kirill Podoprigora
fe44fc4f43
gh-114713: Revert gh-114731 ( #133330 )
...
Revert "gh-114713: Handle case of an empty string passed to `zoneinfo.ZoneInfo` (#114731 )"
This reverts commit 884df116d7
.
2025-05-03 07:47:08 +00:00
sobolevn
ca0a96dfaa
gh-133194: Fix regression with PEP 758 parsing on older feature_version
( #133289 )
...
gh-133192: Fix regression with PEP 758 parsing on older `feature_version`
2025-05-03 10:33:14 +03:00
Jelle Zijlstra
345fdce1d0
gh-133037: Add test for shadowing __annotate__ ( #133084 )
2025-05-02 19:42:49 -07:00
Malcolm Smith
245cd6c532
gh-91156: Document how TextIOWrapper interacts with UTF-8 mode (GH-132885)
...
Document how TextIOWrapper interacts with UTF-8 mode
2025-05-03 10:20:10 +09:00
Sergey Miryanov
bd2ed7c7ce
gh-91048: Chain some exceptions in _testexternalinspection.c ( #132970 )
2025-05-03 01:35:30 +02:00
Adam Turner
49ea8a0b2d
Lint: Use Ruff to format `Tools/build/check_warnings.py
` ( #133317 )
2025-05-02 21:26:32 +01:00
Łukasz Langa
fac41f56d4
gh-131507: Add support for syntax highlighting in PyREPL (GH-133247)
...
Co-authored-by: Victorien <65306057+Viicos@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2025-05-02 20:22:31 +02:00
Brandt Bucher
bfcbb28223
GH-113464: Get LLVM from cpython-bin-deps on Windows (GH-133278)
2025-05-02 11:17:15 -07:00
Sergey Miryanov
a0bc0c462f
gh-100926: Move ctype's pointers cache from _pointer_type_cache to StgInfo (GH-131282)
...
Deprecate _pointer_type_cache and calling POINTER on a string.
Co-authored-by: neonene <53406459+neonene@users.noreply.github.com>
Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-05-02 19:06:37 +02:00
Zhikang Yan
7e7e49be78
gh-112936: Fix IDLE: no Shell menu item in single-process mode (GH-126598)
2025-05-02 20:03:32 +03:00
Paul Moore
a512905e15
gh-132995: Upgrade bundled pip to 25.1.1 (gh-132997)
...
* gh-132995: Upgrade bundled pip to 25.1.1
2025-05-02 17:43:13 +01:00
Ken Jin
ddac7ac59a
gh-132744: Check recursion limit in CALL_PY_GENERAL (GH-132746)
2025-05-02 17:36:29 +01:00
Petr Viktorin
987e45e632
gh-128972: Add _Py_ALIGN_AS
and revert PyASCIIObject
memory layout. (GH-133085)
...
Add `_Py_ALIGN_AS` as per C API WG vote: https://github.com/capi-workgroup/decisions/issues/61
This patch only adds it to free-threaded builds; the `#ifdef Py_GIL_DISABLED`
can be removed in the future.
Use this to revert `PyASCIIObject` memory layout for non-free-threaded builds.
The long-term plan is to deprecate the entire struct; until that happens
it's better to keep it unchanged, as courtesy to people that rely on it despite
it not being stable ABI.
2025-05-02 18:30:40 +02:00
Sergey B Kirpichev
d78768e3d6
gh-121249: fix complex formatting codes in the struct docs (note 10) (GH-133249)
...
This amends 85f89cb
.
2025-05-02 18:27:07 +02:00
Brandt Bucher
2da48e32f6
GH-133171: Prevent combinations of --disable-gil and --enable-experimental-jit... for now (GH-133179)
2025-05-02 09:26:03 -07:00
Sergey B Kirpichev
f425509349
gh-121249: unconditionally support complex
types in struct
(GH-132864)
...
Co-authored-by: Lisandro Dalcin <dalcinl@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
2025-05-02 18:24:52 +02:00
Hugo van Kemenade
e6c518d2eb
gh-133300: argparse: make suggest_on_error
a keyword-only parameter ( #133302 )
2025-05-02 18:11:44 +03:00
Sam Gross
f2379535fe
gh-133164: Add PyUnstable_Object_IsUniqueReferencedTemporary
C API (gh-133170)
...
After gh-130704, the interpreter replaces some uses of `LOAD_FAST` with
`LOAD_FAST_BORROW` which avoid incref/decrefs by "borrowing" references
on the interpreter stack when the bytecode compiler can determine that
it's safe.
This change broke some checks in C API extensions that relied on
`Py_REFCNT()` of `1` to determine if it's safe to modify an object
in-place. Objects may have a reference count of one, but still be
referenced further up the interpreter stack due to borrowing of
references.
This provides a replacement function for those checks.
`PyUnstable_Object_IsUniqueReferencedTemporary` is more conservative:
it checks that the object has a reference count of one and that it exists as a
unique strong reference in the interpreter's stack of temporary
variables in the top most frame.
See also:
* https://github.com/numpy/numpy/issues/28681
Co-authored-by: Pieter Eendebak <pieter.eendebak@gmail.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-05-02 13:24:57 +00:00
Hugo van Kemenade
4701ff92d7
gh-130645: Add color to argparse
help (GH-132323)
2025-05-02 15:06:10 +02:00
sobolevn
ba16ba3a18
gh-133210: Fix test_descr
in --without-doc-strings
mode ( #133294 )
2025-05-02 13:04:27 +00:00
sobolevn
641253cfac
gh-132385: Fix instance error suggestions trigger potential exceptions in traceback
( #132387 )
2025-05-02 15:52:59 +03:00
Nybblista
20f8ed595d
gh-133279: Assert with HAS_TARGET in the codegen_addop_j function ( #133280 )
2025-05-02 13:52:48 +01:00
Petr Viktorin
2590774c9b
gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)
2025-05-02 14:47:07 +02:00
Yongzi Li
df8a02b1e1
Docs: delete title links in turtle.rst
and typing.rst
( #133283 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-05-02 13:15:26 +01:00
Zhikang Yan
e490c00dac
gh-130482: Add ability to specify name for tkinter.OptionMenu and tkinter.ttk.OptionMenu (GH-130502)
2025-05-02 14:38:50 +03:00
sobolevn
1e9cc3d502
gh-133197: Improve error message for incompatible string / bytes prefixes ( #133242 )
2025-05-02 14:28:17 +03:00
sobolevn
4912b29166
gh-133210: Fix test_pydoc
in --without-doc-strings
mode ( #133271 )
2025-05-02 13:12:24 +03:00
sobolevn
a6ddd078d0
gh-123539: Improve SyntaxError msg for import as
with not a name ( #123629 )
2025-05-02 08:34:13 +00:00
Hugo van Kemenade
39afd290ae
gh-123299: Add missing pending removals ( #133082 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-05-02 11:18:24 +03:00
Xuehai Pan
b8633f9aca
gh-119605: Respect follow_wrapped
for __init__
and __new__
when getting class signature with inspect.signature
( #132055 )
2025-05-01 15:41:44 -07:00
Michael Droettboom
c14134020f
gh-133259: Show path to python.sh script on successful build ( #133268 )
...
* gh-133259: Show path to python.sh script on successful build
* wasmtime -> (generic) wasm runtime
2025-05-01 18:49:39 +00:00
Irit Katriel
a4be3bc34f
gh-133258: Fix crash in test_index (GH-133262)
2025-05-01 19:15:53 +02:00
Victor Stinner
d10bd81b45
gh-133261: Use __builtin_frame_address() on GCC 9 and older ( #133269 )
...
GCC 9 and older don't have __has_builtin(), but have
__builtin_frame_address() function.
2025-05-01 19:13:03 +02:00
Stan Ulbrych
e5e51bd7f7
gh-130197: Test pygettext --output option (GH-133041)
2025-05-01 19:30:24 +03:00
sobolevn
27e011455d
gh-133210: Fix test_inspect
in --without-doc-strings
mode ( #133250 )
2025-05-01 19:08:35 +03:00
Victor Stinner
e26bafd107
gh-133256: Add _Py_NONSTRING macro ( #133257 )
...
Fix GCC 15 compiler warnings such as:
Modules/fcntlmodule.c:27:36: warning: initializer-string for
array of 'char' truncates NUL terminator but destination lacks
'nonstring' attribute (9 chars into 8 available)
[-Wunterminated-string-initialization]
static const char guard[GUARDSZ] = "\x00\xfa\x69\xc4\x67\xa3\x6c\x58";
2025-05-01 17:55:49 +02:00
Sergey B Kirpichev
ad2f0884b1
gh-130317: Fix test_pack_unpack_roundtrip() and add docs ( #133204 )
...
* Skip sNaN's testing in 32-bit mode.
* Drop float_set_snan() helper.
* Use memcpy() workaround for sNaN's in PyFloat_Unpack4().
* Document, that sNaN's may not be preserved by PyFloat_Pack/Unpack API.
2025-05-01 16:20:36 +02:00
Steve Dower
ed039b801d
gh-132930: Include IDLE path in registry for PyManager packages (GH-133246)
2025-05-01 14:41:17 +01:00
Tomas R.
c73d46076e
gh-130197: Improve test coverage of msgfmt.py (GH-133048)
2025-05-01 13:32:11 +00:00
neonene
fa52f289a3
gh-133166: Fix missing error emission of PyType_GetModuleByDef (GH-133240)
2025-05-01 14:32:57 +02:00
Victor Stinner
662dd29456
gh-124715: Fix method_dealloc(): use PyObject_GC_UnTrack() ( #133199 )
...
Replace _PyObject_GC_UNTRACK() with PyObject_GC_UnTrack() to not fail
if the method was already untracked.
2025-05-01 13:42:42 +02:00
Tomas R.
474f296718
gh-130655: Add a test for big-endian MO files in gettext (GH-132469)
2025-05-01 14:13:08 +03:00
Adam Turner
f21e42d906
Remove duplicate includes: Python/{bytecodes,ceval,optimizer_analysis}.c ( #132622 )
2025-05-01 12:07:53 +01:00
Irit Katriel
5529213d4e
gh-100239: specialize BINARY_OP/SUBSCR for list-slice ( #132626 )
2025-05-01 10:28:52 +00:00
Mark Shannon
3831752689
PyStats: Make sure that the failure_kinds
array is big enough. ( #133245 )
2025-05-01 10:02:51 +00:00