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
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
Petr Viktorin
2590774c9b
gh-133290: Use PyObject_SetAttr to set _type_ (GH-133292)
2025-05-02 14:47:07 +02: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
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
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
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
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
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
Irit Katriel
5529213d4e
gh-100239: specialize BINARY_OP/SUBSCR for list-slice ( #132626 )
2025-05-01 10:28:52 +00:00
Adam Turner
fe3c7e10d9
Lint: Create a project-wide `.ruff.toml` settings file ( #133124 )
...
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-05-01 08:28:44 +00:00
sobolevn
5cdd49b3f4
gh-133196: Guard PEP 750 grammar with CHECK_VERSION ( #133225 )
2025-05-01 09:17:07 +02:00
Semyon Moroz
bce45bcaf8
gh-130167: Improve `difflib.IS_LINE_JUNK` performance by using string methods ( #130170 )
...
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>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Tim Peters <tim.peters@gmail.com>
2025-05-01 04:11:36 +00:00
Eric Snow
811edcf9cd
Revert "gh-132775: Add _PyCode_GetVarCounts() (gh-133128)" (gh-133232)
...
The change broke the s390 builds, so I'm reverting it while I investigate.
This reverts commit 94b4fcd806 .
2025-05-01 02:35:20 +00:00
Eric Snow
cb35c11d82
gh-132775: Add _PyPickle_GetXIData() (gh-133107)
...
There's some extra complexity due to making sure we we get things right when handling functions and classes defined in the __main__ module. This is also reflected in the tests, including the addition of extra functions in test.support.import_helper.
2025-04-30 17:34:05 -06:00
Tian Gao
327f5ff9fa
gh-133153: Use rlcompleter for pdb's interact command ( #133176 )
2025-04-30 18:19:13 -04:00
sobolevn
0e21ed7c09
gh-133213: Add tests for string.templatelib.TemplateIter ( #133215 )
...
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2025-04-30 22:38:25 +03:00
Eric Snow
94b4fcd806
gh-132775: Add _PyCode_GetVarCounts() (gh-133128)
...
This helper is useful in a variety of ways, including in demonstrating how the different counts relate to one another.
It will be used in a later change to help identify if a function is "stateless", meaning it doesn't have any free vars or globals.
Note that a majority of this change is tests.
2025-04-30 18:19:20 +00:00
sobolevn
b451516aa6
gh-133197: Improve error message for ft"" and bt"" cases ( #133202 )
2025-04-30 19:20:44 +03:00
sobolevn
f7264ddea0
gh-133211: Test that PEP750 types are final ( #133212 )
2025-04-30 18:03:19 +02:00
sobolevn
cc39b19f0f
gh-133167: Fix compilation process with --enable-optimizations and --without-docstrings ( #133187 )
2025-04-30 16:41:50 +03:00
Petr Viktorin
8b26b23a96
gh-87135: test_threading: Wait on thread, not an Event it sets (GH-133198)
...
When the event is set the thread might not be done yet.
This is a fix-up for commit 4ebbfcf30e
2025-04-30 15:14:24 +02:00
Matt Wozniski
5154d412a4
gh-131591: Add tests for _PdbClient ( #132976 )
2025-04-30 14:09:41 +01:00
sobolevn
b1f893875b
gh-133194: Add CHECK_VERSION to new PEP758 grammar ( #133195 )
2025-04-30 13:39:26 +03:00
Victor Stinner
0f23e84cda
gh-130317: Skip test_pack_unpack_roundtrip_for_nans() on x86 ( #133155 )
...
Reduce also the number of iterations from 1000 to 10 to ease
debugging failures and prevent "command line too line" error when
tests are re-run.
2025-04-30 12:01:06 +02:00
Lysandros Nikolaou
60202609a2
gh-132661: Implement PEP 750 ( #132662 )
...
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Wingy <git@wingysam.xyz>
Co-authored-by: Koudai Aono <koxudaxi@gmail.com>
Co-authored-by: Dave Peck <davepeck@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Paul Everitt <pauleveritt@me.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
2025-04-30 11:46:41 +02:00
sobolevn
5ea9010e89
gh-133117: Run mypy on tomllib in CI ( #133118 )
2025-04-30 11:45:58 +03:00
Shantanu
7e8b153fef
gh-116436: Improve error message when TypeError occurs during dict update ( #116443 )
2025-04-29 22:18:06 -07:00
Inada Naoki
4e294f6feb
gh-133036: Deprecate codecs.open ( #133038 )
...
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
2025-04-30 10:11:09 +09:00
Brandt Bucher
732d1b0241
Get rid of ERROR_IF's "label" parameter (GH-132654)
2025-04-29 17:21:53 -07:00
Serhiy Storchaka
c46635aa5a
gh-120220: Deprecate legacy methods for tracing variables in Tkinter (GH-120223)
...
They do not work with Tcl 9.0.
Use new methods added in Python 3.6.
2025-04-29 20:26:51 +03:00
Tian Gao
caee16f052
gh-121468: Support async breakpoint in pdb ( #132576 )
2025-04-29 12:28:24 -04:00
Serhiy Storchaka
4265854d96
gh-132987: Support __index__() in the socket module (GH-133093)
...
ntohl(), htonl(), if_indextoname(), getaddrinfo() now use __index__() if
available.
Also fix the Argument Clinic names for module-level functions (although
this does not affect the user).
2025-04-29 19:27:07 +03:00
Chris Eibl
acb222ce8f
GH-130328: pasting in new REPL is slow on Windows (GH-132884)
2025-04-29 18:03:45 +02:00
Johannes Holmberg
698c6e3a0c
gh-132933: zipapp - apply the filter when creating the list of files to add (gh-132934)
2025-04-29 15:14:46 +01:00
Serhiy Storchaka
a64fdc7513
gh-132987: Support __index__() in the lzma module (GH-133099)
2025-04-29 14:14:33 +00:00
Serhiy Storchaka
0fb4c38c27
gh-132987: Support __index__() in the ssl.SSLContext.options setter (GH-133098)
2025-04-29 16:28:47 +03:00
Neil Schemenauer
eecafc3380
Revert gh-127266: avoid data races when updating type slots (gh-131174) (gh-133129)
...
This is triggering deadlocks in test_opcache. See GH-133130 for stack trace.
2025-04-28 23:38:29 -07:00
Raymond Hettinger
219b1f9d1d
gh-132893: Minor edits to the statistics module PR (gh-133106)
2025-04-28 23:05:37 -05:00