]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
14 months agogh-123560: Correct docs for "empty" format type for floats (#123561)
Sergey B Kirpichev [Thu, 26 Sep 2024 12:40:18 +0000 (15:40 +0300)] 
gh-123560: Correct docs for "empty" format type for floats (#123561)

14 months agogh-124234: Improve docs for `Mock.reset_mock` (#124237)
sobolevn [Thu, 26 Sep 2024 12:06:52 +0000 (15:06 +0300)] 
gh-124234: Improve docs for `Mock.reset_mock` (#124237)

14 months agogh-124538: Fix crash when using `gc.get_referents` on an untracked capsule object...
Peter Bierma [Thu, 26 Sep 2024 10:29:43 +0000 (06:29 -0400)] 
gh-124538: Fix crash when using `gc.get_referents` on an untracked capsule object (#124559)

14 months agogh-124402: Speed up test_free_threading and test_super (#124491)
Victor Stinner [Thu, 26 Sep 2024 08:53:17 +0000 (10:53 +0200)] 
gh-124402: Speed up test_free_threading and test_super (#124491)

* Reduce the number of iterations and the number of threads so a
  whole test file takes less than a minute.
* Refactor test_racing_iter_extend() to remove two levels of
  indentation.
* test_monitoring() uses a sleep of 100 ms instead of 1 second.

14 months agogh-101100: Make __subclasses__ doctest stable (#124577)
Jelle Zijlstra [Thu, 26 Sep 2024 06:26:03 +0000 (23:26 -0700)] 
gh-101100: Make __subclasses__ doctest stable (#124577)

Using a standard library class makes this test difficult to maintain
as other tests and other parts of the stdlib may create subclasses,
which may still be alive when this test runs depending on GC timing.

14 months agogh-120284: Enhance `asyncio.run` to accept awaitable objects (#120566)
Ron Frederick [Thu, 26 Sep 2024 06:15:08 +0000 (23:15 -0700)] 
gh-120284: Enhance `asyncio.run` to accept awaitable objects (#120566)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agogh-119333: get interp from tstate for PyContext watchers(#124444)
Jason Fried [Thu, 26 Sep 2024 05:26:23 +0000 (22:26 -0700)] 
gh-119333: get interp from tstate for PyContext watchers(#124444)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agogh-124309: Modernize the `staggered_race` implementation to support eager task factor...
Peter Bierma [Thu, 26 Sep 2024 05:11:17 +0000 (01:11 -0400)] 
gh-124309: Modernize the `staggered_race` implementation to support eager task factories (#124390)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
14 months agogh-119127: functools.partial placeholders (gh-119827)
dgpb [Thu, 26 Sep 2024 01:04:38 +0000 (04:04 +0300)] 
gh-119127: functools.partial placeholders (gh-119827)

14 months agoAdd "annotate" SET_FUNCTION_ATTRIBUTE bit to dis. (#124566)
larryhastings [Thu, 26 Sep 2024 00:01:45 +0000 (17:01 -0700)] 
Add "annotate" SET_FUNCTION_ATTRIBUTE bit to dis. (#124566)

14 months agogh-124412: Add helpers for converting annotations to source format (#124551)
Jelle Zijlstra [Thu, 26 Sep 2024 00:01:09 +0000 (17:01 -0700)] 
gh-124412: Add helpers for converting annotations to source format (#124551)

14 months agogh-119180: Disallow instantiation of ConstEvaluator objects (#124561)
Jelle Zijlstra [Wed, 25 Sep 2024 23:30:17 +0000 (16:30 -0700)] 
gh-119180: Disallow instantiation of ConstEvaluator objects (#124561)

14 months agoFor-else deserves its own section in the tutorial (#123946)
Ned Batchelder [Wed, 25 Sep 2024 23:18:18 +0000 (19:18 -0400)] 
For-else deserves its own section in the tutorial (#123946)

* For-else deserves its own section in the tutorial

* remove mention of unrolling the loop

* Update Doc/tutorial/controlflow.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
---------

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
14 months agoAdd 3.13 as a version option to the crash issue template (#124560)
Zachary Ware [Wed, 25 Sep 2024 23:09:37 +0000 (18:09 -0500)] 
Add 3.13 as a version option to the crash issue template (#124560)

14 months agogh-123242: Note that type.__annotations__ may not exist (#124557)
Jelle Zijlstra [Wed, 25 Sep 2024 23:08:14 +0000 (16:08 -0700)] 
gh-123242: Note that type.__annotations__ may not exist (#124557)

Closes #123242. The real criterion is that the attribute does not
exist on heap types, but I don't think we should discuss heap vs.
static types in the language reference.

14 months agogh-119180: Make FORWARDREF format look at __annotations__ first (#124479)
Jelle Zijlstra [Wed, 25 Sep 2024 22:32:45 +0000 (15:32 -0700)] 
gh-119180: Make FORWARDREF format look at __annotations__ first (#124479)

From discussion with Larry Hastings and Carl Meyer, this is the desired
behavior.

14 months agoGH-58058: Add quick reference for `ArgumentParser` to argparse docs (gh-124227)
Savannah Ostrowski [Wed, 25 Sep 2024 22:22:17 +0000 (15:22 -0700)] 
GH-58058: Add quick reference for `ArgumentParser` to argparse docs (gh-124227)

14 months agogh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (#120752)
Nice Zombies [Wed, 25 Sep 2024 21:43:58 +0000 (23:43 +0200)] 
gh-41431: Add `datetime.time.strptime()` and `datetime.date.strptime()` (#120752)

* Python implementation

* C implementation

* Test `date.strptime`

* Test `time.strptime`

* 📜🤖 Added by blurb_it.

* Update whatsnew

* Update documentation

* Add leap year note

* Update 2024-06-19-19-53-42.gh-issue-41431.gnkUc5.rst

* Apply suggestions from code review

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Remove parentheses

* Use helper function

* Remove bad return

* Link to github issue

* Fix directive

* Apply suggestions from code review

Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
* Fix test cases

---------

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Paul Ganssle <1377457+pganssle@users.noreply.github.com>
14 months agogh-102450: Add ISO-8601 alternative for midnight to `fromisoformat()` calls. (#105856)
TizzySaurus [Wed, 25 Sep 2024 21:32:51 +0000 (22:32 +0100)] 
gh-102450: Add ISO-8601 alternative for midnight to `fromisoformat()` calls. (#105856)

* Add NEWS.d entry

* Allow ISO-8601 24:00 alternative to midnight on datetime.time.fromisoformat()

* Allow ISO-8601 24:00 alternative to midnight on datetime.datetime.fromisoformat()

* Add NEWS.d entry

* Improve error message when hour is 24 and minute/second/microsecond is not 0

* Add tests for 24:00 fromisoformat

* Remove duplicate call to days_in_month() by storing in variable

* Add Python implementation

* Fix Lint

* Fix differing error msg in datetime.fromisoformat implementations when 24hrs has non-zero time component(s)

* Fix using time components inside tzinfo in Python implementation

* Don't parse tzinfo in C implementation when invalid iso midnight

* Remove duplicated variable in datetime test assertion line

* Add self to acknowledgements

* Remove duplicate NEWS entry

* Linting

* Add missing test case for when wrapping the year makes it invalid (too large)

14 months agogh-124370: Add "howto" for free-threaded Python (#124371)
Sam Gross [Wed, 25 Sep 2024 21:31:53 +0000 (14:31 -0700)] 
gh-124370: Add "howto" for free-threaded Python (#124371)

* gh-124370: Add "howto" for free-threaded Python

This is a guide aimed at people writing Python code, as oppposed to the
existing guide for C API extension authors.

* Add missing new line

* Update Doc/howto/free-threading-python.rst

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* interned -> immortalized

* Apply suggestions from code review

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
* Update Doc/howto/free-threading-python.rst

Co-authored-by: mpage <mpage@cs.stanford.edu>
* Update docs

* Apply suggestions from code review

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
* A few more updates

* Additional comment on immortal objects

* Mention specializing adaptive interpreter

* Remove trailing whitespace

* Remove mention of C macro

---------

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: mpage <mpage@cs.stanford.edu>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
14 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>
14 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>
14 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>
14 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)

14 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)

14 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>
14 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.

14 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)

14 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)

14 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

14 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>
14 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)

14 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)

14 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__":

14 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

14 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>
14 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)

14 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)

14 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

14 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>
14 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)

14 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)

14 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>
14 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)

14 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.

14 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.

14 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)

14 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.

14 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.

14 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)

14 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)

14 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)

14 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)

14 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)

14 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.

14 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)

14 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.

14 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)

14 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)

14 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.

14 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.

14 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)

14 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".

14 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>
14 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)

14 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)

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

14 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>
14 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>
14 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)

14 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>
14 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)

14 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)

14 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>
14 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)

14 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)

14 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>
14 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.

14 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

14 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>
14 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)

14 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

14 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>
14 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)

14 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>
14 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>
14 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

14 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)

14 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.

14 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)

14 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)

14 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)

14 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)

14 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>
14 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>
14 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.

14 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.

14 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.

14 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)

14 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>