]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
13 months agogh-121277: Allow `.. versionadded:: next` in docs (GH-121278)
Petr Viktorin [Wed, 25 Sep 2024 21:30:40 +0000 (23:30 +0200)] 
gh-121277: Allow `.. versionadded:: next` in docs (GH-121278)

Make `versionchanged:: next`` expand to current (unreleased) version.

When a new CPython release is cut, the release manager will replace
all such occurences of "next" with the just-released version.
(See the issue for release-tools and devguide PRs.)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 months agogh-119400: make_ssl_certs: update reference test data automatically, pass in expirat...
Alexander Kanavin [Wed, 25 Sep 2024 21:23:47 +0000 (23:23 +0200)] 
gh-119400:  make_ssl_certs: update reference test data automatically, pass in expiration dates as parameters #119400  (GH-119401)

* Lib/test/certdata: do not hardcode reference cert data into tests

The script was simply printing the reference data and asking
users to update it by hand into the test suites. This can
be easily improved by writing the data into files and
having the test cases load the files.

* make_ssl_certs: make it possible to pass in expiration dates from command line

Note that in this commit, the defaults are same as they were,
so if nothing is specified the script works as before.

---------

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13 months agogh-119180: Avoid going through AST and eval() when possible in annotationlib (#124337)
Jelle Zijlstra [Wed, 25 Sep 2024 21:14:03 +0000 (14:14 -0700)] 
gh-119180: Avoid going through AST and eval() when possible in annotationlib (#124337)

Often, ForwardRefs represent a single simple name. In that case, we
can avoid going through the overhead of creating AST nodes and code
objects and calling eval(): we can simply look up the name directly
in the relevant namespaces.

Co-authored-by: Victor Stinner <vstinner@python.org>
13 months agogh-124448: Update Windows builds to use Tcl/Tk 8.6.15 (GH-124449)
Zachary Ware [Wed, 25 Sep 2024 21:00:25 +0000 (16:00 -0500)] 
gh-124448: Update Windows builds to use Tcl/Tk 8.6.15 (GH-124449)

13 months agogh-123884 Tee of tee was not producing n independent iterators (gh-124490)
Raymond Hettinger [Wed, 25 Sep 2024 20:38:05 +0000 (13:38 -0700)] 
gh-123884 Tee of tee was not producing n independent iterators (gh-124490)

13 months agogh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124542)
Zachary Ware [Wed, 25 Sep 2024 20:16:32 +0000 (15:16 -0500)] 
gh-124378: Update test_ttk for Tcl/Tk 8.6.15 (GH-124542)

Co-authored-by: Marc Culler <culler@users.noreply.github.com>
13 months agogh-124513: Check args in framelocalsproxy_new() (#124515)
Victor Stinner [Wed, 25 Sep 2024 19:41:09 +0000 (21:41 +0200)] 
gh-124513: Check args in framelocalsproxy_new() (#124515)

Fix a crash in FrameLocalsProxy constructor: check the number of
arguments.

13 months agogh-101100: Add a table of class attributes to the "Custom classes" section of the...
Alex Waygood [Wed, 25 Sep 2024 19:29:58 +0000 (12:29 -0700)] 
gh-101100: Add a table of class attributes to the "Custom classes" section of the data model docs (#124480)

13 months agoDoc: Use ``major.minor`` for documentation distribution archive filenames (#124489)
Adam Turner [Wed, 25 Sep 2024 19:06:54 +0000 (20:06 +0100)] 
Doc: Use ``major.minor`` for documentation distribution archive filenames (#124489)

13 months agogh-117376: Fix off-by-ones in conversion functions (GH-124301)
Ken Jin [Wed, 25 Sep 2024 18:41:07 +0000 (02:41 +0800)] 
gh-117376: Fix off-by-ones in conversion functions (GH-124301)

Fix off-by-ones in conversion function

13 months agogh-123856: Fix PyREPL failure when a keyboard interrupt is triggered after using...
Emily Morehouse [Wed, 25 Sep 2024 18:22:03 +0000 (11:22 -0700)] 
gh-123856: Fix PyREPL failure when a keyboard interrupt is triggered after using a history search (#124396)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
13 months agogh-123756: Disable restart command if pdb is in inline mode (#123757)
Tian Gao [Wed, 25 Sep 2024 18:18:01 +0000 (11:18 -0700)] 
gh-123756: Disable restart command if pdb is in inline mode (#123757)

13 months agogh-112301: Use literal format strings in unicode_fromformat_arg (GH-124203)
Petr Viktorin [Wed, 25 Sep 2024 17:46:01 +0000 (19:46 +0200)] 
gh-112301: Use literal format strings in unicode_fromformat_arg (GH-124203)

13 months agoimport: permit __name__ for use in __name__ = "__main__": (#124381)
Thomas Grainger [Wed, 25 Sep 2024 17:39:14 +0000 (18:39 +0100)] 
import: permit __name__ for use in __name__ = "__main__": (#124381)

permit __name__ for use in __name__ = "__main__":

13 months agogh-123223: Adding hyperlink of argument in warnings.catch_warnings: (#123231)
Damien [Wed, 25 Sep 2024 17:30:34 +0000 (01:30 +0800)] 
gh-123223: Adding hyperlink of argument in warnings.catch_warnings: (#123231)

* Adding hyperlink of argument

* Modify as reviewer suggested

13 months agogh-123968: fix -f/--float command line option description (#124517)
Robert Wolff [Wed, 25 Sep 2024 16:47:45 +0000 (18:47 +0200)] 
gh-123968: fix -f/--float command line option description (#124517)

* fix -f/--float command line option description

See gh-123968 gh-124009

* Update Doc/library/random.rst

---------

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
13 months agogh-124285: Fix bug where bool() is called multiple times for the same part of a boole...
Irit Katriel [Wed, 25 Sep 2024 14:51:25 +0000 (15:51 +0100)] 
gh-124285: Fix bug where bool() is called multiple times for the same part of a boolean expression (#124394)

13 months agogh-123014: Disable pidfd API on older Android versions (#124458)
Malcolm Smith [Wed, 25 Sep 2024 14:23:30 +0000 (15:23 +0100)] 
gh-123014: Disable pidfd API on older Android versions (#124458)

13 months agogh-116622: Make test_unzip_zipfile recognize Android error message format (#124462)
Malcolm Smith [Wed, 25 Sep 2024 14:02:18 +0000 (15:02 +0100)] 
gh-116622: Make test_unzip_zipfile recognize Android error message format (#124462)

Make test_unzip_zipfile recognize Android error message format

13 months agogh-123445: calendar: Improve descriptions for day and month attributes (#123483)
Mat S [Wed, 25 Sep 2024 09:24:47 +0000 (10:24 +0100)] 
gh-123445: calendar: Improve descriptions for day and month attributes (#123483)

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 months agoDoc: Improve documentation for the ``path`` argument in ``shutil.which()`` (#124494)
Tom Most [Wed, 25 Sep 2024 07:54:13 +0000 (00:54 -0700)] 
Doc: Improve documentation for the ``path`` argument in ``shutil.which()`` (#124494)

13 months agoAdjust build_ubuntu_ssltests job to use cache for the correct OS version (GH-124403)
Zachary Ware [Wed, 25 Sep 2024 01:27:23 +0000 (20:27 -0500)] 
Adjust build_ubuntu_ssltests job to use cache for the correct OS version (GH-124403)

13 months agogh-90562: Support zero argument super with dataclasses when slots=True (gh-124455)
Eric V. Smith [Wed, 25 Sep 2024 01:26:26 +0000 (21:26 -0400)] 
gh-90562: Support zero argument super with dataclasses when slots=True (gh-124455)

Co-authored-by: @wookie184
Co-authored-by: Carl Meyer <carl@oddbird.net>
13 months agoGH-124408: Temporarily skip test_strftime_y2k for emulated Linux JIT CI (GH-124466)
Savannah Ostrowski [Wed, 25 Sep 2024 01:09:50 +0000 (18:09 -0700)] 
GH-124408: Temporarily skip test_strftime_y2k for emulated Linux JIT CI (GH-124466)

13 months agodataclasses: Avoid using private class (#124465)
Jelle Zijlstra [Tue, 24 Sep 2024 21:02:18 +0000 (14:02 -0700)] 
dataclasses: Avoid using private class (#124465)

typing.get_origin() does what we need here, without reaching into
typing internals. This shouldn't change any behavior (so I am going
to skip news), but it sets a good example for other users introspecting
typing objects.

13 months agogh-124402: Require cpu resource in test_super slow method (#124434)
Victor Stinner [Tue, 24 Sep 2024 20:36:45 +0000 (22:36 +0200)] 
gh-124402: Require cpu resource in test_super slow method (#124434)

test___class___modification_multithreaded() now requires the 'cpu'
test resource on a Free Threaded build.

13 months agogh-86009: Fix solaris detection in `_USE_CP_SENDFILE` check (GH-124289)
Jakub Kulík [Tue, 24 Sep 2024 20:23:17 +0000 (22:23 +0200)] 
gh-86009: Fix solaris detection in `_USE_CP_SENDFILE` check (GH-124289)

13 months agogh-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` (#124026)
Sam Gross [Tue, 24 Sep 2024 20:08:18 +0000 (13:08 -0700)] 
gh-123923: Defer refcounting for `f_funcobj` in `_PyInterpreterFrame` (#124026)

Use a `_PyStackRef` and defer the reference to `f_funcobj` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.

13 months agobpo-44864: Do not translate user-provided strings in ArgumentParser.add_subparsers...
Jérémie Detrey [Tue, 24 Sep 2024 19:54:50 +0000 (21:54 +0200)] 
bpo-44864: Do not translate user-provided strings in ArgumentParser.add_subparsers() (GH-27667)

Call _() on literal strings only.

13 months agogh-120254: Add a `commands` argument to `pdb.set_trace` (#120255)
Tian Gao [Tue, 24 Sep 2024 19:52:15 +0000 (12:52 -0700)] 
gh-120254: Add a `commands` argument to `pdb.set_trace` (#120255)

13 months agogh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. (#124453)
Ned Deily [Tue, 24 Sep 2024 19:49:58 +0000 (12:49 -0700)] 
gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. (#124453)

13 months agogh-124405: Fix `NameError` in `openpty` (#124406)
sobolevn [Tue, 24 Sep 2024 18:06:39 +0000 (21:06 +0300)] 
gh-124405: Fix `NameError` in `openpty` (#124406)

13 months agoGH-124398: Pin LLVM to 18.1.0 for Windows JIT CI (GH-124399)
Savannah Ostrowski [Tue, 24 Sep 2024 17:03:16 +0000 (10:03 -0700)] 
GH-124398: Pin LLVM to 18.1.0 for Windows JIT CI (GH-124399)

13 months agoGH-87358: Add clarification about nargs and default argparse behaviour (#124094)
Savannah Ostrowski [Tue, 24 Sep 2024 16:30:01 +0000 (09:30 -0700)] 
GH-87358: Add clarification about nargs and default argparse behaviour (#124094)

13 months agogh-124402: Require cpu resource in test_free_threading (#124438)
Victor Stinner [Tue, 24 Sep 2024 14:33:27 +0000 (16:33 +0200)] 
gh-124402: Require cpu resource in test_free_threading (#124438)

Require the 'cpu' test resource on slow test_free_threading tests.

13 months agogh-113008: Correct argparse usage output for required, mutually exclusive groups...
Payton [Tue, 24 Sep 2024 14:14:35 +0000 (09:14 -0500)] 
gh-113008:  Correct argparse usage output for required, mutually exclusive groups (GH-113085)

13 months agogh-59317: Improve parsing optional positional arguments in argparse (GH-124303)
Serhiy Storchaka [Tue, 24 Sep 2024 12:46:41 +0000 (15:46 +0300)] 
gh-59317: Improve parsing optional positional arguments in argparse (GH-124303)

Fix parsing positional argument with nargs equal to '?' or '*' if it is
preceded by an option and another positional argument.

13 months agogh-65169: Clarify prog default in argparse (GH-31602)
Stanley [Tue, 24 Sep 2024 10:57:37 +0000 (03:57 -0700)] 
gh-65169: Clarify prog default in argparse (GH-31602)

13 months agogh-123978: Remove broken time.thread_time() on NetBSD (GH-124116)
Serhiy Storchaka [Tue, 24 Sep 2024 08:26:25 +0000 (11:26 +0300)] 
gh-123978: Remove broken time.thread_time() on NetBSD (GH-124116)

13 months agogh-124188: Fix PyErr_ProgramTextObject() (GH-124189)
Serhiy Storchaka [Tue, 24 Sep 2024 08:01:37 +0000 (11:01 +0300)] 
gh-124188: Fix PyErr_ProgramTextObject() (GH-124189)

* Detect source file encoding.
* Use the "replace" error handler even for UTF-8 (default) encoding.
* Remove the BOM.
* Fix detection of too long lines if they contain NUL.
* Return the head rather than the tail for truncated long lines.

13 months agogh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH...
Serhiy Storchaka [Tue, 24 Sep 2024 07:55:33 +0000 (10:55 +0300)] 
gh-72795: Make positional arguments with nargs='*' or REMAINDER non-required (GH-124306)

This allows to use positional argument with nargs='*' and without default
in mutually exclusive group and improves error message about required
arguments.

13 months agogh-53780: Ignore the first "--" (double dash) between an option and command in argpar...
Serhiy Storchaka [Tue, 24 Sep 2024 07:35:28 +0000 (10:35 +0300)] 
gh-53780: Ignore the first "--" (double dash) between an option and command in argparse (GH-124275)

13 months agogh-63143: Fix parsing mutually exclusive arguments in argparse (GH-124307)
Serhiy Storchaka [Tue, 24 Sep 2024 07:23:07 +0000 (10:23 +0300)] 
gh-63143: Fix parsing mutually exclusive arguments in argparse (GH-124307)

Arguments with the value identical to the default value (e.g. booleans,
small integers, empty or 1-character strings) are no longer considered
"not present".

13 months agogh-124120: Document `Annotated.__origin__` (#124125)
sobolevn [Tue, 24 Sep 2024 06:53:04 +0000 (09:53 +0300)] 
gh-124120: Document `Annotated.__origin__` (#124125)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months agogh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128)
Victor Stinner [Tue, 24 Sep 2024 06:42:58 +0000 (08:42 +0200)] 
gh-124127: Make Py_REFCNT() opaque in limited C API 3.14 (#124128)

13 months agogh-124130: Increase test coverage for \b and \B in regular expressions (GH-124330)
Serhiy Storchaka [Tue, 24 Sep 2024 06:31:10 +0000 (09:31 +0300)] 
gh-124130: Increase test coverage for \b and \B in regular expressions (GH-124330)

13 months agoFix typos (#124409)
Xie Yanbo [Tue, 24 Sep 2024 06:19:25 +0000 (14:19 +0800)] 
Fix typos (#124409)

13 months agogh-119180: Add discussion of annotations to the 3.14 What's New (#124393)
Jelle Zijlstra [Tue, 24 Sep 2024 05:50:13 +0000 (22:50 -0700)] 
gh-119180: Add discussion of annotations to the 3.14 What's New (#124393)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months agogh-119333: Add C api to have contextvar enter/exit callbacks (#119335)
Jason Fried [Tue, 24 Sep 2024 03:40:17 +0000 (20:40 -0700)] 
gh-119333: Add C api to have contextvar enter/exit callbacks (#119335)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
13 months agogh-123990: Good bye WITH_FREELISTS macro (gh-124358)
Donghee Na [Tue, 24 Sep 2024 01:28:59 +0000 (18:28 -0700)] 
gh-123990: Good bye WITH_FREELISTS macro (gh-124358)

13 months agogh-100980: ctypes: Test, document, and fix finalizing _fields_ (GH-124292)
Petr Viktorin [Tue, 24 Sep 2024 00:40:53 +0000 (02:40 +0200)] 
gh-100980: ctypes: Test, document, and fix finalizing _fields_ (GH-124292)

- If setting `_fields_` fails, e.g. with AttributeError, don't set the attribute in `__dict__`
- Document the “finalization” behaviour
- Beef up tests: add `getattr`, test Union as well as Structure
- Put common functionality in a common function

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
13 months agoLint and format Tools/build/check-warnings.py (#124382)
Hugo van Kemenade [Mon, 23 Sep 2024 23:47:05 +0000 (16:47 -0700)] 
Lint and format Tools/build/check-warnings.py (#124382)

13 months agogh-119004: fix a crash in equality testing between `OrderedDict` (#121329)
Bénédikt Tran [Mon, 23 Sep 2024 23:44:36 +0000 (01:44 +0200)] 
gh-119004: fix a crash in equality testing between `OrderedDict` (#121329)

13 months agogh-116622: Complete Android documentation (#124259)
Malcolm Smith [Mon, 23 Sep 2024 23:09:53 +0000 (00:09 +0100)] 
gh-116622: Complete Android documentation (#124259)

Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: T. Wouters <thomas@python.org>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months agogh-124102: Update internal PCbuild docs to accurately list build dependencies (GH...
Wulian [Mon, 23 Sep 2024 23:09:22 +0000 (07:09 +0800)] 
gh-124102: Update internal PCbuild docs to accurately list build dependencies (GH-124103)

13 months agoBump Ruff to 0.6.7 (#124384)
Alex Waygood [Mon, 23 Sep 2024 22:19:35 +0000 (15:19 -0700)] 
Bump Ruff to 0.6.7 (#124384)

13 months agoDoc: Add ``make dist-no-html`` (#124383)
Adam Turner [Mon, 23 Sep 2024 22:11:34 +0000 (23:11 +0100)] 
Doc: Add ``make dist-no-html`` (#124383)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
13 months agoGH-65961: Document the deprecation of `__package__` and `__cached__` (GH-124377)
Brett Cannon [Mon, 23 Sep 2024 21:14:33 +0000 (14:14 -0700)] 
GH-65961: Document the deprecation of `__package__` and `__cached__` (GH-124377)

The code changes for warning related to `__package__` landed in Python 3.12. `__cached__` doesn't have any changes as it isn't used but only set by the import system.

13 months agogh-99108: Disable HACL SIMD code on older versions of Android (#124304)
Malcolm Smith [Mon, 23 Sep 2024 20:28:03 +0000 (21:28 +0100)] 
gh-99108: Disable HACL SIMD code on older versions of Android (#124304)

Disable HACL SIMD code on older versions of Android

13 months agoGH-87041: Fix incorrect indentation in argparse help (GH-124230)
Savannah Ostrowski [Mon, 23 Sep 2024 19:45:36 +0000 (12:45 -0700)] 
GH-87041: Fix incorrect indentation in argparse help (GH-124230)

In case of usage a long command along with max_help_position more than
the length of the command, the command's help was incorrectly started
on the new line.

Co-authored-by: Pavel Ditenbir <pavel.ditenbir@gmail.com>
13 months agoGH-109975: Copyedit 3.13 What's New: Trivia (#124348)
Adam Turner [Mon, 23 Sep 2024 19:32:23 +0000 (20:32 +0100)] 
GH-109975: Copyedit 3.13 What's New: Trivia (#124348)

13 months agogh-124344: Make `_PyObject_IS_GC()` use underscored `PyType_IS_GC()` (#124349)
neonene [Mon, 23 Sep 2024 19:14:15 +0000 (04:14 +0900)] 
gh-124344: Make `_PyObject_IS_GC()` use underscored `PyType_IS_GC()` (#124349)

move up _PyType_IS_GC and use it

13 months agogh-119180: Fix annotationlib.ForwardRef.evaluate with no globals (#124326)
Jelle Zijlstra [Mon, 23 Sep 2024 19:06:19 +0000 (12:06 -0700)] 
gh-119180: Fix annotationlib.ForwardRef.evaluate with no globals (#124326)

We were sometimes passing None as the globals argument to eval(), which makes it
inherit the globals from the calling scope. Instead, ensure that globals is always
non-None. The test was passing accidentally because I passed "annotationlib" as a
module object; fix that. Also document the parameters to ForwardRef() and remove
two unused private ones.

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months agoGH-109975: Copyedit 3.13 What's New: Copyedit C API deprecations pending removal...
Adam Turner [Mon, 23 Sep 2024 18:40:20 +0000 (19:40 +0100)] 
GH-109975: Copyedit 3.13 What's New: Copyedit C API deprecations pending removal (#124336)

13 months agoGH-109975: Copyedit 3.13 What's New: Build Changes (#124343)
Adam Turner [Mon, 23 Sep 2024 18:30:45 +0000 (19:30 +0100)] 
GH-109975: Copyedit 3.13 What's New: Build Changes (#124343)

Co-authored-by: Malcolm Smith <smith@chaquo.com>
13 months agoGH-124321: Fix argparse negative number parsing to capture -.5(GH-124322)
Savannah Ostrowski [Mon, 23 Sep 2024 18:16:55 +0000 (11:16 -0700)] 
GH-124321: Fix argparse negative number parsing to capture -.5(GH-124322)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
13 months agoGH-109975: Copyedit 3.13 What's New: Porting to Python 3.13 (#124341)
Adam Turner [Mon, 23 Sep 2024 18:14:37 +0000 (19:14 +0100)] 
GH-109975: Copyedit 3.13 What's New: Porting to Python 3.13 (#124341)

Copyedit Porting to Python 3.13

13 months agoGH-124284: Add stats for refcount operations on immortal objects (GH-124288)
Mark Shannon [Mon, 23 Sep 2024 18:10:55 +0000 (19:10 +0100)] 
GH-124284: Add stats for refcount operations on immortal objects (GH-124288)

13 months agoReplace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossar...
decorator-factory [Mon, 23 Sep 2024 16:34:08 +0000 (19:34 +0300)] 
Replace the term `Immutable` with a `Hashable` in the `sequence` entry of the Glossary (#124350)

The term `Immutable` in the `sequence` entry of the glossary is used incorrectly, in fact dicts accepts hashable keys, which is not the same as immutable.

13 months agogh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH...
Steve Dower [Mon, 23 Sep 2024 15:27:46 +0000 (16:27 +0100)] 
gh-124254: Detect freethreaded MSI component when doing an upgrade on Windows (GH-124279)

13 months agoAdd Kirill Podoprigora for AST codeowners (#124302)
Kirill Podoprigora [Mon, 23 Sep 2024 14:16:19 +0000 (17:16 +0300)] 
Add Kirill Podoprigora for AST codeowners (#124302)

13 months agoGH-109975: Copyedit 3.13 What's New: C API (#124313)
Adam Turner [Mon, 23 Sep 2024 13:28:17 +0000 (14:28 +0100)] 
GH-109975: Copyedit 3.13 What's New: C API (#124313)

13 months agoGH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932)
Savannah Ostrowski [Mon, 23 Sep 2024 09:08:03 +0000 (02:08 -0700)] 
GH-79714: Add mention of stderr for clarity to ArgumentParser.exit() (GH-123932)

13 months agoGH-113655: Lower the C recursion limit for HPPA, PPC64 and SPARC (#124264)
Sam James [Mon, 23 Sep 2024 07:03:30 +0000 (08:03 +0100)] 
GH-113655: Lower the C recursion limit for HPPA, PPC64 and SPARC (#124264)

Lower the C recursion limit for HPPA, PPC64 and SPARC, as they use
relatively large stack frames that cause e.g. `test_descr` to hit
a stack overflow.  According to quick testing, it seems that values
around 8000 are max for HPPA and PPC64 (ELFv1 ABI) and 7000 for SPARC64.
To keep things safe, let's use 5000 for PPC64 and 4000 for SPARC.

Co-authored-by: Michał Górny <mgorny@gentoo.org>
13 months agogh-124130: Notes on empty string corner case of category `\B` (#124133)
Y5 [Mon, 23 Sep 2024 06:58:14 +0000 (06:58 +0000)] 
gh-124130: Notes on empty string corner case of category `\B` (#124133)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months agogh-124228: Fix UUID test in configure files for NetBSD (#124229)
Furkan Onder [Mon, 23 Sep 2024 06:54:36 +0000 (09:54 +0300)] 
gh-124228: Fix UUID test in configure files for NetBSD (#124229)

Fix UUID configuration in configure files for NetBSD compatibility.

13 months agogh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output...
Terry Jan Reedy [Sun, 22 Sep 2024 19:51:09 +0000 (15:51 -0400)] 
gh-112938: IDLE - Fix uninteruptable hang when Shell gets rapid continuous output. (#124310)

https://github.com/python/cpython/issues/88496 replaced text.update with text.update_idletasks in colorizer.py and outwin.py to fix test failures on macOS.  While theoretically correct, the result was Shell freezing when receiving continuous short strings to print.  Test: `while 1: 1`.

The guess is that there is no idle time in which to do the screen update.  Reverting the change in one of the files,
outwin, fixes the issue.  Colorizer runs ever 1/20 second and seems to work fine.

When running test-outwin on macOS, alias 'update'
to 'update_idletasks on the text used for testing.

13 months agogh-124213: Skip tests failing inside systemd-nspawn --suppress-sync=true (#124215)
Michał Górny [Fri, 20 Sep 2024 13:37:49 +0000 (15:37 +0200)] 
gh-124213: Skip tests failing inside systemd-nspawn --suppress-sync=true (#124215)

Add a helper function that checks whether the test suite is running
inside a systemd-nspawn container, and skip the few tests failing
with `--suppress-sync=true` in that case.  The tests are failing because
`--suppress-sync=true` stubs out `fsync()`, `fdatasync()` and `msync()`
calls, and therefore they always return success without checking for
invalid arguments.

Call `os.open(__file__, os.O_RDONLY | os.O_SYNC)` and check the errno to
detect whether `--suppress-sync=true` is actually used, and skip
the tests only in that scenario.

13 months agogh-111513: Improve datetime.fromtimestamp's error message (#124249)
AN Long [Fri, 20 Sep 2024 12:42:43 +0000 (20:42 +0800)] 
gh-111513: Improve datetime.fromtimestamp's error message (#124249)

13 months agogh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (#124240)
Y5 [Fri, 20 Sep 2024 11:01:28 +0000 (11:01 +0000)] 
gh-124217, ipaddress: Add RFC 9637 reserved IPv6 block `3fff::/20` (#124240)

Signed-off-by: y5c4l3 <y5c4l3@proton.me>
13 months agoFix typo in XMLParser doc (#124129)
Jacob Walls [Fri, 20 Sep 2024 10:42:44 +0000 (07:42 -0300)] 
Fix typo in XMLParser doc (#124129)

13 months agogh-124248: Fix crash in struct when processing 0p fields (#124251)
Brian Schubert [Fri, 20 Sep 2024 10:08:59 +0000 (06:08 -0400)] 
gh-124248: Fix crash in struct when processing 0p fields (#124251)

13 months agogh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274)
Serhiy Storchaka [Fri, 20 Sep 2024 09:54:20 +0000 (12:54 +0300)] 
gh-95468: Add more tests for "--" (double dash) in test_argparse (GH-124274)

13 months agogh-123880: Allow recursive import of single-phase-init modules (GH-123950)
Petr Viktorin [Fri, 20 Sep 2024 08:27:34 +0000 (10:27 +0200)] 
gh-123880: Allow recursive import of single-phase-init modules (GH-123950)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
13 months agogh-123797: Check for runtime availability of `ptsname_r` on macos (#123806)
sobolevn [Fri, 20 Sep 2024 06:30:27 +0000 (09:30 +0300)] 
gh-123797: Check for runtime availability of `ptsname_r` on macos (#123806)

13 months agogh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233)
Serhiy Storchaka [Fri, 20 Sep 2024 06:20:47 +0000 (09:20 +0300)] 
gh-81691: Fix handling of multiple "--" (double dashes) in argparse (GH-124233)

Only the first one has now been removed, all subsequent ones are now
taken literally.

13 months agotest_cext, test_cppext: enable /W4 warnings on Windows (#124253)
Victor Stinner [Thu, 19 Sep 2024 20:32:01 +0000 (22:32 +0200)] 
test_cext, test_cppext: enable /W4 warnings on Windows (#124253)

Add an explicit cast to (void*) and add Py_UNUSED() to fix some
warnings in extension.c.

13 months agoDocs: Update two FAQs for Python 3 (#124247)
Hugo van Kemenade [Thu, 19 Sep 2024 18:50:05 +0000 (21:50 +0300)] 
Docs: Update two FAQs for Python 3 (#124247)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
13 months agogh-124245: Fix UserWarning in test_argparse (GH-124246)
Serhiy Storchaka [Thu, 19 Sep 2024 18:35:12 +0000 (21:35 +0300)] 
gh-124245: Fix UserWarning in test_argparse (GH-124246)

13 months agogh-124160: Pass main_tstate to update_global_state_for_extension() (#124164)
luk1337 [Thu, 19 Sep 2024 16:05:20 +0000 (18:05 +0200)] 
gh-124160: Pass main_tstate to update_global_state_for_extension() (#124164)

13 months agobpo-41843: Reenable use of sendfile in shutil module on Solaris (GH-23893)
Jakub Kulík [Thu, 19 Sep 2024 14:47:05 +0000 (16:47 +0200)] 
bpo-41843: Reenable use of sendfile in shutil module on Solaris (GH-23893)

13 months agoSupport the "pager" binary in _pyrepl (#122878)
Stefano Rivera [Thu, 19 Sep 2024 13:18:24 +0000 (06:18 -0700)] 
Support the "pager" binary in _pyrepl (#122878)

Debian (and derivatives) provide a /usr/bin/pager binary, managed by the
alternatives system, that always points to an available pager utility.
Allow _pyrepl to use it, to follow system policy.

This is a very trivial change, from a patch that Debian has been
carrying since 2.7 era. Seems appropriate to upstream.
https://bugs.debian.org/799555

13 months agogh-124040: Adjust few tests in testHypot/testDist to get exactly computed results...
Sergey B Kirpichev [Thu, 19 Sep 2024 08:11:03 +0000 (11:11 +0300)] 
gh-124040: Adjust few tests in testHypot/testDist to get exactly computed results (GH-124042)

13 months agogh-123934: Fix `MagicMock` not to reset magic method return values (#124038)
sobolevn [Thu, 19 Sep 2024 07:55:47 +0000 (10:55 +0300)] 
gh-123934: Fix `MagicMock` not to reset magic method return values (#124038)

13 months agogh-120754: Fix memory leak in FileIO.__init__() (#124225)
Victor Stinner [Wed, 18 Sep 2024 22:11:50 +0000 (00:11 +0200)] 
gh-120754: Fix memory leak in FileIO.__init__() (#124225)

Free 'self->stat_atopen' before assigning it, since
io.FileIO.__init__() can be called multiple times manually
(especially by test_io).

13 months agogh-124212: Fix undefined variable in error message in venv (GH-124211)
Jacek [Wed, 18 Sep 2024 22:05:18 +0000 (00:05 +0200)] 
gh-124212: Fix undefined variable in error message in venv (GH-124211)

13 months agogh-124083: Skip test_signal.test_strsignal() on NetBSD (#124084)
Furkan Onder [Wed, 18 Sep 2024 21:22:00 +0000 (00:22 +0300)] 
gh-124083: Skip test_signal.test_strsignal() on NetBSD (#124084)

Skip test_strsignal() on NetBSD due to TypeError.

13 months agoFix `make htmllive` target (GH-124219)
Zachary Ware [Wed, 18 Sep 2024 21:02:20 +0000 (16:02 -0500)] 
Fix `make htmllive` target (GH-124219)

Allow `make -C Doc htmllive` to work without manual venv activation

Set PATH to ensure that `sphinx-autobuild` can find `sphinx-build`.

13 months agogh-116022: Improve `repr()` of AST nodes (#117046)
Tomas R [Wed, 18 Sep 2024 17:28:22 +0000 (19:28 +0200)] 
gh-116022: Improve `repr()` of AST nodes (#117046)

Co-authored-by: AN Long <aisk@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
13 months agogh-124064: Fix -Wconversion warnings in Parser/string_parser.c (#124204)
Victor Stinner [Wed, 18 Sep 2024 17:10:56 +0000 (19:10 +0200)] 
gh-124064: Fix -Wconversion warnings in Parser/string_parser.c (#124204)

Fix integer overflow check in decode_unicode_with_escapes(): use
PY_SSIZE_T_MAX instead of SIZE_MAX.