]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
11 months ago[3.13] Doc: Recommend shlex.quote alongside pipes removal (GH-126570) (#126820)
Miss Islington (bot) [Thu, 14 Nov 2024 05:08:22 +0000 (06:08 +0100)] 
[3.13] Doc: Recommend shlex.quote alongside pipes removal (GH-126570) (#126820)

Doc: Recommend shlex.quote alongside pipes removal (GH-126570)

One of the most common reasons I see the old `pipes` module still in use
when porting to Python 3.13 is for the undocumented `pipes.quote`
function, which can easily be replaced with `shlex.quote`.  I think it's
worth specifically calling this out, since being directed to the
`subprocess` module would be confusing in this case.
(cherry picked from commit 73e34b680852794d110cd806505b3d74d9d593db)

Co-authored-by: Colin Watson <cjwatson@debian.org>
11 months ago[3.13] gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732...
Miss Islington (bot) [Thu, 14 Nov 2024 05:04:03 +0000 (06:04 +0100)] 
[3.13] gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732) (#126818)

gh-126731: Update outdated project information in `pprint.pp` doc (GH-126732)
(cherry picked from commit 6a93a1adbb56a64ec6d20e8aab911439998502c9)

Co-authored-by: Wulian <xiguawulian@gmail.com>
11 months ago[3.13] gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. (GH-125801)
Miss Islington (bot) [Thu, 14 Nov 2024 04:28:22 +0000 (05:28 +0100)] 
[3.13] gh-124448: Update bundled Tcl/Tk in macOS installer to 8.6.15. (GH-125801)

(cherry picked from commit fc9e6bf53d1c9ce2b5f802864e0da265a77c111f)

Co-authored-by: Ned Deily <nad@python.org>
11 months ago[3.13] GH-118289: Fix handling of non-directories in `posixpath.realpath()` (GH...
Barney Gale [Wed, 13 Nov 2024 23:32:56 +0000 (23:32 +0000)] 
[3.13] GH-118289: Fix handling of non-directories in `posixpath.realpath()`  (GH-120127) (#126815)

In strict mode, raise `NotADirectoryError` if we encounter a non-directory
while we still have path parts left to process.

We use a `part_count` variable rather than `len(rest)` because the `rest`
stack also contains markers for unresolved symlinks.
(cherry picked from commit fd4b5453df74e249987553b12c14ad75fafa4991)

11 months ago[3.13] GH-126606: don't write incomplete pyc files (GH-126627) (GH-126809)
Miss Islington (bot) [Wed, 13 Nov 2024 22:49:09 +0000 (23:49 +0100)] 
[3.13] GH-126606: don't write incomplete pyc files (GH-126627) (GH-126809)

GH-126606: don't write incomplete pyc files (GH-126627)
(cherry picked from commit c695e37a3f95c225ee08d1e882d23fa200b5ec34)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Brett Cannon <brett@python.org>
11 months ago[3.13] gh-126188: Update bundled pip to 24.3.1 (gh-126805) (#126806)
Miss Islington (bot) [Wed, 13 Nov 2024 21:51:57 +0000 (22:51 +0100)] 
[3.13] gh-126188: Update bundled pip to 24.3.1 (gh-126805) (#126806)

gh-126188: Update bundled pip to 24.3.1 (gh-126805)

Update bundled pip to 24.3.1
(cherry picked from commit f6b0361c17552197f44be16435e4a5cb4b1d60ca)

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
11 months ago[3.13] gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759...
Miss Islington (bot) [Wed, 13 Nov 2024 19:05:59 +0000 (20:05 +0100)] 
[3.13] gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759) (#126778)

gh-126341: add release check to `__iter__` method of `memoryview` (GH-126759)
(cherry picked from commit a12690ef49e8fc8a3af4c5f1757eb3caffb35e03)

Co-authored-by: Ritvik Pasham <ritvikpasham@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Victor Stinner <vstinner@python.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
11 months ago[3.13] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792...
Miss Islington (bot) [Wed, 13 Nov 2024 18:56:17 +0000 (19:56 +0100)] 
[3.13] gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792) (GH-126796)

gh-126623: Update libexpat to 2.6.4, make future updates easier (GH-126792)

Update libexpat to 2.6.4, make future updates easier.
(cherry picked from commit 3c9996909402fadc98e6ca2a64e75a71a7427352)

Co-authored-by: Seth Michael Larson <seth@python.org>
11 months ago[3.13] gh-126456: Fix _pyrepl curses tigetstr() (GH-126472) (#126790)
Miss Islington (bot) [Wed, 13 Nov 2024 17:19:03 +0000 (18:19 +0100)] 
[3.13] gh-126456: Fix _pyrepl curses tigetstr() (GH-126472) (#126790)

gh-126456: Fix _pyrepl curses tigetstr() (GH-126472)
(cherry picked from commit b2bbdc56e3276f3b37ea5cf5f73f49c4cce6d9f6)

Co-authored-by: Victor Stinner <vstinner@python.org>
11 months ago[3.13] gh-104745: Limit starting a patcher more than once without stopping it (GH...
Miss Islington (bot) [Wed, 13 Nov 2024 08:46:12 +0000 (09:46 +0100)] 
[3.13] gh-104745: Limit starting a patcher more than once without stopping it (GH-126649) (#126772)

gh-104745: Limit starting a patcher more than once without stopping it (GH-126649)

Previously, this would cause an `AttributeError` if the patch stopped more than once after this, and would also disrupt the original patched object.

---------

(cherry picked from commit 1e40c5ba47780ddd91868abb3aa064f5ba3015e4)

Co-authored-by: Red4Ru <39802734+Red4Ru@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
11 months ago[3.13] bpo-46128: Strip IsolatedAsyncioTestCase frames from reported stacktraces...
Miss Islington (bot) [Wed, 13 Nov 2024 04:48:30 +0000 (05:48 +0100)] 
[3.13] bpo-46128: Strip IsolatedAsyncioTestCase frames from reported stacktraces (GH-30196) (#126770)

bpo-46128: Strip IsolatedAsyncioTestCase frames from reported stacktraces (GH-30196)

---------

(cherry picked from commit 2e39d77ddeb51505d65fd54ccfcd72615c6b1927)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
11 months ago[3.13] gh-126688: Reinit import lock after fork (GH-126692) (GH-126765)
Miss Islington (bot) [Tue, 12 Nov 2024 22:00:42 +0000 (23:00 +0100)] 
[3.13] gh-126688: Reinit import lock after fork (GH-126692) (GH-126765)

The PyMutex implementation supports unlocking after fork because we
clear the list of waiters in parking_lot.c. This doesn't work as well
for _PyRecursiveMutex because on some systems, such as SerenityOS, the
thread id is not preserved across fork().
(cherry picked from commit 5610860840aa71b186fc5639211dd268b817d65f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
11 months ago[3.13] GH-120423: `pathname2url()`: handle forward slashes in Windows paths (GH-12659...
Miss Islington (bot) [Tue, 12 Nov 2024 21:57:41 +0000 (22:57 +0100)] 
[3.13] GH-120423: `pathname2url()`: handle forward slashes in Windows paths (GH-126593) (#126764)

GH-120423: `pathname2url()`: handle forward slashes in Windows paths (GH-126593)

Adjust `urllib.request.pathname2url()` so that forward slashes in Windows
paths are handled identically to backward slashes.
(cherry picked from commit bf224bd7cef5d24eaff35945ebe7ffe14df7710f)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
11 months ago[3.13] gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (GH-126617...
Miss Islington (bot) [Tue, 12 Nov 2024 14:14:21 +0000 (15:14 +0100)] 
[3.13] gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (GH-126617) (#126739)

gh-126595: fix a crash when calling `itertools.count(sys.maxsize)` (GH-126617)
(cherry picked from commit 6e3bb8a91380ba98d704f2dca8e98923c0abc8a8)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
11 months ago[3.13] gh-126405: fix use-after-free in `_asyncio.Future.remove_done_callback` (GH...
Miss Islington (bot) [Tue, 12 Nov 2024 13:04:27 +0000 (14:04 +0100)] 
[3.13] gh-126405: fix use-after-free in `_asyncio.Future.remove_done_callback` (GH-126733) (#126736)

gh-126405: fix use-after-free in `_asyncio.Future.remove_done_callback` (GH-126733)
(cherry picked from commit 37c57dfad12744608091653fd753a1f770e2479b)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
11 months ago[3.13] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865...
Miss Islington (bot) [Tue, 12 Nov 2024 12:45:12 +0000 (13:45 +0100)] 
[3.13] gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865) (gh-125709) (GH-125204)

* gh-116510: Fix a Crash Due to Shared Immortal Interned Strings (gh-124865)

Fix a crash caused by immortal interned strings being shared between
sub-interpreters that use basic single-phase init. In that case, the string
can be used by an interpreter that outlives the interpreter that created and
interned it. For interpreters that share obmalloc state, also share the
interned dict with the main interpreter.

This is an un-revert of gh-124646 that then addresses the Py_TRACE_REFS
failures identified by gh-124785.
(cherry picked from commit f2cb39947093feda3ff85b8dc820922cc5e5f954)

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
* [3.13] gh-125286: Share the Main Refchain With Legacy Interpreters (gh-125709)

They used to be shared, before 3.12.  Returning to sharing them resolves a failure on Py_TRACE_REFS builds.

---------

Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
11 months ago[3.13] gh-126451: Revert backports of ABC registrations for `contextvars.Context...
Alex Waygood [Tue, 12 Nov 2024 12:29:13 +0000 (12:29 +0000)] 
[3.13] gh-126451: Revert backports of ABC registrations for `contextvars.Context` and multiprocessing proxies (#126734)

11 months ago[3.13] Fix error message of "Check if Autoconf files are up to date" job (GH-126683...
Miss Islington (bot) [Tue, 12 Nov 2024 11:01:39 +0000 (12:01 +0100)] 
[3.13] Fix error message of "Check if Autoconf files are up to date" job (GH-126683) (#126717)

Fix error message of "Check if Autoconf files are up to date" job (GH-126683)
(cherry picked from commit 0052a8c638518447baf39ae02b6ff6a309efd4ce)

Co-authored-by: sobolevn <mail@sobolevn.me>
11 months ago[3.13] gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526...
Miss Islington (bot) [Tue, 12 Nov 2024 10:48:55 +0000 (11:48 +0100)] 
[3.13] gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526) (#126725)

gh-126525: Fix `makeunicodedata.py` output on macOS and Windows (GH-126526)
(cherry picked from commit f223efb2a2d6a3e86556be7295cbbd3ef839f489)

Co-authored-by: sobolevn <mail@sobolevn.me>
12 months agoUpdate documentation links to Microsoft's documentation pages (GH-126379)
Miss Islington (bot) [Mon, 11 Nov 2024 17:18:01 +0000 (18:18 +0100)] 
Update documentation links to Microsoft's documentation pages (GH-126379)

(cherry picked from commit 6e25eb15410f781f632d536d555f38879432522c)

Co-authored-by: 谭九鼎 <109224573@qq.com>
12 months ago[3.13] gh-126505: Fix bugs in compiling case-insensitive character classes (GH-126557...
Miss Islington (bot) [Mon, 11 Nov 2024 16:54:57 +0000 (17:54 +0100)] 
[3.13] gh-126505: Fix bugs in compiling case-insensitive character classes (GH-126557) (GH-126689)

* upper-case non-BMP character was ignored
* the ASCII flag was ignored when matching a character range whose
  upper bound is beyond the BMP region
(cherry picked from commit 819830f34a11ecaa3aada174ca8eedeb3f260630)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHan...
Miss Islington (bot) [Mon, 11 Nov 2024 14:25:58 +0000 (15:25 +0100)] 
[3.13] gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503) (GH-126571)

gh-126500: test_ssl: Don't stop ThreadedEchoServer on OSError in ConnectionHandler; rely on __exit__ (GH-126503)

If `read()` in the ConnectionHandler thread raises `OSError` (except `ConnectionError`),
the ConnectionHandler shuts down the entire ThreadedEchoServer,
preventing further connections.
It also does that for `EPROTOTYPE` in `wrap_conn`.

As far as I can see, this is done to avoid the server thread getting stuck,
forgotten, in its accept loop. However, since 2011 (5b95eb90a7167285b6544b50865227c584943c9a)
the server is used as a context manager, and its `__exit__` does `stop()` and `join()`.
(I'm not sure if we *always* used `with` since that commit, but currently we do.)

Make sure that the context manager *is* used, and remove the `server.stop()`
calls from ConnectionHandler.
(cherry picked from commit c9cda1608edf7664c10f4f467e24591062c2fe62)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.13] gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501) (GH-126574)
Miss Islington (bot) [Mon, 11 Nov 2024 12:56:01 +0000 (13:56 +0100)] 
[3.13] gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501) (GH-126574)

gh-126499: test_ssl: Don't assume err.reason is a string (GH-126501)

The skipping machinery called `getattr(err, "reason", "")` on an arbitrary
exception. As intermittent Buildbot failures show, sometimes it's set
to None.

Convert it to string for this specific check.
(cherry picked from commit 78ad7e632248dc989378cabeb797b9f3d940d9f2)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
12 months ago[3.13] gh-126654: Fix crash in several functions in `_interpreters` module (GH-126678...
Miss Islington (bot) [Mon, 11 Nov 2024 12:01:22 +0000 (13:01 +0100)] 
[3.13] gh-126654: Fix crash in several functions in `_interpreters` module (GH-126678) (#126681)

gh-126654: Fix crash in several functions in `_interpreters` module (GH-126678)
(cherry picked from commit 9fc2808eaf4e74a9f52f44d20a7d1110bd949d41)

Co-authored-by: sobolevn <mail@sobolevn.me>
12 months ago[3.13] Add missing fullstop `.` to whatsnew/3.8.rst (GH-126553) (#126672)
Miss Islington (bot) [Mon, 11 Nov 2024 07:05:15 +0000 (08:05 +0100)] 
[3.13] Add missing fullstop `.` to whatsnew/3.8.rst (GH-126553) (#126672)

Add missing fullstop `.` to whatsnew/3.8.rst (GH-126553)
(cherry picked from commit 82269c7d580e1aad71ff11fe891cf7f97eb45703)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
12 months ago[3.13] gh-126664: Use `else` instead of `finally` in "The with statement" documentati...
Miss Islington (bot) [Mon, 11 Nov 2024 06:54:26 +0000 (07:54 +0100)] 
[3.13] gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665) (#126670)

gh-126664: Use `else` instead of `finally` in "The with statement" documentation. (GH-126665)
(cherry picked from commit 25257d61cfccc3b4189f96390a5c4db73fd5302c)

Co-authored-by: vivodi <103735539+vivodi@users.noreply.github.com>
12 months ago[3.13] gh-117378: Clear up the NEWS entry wording (GH-126634) (#126668)
Miss Islington (bot) [Mon, 11 Nov 2024 06:46:24 +0000 (07:46 +0100)] 
[3.13] gh-117378: Clear up the NEWS entry wording (GH-126634) (#126668)

gh-117378: Clear up the NEWS entry wording (GH-126634)

gh-117378: Clear up the NEWS entry wording.

Docs are hard.  Lets go shopping!
(cherry picked from commit 5c488caeb858690a696bc9f74fc74a274a3aa51c)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
12 months ago[3.13] gh-126543: Docs: change "bound type var" to "bounded" when used in the context...
Miss Islington (bot) [Mon, 11 Nov 2024 02:48:44 +0000 (03:48 +0100)] 
[3.13] gh-126543: Docs: change "bound type var" to "bounded" when used in the context of the 'bound' kw argument to TypeVar (GH-126584) (#126657)

(cherry picked from commit 434b29767f2fdef9f35c8e93303cf6aca4a66a80)

Co-authored-by: Pedro Fonini <fonini@protonmail.ch>
12 months ago[3.13] gh-126647: `Doc/using/configure.rst`: Add an entry for ``--enable-experimental...
Miss Islington (bot) [Sun, 10 Nov 2024 21:51:21 +0000 (22:51 +0100)] 
[3.13] gh-126647: `Doc/using/configure.rst`: Add an entry for ``--enable-experimental-jit`` option (GH-126648) (#126655)

gh-126647: `Doc/using/configure.rst`: Add an entry for ``--enable-experimental-jit`` option (GH-126648)

Add an entry for the ``--enable-experimental-jit`` option in ``Doc/using/configure.rst``.
This was added as an experimental option in CPython 3.13.
Possible values for it:
* `no` - don't build the JIT.
* `yes` - build the JIT.
* `yes-off` - build the JIT but disable it by default.
* `interpreter` - don't build the JIT but enable tier 2 interpreter instead.

(cherry picked from commit f435de6765e0327995850d719534be38c9b5ec49)

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] gh-117378: Only run the new multiprocessing SysPath test when appropriate...
Miss Islington (bot) [Sun, 10 Nov 2024 21:40:33 +0000 (22:40 +0100)] 
[3.13] gh-117378: Only run the new multiprocessing SysPath test when appropriate (GH-126635) (GH-126652)

gh-117378: Only run the new multiprocessing SysPath test when appropriate (GH-126635)

The first version had it running two forkserver and one spawn tests underneath each of the _fork, _forkserver, and _spawn test suites that build off the generic one.

This adds to the existing complexity of the multiprocessing test suite by offering BaseTestCase classes another attribute to control which suites they are invoked under. Practicality vs purity here. :/

Net result: we don't over-run the new test and their internal logic is simplified.
(cherry picked from commit ca878b6e45f9c7934842f7bb94274e671b155e09)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
12 months ago[3.13] Skip test in test_socket.py if `sys.getrefcount` isn't available (GH-126640...
Miss Islington (bot) [Sun, 10 Nov 2024 15:41:42 +0000 (16:41 +0100)] 
[3.13] Skip test in test_socket.py if `sys.getrefcount` isn't available (GH-126640) (#126645)

Skip test in test_socket.py if `sys.getrefcount` isn't available (GH-126640)

Skip `testMakefileCloseSocketDestroy` test if `sys.getrefcount` isn't available. This is necessary for  PyPy and other Python implementations that do not have `sys.getrefcount`.
(cherry picked from commit 0f6bb28ff3ba152faf7523ea9aaf0094cc39bdda)

Co-authored-by: CF Bolz-Tereick <cfbolz@gmx.de>
12 months ago[3.13] gh-126565: Skip `zipfile.Path.exists` check in write mode (GH-126576) (#126642)
Miss Islington (bot) [Sun, 10 Nov 2024 15:21:47 +0000 (16:21 +0100)] 
[3.13] gh-126565: Skip `zipfile.Path.exists` check in write mode (GH-126576) (#126642)

gh-126565: Skip `zipfile.Path.exists` check in write mode (GH-126576)

When `zipfile.Path.open` is called, the implementation will check
whether the path already exists in the ZIP file. However, this check is
only required when the ZIP file is in read mode. By swapping arguments
of the `and` operator, the short-circuiting will prevent the check from
being run in write mode.

This change will improve the performance of `open()`, because checking
whether a file exists is slow in write mode, especially when the archive
has many members.
(cherry picked from commit 160758a574d12bf0d965d8206136e7da4f4fd6c3)

Co-authored-by: Jan Hicken <janhicken@users.noreply.github.com>
12 months ago[3.13] Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482) (#126638)
Shantanu [Sun, 10 Nov 2024 01:01:05 +0000 (17:01 -0800)] 
[3.13] Postpone `module.__loader__` deprecation to Python 3.16 (GH-126482) (#126638)

Postpone `module.__loader__` deprecation to Python 3.16 (#126482)

(cherry picked from commit 450db61a78989c5a1f1106be01e071798c783cf9)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 months ago[3.13] gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. (GH...
Miss Islington (bot) [Sat, 9 Nov 2024 23:47:58 +0000 (00:47 +0100)] 
[3.13] gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. (GH-126538) (GH-126632)

gh-117378: Fix multiprocessing forkserver preload sys.path inheritance. (GH-126538)

`sys.path` was not properly being sent from the parent process when launching
the multiprocessing forkserver process to preload imports.  This bug has been
there since the forkserver start method was introduced in Python 3.4.  It was
always _supposed_ to inherit `sys.path` the same way the spawn method does.

Observable behavior change: A `''` value in `sys.path` will now be replaced in
the forkserver's `sys.path` with an absolute pathname
`os.path.abspath(os.getcwd())` saved at the time that `multiprocessing` was
imported in the parent process as it already was when using the spawn start
method. **This will only be observable during forkserver preload imports**.

The code invoked before calling things in another process already correctly sets `sys.path`.
Which is likely why this went unnoticed for so long as a mere performance issue in
some configurations.

A workaround for the bug on impacted Pythons is to set PYTHONPATH in the
environment before multiprocessing's forkserver process was started. Not perfect
as that is then inherited by other children, etc, but likely good enough for many
people's purposes.

(cherry picked from commit 9d08423b6e0fa89ce9cfea08e580ed72e5db8c70)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126590)
Miss Islington (bot) [Fri, 8 Nov 2024 17:31:44 +0000 (18:31 +0100)] 
[3.13] GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214) (#126590)

GH-126212: Fix removal of slashes in file URIs on Windows (GH-126214)

Adjust `urllib.request.pathname2url()` and `url2pathname()` so that they
don't remove slashes from Windows DOS drive paths and URLs. There was no
basis for this behaviour, and it conflicts with how UNC and POSIX paths are
handled.
(cherry picked from commit 54c63a32d06cb5f07a66245c375eac7d7efb964a)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
12 months agogh-126497: Add missing venv redirectors to freethreaded installer (GH-126556)
Miss Islington (bot) [Fri, 8 Nov 2024 16:33:54 +0000 (17:33 +0100)] 
gh-126497: Add missing venv redirectors to freethreaded installer (GH-126556)

(cherry picked from commit fd5580cd151e07c690e9d7594513be5fa3102a2e)

Co-authored-by: Steve Dower <steve.dower@python.org>
12 months agogh-125298: Remove misleading text in os.kill documentation (GH-125749)
Miss Islington (bot) [Fri, 8 Nov 2024 15:47:52 +0000 (16:47 +0100)] 
gh-125298: Remove misleading text in os.kill documentation (GH-125749)

Windows has not accepted process handles in many releases.
(cherry picked from commit 75ffac296ef24758b7e5bd9316f32a8170ade37f)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
12 months ago[3.13] gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566...
Miss Islington (bot) [Fri, 8 Nov 2024 10:55:38 +0000 (11:55 +0100)] 
[3.13] gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566) (#126567)

gh-126171: fix possible null dereference in _imp_find_frozen_impl (GH-126566)
(cherry picked from commit 9ecd8f7f40e6724a1c1d46c2665147aaabceb2d2)

Co-authored-by: Valery Fedorenko <federicovalenso@gmail.com>
12 months ago[3.13] GH-123877: make `wasm32-wasip1` the target triple for WASI (#126561)
Brett Cannon [Fri, 8 Nov 2024 00:16:12 +0000 (16:16 -0800)] 
[3.13] GH-123877: make `wasm32-wasip1` the target triple for WASI (#126561)

12 months ago[3.13] Doc: C API: Demote sections to subsections for consistency (GH-126535) (#126546)
Miss Islington (bot) [Thu, 7 Nov 2024 15:35:41 +0000 (16:35 +0100)] 
[3.13] Doc: C API: Demote sections to subsections for consistency (GH-126535) (#126546)

Doc: C API: Demote sections to subsections for consistency (GH-126535)

The entire file should be a single section; the headings below the
first heading should be subsections.
(cherry picked from commit e3510bd3dd9ea8f2a30cb1128470aee3a48d8880)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
12 months ago[3.13] gh-48020: [docs] Remove the logging howto suggested future FileHandler multipr...
Miss Islington (bot) [Thu, 7 Nov 2024 10:03:58 +0000 (11:03 +0100)] 
[3.13] gh-48020: [docs] Remove the logging howto suggested future FileHandler multiprocessing support (GH-126531) (#126540)

gh-48020: [docs] Remove the logging howto suggested future FileHandler multiprocessing support (GH-126531)

Docs: Remove the logging howto potential promise of multiprocessing support in the future.

Stick to the facts and suggestions, don't provide hope where we're not going to
implement complexity that we'd rather the user implement themselves when
needed.
(cherry picked from commit 1fe67df8e373a5177143e4a310c83438e79f9b77)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
12 months ago[3.13] gh-125679: multiprocessing Lock and RLock - fix invalid representation string...
Miss Islington (bot) [Thu, 7 Nov 2024 09:49:31 +0000 (10:49 +0100)] 
[3.13] gh-125679: multiprocessing Lock and RLock - fix invalid representation string on MacOSX. (GH-125680) (#126533)

gh-125679: multiprocessing Lock and RLock - fix invalid representation string on MacOSX. (GH-125680)
(cherry picked from commit 75f7cf91ec5afc6091a0fd442a1f0435c19300b2)

Co-authored-by: Duprat <yduprat@gmail.com>
12 months ago[3.13] gh-125631: Enable setting persistent_id and persistent_load of pickler and...
Miss Islington (bot) [Thu, 7 Nov 2024 07:21:23 +0000 (08:21 +0100)] 
[3.13] gh-125631: Enable setting persistent_id and persistent_load of pickler and unpickler (GH-125752) (GH-126528)

pickle.Pickler.persistent_id and pickle.Unpickler.persistent_load can
again be overridden as instance attributes.
(cherry picked from commit 223d3dc554dde45f185f7f465753824c6f698b9b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452...
Miss Islington (bot) [Wed, 6 Nov 2024 22:41:48 +0000 (23:41 +0100)] 
[3.13] gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452) (#126518)

gh-126451: Register contextvars.Context to collections.abc.Mapping (GH-126452)
(cherry picked from commit 5dc36dc5658f6ba9cfd9d7a2771baaf17d2ee23a)

Co-authored-by: Stephen Morton <git@tungol.org>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
12 months ago[3.13] gh-126489: Do not call persistent_id() for a persistent id in Python pickle...
Miss Islington (bot) [Wed, 6 Nov 2024 20:54:48 +0000 (21:54 +0100)] 
[3.13] gh-126489: Do not call persistent_id() for a persistent id in Python pickle (GH-126490) (GH-126514)

(cherry picked from commit 8fa4dc4ba8646c59f945f2451c53e2919f066065)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-126461: Fix _Unpickler_ReadFromFile() error handling (GH-126485) (#126495)
Miss Islington (bot) [Wed, 6 Nov 2024 13:51:39 +0000 (14:51 +0100)] 
[3.13] gh-126461: Fix _Unpickler_ReadFromFile() error handling (GH-126485) (#126495)

gh-126461: Fix _Unpickler_ReadFromFile() error handling (GH-126485)

Handle _Unpickler_SetStringInput() failure.
(cherry picked from commit a1c57bcfd2bcbc55ff858407e09c1d8d8cee44e6)

Co-authored-by: Victor Stinner <vstinner@python.org>
12 months ago[3.13] gh-126313: Fix a crash in curses.napms() due to incorrect error handling ...
Bénédikt Tran [Wed, 6 Nov 2024 13:33:23 +0000 (14:33 +0100)] 
[3.13] gh-126313: Fix a crash in curses.napms() due to incorrect error handling (GH-126351) (#126493)

gh-126313: Fix a crash in curses.napms() due to incorrect error handling (GH-126351)

12 months ago[3.13] gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481) (#126486)
Miss Islington (bot) [Wed, 6 Nov 2024 11:24:45 +0000 (12:24 +0100)] 
[3.13] gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481) (#126486)

gh-126455: Disallow _ssl.SSLSocket instantiation (GH-126481)

Prevent creation of incomplete/invalid _ssl.SSLSocket objects when
created directly.
(cherry picked from commit b1c4ffc20573befb4db66bbbdd569b9bd13bb127)

Co-authored-by: Victor Stinner <vstinner@python.org>
12 months ago[3.13] gh-122544: Change OS image in Azure pipeline to Ubuntu 24.04 (GH-125344) ...
Miss Islington (bot) [Wed, 6 Nov 2024 10:24:55 +0000 (11:24 +0100)] 
[3.13] gh-122544: Change OS image in Azure pipeline to Ubuntu 24.04 (GH-125344) (#126479)

Co-authored-by: Damien <81557462+Damien-Chen@users.noreply.github.com>
12 months ago[3.13] Fix possible null pointer dereference of freevars in _PyCompile_LookupArg...
Valery Fedorenko [Wed, 6 Nov 2024 08:10:04 +0000 (11:10 +0300)] 
[3.13] Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (gh-126238) (#126475)

[3.13] gh-126238: Fix possible null pointer dereference of freevars in _PyCompile_LookupArg (GH-126239)

* Replace Py_DECREF by Py_XDECREF

(cherry picked from commit 8525c9375f25e6ec0c0b5dfcab464703f6e78082)

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
12 months ago[3.13] gh-70764: inspect.getclosurevars now identifies global variables with LOAD_GLO...
Miss Islington (bot) [Wed, 6 Nov 2024 00:18:32 +0000 (01:18 +0100)] 
[3.13] gh-70764: inspect.getclosurevars now identifies global variables with LOAD_GLOBAL (GH-120143) (#126459)

gh-70764: inspect.getclosurevars now identifies global variables with LOAD_GLOBAL (GH-120143)
(cherry picked from commit 83ba8c2bba834c0b92de669cac16fcda17485e0e)

Co-authored-by: blhsing <blhsing@gmail.com>
12 months ago[3.13] gh-89640: harden float word ordering (#125571 and #126387) (#126429)
Erlend E. Aasland [Tue, 5 Nov 2024 22:18:55 +0000 (23:18 +0100)] 
[3.13] gh-89640: harden float word ordering (#125571 and #126387) (#126429)

Properly detect float word ordering on Linux (gh-125571)

autoconf-archive patch by Dan Amelang.

(cherry picked from commit 26d627779f79d8d5650fe7be348432eccc28f8f9)

Hardcode WASM float word ordering to little endian (gh-126387)

(cherry picked from commit 532fc08102d62c04d55f5b8aac00bd9e7e12ff4b)

12 months agogh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)
Miss Islington (bot) [Tue, 5 Nov 2024 21:08:44 +0000 (22:08 +0100)] 
gh-126074: Removes unnecessary DLLs from embeddable package (GH-126143)

(cherry picked from commit f51fd84034e2cbf458321c25ba6fd085a39d6f6f)

Co-authored-by: Steve Dower <steve.dower@python.org>
12 months ago[3.13] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126442)
Miss Islington (bot) [Tue, 5 Nov 2024 12:48:18 +0000 (13:48 +0100)] 
[3.13] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126442)

gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 75872605aa78dbdfc5c4f025b0f90a7f37ba10c3)

Co-authored-by: sobolevn <mail@sobolevn.me>
12 months ago[3.13] gh-126417: Register multiprocessing proxy types to an appropriate collections...
Alex Waygood [Tue, 5 Nov 2024 11:22:44 +0000 (11:22 +0000)] 
[3.13] gh-126417: Register multiprocessing proxy types to an appropriate collections.abc class (#126419) (#126435)

Co-authored-by: Stephen Morton <github@tungol.org>
12 months ago[3.13] Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418) (#126431)
Miss Islington (bot) [Tue, 5 Nov 2024 10:01:16 +0000 (11:01 +0100)] 
[3.13] Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418) (#126431)

Doc: C API: Delete claim that `PyObject_Init` is GC-aware (GH-126418)
(cherry picked from commit 407c0366d9ccd2a36c6cc8bf92324856b16fd604)

Co-authored-by: Richard Hansen <rhansen@rhansen.org>
12 months ago[3.13] gh-126303: Fix pickling and copying of os.sched_param objects (GH-126336)...
Miss Islington (bot) [Tue, 5 Nov 2024 06:50:33 +0000 (07:50 +0100)] 
[3.13] gh-126303: Fix pickling and copying of os.sched_param objects (GH-126336) (GH-126423)

(cherry picked from commit d3840503b0f590ee574fbdf3c96626ff8b3c45f6)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
12 months ago[3.13] gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigPar...
Miss Islington (bot) [Tue, 5 Nov 2024 03:04:32 +0000 (04:04 +0100)] 
[3.13] gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437) (#126421)

gh-125436: Doc: Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` documentation (GH-125437)

Add missing ``allow_unnamed_section`` parameter to ``ConfigParser`` doc, as well as to it's parent ``RawConfigParser``.
Split too long line on ``ConfigParser`` signature.
Add some sections about when some of ``RawConfigParser`` parameters were added.
(cherry picked from commit d9602265479bcd96dc377d92a34556baf34ac3cd)

Co-authored-by: lit <litlighilit@foxmail.com>
12 months ago[3.13] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (GH-126392)...
Hugo van Kemenade [Mon, 4 Nov 2024 17:46:26 +0000 (19:46 +0200)] 
[3.13] gh-101865: Docs: Keep co_lnotab deprecation for at least 3.14 (GH-126392) (#126403)

(cherry picked from commit eac41c5ddfadf52fbd84ee898ad56aedd5d90a41)

12 months ago[3.13] Doc: Fix typo in documentation for ``MAKE_FUNCTION`` opcode (GH-126396) ...
Miss Islington (bot) [Mon, 4 Nov 2024 17:35:12 +0000 (18:35 +0100)] 
[3.13] Doc: Fix typo in documentation for  ``MAKE_FUNCTION`` opcode (GH-126396) (#126406)

Doc: Fix typo in documentation for  ``MAKE_FUNCTION`` opcode (GH-126396)
(cherry picked from commit e5a4b402ae55f5eeeb44d3e7bc3f3ec39b249846)

Co-authored-by: Mikhail Efimov <efimov.mikhail@gmail.com>
12 months ago[3.13] gh-125783: Add more tests to prevent regressions with the combination of ctype...
Miss Islington (bot) [Mon, 4 Nov 2024 10:58:20 +0000 (11:58 +0100)] 
[3.13] gh-125783: Add more tests to prevent regressions with the combination of ctypes and metaclasses. (GH-126126) (GH-126275)

gh-125783: Add more tests to prevent regressions with the combination of ctypes and metaclasses. (GH-126126)
(cherry picked from commit 6c67446a6e73ab0e9a26e4360412cbd2f5550e66)

Co-authored-by: Jun Komoda <45822440+junkmd@users.noreply.github.com>
12 months ago[3.13] Docs: turn getopt examples into doctests (GH-126377) (#126385)
Miss Islington (bot) [Mon, 4 Nov 2024 08:34:36 +0000 (09:34 +0100)] 
[3.13] Docs: turn getopt examples into doctests (GH-126377) (#126385)

(cherry picked from commit 0d80777981f95bbc79b146fc78b2189c82521ab9)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
12 months ago[3.13] gh-126165: Improve docs of function `math.isclose` (GH-126215) (#126380)
Miss Islington (bot) [Mon, 4 Nov 2024 04:14:05 +0000 (05:14 +0100)] 
[3.13] gh-126165: Improve docs of function `math.isclose` (GH-126215) (#126380)

gh-126165: Improve docs of function `math.isclose` (GH-126215)
(cherry picked from commit 081706f873b7d1a10b27016a9ed350b20c719709)

Co-authored-by: Zhikang Yan <2951256653@qq.com>
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
12 months ago[3.13] Docs: Delist sqlite3 deprecation from "Pending removal in 3.14" (GH-126370...
Miss Islington (bot) [Sun, 3 Nov 2024 21:29:02 +0000 (22:29 +0100)] 
[3.13] Docs: Delist sqlite3 deprecation from "Pending removal in 3.14" (GH-126370) (#126372)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 months ago[3.13] gh-104400: Add more tests to pygettext (GH-108173) (GH-126361)
Miss Islington (bot) [Sun, 3 Nov 2024 14:30:16 +0000 (15:30 +0100)] 
[3.13] gh-104400: Add more tests to pygettext (GH-108173) (GH-126361)

(cherry picked from commit dcae5cd6abaae4f73e656ebc054f30d3f15ca7b8)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
12 months ago[3.13] gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101) (#126348)
Miss Islington (bot) [Sun, 3 Nov 2024 05:59:00 +0000 (06:59 +0100)] 
[3.13] gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101) (#126348)

gh-113977, gh-120754: Remove unbounded reads from zipfile (GH-122101)

GH-113977, GH-120754: Remove unbounded reads from zipfile

Read without a size may read an unbounded amount of data + allocate
unbounded size buffers. Move to capped size reads to prevent potential
issues.

(cherry picked from commit 556dc9b8a78bad296513221f3f414a3f8fd0ae70)

Co-authored-by: Cody Maloney <cmaloney@users.noreply.github.com>
Co-authored-by: Daniel Hillier <daniel.hillier@gmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
12 months ago[3.13] gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (gh-12632...
Donghee Na [Sun, 3 Nov 2024 04:10:15 +0000 (13:10 +0900)] 
[3.13] gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (gh-126322) (gh-126344)

* gh-125832: Clarify comment for inlined comprehensions as per PEP-709 (#126322)

* Fix comprehensions comment to inlined by pep 709

* Update spacing

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
* Add reference to PEP 709

---------

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
(cherry picked from commit 868bfcc02ed42a1042851830b79c6877b7f1c7a8)

* Add space

---------

Co-authored-by: rimchoi <hyerimc858@gmail.com>
12 months ago[3.13] gh-125761: Clarify repeated warning suppression criteria in warnings module...
Miss Islington (bot) [Sat, 2 Nov 2024 11:43:30 +0000 (12:43 +0100)] 
[3.13] gh-125761: Clarify repeated warning suppression criteria in warnings module (gh-126330)

(cherry picked from commit 10eeec2d4ffb6b09a6d925877b6d9ef6aa6bb59d)

Co-authored-by: 고병찬 <70642609+byungchanKo99@users.noreply.github.com>
12 months ago[3.13] gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321) (gh-126327)
Miss Islington (bot) [Sat, 2 Nov 2024 08:51:28 +0000 (09:51 +0100)] 
[3.13] gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321) (gh-126327)

gh-125522: Remove bare except in test_zlib.test_flushes (gh-126321)
(cherry picked from commit cfb1b2f0cb999558a30e61a9e1a62fdb7f55f6a4)

Co-authored-by: simple-is-great <103080930+simple-is-great@users.noreply.github.com>
12 months ago[3.13] gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__...
Miss Islington (bot) [Sat, 2 Nov 2024 08:09:18 +0000 (09:09 +0100)] 
[3.13] gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__` (GH-126305) (#126324)

gh-126138: Fix use-after-free in `_asyncio.Task` by evil `__getattribute__` (GH-126305)
(cherry picked from commit f032f6ba8fec6fab35edeec0eb40cd73e9d58928)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
12 months ago[3.13] gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319) (gh-126320)
Miss Islington (bot) [Sat, 2 Nov 2024 05:16:24 +0000 (06:16 +0100)] 
[3.13] gh-125875: Fix docs typo FORMAT_SPEC to FORMAT_WITH_SPEC (gh-126319) (gh-126320)

12 months ago[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)
Miss Islington (bot) [Fri, 1 Nov 2024 23:17:35 +0000 (00:17 +0100)] 
[3.13] docs: add a more precise example in enum doc (GH-121015) (#126306)

docs: add a more precise example in enum doc (GH-121015)

* docs: add a more precise example

Previous example used manual integer value assignment in class based declaration but in functional syntax has been used auto value assignment what could be confusing for the new users. Additionally documentation doesn't show how to declare new enum via functional syntax with usage of the manual value assignment.

* docs: remove whitespace characters

* refactor: change example

---------

(cherry picked from commit ff257c7843d8ed0dffb6624f2f14996a46e74801)

Co-authored-by: Filip "Ret2Me" Poplewski <37419029+Ret2Me@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
12 months ago[3.13] Doc: Add a single table as summary to math documentation (GH-125810) (GH-126308)
Miss Islington (bot) [Fri, 1 Nov 2024 23:11:40 +0000 (00:11 +0100)] 
[3.13] Doc: Add a single table as summary to math documentation (GH-125810) (GH-126308)

Doc: Add a single table as summary to math documentation (GH-125810)

* Summary for math module with separate tables

* Forgot remainder description

* Single table

* data instead of func

* Add arguments in the table

* Fix inconsistencies in pow documentation

* Remove full stops from the table

* Fix math.pow link

* Fix spacing

---------

(cherry picked from commit 74cf5967f345f944f1c308e5e30fee21b438eb6c)

Co-authored-by: Joseph Martinot-Lagarde <contrebasse@gmail.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
12 months ago[3.13] gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args (backp...
Miss Islington (bot) [Fri, 1 Nov 2024 22:24:06 +0000 (23:24 +0100)] 
[3.13] gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args (backportable) (GH-126271) (#126310)

gh-126220: Fix crash on calls to `_lsprof.Profiler` methods with 0 args (backportable) (GH-126271)
(cherry picked from commit 28b148fb32e4548b461137d18d1ab6d366395d36)

Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
12 months ago[3.13] gh-122767: document "new style" formatting for complexes (GH-122848) (#126128)
Miss Islington (bot) [Fri, 1 Nov 2024 19:29:29 +0000 (20:29 +0100)] 
[3.13] gh-122767: document "new style" formatting for complexes (GH-122848) (#126128)

gh-122767: document "new style" formatting for complexes (GH-122848)

(cherry picked from commit 0bbbe15f5688552236c48f2b6e320c5312720b8e)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260)...
Miss Islington (bot) [Fri, 1 Nov 2024 07:23:11 +0000 (08:23 +0100)] 
[3.13] gh-126259: Fix "unclosed database" warning in sqlite3 doctest (GH-126260) (#126265)

(cherry picked from commit 295262c8ecb085b4fea552bc6229af3551bbaf7a)

Co-authored-by: sobolevn <mail@sobolevn.me>
12 months ago[3.13] gh-126256: Update time.rst to use the same clock as instead of the same clock...
Miss Islington (bot) [Thu, 31 Oct 2024 21:50:20 +0000 (22:50 +0100)] 
[3.13] gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257) (#126258)

gh-126256: Update time.rst to use the same clock as instead of the same clock than (GH-126257)

Update time.rst to use `the same clock as` instead of `the same clock than`

The time documentation uses the same clock than time.monotonic instead of the same clock as time.monotonic, which is grammatically false. This PR fixes changes two instances of `the same clock than` to `the same clock as`.
(cherry picked from commit d0abd0b826cfa574d1515c6f8459c9901939388f)

Co-authored-by: Alperen Keleş <alpkeles99@gmail.com>
12 months ago[3.13] gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to...
Miss Islington (bot) [Thu, 31 Oct 2024 19:32:47 +0000 (20:32 +0100)] 
[3.13] gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to an evil `loop.__getattribute__` (GH-126120) (#126250)

gh-126080: fix UAF on `task->task_context` in `task_call_step_soon` due to an evil `loop.__getattribute__` (GH-126120)
(cherry picked from commit 0e8665554b2f1334e530fd6de5b3a4e908405419)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] GH-126205: Fix conversion of UNC paths to file URIs (GH-126208) (#126249)
Miss Islington (bot) [Thu, 31 Oct 2024 16:58:56 +0000 (17:58 +0100)] 
[3.13] GH-126205: Fix conversion of UNC paths to file URIs (GH-126208) (#126249)

GH-126205: Fix conversion of UNC paths to file URIs (GH-126208)

File URIs for Windows UNC paths should begin with two slashes, not four.
(cherry picked from commit 951cb2c369e8b8fb9f93662658391a53fd727787)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
12 months ago[3.13] gh-126240: handle `NULL` returned by `_Py_asdl_expr_seq_new` (GH-126241)...
Miss Islington (bot) [Thu, 31 Oct 2024 14:57:11 +0000 (15:57 +0100)] 
[3.13] gh-126240: handle `NULL` returned by  `_Py_asdl_expr_seq_new` (GH-126241) (#126243)

gh-126240: handle `NULL` returned by  `_Py_asdl_expr_seq_new` (GH-126241)

check return value of `_Py_asdl_expr_seq_new`
(cherry picked from commit 94639f6b7182c2e1a82f2f907b03b5b15202acfa)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224...
Miss Islington (bot) [Thu, 31 Oct 2024 14:46:36 +0000 (15:46 +0100)] 
[3.13] gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224) (#126242)

gh-126223: Propagate unicode errors in `_interpreters.create()` (GH-126224)
(cherry picked from commit 01415213d72504eafc159721a8f55d57b374fd9c)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Co-authored-by: sobolevn <mail@sobolevn.me>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
12 months ago[3.13] gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with...
Miss Islington (bot) [Thu, 31 Oct 2024 08:14:00 +0000 (09:14 +0100)] 
[3.13] gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with new non-`None` context (GH-126103) (#126229)

gh-126083: Fix a reference leak in `asyncio.Task` when reinitializing with new non-`None` context (GH-126103)
(cherry picked from commit d07dcce6935364cab807e0df931ed09b088ade69)

Co-authored-by: Nico-Posada <102486290+Nico-Posada@users.noreply.github.com>
12 months ago[3.13] gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warning...
Miss Islington (bot) [Thu, 31 Oct 2024 01:32:04 +0000 (02:32 +0100)] 
[3.13] gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823) (#126216)

gh-125818: Fix incorrect signature of argument `skip_file_prefixes` in warnings docs (GH-125823)

Change documentation
(cherry picked from commit d467d9246cbe0ce5dc149c4c74223bb8374ece73)

Co-authored-by: RUANG (James Roy) <longjinyii@outlook.com>
12 months ago[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)
Richard Hansen [Wed, 30 Oct 2024 20:48:02 +0000 (16:48 -0400)] 
[3.13] gh-124872: Refine contextvars documentation (GH-124773) (#125233)

[3.13] gh-124872: Refine contextvars documentation

  * Add definitions for "context", "current context", and "context
    management protocol".
  * Update related definitions to be consistent with the new
    definitions.
  * Restructure the documentation for the `contextvars.Context` class
    to prepare for adding context manager support, and for consistency
    with the definitions.
  * Use `testcode` and `testoutput` to test the `Context.run` example.

(cherry-picked from commit 99400930ac1d4e5e10a5ae30f8202d8bc2661e39)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
12 months ago[3.13] Prefer "similar" over "equivalent" in tutorial (GH-125343) (GH-125372)
Miss Islington (bot) [Wed, 30 Oct 2024 20:33:20 +0000 (21:33 +0100)] 
[3.13] Prefer "similar" over "equivalent" in tutorial (GH-125343) (GH-125372)

Prefer "similar" over "equivalent" in tutorial (GH-125343)

In the datastructures tutorial doc, some operations are described as
"equivalent to" others. This has led to some user-confusion -- at
least in the Discourse forums -- about cases in which the operations
differ.

This change doesn't systematically eliminate the word "equivalent"
from the tutorial. It just substitutes "similar to" in several cases
in which "equivalent to" could mislead users into expecting exact
equivalence.
(cherry picked from commit 4a2282b0679bbf7b7fbd36aae1b1565145238961)

Co-authored-by: Stephen Rosen <sirosen@globus.org>
12 months agogh-125315: Avoid crashing in _wmimodule due to slow WMI calls on some Windows machine...
Miss Islington (bot) [Wed, 30 Oct 2024 20:26:14 +0000 (21:26 +0100)] 
gh-125315: Avoid crashing in _wmimodule due to slow WMI calls on some Windows machines (GH-126141)

(cherry picked from commit 60c415bd531392a239c23c754154a7944695ac99)

Co-authored-by: Steve Dower <steve.dower@python.org>
12 months ago[3.13] gh-60712: Include the "object" type in the lists of documented types (GH-10303...
Miss Islington (bot) [Wed, 30 Oct 2024 20:16:38 +0000 (21:16 +0100)] 
[3.13] gh-60712: Include the "object" type in the lists of documented types (GH-103036) (GH-126197)

gh-60712: Include the "object" type in the lists of documented types (GH-103036)

* add test for the predefined object's attributes

* Include the "object" type in the lists of documented types

* remove 'or' from augment tuple

* 📜🤖 Added by blurb_it.

* Add cross-reference to news

* Fix format for the function parameter

* Add space

* add reference for the 'object'

* add reference for NotImplemented

* Change ref:`string <textseq>`  as class:`str`

* remove hyphen from `newly-created`

* Update Doc/reference/datamodel.rst

'dictionaries' to 'dict'

* Update predefined attribute types in testPredefinedAttrs

* Change `universal type` as `top type`

* Don't mention about the top type

* Update the description of richcmpfuncs

* Update Doc/library/stdtypes.rst

* Revert: Hierarchy Section in Data Model Documentation

* Revert to original explanations of __new__ and __init__ methods in datamodel.rst for improved clarity.

* Update Doc/reference/datamodel.rst

* Remove blank line

* Use ref:`str <textseq>` instead of :class:`str

* Revert changes the description of Other Built-in Types in stdtypes.rst

* Update Doc/reference/datamodel.rst

---------

(cherry picked from commit 4f826214b30ad50365f45bf07e4a02f34f897ab5)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
12 months ago[3.13] gh-126055: Add omitted command (in docs [os.walk]) for code to fulfill `shuti...
Miss Islington (bot) [Wed, 30 Oct 2024 20:16:00 +0000 (21:16 +0100)] 
[3.13] gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067) (GH-126199)

gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm (GH-126067)

* gh-126055:  Add omitted command (in docs [os.walk]) for code to fulfill `shutil.rmtree` algorithm.

Resolves GH-126055

* gh-126055:  Fix omitted code highlighting
(cherry picked from commit 597d814334742dde386a4d2979b9418aee6fcaba)

Co-authored-by: Victor Wheeler <vwheeler63@users.noreply.github.com>
12 months ago[3.13] Fix incorrect indentation in importlib.metadata.rst (GH-126189) (GH-126193)
Miss Islington (bot) [Wed, 30 Oct 2024 18:00:29 +0000 (19:00 +0100)] 
[3.13] Fix incorrect indentation in importlib.metadata.rst (GH-126189) (GH-126193)

Fix incorrect indentation in importlib.metadata.rst (GH-126189)
(cherry picked from commit 6f512c603465ff3e51e07cb7e1d36b4e5e88905d)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
12 months ago[3.13] gh-85583: Add f-string index in tutorial/inputoutput.rst (GH-21681) (GH-126191)
Miss Islington (bot) [Wed, 30 Oct 2024 17:35:10 +0000 (18:35 +0100)] 
[3.13] gh-85583: Add f-string index in tutorial/inputoutput.rst  (GH-21681) (GH-126191)

gh-85583: Add f-string index in tutorial/inputoutput.rst  (GH-21681)

* bpo-41411 fstring index in tutorial/inputoutput

To assist in searching for fstrings I have added an index

* Add newline

---------

(cherry picked from commit a3443c0e22a8623afe4c0518433b28afbc3a6df6)

Co-authored-by: amaajemyfren <32741226+amaajemyfren@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
12 months ago[3.13] gh-124612: Use ghcr.io/python/autoconf instead of public image (GH-124657...
Miss Islington (bot) [Wed, 30 Oct 2024 14:19:15 +0000 (15:19 +0100)] 
[3.13] gh-124612: Use ghcr.io/python/autoconf instead of public image (GH-124657) (#126183)

(cherry picked from commit b502573f7f800dbb2e401fa2a7a05eceac692c7a)

Co-authored-by: Donghee Na <donghee.na@python.org>
12 months ago[3.13] gh-126071: Improve formatting of the argparse documentation (GH-126073) (GH...
Serhiy Storchaka [Wed, 30 Oct 2024 09:21:38 +0000 (11:21 +0200)] 
[3.13] gh-126071: Improve formatting of the argparse documentation (GH-126073) (GH-126173)

* Use appropriate roles for ArgumentParser, Action, etc.
* Remove superfluous repeated links.
* Explicitly document signatures and add index entries for some methods
  and classes.
* Make it more clear that some parameters are keyword-only.
* Fix some minor errors.
(cherry picked from commit 2ab377a47c8290f8bf52c8ffb5d7fc4c45452611)

12 months ago[3.13] docs: restore an anchor to for/else (GH-126154) (#126159)
Miss Islington (bot) [Wed, 30 Oct 2024 08:16:33 +0000 (09:16 +0100)] 
[3.13] docs: restore an anchor to for/else (GH-126154) (#126159)

docs: restore an anchor to for/else (GH-126154)
(cherry picked from commit 2d9d10179ff3f13029bf4430e62c455a839987ca)

Co-authored-by: Ned Batchelder <ned@nedbatchelder.com>
12 months ago[3.13] gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437...
Miss Islington (bot) [Wed, 30 Oct 2024 00:49:18 +0000 (01:49 +0100)] 
[3.13] gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437) (#126161)

gh-118633: Add warning regarding the unsafe usage of eval and exec (GH-118437)

* Add warning regarding the unsafe usage of eval

* Add warning regarding the unsafe usage of exec

* Move warning under parameters table

* Use suggested shorter text

* Use suggested shorter text

* Improve wording as suggested

---------

(cherry picked from commit 00e5ec0d35193c1665e5c0cfe5ef82eed270d0f4)

Co-authored-by: Daniel Ruf <daniel@daniel-ruf.de>
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
12 months ago[3.13] gh-126139: Improve error message location for future statement with unknown...
Miss Islington (bot) [Wed, 30 Oct 2024 00:36:06 +0000 (01:36 +0100)] 
[3.13] gh-126139: Improve error message location for future statement with unknown feature (GH-126140) (#126155)

gh-126139: Improve error message location for future statement with unknown feature (GH-126140)
(cherry picked from commit 224c370a3680132997f1e43d20a3b4ca95a060ab)

Co-authored-by: Brian Schubert <brianm.schubert@gmail.com>
12 months ago[3.13] gh-116938: Fix `dict.update` docstring and remove erraneous full stop from...
Miss Islington (bot) [Tue, 29 Oct 2024 23:27:33 +0000 (00:27 +0100)] 
[3.13] gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421) (#126150)

gh-116938: Fix `dict.update` docstring and remove erraneous full stop from `dict` documentation (GH-125421)
(cherry picked from commit 5527c4051c0b58218ce69044f92b45f1d66ed43f)

Co-authored-by: Prometheus3375 <35541026+Prometheus3375@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
12 months ago[3.13] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126152)
Miss Islington (bot) [Tue, 29 Oct 2024 23:23:18 +0000 (00:23 +0100)] 
[3.13] Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362) (#126152)

Doc: Note that pydoc uses and prefers ``MANPAGER`` (GH-125362)
(cherry picked from commit 0e45b1fd0ffbb165f580ecdfd5234c1d54389501)

Co-authored-by: Matthieu Ancellin <31126826+mancellin@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
12 months ago[3.13] GH-125866: Improve tests for `pathname2url()` and `url2pathname()` (GH-125993...
Miss Islington (bot) [Tue, 29 Oct 2024 21:08:17 +0000 (22:08 +0100)] 
[3.13] GH-125866: Improve tests for `pathname2url()` and `url2pathname()` (GH-125993) (#126144)

GH-125866: Improve tests for `pathname2url()` and `url2pathname()` (GH-125993)

Merge `URL2PathNameTests` and `PathName2URLTests` test cases (which test
only the Windows-specific implementations from `nturl2path`) into the main
`Pathname_Tests` test case for these functions.

Copy/port some test cases for `pathlib.Path.as_uri()` and `from_uri()`.
(cherry picked from commit 6742f14dfd3fa8ba8a245efa21a4f723160d93d4)

Co-authored-by: Barney Gale <barney.gale@gmail.com>
12 months agogh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)
Miss Islington (bot) [Tue, 29 Oct 2024 20:20:05 +0000 (21:20 +0100)] 
gh-126084: Fix venvwlauncher.exe to run pythonw.exe (GH-126088)

(cherry picked from commit 802d405ff1233a48004a7c9b302baa76291514d1)

Co-authored-by: Christian Ullrich <chris@chrullrich.net>
12 months ago[3.13] Add lightweight comments to conf.py and update docs readme (GH-126100) (#126134)
Miss Islington (bot) [Tue, 29 Oct 2024 19:21:41 +0000 (20:21 +0100)] 
[3.13] Add lightweight comments to conf.py and update docs readme (GH-126100) (#126134)

Add lightweight comments to conf.py and update docs readme (GH-126100)

* Update contributing contact info in readme

* Add lightweight comments to improve docs workflow understanding

* Apply code review suggestions from @hugovk

* Add code review suggestion from @AA-Turner

* Update Doc/conf.py

* Update Doc/conf.py

* Update Doc/conf.py

---------

(cherry picked from commit 9effa0ff06047f3d957bf37267742a98106581ff)

Co-authored-by: Carol Willing <carolcode@willingconsulting.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>