]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
3 years agogh-92368: Fix missing possessive apostrophe (GH-92397)
Miss Islington (bot) [Fri, 6 May 2022 14:12:59 +0000 (07:12 -0700)] 
gh-92368: Fix missing possessive apostrophe (GH-92397)

* Fix missing possessive apostrophe
(cherry picked from commit a79001ee16b3ea8b5d0fad595c969d9e1b7627f3)

Co-authored-by: gophra <105054704+gophra@users.noreply.github.com>
3 years agogh-92047: Py_GetVersion multi-digit minor version (GH-92047) (GH-92048) (#92330)
Miss Islington (bot) [Fri, 6 May 2022 12:47:09 +0000 (05:47 -0700)] 
gh-92047: Py_GetVersion multi-digit minor version (GH-92047) (GH-92048) (#92330)

(cherry picked from commit 43b135f94ebf3e6e84ddb0f75ed8510b96a610e4)

Co-authored-by: Robert Howlett <robert@howletts.org.uk>
Co-authored-by: Robert Howlett <robert@howletts.org.uk>
3 years agoAdd source for character mappings (GH-92014) (#92389)
Miss Islington (bot) [Fri, 6 May 2022 10:58:16 +0000 (03:58 -0700)] 
Add source for character mappings (GH-92014) (#92389)

(cherry picked from commit d707d073be5ecacb7ad341a1c1716f4998907d6b)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agoDocument the lifetime of `PyUnicode_AsUTF8String` (GH-92325)
Miss Islington (bot) [Fri, 6 May 2022 09:55:01 +0000 (02:55 -0700)] 
Document the lifetime of `PyUnicode_AsUTF8String` (GH-92325)

The current wording implied this, but didn't state it explicitly.
(cherry picked from commit 740da8d37a84638f4a8893bee3648f36fc6beb0f)

Co-authored-by: Matt Wozniski <godlygeek@gmail.com>
3 years agoNEWS: Reorder items by section (GH-92373)
Miss Islington (bot) [Fri, 6 May 2022 05:15:53 +0000 (22:15 -0700)] 
NEWS: Reorder items by section (GH-92373)

They caused duplicated sections.
(cherry picked from commit 9b491ae04c900579ec82776aacdf71b2fd1e9d6a)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
3 years agoIssues/88027: A potential double free in list_sort_impl (GH-92367)
Miss Islington (bot) [Fri, 6 May 2022 04:38:14 +0000 (21:38 -0700)] 
Issues/88027: A potential double free in list_sort_impl (GH-92367)

merge_freemem(): set keys to NULL do it's harmless to call this again.
(cherry picked from commit 9652900969df77b1ac245595419431df19296af9)

Co-authored-by: Tim Peters <tim.peters@gmail.com>
3 years ago[3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#92274)
Erlend Egeberg Aasland [Thu, 5 May 2022 19:46:21 +0000 (21:46 +0200)] 
[3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#92274)

* [3.10] gh-80254: Disallow recursive usage of cursors in `sqlite3` converters (#29054)

(cherry picked from commit f629dcfe835e349433e4c5099381d668e8fe69c8)

Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
* Fix ref leak in pysqlite_cursor_iternext

3 years ago[3.10] gh-92118: Add test for traceback when exception is modified by (Async)ExitStac...
Miss Islington (bot) [Thu, 5 May 2022 17:47:59 +0000 (10:47 -0700)] 
[3.10] gh-92118: Add test for traceback when exception is modified by (Async)ExitStack.__exit__ (GH-92339) (GH-92343)

3 years agogh-92223: Remove pre-Python 3.7 alternative in asyncio docs (GH-92224)
Miss Islington (bot) [Thu, 5 May 2022 00:30:54 +0000 (17:30 -0700)] 
gh-92223: Remove pre-Python 3.7 alternative in asyncio docs (GH-92224)

(cherry picked from commit d1b2e989be2bc5128d6602e4f370d0ee6f5ac476)

Co-authored-by: Sebastian Rittau <srittau@rittau.biz>
3 years agogh-92036: Fix gc_fini_untrack() (GH-92037)
Miss Islington (bot) [Wed, 4 May 2022 10:23:29 +0000 (03:23 -0700)] 
gh-92036: Fix gc_fini_untrack() (GH-92037)

Fix a crash in subinterpreters related to the garbage collector. When
a subinterpreter is deleted, untrack all objects tracked by its GC.
To prevent a crash in deallocator functions expecting objects to be
tracked by the GC, leak a strong reference to these objects on
purpose, so they are never deleted and their deallocator functions
are not called.
(cherry picked from commit 14243369b5f80613628a565c224bba7fb3fcacd8)

Co-authored-by: Victor Stinner <vstinner@python.org>
3 years agobpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and...
Miss Islington (bot) [Wed, 4 May 2022 00:16:21 +0000 (17:16 -0700)] 
bpo-47029: Fix BrokenPipeError in multiprocessing.Queue at garbage collection and explicit close (GH-31913)

(cherry picked from commit dfb1b9da8a4becaeaed3d9cffcaac41bcaf746f4)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
3 years ago[3.10] Improve the typing docs (GH-92264) (#92270)
Jelle Zijlstra [Tue, 3 May 2022 22:41:39 +0000 (16:41 -0600)] 
[3.10] Improve the typing docs (GH-92264) (#92270)

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>.
(cherry picked from commit 27e366571590e9e98f61dccf69dbeaa88ee66737)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-87304: Improve comments in language reference for imports (GH-92164)
Miss Islington (bot) [Tue, 3 May 2022 22:24:03 +0000 (15:24 -0700)] 
gh-87304: Improve comments in language reference for imports (GH-92164)

(cherry picked from commit ee2205b208389611e8a278ac1bc74b34f4994fd2)

Co-authored-by: Robert Yang <35813883+robert861212@users.noreply.github.com>
3 years agobpo-29890: Test IPv*Interface construction with tuple argument (GH-30862)
Miss Islington (bot) [Tue, 3 May 2022 18:18:31 +0000 (11:18 -0700)] 
bpo-29890: Test IPv*Interface construction with tuple argument (GH-30862)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b295a92c50b128e494f47c28f12b8e9eac2927ea)

Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
3 years agobpo-46604: fix function name in ssl module docstring (GH-31064)
Miss Islington (bot) [Tue, 3 May 2022 16:24:39 +0000 (09:24 -0700)] 
bpo-46604: fix function name in ssl module docstring (GH-31064)

The function fetch_server_certificate is replaced by get_server_certificate in the module. I reflected the change in the module docstrings.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit feca9bbd1f6489f2b6d2783bfc22fdb96e45b69f)

Co-authored-by: Kossi GLOKPOR <83467320+glk0@users.noreply.github.com>
3 years agobpo-46415: Use f-string for ValueError in ipaddress.ip_{address,network,interface...
Miss Islington (bot) [Tue, 3 May 2022 12:37:17 +0000 (05:37 -0700)] 
bpo-46415: Use f-string for ValueError in ipaddress.ip_{address,network,interface} helper functions (GH-30642)

`IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of
(address description, netmask) as the address parameter.
When the tuple-based address is used errors are not propagated
correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments:

In [7]: ipaddress.ip_network(("192.168.100.0", "fooo"))
        ...
TypeError: not all arguments converted during string formatting

Compared to:

In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo"))
        ...
NetmaskValueError: 'foo' is not a valid netmask

Use an f-string to make sure the error is always properly formatted.

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 52dc9c3066bcdc67a7a45d41cf158ecb1434d5f3)

Co-authored-by: Thomas Cellerier <thomascellerier@gmail.com>
3 years ago[3.10] gh-91583: AC: Fix regression for functions with defining_class (GH-91739)...
Serhiy Storchaka [Tue, 3 May 2022 08:53:46 +0000 (11:53 +0300)] 
[3.10] gh-91583: AC: Fix regression for functions with defining_class (GH-91739) (GH-92079)

Argument Clinic now generates the same efficient code as before
adding the defining_class parameter.
(cherry picked from commit a055dac0b45031878a8196a8735522de018491e3)

3 years agogh-92106: Add test that subscription works on arbitrary TypedDicts (GH-92176)
Miss Islington (bot) [Tue, 3 May 2022 00:39:07 +0000 (17:39 -0700)] 
gh-92106: Add test that subscription works on arbitrary TypedDicts (GH-92176)

(cherry picked from commit 81fb3548be5a18bf40a6f4505a02cc7fb72c9c34)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agobpo-46586: Fix more erroneous doc links to builtins (GH-31429)
Miss Islington (bot) [Mon, 2 May 2022 22:51:33 +0000 (15:51 -0700)] 
bpo-46586: Fix more erroneous doc links to builtins (GH-31429)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Éric <merwok@netwok.org>
(cherry picked from commit cc6ae4f4835f9e76a34f24cd1f666c1cc0fecfa3)

Co-authored-by: Meer Suri <46469858+meersuri@users.noreply.github.com>
3 years agobpo-46787: Fix `ProcessPoolExecutor exception` memory leak (GH-31408) (GH-31408)
Miss Islington (bot) [Mon, 2 May 2022 22:45:22 +0000 (15:45 -0700)] 
bpo-46787: Fix `ProcessPoolExecutor exception` memory leak (GH-31408) (GH-31408)

Do not store `ProcessPoolExecutor` work item exception traceback that prevents
exception frame locals from being garbage collected.
(cherry picked from commit 9c204b148fad9742ed19b3bce173073cdec79819)

Co-authored-by: themylogin <themylogin@gmail.com>
3 years agobpo-6686: Replace String with Bytes in xml.sax.handler documentation (GH-30612)
Miss Islington (bot) [Mon, 2 May 2022 22:44:07 +0000 (15:44 -0700)] 
bpo-6686: Replace String with Bytes in xml.sax.handler documentation (GH-30612)

(cherry picked from commit 32e4f450af3fbcc5c7e186f83ff74e2efe164136)

Co-authored-by: Yassir Karroum <ukarroum17@gmail.com>
3 years agoimportlib docs: Update importlib.abc hierarchy (GH-31113)
Miss Islington (bot) [Mon, 2 May 2022 20:48:59 +0000 (13:48 -0700)] 
importlib docs: Update importlib.abc hierarchy (GH-31113)

Fixed some inconsistencies in the text about relationships
(cherry picked from commit 5f45a9d3c3de97a4eafedb60ecea224a78bae52c)

Co-authored-by: David Gilbertson <gilbertson.david@gmail.com>
3 years ago[3.10] bpo-43504: Remove effbot urls (GH-26308) (#92161)
Thaddeus1499 [Mon, 2 May 2022 18:21:51 +0000 (14:21 -0400)] 
[3.10] bpo-43504: Remove effbot urls (GH-26308) (#92161)

* [3.10] Remove effbot urls (GH-26308).
(cherry picked from commit e9f66aedf44ccc3be27975cfb070a44ce6a6bd13)

Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
3 years agogh-91783: Document security considerations for shutil.unpack_archive (GH-91844)
Miss Islington (bot) [Mon, 2 May 2022 17:34:59 +0000 (10:34 -0700)] 
gh-91783: Document security considerations for shutil.unpack_archive (GH-91844)

(cherry picked from commit 4b297a9ffd4a1d420c1a8016f4ed2c7f1d298469)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
3 years ago[3.10] Fix typo in Programming FAQ (GH-92083) (GH-92148)
Miss Islington (bot) [Mon, 2 May 2022 17:24:49 +0000 (10:24 -0700)] 
[3.10] Fix typo in Programming FAQ (GH-92083) (GH-92148)

I believe the word "with" was missing here.
(cherry picked from commit 2a7efa324274a54fe0e5480cae1438d8294b9ec3)

Co-authored-by: Matt Harding <majaharding@gmail.com>
3 years agogh-92082: contextlib docs: Change aclosing from a class to a function for consistency...
Miss Islington (bot) [Mon, 2 May 2022 16:37:10 +0000 (09:37 -0700)] 
gh-92082: contextlib docs: Change aclosing from a class to a function for consistency (GH-92155)

Signed-off-by: prwatson <prwatson@redhat.com>
(cherry picked from commit 958f21c5cdb3bbbd16fec87164785cff3dacce96)

Co-authored-by: Thaddeus1499 <104600742+Thaddeus1499@users.noreply.github.com>
3 years ago[3.10] gh-89301: Fix regression with bound values in traced SQLite statements (#92147)
Erlend Egeberg Aasland [Mon, 2 May 2022 16:21:13 +0000 (10:21 -0600)] 
[3.10] gh-89301: Fix regression with bound values in traced SQLite statements (#92147)

(cherry picked from commit 721aa96540bb96700f8c4bab0b4095b43491dca1)

3 years ago[3.10] build(deps): bump actions/cache from 3.0.1 to 3.0.2 (GH-92111) (#92124)
Jelle Zijlstra [Mon, 2 May 2022 16:07:03 +0000 (10:07 -0600)] 
[3.10] build(deps): bump actions/cache from 3.0.1 to 3.0.2 (GH-92111) (#92124)

Bumps [actions/cache](https://github.com/actions/cache) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>.
(cherry picked from commit eefe6911f4f497e8b73e0690f9b3f47904fdb02a)

3 years agoconcurrent.futures: Fix typo in docstring (GH-92121)
Miss Islington (bot) [Mon, 2 May 2022 16:06:43 +0000 (09:06 -0700)] 
concurrent.futures: Fix typo in docstring (GH-92121)

(cherry picked from commit b11243e85e020ed2f524bdd83c339faf11ef03d4)

Co-authored-by: Yiannis Hadjicharalambous <hadjicharalambous.yiannis@gmail.com>
3 years agogh-88546: glob.glob docs: Make new paragraph for emphasis and reordered sentence...
Miss Islington (bot) [Mon, 2 May 2022 15:35:37 +0000 (08:35 -0700)] 
gh-88546: glob.glob docs: Make new paragraph for emphasis and reordered sentence (GH-91614)

(cherry picked from commit b9ab6cea0819bd498063f0934cb5bb0bb5a6a2d4)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agoasyncio.subprocess: Fix a typo in doc (GH-92030)
Miss Islington (bot) [Mon, 2 May 2022 15:18:01 +0000 (08:18 -0700)] 
asyncio.subprocess: Fix a typo in doc (GH-92030)

Remove a confusion for read method in asyncio-subprocess doc for stderr StreamReader instance
(cherry picked from commit bb857a96ef368ba9de1da2db12b1a1f1870606ac)

Co-authored-by: Harsh <65716674+Harsh-br0@users.noreply.github.com>
3 years agogh-85133: os docs: Add that getenv uses os.environ (GH-91874)
Miss Islington (bot) [Mon, 2 May 2022 14:58:09 +0000 (07:58 -0700)] 
gh-85133: os docs: Add that getenv uses os.environ (GH-91874)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit b25352a5c039d95e019dd8ca111f6f77c43ca1f7)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-84714: Add behavior if dst file exists (GH-91867)
Miss Islington (bot) [Mon, 2 May 2022 14:51:07 +0000 (07:51 -0700)] 
gh-84714: Add behavior if dst file exists (GH-91867)

(cherry picked from commit 9166ace805d915c8a918cd89fff0e58b65e3327c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agobpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)
Miss Islington (bot) [Mon, 2 May 2022 09:58:41 +0000 (02:58 -0700)] 
bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)

If the error handler returns position less or equal than the starting
position of non-encodable characters, most of built-in encoders didn't
properly re-size the output buffer. This led to out-of-bounds writes,
and segfaults.
(cherry picked from commit 18b07d773e09a2719e69aeaa925d5abb7ba0c068)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-85679: Recommend `encoding="utf-8"` in tutorial (GH-91778)
Miss Islington (bot) [Mon, 2 May 2022 08:45:10 +0000 (01:45 -0700)] 
gh-85679: Recommend `encoding="utf-8"` in tutorial (GH-91778)

(cherry picked from commit 614420df9796c8a4f01e24052fc0128b4c20c5bf)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
3 years ago[3.10] build(deps): bump actions/stale from 4 to 5 (GH-92108) (#92127)
Jelle Zijlstra [Sun, 1 May 2022 23:46:06 +0000 (17:46 -0600)] 
[3.10] build(deps): bump actions/stale from 4 to 5 (GH-92108) (#92127)

Bumps [actions/stale](https://github.com/actions/stale) from 4 to 5.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>.
(cherry picked from commit 34129f7c42b31d12d8ed692cd3f82c8d36c6c644)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago[3.10] gh-91401: Conservative backport of `subprocess._USE_VFORK` (#91932)
Gregory P. Smith [Sun, 1 May 2022 23:09:50 +0000 (16:09 -0700)] 
[3.10] gh-91401: Conservative backport of `subprocess._USE_VFORK` (#91932)

This does not alter the `_posixsubprocess.fork_exec()` private API to
avoid issues for anyone relying on that (bad idea) or for anyone who's
`subprocess.py` and `_posixsubprocess.so` upgrades may not become
visible to existing Python 3.10 processes at the same time.

Backports the concept of cd5726fe674eaff442510eeb6c75628858be9e9f.

Provides a fail-safe way to disable vfork for #91401.

I didn't backport the documentation as I don't actually expect this to be used and `.. versionadded: 3.10.5` always looks weird in docs. It's being done more to have a fail-safe in place for people just in case.

3 years agotyping docs: Add example for async functions (GH-20386)
Miss Islington (bot) [Sun, 1 May 2022 04:55:58 +0000 (21:55 -0700)] 
typing docs: Add example for async functions (GH-20386)

Fixes python/typingGH-424
(cherry picked from commit 9588f880a286a8cc5597188f6ab44108c8f18761)

Co-authored-by: Sam Bull <aa6bs0@sambull.org>
3 years agogh-81488: Add recursive wording for issubclass docs (GH-92087)
Miss Islington (bot) [Sun, 1 May 2022 04:21:51 +0000 (21:21 -0700)] 
gh-81488: Add recursive wording for issubclass docs (GH-92087)

(cherry picked from commit 1066ecb97042b8e89de554e6f9dc2e3d634208c0)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-91611: Use example.com for documentation, not mydomain.com (GH-91613)
Miss Islington (bot) [Sun, 1 May 2022 04:03:11 +0000 (21:03 -0700)] 
gh-91611: Use example.com for documentation, not mydomain.com (GH-91613)

example.com is reserved by the IANA as special-use domain name for documentation
purposes. The domain names are used widely in books, tutorials, sample network
configurations, and generally as examples for the use of domain name.

On the other hand, mydomain.com is real Domain Name Registration service.
(cherry picked from commit ea392467829d6e93f824bde8eb87bdb31d9e4c62)

Co-authored-by: Motoki Naruse <motoki@naru.se>
3 years agogh-89253: Add 3.10 whatsnew section for itertools.pairwise (GH-91563)
Miss Islington (bot) [Sat, 30 Apr 2022 22:29:09 +0000 (15:29 -0700)] 
gh-89253: Add 3.10 whatsnew section for itertools.pairwise (GH-91563)

GH-89253

[`pairwise()`](https://docs.python.org/3/library/itertools.htmlGH-itertools.pairwise) already has the 'new in python3.10'

Automerge-Triggered-By: GH:rhettinger
(cherry picked from commit 5dcfb916c765d825b2e8372281d71d32316b41cf)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-87801: Add run() to subprocess.CalledProcessError description (GH-91628)
Miss Islington (bot) [Sat, 30 Apr 2022 21:51:45 +0000 (14:51 -0700)] 
gh-87801: Add run() to subprocess.CalledProcessError description (GH-91628)

(cherry picked from commit 567be058b403db9689af45bf831d4c732c8b1105)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-87192: Update wording for fcntl 'Changed in' (GH-91658)
Miss Islington (bot) [Sat, 30 Apr 2022 21:44:08 +0000 (14:44 -0700)] 
gh-87192: Update wording for fcntl 'Changed in' (GH-91658)

(cherry picked from commit d7eb1ffbe8f913693e4c9ffa1b32edccac987ab6)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-85864: io docs: Add missing position-only parameters (GH-91950)
Miss Islington (bot) [Sat, 30 Apr 2022 15:39:29 +0000 (08:39 -0700)] 
gh-85864: io docs: Add missing position-only parameters (GH-91950)

(cherry picked from commit 3a8e2b6e65fea1252477f6e29a384fa9a492ed06)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070) ...
Serhiy Storchaka [Sat, 30 Apr 2022 12:33:39 +0000 (15:33 +0300)] 
[3.10] gh-92049: Forbid pickling constants re._constants.SUCCESS etc (GH-92070) (GH-92073)

Previously, pickling did not fail, but the result could not be unpickled.
(cherry picked from commit 6d0d547033e295f91f05030322acfbb0e280fc1f)

3 years agobpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)
Miss Islington (bot) [Sat, 30 Apr 2022 12:31:28 +0000 (05:31 -0700)] 
bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)

It was raised if the charset itself contains characters not encodable
in UTF-8 (in particular \udcxx characters representing non-decodable
bytes in the source).
(cherry picked from commit e91dee87edcf6dee5dd78053004d76e5f05456d4)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agosorting howto: Add clarification on < using __lt__ (GH-92010)
Miss Islington (bot) [Fri, 29 Apr 2022 22:25:31 +0000 (15:25 -0700)] 
sorting howto: Add clarification on < using __lt__ (GH-92010)

(cherry picked from commit 53ca774497fde7c5fcf3a84813ea42f95f75c639)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agobpo-26792: Improve docstrings of runpy module run_functions (GH-30729)
Miss Islington (bot) [Fri, 29 Apr 2022 18:45:43 +0000 (11:45 -0700)] 
bpo-26792: Improve docstrings of runpy module run_functions (GH-30729)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 117836f123a1c65d9ba50401822b883f11f0a347)

Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
3 years agogh-91832: Add 'required' attr to argparse.Action repr (GH-91841)
Miss Islington (bot) [Thu, 28 Apr 2022 15:27:17 +0000 (08:27 -0700)] 
gh-91832: Add 'required' attr to argparse.Action repr (GH-91841)

GH- Adding 'required' to names in Lib.argparse.Action

gh-91832:
Added 'required' to the list `names` in `Lib.argparse.Action`.
Changed constant strings that test the Action object.

Automerge-Triggered-By: GH:merwok
(cherry picked from commit 4ed3900041c688a02dca1eb3323083d720dd0d93)

Co-authored-by: Abhigyan Bose <abhigyandeepbose@gmail.com>
3 years agoAdd note that headers added via urllib.request.add_header are added to redirected...
Miss Islington (bot) [Wed, 27 Apr 2022 22:26:42 +0000 (15:26 -0700)] 
Add note that headers added via urllib.request.add_header are added to redirected requests (GH-30708) (#92004)

(cherry picked from commit f348154c8f8a9c254503306c59d6779d4d09b3a9)

Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
Co-authored-by: Ashwin Ramaswami <aramaswamis@gmail.com>
3 years agoCorrect method name typo (GH-91970)
Miss Islington (bot) [Wed, 27 Apr 2022 22:19:43 +0000 (15:19 -0700)] 
Correct method name typo (GH-91970)

(cherry picked from commit c6b84a727c9299f24edbab4105ce47e9f2bae199)

Co-authored-by: Simon de Vlieger <cmdr@supakeen.com>
3 years agogh-84459: Make wording more specific for Path.replace (GH-91853)
Miss Islington (bot) [Wed, 27 Apr 2022 22:18:06 +0000 (15:18 -0700)] 
gh-84459: Make wording more specific for Path.replace (GH-91853)

GH-84459
(cherry picked from commit 161dff7e10eeb7eaf6d418b91e993aaf84770a5c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-91810: Expand ElementTree.write() tests to use non-ASCII data (GH-91989)
Miss Islington (bot) [Wed, 27 Apr 2022 16:50:25 +0000 (09:50 -0700)] 
gh-91810: Expand ElementTree.write() tests to use non-ASCII data (GH-91989)

(cherry picked from commit f60b4c3d74f241775f80affe60dcba6448634fe3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-68966: Document mailcap deprecation in Python 3.11 (#91971)
Victor Stinner [Wed, 27 Apr 2022 09:39:51 +0000 (11:39 +0200)] 
gh-68966: Document mailcap deprecation in Python 3.11 (#91971)

(cherry picked from commit 80de0273c0caf8bae19787bb00255eb3fb2a2d0c)

3 years agoFix missing `f` prefix on f-strings (GH-91910)
Miss Islington (bot) [Wed, 27 Apr 2022 07:08:05 +0000 (00:08 -0700)] 
Fix missing `f` prefix on f-strings (GH-91910)

(cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93)

Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
3 years ago[3.10] gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918). (GH-91946)
Serhiy Storchaka [Tue, 26 Apr 2022 07:50:22 +0000 (10:50 +0300)] 
[3.10] gh-91915: Fix test_netrc on non-UTF-8 locale (GH-91918). (GH-91946)

(cherry picked from commit 36306cf7862097318a3fef74224075cc4cf37229)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)
Miss Islington (bot) [Tue, 26 Apr 2022 05:57:57 +0000 (22:57 -0700)] 
gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)

(cherry picked from commit f41c16bf512778fca4bfabca887c4c303cc21896)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)
Miss Islington (bot) [Tue, 26 Apr 2022 05:26:47 +0000 (22:26 -0700)] 
gh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)

If use a non-builtin codec, partially implemented in Python
(e.g. ISO-8859-15), a new RecursionError (with empty error message)
can be raised while handle a RecursionError.

Testing for error message was needed to distinguish
a recursion error from arbitrary RuntimeError. After introducing
RecursionError, it became unnecessary.
(cherry picked from commit a568585069174cec35ce26cdf4d4862c634d9f6d)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] gh-91888: add a :gh: role to the documentation (GH-91889) (#91934)
Ezio Melotti [Tue, 26 Apr 2022 00:51:28 +0000 (02:51 +0200)] 
[3.10] gh-91888: add a :gh: role to the documentation (GH-91889) (#91934)

* gh-91888: Add a :gh: role to the documentation (GH-91889).

* [3.10] gh-91888: add a `:gh:` role to the documentation (GH-91889)

* Add a new :gh:`...` role for GitHub issues.

* Fix a GitHub id to use the :gh: role.

* Add Misc/NEWS entry.

* Refactoring and rephrasing.

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>.
(cherry picked from commit f7641a2ffec243e5f600028a84debe9028a9ee44)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-91904: Fix setting envvar PYTHONREGRTEST_UNICODE_GUARD (GH-91905)
Miss Islington (bot) [Mon, 25 Apr 2022 15:03:47 +0000 (08:03 -0700)] 
gh-91904: Fix setting envvar PYTHONREGRTEST_UNICODE_GUARD (GH-91905)

It always failed on non-UTF-8 locale and prevented running regrtests.
(cherry picked from commit 54d068adfbf2b822bcbf90dac9b3f6684cec0f99)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years ago[3.10] Update Sphinx bpo role to use redirect URI. (#91890)
Ezio Melotti [Sun, 24 Apr 2022 21:07:51 +0000 (23:07 +0200)] 
[3.10] Update Sphinx bpo role to use redirect URI. (#91890)

* Update Sphinx bpo role to use redirect URI. (GH-32342)

* [3.10] Update Sphinx bpo role to use redirect URI. (GH-32342).
(cherry picked from commit 08cfe079503ffd19d8b7ab324f0fdb1c6b150ca8)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* Fix whitespace.

3 years agoRE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854)
Miss Islington (bot) [Sat, 23 Apr 2022 10:16:36 +0000 (03:16 -0700)] 
RE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854)

(cherry picked from commit 6b45076bd62407103433daea8acf085a99e6cb7e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agogh-85864: Mark positional-only args in io docs (GH-91683)
Miss Islington (bot) [Sat, 23 Apr 2022 00:48:13 +0000 (17:48 -0700)] 
gh-85864: Mark positional-only args in io docs (GH-91683)

(cherry picked from commit a3f2cf3ced378db2569df4e7389ec1f79c85d55c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-91547: Remove "Undocumented modules" page (GH-91682)
Miss Islington (bot) [Fri, 22 Apr 2022 23:33:46 +0000 (16:33 -0700)] 
gh-91547: Remove "Undocumented modules" page (GH-91682)

(cherry picked from commit 254aaa7981d8773658fb14795da5dec888c95f93)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years ago[3.10] gh-91575: Update case-insensitive matching in re to the latest Unicode version...
Serhiy Storchaka [Fri, 22 Apr 2022 18:44:05 +0000 (21:44 +0300)] 
[3.10] gh-91575: Update case-insensitive matching in re to the latest Unicode version (GH-91580). (GH-91661)

(cherry picked from commit 1c2fcebf3c5e2ab41d376bb481834445617c8f3c)

3 years ago[3.10] gh-91700: Validate the group number in conditional expression in RE (GH-91702...
Serhiy Storchaka [Fri, 22 Apr 2022 18:09:30 +0000 (21:09 +0300)] 
[3.10] gh-91700: Validate the group number in conditional expression in RE (GH-91702) (GH-91831)

In expression (?(group)...) an appropriate re.error is now
raised if the group number refers to not defined group.

Previously it raised RuntimeError: invalid SRE code.
(cherry picked from commit 48ec61a89a959071206549819448405c2cea61b0)

3 years ago[3.10] gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665...
Serhiy Storchaka [Fri, 22 Apr 2022 18:08:49 +0000 (21:08 +0300)] 
[3.10] gh-90568: Fix exception type for \N with a named sequence in RE (GH-91665) (GH-91830)

re.error is now raised instead of TypeError.
(cherry picked from commit 6ccfa31421393910b52936e0447625db06f2a655)

3 years ago[3.10] build(deps): bump actions/upload-artifact from 2.3.1 to 3 (GH-32227) (#91748)
Jelle Zijlstra [Thu, 21 Apr 2022 01:53:31 +0000 (18:53 -0700)] 
[3.10] build(deps): bump actions/upload-artifact from 2.3.1 to 3 (GH-32227) (#91748)

Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2.3.1 to 3.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v2.3.1...v3)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>.
(cherry picked from commit b8812c9ca3f6864a233574001e16f1b9e92daf6e)

3 years ago[3.10] build(deps): bump actions/cache from 2.1.7 to 3.0.1 (GH-32228) (#91746)
Jelle Zijlstra [Thu, 21 Apr 2022 01:53:05 +0000 (18:53 -0700)] 
[3.10] build(deps): bump actions/cache from 2.1.7 to 3.0.1 (GH-32228) (#91746)

Bumps [actions/cache](https://github.com/actions/cache) from 2.1.7 to 3.0.1.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v2.1.7...v3.0.1)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>.
(cherry picked from commit 3ace1034b8202bc7034e15f34561725934f04ff6)

3 years agobpo-23747: Enhance platform doc, document default behavior (GH-31462)
Miss Islington (bot) [Wed, 20 Apr 2022 16:41:12 +0000 (09:41 -0700)] 
bpo-23747: Enhance platform doc, document default behavior (GH-31462)

(cherry picked from commit ad3ca17ff5cd63f907430073b52be27695674148)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] build(deps): bump actions/checkout from 2 to 3 (GH-32226) (#91723)
Jelle Zijlstra [Wed, 20 Apr 2022 14:40:36 +0000 (07:40 -0700)] 
[3.10] build(deps): bump actions/checkout from 2 to 3 (GH-32226) (#91723)

Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>.
(cherry picked from commit 1ba63e3a9bb176e5ad8e8dd744b9d2b9d588e275)

3 years agobpo-40859: Update Windows build to use xz-5.2.5 (GH-20622)
Steve Dower [Wed, 20 Apr 2022 13:30:16 +0000 (14:30 +0100)] 
bpo-40859: Update Windows build to use xz-5.2.5 (GH-20622)

Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
3 years agogh-91734: Fix ossaudio support on Solaris (GH-91735)
Miss Islington (bot) [Wed, 20 Apr 2022 11:06:29 +0000 (04:06 -0700)] 
gh-91734: Fix ossaudio support on Solaris (GH-91735)

(cherry picked from commit 4420faf273e9e2d03226a9375e1e04a336230c84)

Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
3 years agobpo-30718: Add information about text buffering (GH-32351)
Miss Islington (bot) [Wed, 20 Apr 2022 09:00:43 +0000 (02:00 -0700)] 
bpo-30718: Add information about text buffering (GH-32351)

(cherry picked from commit 5101d97d0b13425ccc5ed37abfabb07701db81fe)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agoFix whitespace/indentation issues in test_sys (GH-32369) (GH-32372)
Ken Jin [Wed, 20 Apr 2022 05:57:30 +0000 (12:57 +0700)] 
Fix whitespace/indentation issues in test_sys (GH-32369) (GH-32372)

3 years agoAdd link to sys.path in os lib (GH-91679)
Miss Islington (bot) [Wed, 20 Apr 2022 04:17:34 +0000 (21:17 -0700)] 
Add link to sys.path in os lib (GH-91679)

(cherry picked from commit 692aea6f3823df48b7fc267ba0aa1ccc45ac606d)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agoFix awkward sentence in signal docs (GH-91508)
Miss Islington (bot) [Wed, 20 Apr 2022 01:38:15 +0000 (18:38 -0700)] 
Fix awkward sentence in signal docs (GH-91508)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 326ae71f1d93c12100150baa1173ea7ce7a96ea0)

Co-authored-by: AJ Jordan <alex@strugee.net>
3 years agogh-87497: Document that urllib.request sends headers in camel case (GH-24661) (#91517)
Miss Islington (bot) [Wed, 20 Apr 2022 01:20:03 +0000 (18:20 -0700)] 
gh-87497: Document that urllib.request sends headers in camel case (GH-24661) (#91517)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 325d6f50357474c7d9fd2475be0e2481f7ae0476)

Co-authored-by: Alix Lourme <alix.lourme@gmail.com>
3 years agobuild(deps): bump actions/setup-python from 2 to 3 (GH-31630)
Miss Islington (bot) [Tue, 19 Apr 2022 20:41:39 +0000 (13:41 -0700)] 
build(deps): bump actions/setup-python from 2 to 3 (GH-31630)

Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 3.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 74e319239b0a2a5ef8bc27670f4f533ee701d57f)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
3 years ago[3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769...
Oleg Iarygin [Tue, 19 Apr 2022 20:01:09 +0000 (23:01 +0300)] 
[3.10] gh-91118: Fix docstrings that do not honor --without-doc-strings (GH-31769) (#91662)

Co-authored-by: Éric <merwok@netwok.org>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit a573cb2fec664c645ab744658d7e941d72e1a398)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
3 years agogh-91231: multiprocessing BaseManager waits 1.0 second (#91701)
Victor Stinner [Tue, 19 Apr 2022 15:06:00 +0000 (17:06 +0200)] 
gh-91231: multiprocessing BaseManager waits 1.0 second (#91701)

Shutting down a multiprocessing BaseManager now waits for 1 second until
the process completes, rather than 0.1 second, after the process is
terminated.

3 years agoAdd more tests for group names and refs in RE (GH-91695)
Miss Islington (bot) [Tue, 19 Apr 2022 14:33:09 +0000 (07:33 -0700)] 
Add more tests for group names and refs in RE (GH-91695)

(cherry picked from commit 74070085da5322ac83c954f101f2caa150655be2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
3 years agoDoc: Fix link formatting typo (GH-91659)
Miss Islington (bot) [Tue, 19 Apr 2022 09:33:44 +0000 (02:33 -0700)] 
Doc: Fix link formatting typo (GH-91659)

(cherry picked from commit 6a7a8a740e61508cb5a0fcdac8b752b6c9e5d1ea)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years ago[3.10] gh-91676 gh-91260 unittest.IsolatedAsyncioTestCase no longer leaks its executo...
Gregory P. Smith [Tue, 19 Apr 2022 09:31:50 +0000 (02:31 -0700)] 
[3.10] gh-91676 gh-91260 unittest.IsolatedAsyncioTestCase no longer leaks its executor (GH-91680)

For things like test_asyncio.test_thread this was causing frequent
"environment modified by test" errors as the executor threads had not
always stopped running after the test was over.

3 years agoRemove duplicate explanation (GH-91534)
Miss Islington (bot) [Mon, 18 Apr 2022 04:44:58 +0000 (21:44 -0700)] 
Remove duplicate explanation (GH-91534)

(cherry picked from commit 0e6dca01937b62c07cff5b8450b7c74c101b857d)

Co-authored-by: Gouvernathor <44340603+Gouvernathor@users.noreply.github.com>
3 years agogh-89885: Improve import example in language reference (GH-91523)
Miss Islington (bot) [Sun, 17 Apr 2022 21:34:41 +0000 (14:34 -0700)] 
gh-89885: Improve import example in language reference (GH-91523)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit d5a69571f586080af4c29671c47f9c4bc671af7f)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-91541: Fix error in example in modules tutorial (GH-91634)
Miss Islington (bot) [Sun, 17 Apr 2022 21:30:57 +0000 (14:30 -0700)] 
gh-91541: Fix error in example in modules tutorial (GH-91634)

(cherry picked from commit efbc668183400597070356a2df2fbab114a53cb3)

Co-authored-by: 180909 <734461790@qq.com>
3 years agogh-90923: Improve sqlite3.Connection.execute* docs (GH-91643)
Miss Islington (bot) [Sun, 17 Apr 2022 21:29:21 +0000 (14:29 -0700)] 
gh-90923: Improve sqlite3.Connection.execute* docs (GH-91643)

- Drop 'nonstandard'; it does not add any value
- Try to be more concise
- Make return value a little more explicit
(cherry picked from commit 017f07a229a337e9c17bed8cd1879e0177a8d89d)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
3 years ago[3.10] gh-91607: Fix several test_concurrent_futures tests to actually test what...
Gregory P. Smith [Sat, 16 Apr 2022 20:48:11 +0000 (13:48 -0700)] 
[3.10] gh-91607: Fix several test_concurrent_futures tests to actually test what they claim (GH-91600) (#91612)

* Fix test_concurrent_futures to actually test what it says.

Many ProcessPoolExecutor based tests were ignoring the mp_context
and using the default instead.  This meant we lacked proper test
coverage of all of them.

Also removes the old _prime_executor() worker delay seeding code
as it appears to have no point and causes 20-30 seconds extra
latency on this already long test.  It also interfered with some
of the refactoring to fix the above to not needlessly create their
own executor when setUp has already created an appropriate one.

* Don't import the name from multiprocessing directly to avoid confusion.

(cherry picked from commit 7fa3a5a2197896066e3fe53ee325ac6ab54c3414)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 years agogh-91595: fix the comparison of character and integer by using ord() (GH-91596)
Miss Islington (bot) [Sat, 16 Apr 2022 14:59:32 +0000 (07:59 -0700)] 
gh-91595: fix the comparison of character and integer by using ord() (GH-91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d72948b94c0924a75ea14c6298156522d0)

Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
3 years agogh-82849: revise intro to os.path.rst (GH-32232)
Miss Islington (bot) [Sat, 16 Apr 2022 04:38:11 +0000 (21:38 -0700)] 
gh-82849: revise intro to os.path.rst (GH-32232)

* revise the first paragraph of docs for os.path
* add a mention of `os.PathLike` protocol
* remove warnings rendered irrelevant by :pep:`383` and :pep:`529`

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 468314cc8bfdb6fd328cbbbb7d0807728f25e043)

Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
3 years agoAdd link to documentation translation list (GH-91560) (#91589)
Miss Islington (bot) [Sat, 16 Apr 2022 02:16:05 +0000 (19:16 -0700)] 
Add link to documentation translation list (GH-91560) (#91589)

(cherry picked from commit c4e8a93eb3fa5e5d930cea64f213443242c2588c)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434) (GH-91464)
Miss Islington (bot) [Fri, 15 Apr 2022 13:55:13 +0000 (06:55 -0700)] 
gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434) (GH-91464)

* add a paragraph to document this kwarg in detail
* update docstring in the source accordingly
(cherry picked from commit f33e2c87a83917b5139d97fd8ef7cba7223ebef5)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agogh-70979: Fix runpy.run_path parameter name in docs (GH-32265)
Miss Islington (bot) [Fri, 15 Apr 2022 01:23:20 +0000 (18:23 -0700)] 
gh-70979: Fix runpy.run_path parameter name in docs (GH-32265)

Noticed while reviewing GH-30729.
(cherry picked from commit f1e989b04507db6f0adbccb5e1624d81cb217ea8)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
3 years agoAdd redirects to Misc/NEWS bpo links (GH-91454) (GH-91535)
Miss Islington (bot) [Thu, 14 Apr 2022 15:02:03 +0000 (08:02 -0700)] 
Add redirects to Misc/NEWS bpo links (GH-91454) (GH-91535)

(cherry picked from commit 17dbb6bc10ca8a8b602335414c047294f00afcbe)

Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
3 years agogh-90879: Fix missing parameter for put_nowait() (GH-91514)
Miss Islington (bot) [Thu, 14 Apr 2022 09:18:31 +0000 (02:18 -0700)] 
gh-90879: Fix missing parameter for put_nowait() (GH-91514)

(cherry picked from commit 0fc3517cf46ec79b4681c31916d4081055a7ed09)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
3 years agogh-91421: Use constant value check during runtime (GH-91422) (GH-91492)
Miss Islington (bot) [Thu, 14 Apr 2022 01:38:37 +0000 (18:38 -0700)] 
gh-91421: Use constant value check during runtime (GH-91422) (GH-91492)

The left-hand side expression of the if-check can be converted to a
constant by the compiler, but the addition on the right-hand side is
performed during runtime.

Move the addition from the right-hand side to the left-hand side by
turning it into a subtraction there. Since the values are known to
be large enough to not turn negative, this is a safe operation.

Prevents a very unlikely integer overflow on 32 bit systems.

Fixes GH-91421.
(cherry picked from commit 0859368335d470b9ff33fc53ed9a85ec2654b278)

Co-authored-by: Tobias Stoeckmann <stoeckmann@users.noreply.github.com>
3 years agobpo-47260: Fix os.closerange() potentially being a no-op in a seccomp sandbox (GH...
Miss Islington (bot) [Fri, 8 Apr 2022 18:10:38 +0000 (11:10 -0700)] 
bpo-47260: Fix os.closerange() potentially being a no-op in a seccomp sandbox (GH-32418)

_Py_closerange() currently assumes that close_range() closes
all file descriptors even if it returns an error (other than ENOSYS).
This assumption can be wrong on Linux if a seccomp sandbox denies
the underlying syscall, pretending that it returns EPERM or EACCES.
In this case _Py_closerange() won't close any descriptors at all,
which in the worst case can be a security issue.

Fix this by falling back to other methods in case of any close_range()
error. Note that fallbacks will not be triggered on any problems with
closing individual file descriptors because close_range() is documented
to ignore such errors on both Linux[1] and FreeBSD[2].

[1] https://man7.org/linux/man-pages/man2/close_range.2.html
[2] https://www.freebsd.org/cgi/man.cgi?query=close_range&sektion=2
(cherry picked from commit 1c8b3b5d66a629258f1db16939b996264a8b9c37)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
3 years agoFix bad grammar and import docstring for split/rsplit (GH-32381) (GH-32416)
Miss Islington (bot) [Fri, 8 Apr 2022 17:06:19 +0000 (10:06 -0700)] 
Fix bad grammar and import docstring for split/rsplit (GH-32381) (GH-32416)

3 years agopickle docs: Fix typos and improve wording (GH-24776) (GH-32395)
Miss Islington (bot) [Fri, 8 Apr 2022 01:56:17 +0000 (18:56 -0700)] 
pickle docs: Fix typos and improve wording (GH-24776) (GH-32395)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
(cherry picked from commit 1d0f08fa46b54f5a9b43a916b66d50b97d56cf36)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>