]> git.ipfire.org Git - thirdparty/Python/cpython.git/log
thirdparty/Python/cpython.git
2 years ago[3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new...
Serhiy Storchaka [Tue, 6 Dec 2022 15:15:44 +0000 (17:15 +0200)] 
[3.11] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#99949)

It no longer emits a deprecation warning if the current event loop was set.

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years ago[3.11] gh-100001: Remove doc typo, add versionadded (GH-100042) (#100043)
Miss Islington (bot) [Tue, 6 Dec 2022 10:34:20 +0000 (02:34 -0800)] 
[3.11] gh-100001: Remove doc typo, add versionadded (GH-100042) (#100043)

(cherry picked from commit bed15f87eadc726122185cf41efcdda289f4a7b1)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[Enum] Fix typos in the documentation (GH-99960)
Miss Islington (bot) [Tue, 6 Dec 2022 05:46:48 +0000 (21:46 -0800)] 
[Enum] Fix typos in the documentation (GH-99960)

(cherry picked from commit 2ae894b6d1995a3b9f95f4a82eec6dedd3ba5298)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2 years agogh-100001: Also escape \s in http.server log messages. (GH-100038)
Miss Islington (bot) [Mon, 5 Dec 2022 22:53:41 +0000 (14:53 -0800)] 
gh-100001: Also escape \s in http.server log messages. (GH-100038)

Also \ escape \s in the http.server BaseHTTPRequestHandler.log_message so
that it is technically possible to parse the line and reconstruct what the
original data was.  Without this a \xHH is ambiguious as to if it is a hex
replacement we put in or the characters r"\x" came through in the original
request line.
(cherry picked from commit 7e29398407dbd53b714702abb89aa2fd7baca48a)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years agogh-100001: Omit control characters in http.server stderr logs. (GH-100002)
Miss Islington (bot) [Mon, 5 Dec 2022 21:39:22 +0000 (13:39 -0800)] 
gh-100001: Omit control characters in http.server stderr logs. (GH-100002)

Replace control characters in http.server.BaseHTTPRequestHandler.log_message with an escaped \xHH sequence to avoid causing problems for the terminal the output is printed to.
(cherry picked from commit d8ab0a4dfa48f881b4ac9ab857d2e9de42f72828)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
2 years ago[3.11] dataclasses.rst: Prevent horizontal scrolling (gh-100025) (gh-100028)
Miss Islington (bot) [Mon, 5 Dec 2022 18:59:34 +0000 (10:59 -0800)] 
[3.11] dataclasses.rst: Prevent horizontal scrolling (gh-100025) (gh-100028)

dataclasses.rst: Prevent horizontal scrolling (gh-100025)
(cherry picked from commit 51ee0a29e9b20c3e4a94a675e73a894ee2fe447b)

Co-authored-by: Ram Rachum <ram@rachum.com>
Co-authored-by: Ram Rachum <ram@rachum.com>
2 years agogh-98680: Add PyBUF_* constants to the Limited API listing (GH-100018)
Miss Islington (bot) [Mon, 5 Dec 2022 17:12:44 +0000 (09:12 -0800)] 
gh-98680: Add PyBUF_* constants to the Limited API listing (GH-100018)

``PyBUF_*`` constants are marked as part of Limited API of Python 3.11+.
These were available in 3.11.0 with `Py_LIMITED_API` defined for 3.11,
and are necessary to use the buffer API. Omitting them in `stable_abi.toml`
was a mistake.
(cherry picked from commit f24738742cc5d3e00409d55ced789cd544b346b5)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years ago[3.11] gh-60203: Revert changes in cycle.__setstate__ (GH-99982) (#100016)
Łukasz Langa [Mon, 5 Dec 2022 16:58:40 +0000 (17:58 +0100)] 
[3.11] gh-60203: Revert changes in cycle.__setstate__ (GH-99982) (#100016)

In case if only True/False be supported as boolean arguments in future,
we should continue to support 1/0 here.
(cherry picked from commit 922a6cf6c265e2763a003291885ff74d46203fc3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-99892: test_unicodedata: skip test on download failure (GH-100011)
Miss Islington (bot) [Mon, 5 Dec 2022 16:07:00 +0000 (08:07 -0800)] 
gh-99892: test_unicodedata: skip test on download failure (GH-100011)

Skip test_normalization() of test_unicodedata if it fails to download
NormalizationTest.txt file from pythontest.net.
(cherry picked from commit 2488c1e1b66366a3a933ff248eff080fabd2351c)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years agogh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006)
Miss Islington (bot) [Mon, 5 Dec 2022 14:07:48 +0000 (06:07 -0800)] 
gh-100005: Skip test_script_as_dev_fd() on FreeBSD (GH-100006)

On FreeBSD, skip test_script_as_dev_fd() of test_cmd_line_script if
fdescfs is not mounted (at /dev/fd).
(cherry picked from commit 038b151963d9d4a5f4c852544fb5b0402ffcb218)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684) (#99973)
Luke Garland [Mon, 5 Dec 2022 12:38:25 +0000 (05:38 -0700)] 
[3.11] bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684) (#99973)

bpo-40882: Fix a memory leak in SharedMemory on Windows (GH-20684)

In multiprocessing.shared_memory.SharedMemory(), the temporary view
returned by MapViewOfFile() should be unmapped when it is no longer
needed.

(cherry picked from commit 85c128e34daec7625b74746e127afa25888ccde1)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2 years agogh-93464: [Enum] Add versionchanged tag (GH-99997)
Miss Islington (bot) [Mon, 5 Dec 2022 10:45:37 +0000 (02:45 -0800)] 
gh-93464: [Enum] Add versionchanged tag (GH-99997)

(cherry picked from commit e3a3863cb9561705d3dd59a9367427ed45dfb5ea)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agogh-98458: unittest: bugfix for infinite loop while handling chained exceptions that...
Miss Islington (bot) [Sun, 4 Dec 2022 20:06:42 +0000 (12:06 -0800)] 
gh-98458: unittest: bugfix for infinite loop while handling chained exceptions that contain cycles (GH-98459)

* Bugfix addressing infinite loop while handling self-referencing chained exception in TestResult._clean_tracebacks()
* Bugfix extended to properly handle exception cycles in _clean_tracebacks. The "seen" set follows the approach used in the TracebackException class (thank you @iritkatriel for pointing it out)
* adds a test for a single chained exception that holds a self-loop in its __cause__ and __context__ attributes
(cherry picked from commit 72ec518203c3f3577a5e888b12f10bb49060e6c2)

Co-authored-by: AlexTate <0xalextate@gmail.com>
2 years agogh-60203: Always pass True/False as boolean arguments in tests (GH-99983)
Miss Islington (bot) [Sun, 4 Dec 2022 12:50:46 +0000 (04:50 -0800)] 
gh-60203: Always pass True/False as boolean arguments in tests (GH-99983)

Unless we explicitly test non-bool values.
(cherry picked from commit 76f43fc09af29401cc0cec7710b03e4dbf8a4578)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-99886: Fix crash when freeing objects with managed dictionaries (#99902)
Ken Jin [Sun, 4 Dec 2022 06:41:23 +0000 (14:41 +0800)] 
[3.11] gh-99886: Fix crash when freeing objects with managed dictionaries (#99902)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years agogh-85747: "Preface" section of asyncio-eventloop.rst: Switch to active voice and...
Miss Islington (bot) [Sun, 4 Dec 2022 00:59:06 +0000 (16:59 -0800)] 
gh-85747: "Preface" section of asyncio-eventloop.rst: Switch to active voice and suggest other edits (GH-99784)

(cherry picked from commit bf26bdf6ac04878fc720e78422991aaedb9808a1)

Co-authored-by: Brian Skinn <brian.skinn@gmail.com>
2 years agogh-99934: test_marshal.py: add more elements in test_deterministic_sets (GH-99935)
Miss Islington (bot) [Sat, 3 Dec 2022 17:18:23 +0000 (09:18 -0800)] 
gh-99934: test_marshal.py: add more elements in test_deterministic_sets (GH-99935)

Existing elements do produce different output on x86_64, but they
do not on x86. Let's make the data longer to ensure it differs.
(cherry picked from commit c68573b339320409b038501fdd7d4f8a56766275)

Co-authored-by: Alexander Kanavin <alex.kanavin@gmail.com>
2 years agogh-99845: _PyObject_DictPointer(): fix dictoffset cast (#99922)
Victor Stinner [Thu, 1 Dec 2022 13:07:58 +0000 (14:07 +0100)] 
gh-99845: _PyObject_DictPointer(): fix dictoffset cast (#99922)

Cast size_t to Py_ssize_t, rather than casting it to long. On 64-bit
Windows, long is 32-bit whereas Py_ssize_t is 64-bit.

2 years ago[3.11] gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declara… (GH-99919)
Sam James [Thu, 1 Dec 2022 10:26:56 +0000 (10:26 +0000)] 
[3.11] gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declara… (GH-99919)

…tion warnings in configure.ac (GH-99406)

Follow up to 12078e78f6e4a21f344e4eaff529e1ff3b97734f. (cherry picked from commit e35ca417fe81a64985c2b29e863ce418ae75b96e)

2 years ago[3.11] gh-99891: Fix infinite recursion in the tokenizer when showing warnings (GH...
Pablo Galindo Salgado [Thu, 1 Dec 2022 08:57:04 +0000 (08:57 +0000)] 
[3.11] gh-99891: Fix infinite recursion in the tokenizer when showing warnings (GH-99893) (GH-99896)

Automerge-Triggered-By: GH:pablogsal.
(cherry picked from commit 417206a05c4545bde96c2bbbea92b53e6cac0d48)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years agogh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194)
Miss Islington (bot) [Wed, 30 Nov 2022 23:31:49 +0000 (15:31 -0800)] 
gh-96192: fix os.ismount() to use a path that is str or bytes (GH-96194)

(cherry picked from commit 367f552129341796d75fc4cc40edb49405235a2b)

Co-authored-by: Christoph Anton Mitterer <calestyo@scientia.org>
Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years ago[3.11] GH-98906 ```re``` module: ```search() vs. match()``` section should mention...
Miss Islington (bot) [Wed, 30 Nov 2022 23:14:36 +0000 (15:14 -0800)] 
[3.11] GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916) (GH-99912)

GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916)

Mention fullmatch along with search and match.
(cherry picked from commit e0f91deb5930ecb02e7f8ced9bd82609e6889fb0)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2 years agobpo-47220: Document the optional callback parameter of weakref.WeakMethod (GH-25491)
Miss Islington (bot) [Wed, 30 Nov 2022 19:53:04 +0000 (11:53 -0800)] 
bpo-47220: Document the optional callback parameter of weakref.WeakMethod (GH-25491)

(cherry picked from commit 9628136fac997847b4662e6a17faf06d2a0507eb)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2 years agogh-82836: fix private network check (GH-97733)
Miss Islington (bot) [Tue, 29 Nov 2022 22:12:57 +0000 (14:12 -0800)] 
gh-82836: fix private network check (GH-97733)

Fixes private checks for network objects. The previous method would incorrectly return True for a private check in cases such as "0.0.0.0/0".
(cherry picked from commit ed391090cc8332406e6225d40877db6ff44a7104)

Co-authored-by: Pete Wicken <2273100+JamoBox@users.noreply.github.com>
2 years agoDocs: improve accuracy of socketserver reference (GH-24767)
Miss Islington (bot) [Tue, 29 Nov 2022 20:43:09 +0000 (12:43 -0800)] 
Docs: improve accuracy of socketserver reference (GH-24767)

(cherry picked from commit 052bc128ac0bcafd36a0cbee5f4c2a10d74468dc)

Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
2 years agowhatsnew-3.10: Mention PEP 647 in the Release highlights section. (GH-99853)
Miss Islington (bot) [Tue, 29 Nov 2022 20:41:05 +0000 (12:41 -0800)] 
whatsnew-3.10: Mention PEP 647 in the Release highlights section. (GH-99853)

Mention PEP 647 in the Release highlights section.

Also re-ordered the list so it matches the order in the details sections below.
(cherry picked from commit d74a58872c243bc766055d42f8280721629e3c82)

Co-authored-by: Yilei "Dolee" Yang <yileiyang@google.com>
2 years agogh-90717: Update the documentation for the altchars paremeter in base64 library ...
Miss Islington (bot) [Tue, 29 Nov 2022 16:29:03 +0000 (08:29 -0800)] 
gh-90717: Update the documentation for the altchars paremeter in base64 library (GH-94187)

(cherry picked from commit 05dfc539c2de34021e44f621f2b7b993682ee200)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
2 years agogh-99344, gh-99379, gh-99382: Fix issues in substitution of ParamSpec and TypeVarTupl...
Miss Islington (bot) [Tue, 29 Nov 2022 14:46:53 +0000 (06:46 -0800)] 
gh-99344, gh-99379, gh-99382: Fix issues in substitution of ParamSpec and TypeVarTuple (GH-99412)

* Fix substitution of TypeVarTuple and ParamSpec together in user generics.

* Fix substitution of ParamSpec followed by TypeVarTuple in generic aliases.

* Check the number of arguments in substitution in user generics containing a
  TypeVarTuple and one or more TypeVar.
(cherry picked from commit 8f2fb7dfe72c882e97e524ef7ce40ceb663cc27e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years ago[3.11] gh-99811: Use correct variable to search for time in format string (GH-99812...
Miss Islington (bot) [Mon, 28 Nov 2022 19:16:49 +0000 (11:16 -0800)] 
[3.11] gh-99811: Use correct variable to search for time in format string (GH-99812) (GH-99851)

(cherry picked from commit 1d1bb95abdcafe92c771fb3dc4722351b032cc24)
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
2 years ago`fnmatch` docs: link to `fnmatch.filter()`, not `builtins.filter()` (GH-99819)
Miss Islington (bot) [Mon, 28 Nov 2022 18:17:07 +0000 (10:17 -0800)] 
`fnmatch` docs: link to `fnmatch.filter()`, not `builtins.filter()` (GH-99819)

(cherry picked from commit ca3e611b1f620eabb657ef08a95d5f5f554ea773)

Co-authored-by: Matthew Hughes <34972397+matthewhughes934@users.noreply.github.com>
2 years agogh-99249: Clarify "read-only" slots tp_bases & tp_mro (GH-99342)
Miss Islington (bot) [Mon, 28 Nov 2022 11:25:04 +0000 (03:25 -0800)] 
gh-99249: Clarify "read-only" slots tp_bases & tp_mro (GH-99342)

These slots are marked "should be treated as read-only" in the
table at the start of the document.  That doesn't say anything about
setting them in the static struct.

`tp_bases` docs did say that it should be ``NULL`` (TIL!). If you
ignore that, seemingly nothing bad happens. However, some slots
may not be inherited, depending on which sub-slot structs are present.
(FWIW, NumPy sets tp_bases and is affected by the quirk -- though to
be fair, its DUAL_INHERIT code probably predates tp_bases docs, and
also the result happens to be benign.)

This patch makes things explicit.
It also makes the summary table legend easier to scan.

(cherry picked from commit 219696abb240607d3f807853c4c180825e60716e)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years ago[3.11] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and segfaults (GH...
Kumar Aditya [Mon, 28 Nov 2022 11:17:33 +0000 (16:47 +0530)] 
[3.11] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and segfaults (GH-18640) (#99841)

Co-authored-by: Oren Milman <orenmn@gmail.com>
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit 53eef27133c1da395b3b4d7ce0ab1d5b743ffb41)

2 years agobpo-41825: restructure docs for the os.wait*() family (GH-22356)
Miss Islington (bot) [Mon, 28 Nov 2022 09:48:52 +0000 (01:48 -0800)] 
bpo-41825: restructure docs for the os.wait*() family (GH-22356)

(cherry picked from commit 492dc02b01828f346dd62412fefc654e781de923)

Co-authored-by: Georg Brandl <georg@python.org>
2 years agogh-51524: Fix bug when calling trace.CoverageResults with valid infile (GH-99629)
Miss Islington (bot) [Mon, 28 Nov 2022 07:15:00 +0000 (23:15 -0800)] 
gh-51524: Fix bug when calling trace.CoverageResults with valid infile (GH-99629)

(cherry picked from commit 594de165bf2f21d6b28eb17003ea78fc20c0ffed)

Co-authored-by: Furkan Onder <furkanonder@protonmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years agoDocs: both sqlite3 "point examples" now adapt to str (GH-99823)
Miss Islington (bot) [Sun, 27 Nov 2022 21:21:00 +0000 (13:21 -0800)] 
Docs: both sqlite3 "point examples" now adapt to str (GH-99823)

(cherry picked from commit 276643e207d44c53b87a8108d5b00982defcce1e)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2 years agogh-91340: Document multiprocessing.set_start_method force parameter (GH-32339)
Miss Islington (bot) [Sun, 27 Nov 2022 18:05:59 +0000 (10:05 -0800)] 
gh-91340: Document multiprocessing.set_start_method force parameter (GH-32339)

GH-91340

https://bugs.python.org/issue47184
(cherry picked from commit dfc2732a57e3ea6603d62f769d4f9c80be726fa4)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Automerge-Triggered-By: GH:kumaraditya303
2 years agoGH-87235: Make sure "python /dev/fd/9 9</path/to/script.py" works on macOS (GH-99768)
Miss Islington (bot) [Sun, 27 Nov 2022 11:19:02 +0000 (03:19 -0800)] 
GH-87235: Make sure "python /dev/fd/9 9</path/to/script.py" works on macOS (GH-99768)

On macOS all file descriptors for a particular file in /dev/fd
share the same file offset, that is ``open("/dev/fd/9", "r")`` behaves
more like ``dup(9)`` than a regular open.

This causes problems when a user tries to run "/dev/fd/9" as a script
because zipimport changes the file offset to try to read a zipfile
directory. Therefore change zipimport to reset the file offset after
trying to read the zipfile directory.
(cherry picked from commit d08fb257698e3475d6f69bb808211d39e344e5b2)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years agodoc: Remove backslashes in doctest grammar docs (GH-29346)
Miss Islington (bot) [Sun, 27 Nov 2022 06:46:33 +0000 (22:46 -0800)] 
doc: Remove backslashes in doctest grammar docs (GH-29346)

(cherry picked from commit 22860dbbc8b53954055847d2bb036af68b4ea409)

Co-authored-by: George Zhang <geetransit@gmail.com>
2 years agobpo-43327: Fix the docs for PyImport_ImportFrozenModuleObject() (GH-24659)
Miss Islington (bot) [Sun, 27 Nov 2022 06:37:08 +0000 (22:37 -0800)] 
bpo-43327: Fix the docs for PyImport_ImportFrozenModuleObject() (GH-24659)

The docs stated that PyImport_ImportFrozenModuleObject() returns a
new reference, but it actually returns an int.

(cherry picked from commit 62a5dc13e941d01beb215db4218a10977914ab55)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years agogh-91078: Return None from TarFile.next when the tarfile is empty (GH-91850)
Miss Islington (bot) [Sat, 26 Nov 2022 19:01:20 +0000 (11:01 -0800)] 
gh-91078: Return None from TarFile.next when the tarfile is empty (GH-91850)

(cherry picked from commit 78365b8e283c78e23725748500f48dd2c2ca1161)

Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agogh-99795: Fix typo in importlib.resources.abc (GH-99796)
Miss Islington (bot) [Sat, 26 Nov 2022 18:12:23 +0000 (10:12 -0800)] 
gh-99795: Fix typo in importlib.resources.abc (GH-99796)

Changing TraversableReader to TraversableResources at one place of the documentation.

See GH-99795 for more details.
(cherry picked from commit 5f8898216e7b67b7de6b0b1aad9277e88bcebfdb)

Co-authored-by: busywhitespace <busywhitespace@tuta.io>
2 years agogh-97966: Restore prior expectation that uname_result._fields and ._asdict would...
Miss Islington (bot) [Sat, 26 Nov 2022 13:53:00 +0000 (05:53 -0800)] 
gh-97966: Restore prior expectation that uname_result._fields and ._asdict would include the processor. (gh-98343)

(cherry picked from commit dc063a25d29840d863b15c86fdab15b4a1894c73)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2 years agoGH-95896: posixmodule.c: fix osdefs.h inclusion to not depend on compiler (GH-95897)
Miss Islington (bot) [Sat, 26 Nov 2022 09:57:49 +0000 (01:57 -0800)] 
GH-95896: posixmodule.c: fix osdefs.h inclusion to not depend on compiler (GH-95897)

(cherry picked from commit ec2b76aa8b7c6313293ff9c6814e8bc31e08fcaf)

Co-authored-by: TheShermanTanker <32636402+TheShermanTanker@users.noreply.github.com>
Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] gh-99502: mention bytes-like objects as input in `secrets.compare_digest`...
Miss Islington (bot) [Sat, 26 Nov 2022 09:49:23 +0000 (01:49 -0800)] 
[3.11] gh-99502: mention bytes-like objects as input in `secrets.compare_digest` (GH-99512) (#99791)

gh-99502: mention bytes-like objects as input in `secrets.compare_digest` (GH-99512)

Now it is in sync with https://docs.python.org/3/library/hmac.htmlGH-hmac.compare_digest
It is the same function, just re-exported. So, I guess they should mention the same input types.
(cherry picked from commit 47d673d81fc315069c14f9438ebe61fb70ef1ccc)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoFix typo in `__match_args__` doc (GH-99785)
Miss Islington (bot) [Sat, 26 Nov 2022 00:10:48 +0000 (16:10 -0800)] 
Fix typo in `__match_args__` doc (GH-99785)

A opy of GH-98549, whose author (@icecream17) uses a school computer that blocks the CLA site. I did not mention this in commit comment above so CLA bot does not pick up the name and request the CLA again.
(cherry picked from commit a86d8545221b16e714ffe3bda5afafc1d4748d13)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2 years ago[3.11] Fix misspelling in docs for http.HTTPMethod (GH-99376) (#99451)
Miss Islington (bot) [Fri, 25 Nov 2022 23:26:50 +0000 (15:26 -0800)] 
[3.11] Fix misspelling in docs for http.HTTPMethod (GH-99376) (#99451)

Fix misspelling in docs for http.HTTPMethod (GH-99376)
(cherry picked from commit f0d12ca0e0e31b678448b6192ebaf9720228d4fa)

Co-authored-by: Matt Harasymczuk <github.com@haras.pl>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
2 years agogh-64019: Have attribute table in `inspect` docs link to module attributes instead...
Miss Islington (bot) [Fri, 25 Nov 2022 22:06:45 +0000 (14:06 -0800)] 
gh-64019: Have attribute table in `inspect` docs link to module attributes instead of listing them (GH-98116)

(cherry picked from commit 7d2dcc53d09fe903329926bf7bbfe460b1465dab)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Michael Anckaert <michael.anckaert@sinax.be>
2 years ago[3.11] gh-85073: Add some missing links to source (GH-99363) (#99586)
Miss Islington (bot) [Fri, 25 Nov 2022 17:49:40 +0000 (09:49 -0800)] 
[3.11] gh-85073: Add some missing links to source (GH-99363) (#99586)

gh-85073: Add some missing links to source (GH-99363)

Add some missing links to source from Python docs
(cherry picked from commit 27d8dc2c9d3de886a884f79f0621d4586c0e0f7a)

Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
2 years agobpo-38031: Fix a possible assertion failure in _io.FileIO() (GH-GH-5688)
Miss Islington (bot) [Fri, 25 Nov 2022 13:20:00 +0000 (05:20 -0800)] 
bpo-38031: Fix a possible assertion failure in _io.FileIO() (GH-GH-5688)

(cherry picked from commit d386115039e75c332c8471c239cf7dc5dee791a7)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2 years agogh-96168: Add sqlite3 row factory how-to (GH-99507)
Miss Islington (bot) [Fri, 25 Nov 2022 13:15:09 +0000 (05:15 -0800)] 
gh-96168: Add sqlite3 row factory how-to (GH-99507)

(cherry picked from commit 8749121b07f48994ea47f2e7ff75fb13c13953f6)

Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
2 years agoFix rendering of audioop license in Doc/license.rst (GH-99752)
Miss Islington (bot) [Thu, 24 Nov 2022 16:29:21 +0000 (08:29 -0800)] 
Fix rendering of audioop license in Doc/license.rst (GH-99752)

Also some cosmetic blank line additions for consistency with the
formatting of the rest of the file.
(cherry picked from commit b5b3904f05e77f044f158307bc6bdd2bc1b670a2)

Co-authored-by: Zachary Ware <zach@python.org>
2 years agogh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)
Miss Islington (bot) [Thu, 24 Nov 2022 09:45:40 +0000 (01:45 -0800)] 
gh-98872: Fix a possible resource leak in Python 3.11.0 (GH-99047)

Issue: GH-98872
(cherry picked from commit 4e5f2db6f228d45a655cf22fd587792d56116145)

Co-authored-by: SQLPATCH <95843853+SQLPATCH@users.noreply.github.com>
Automerge-Triggered-By: GH:kumaraditya303
2 years agoUse faster APIs to calculate paths at startup for Store packaged Python on Windows...
Miss Islington (bot) [Wed, 23 Nov 2022 20:12:34 +0000 (12:12 -0800)] 
Use faster APIs to calculate paths at startup for Store packaged Python on Windows (GH-99345)

(cherry picked from commit 71a4a2da983a651bfcbc1be59c6e27508cdd05c6)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection raises...
Dong Uk, Kang [Wed, 23 Nov 2022 18:37:24 +0000 (03:37 +0900)] 
[3.11] gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection raises (GH-95739) (#99721)

Break reference cycles to resolve memory leak, by
removing local exception and future instances from the frame.
(cherry picked from commit 995f6170c78570eca818f7e7dbd8a7661c171a81)

Co-authored-by: Dong Uk, Kang <nailbrainz@gmail.com>
2 years agogh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)
Miss Islington (bot) [Wed, 23 Nov 2022 11:08:22 +0000 (03:08 -0800)] 
gh-99619: fix error in documentation of ExceptionGroup.derive() (GH-99621)

(cherry picked from commit 5d9183c7ad68eb9ddb53d54a3f9a27e29dbabf31)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agoGH-95283: Add note about compilers in Mac/README.txt (GH-99506)
Miss Islington (bot) [Wed, 23 Nov 2022 11:03:43 +0000 (03:03 -0800)] 
GH-95283: Add note about compilers in Mac/README.txt (GH-99506)

The build machinery assumes that the compiler that's used
to build on macOS includes an SDK that's at least as new
as the OS version on the build machine. Explicitly mention
this in Mac/README.txt.
(cherry picked from commit 8f024a02d7d63315ecc3479f0715e927f48fc91b)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99650 : Updated argparse docs (GH-99653) (GH-99705)
Miss Islington (bot) [Tue, 22 Nov 2022 22:17:20 +0000 (14:17 -0800)] 
[3.11] gh-99650 : Updated argparse docs (GH-99653) (GH-99705)

2 years agoGH-92892: Add section about variadic functions to ctypes documentation (GH-99529)
Miss Islington (bot) [Tue, 22 Nov 2022 18:57:09 +0000 (10:57 -0800)] 
GH-92892: Add section about variadic functions to ctypes documentation (GH-99529)

On some platforms, and in particular macOS/arm64, the calling
convention for variadic arguments is different from the regular
calling convention. Add a section to the documentation to document
this.
(cherry picked from commit bc3a11d21ddef28047b18c0f6a5068fa9fb16da2)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99146 struct module documentation should have more predictable examples...
Miss Islington (bot) [Tue, 22 Nov 2022 18:16:59 +0000 (10:16 -0800)] 
[3.11] gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141) (GH-99702)

gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141)

* nail down a couple examples to have more predictable output

* update a number of things, but this is really just a stash...

* added an applications section to describe typical uses for native and machine-independent formats

* make sure all format strings use a format prefix character

* responding to comments from @gpshead. Not likely finished yet.

* This got more involved than I expected...

* respond to several PR comments
* a lot of wordsmithing
* try and be more consistent in use of ``x`` vs ``'x'``
* expand examples a bit
* update the "see also" to be more up-to-date
* original examples relied on import * so present all examples as if

* reformat based on @gpshead comment (missed before)

* responding to comments

* missed this

* one more suggested edit

* wordsmithing
(cherry picked from commit 22d91c16bb03c3d87f53b5fee10325b876262a78)

Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
2 years ago[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646...
Serhiy Storchaka [Tue, 22 Nov 2022 17:02:56 +0000 (19:02 +0200)] 
[3.11] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646) (GH-99698)

Now addClassCleanup() uses separate lists for different TestCase subclasses,
and doClassCleanups() only cleans up the particular class.

(cherry picked from commit c2102136be569e6fc8ed90181f229b46d07142f8)

2 years agogh-93937: Document PyFrame_Check and PyFrame_Type (GH-99695)
Miss Islington (bot) [Tue, 22 Nov 2022 15:50:39 +0000 (07:50 -0800)] 
gh-93937: Document PyFrame_Check and PyFrame_Type (GH-99695)

(cherry picked from commit d15b9f19ac0ffb29b646735d69b29f48a71c247f)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
2 years ago[3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693)
Serhiy Storchaka [Tue, 22 Nov 2022 15:46:18 +0000 (17:46 +0200)] 
[3.11] gh-99016: Make build scripts compatible with Python 3.8 (GH-99017). (GH-99693)

(cherry picked from commit f520d720f667c87f7b70ed86ea58d73892d6b969)

2 years agoGH-97001: Release GIL in termios extension (GH-99503)
Miss Islington (bot) [Tue, 22 Nov 2022 11:28:06 +0000 (03:28 -0800)] 
GH-97001: Release GIL in termios extension (GH-99503)

Without releasing the GIL calls to termios APIs might block the entire interpreter.
(cherry picked from commit 959ba45d75953caa911e16b4c2a277978fc4b9b0)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years agogh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)
Miss Islington (bot) [Tue, 22 Nov 2022 11:03:26 +0000 (03:03 -0800)] 
gh-99341: Cover type ignore nodes when incrementing line numbers (GH-99422)

(cherry picked from commit 1acdfec359fdf3db936168480be0f4157273c200)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2 years agogh-99659: Use correct exceptions in sqlite3 bigmem tests (GH-99660)
Miss Islington (bot) [Tue, 22 Nov 2022 08:51:59 +0000 (00:51 -0800)] 
gh-99659: Use correct exceptions in sqlite3 bigmem tests (GH-99660)

The tests in question were added in 0eec6276fdcd by Serhiy. Apparently,
sqlite3 changed exceptions raised in those cases in the mean time but
the tests never ran because they require a high `-M` setting in the
test runner.
(cherry picked from commit 2781ec9b0e41a62cecc189c22dfc849f9a56927c)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
2 years agogh-99662: fix typo in typing.TypeVarTuple docs (GH-99672)
Miss Islington (bot) [Tue, 22 Nov 2022 04:09:49 +0000 (20:09 -0800)] 
gh-99662: fix typo in typing.TypeVarTuple docs (GH-99672)

(cherry picked from commit 1bf983ce7eb8bfd17dc18102b61dfbdafe0deda2)

Co-authored-by: GabrielAnguita <60579349+GabrielAnguita@users.noreply.github.com>
2 years ago[3.11] gh-99103: Normalize specialized traceback anchors against the current line...
Batuhan Taskaya [Mon, 21 Nov 2022 22:16:12 +0000 (01:16 +0300)] 
[3.11] gh-99103: Normalize specialized traceback anchors against the current line (#99423)

[3.11] gh-99103: Normalize specialized traceback anchors against the current line (GH-99145)

Automerge-Triggered-By: GH:isidentical.
(cherry picked from commit 57be5459593bbd09583317ebdafc4d58ae51dbf4)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
2 years agogh-98629: Fixes sys._git and sys.version creation on Windows (GH-99664)
Miss Islington (bot) [Mon, 21 Nov 2022 21:13:52 +0000 (13:13 -0800)] 
gh-98629: Fixes sys._git and sys.version creation on Windows (GH-99664)

(cherry picked from commit 49e554dbafc87245c1364ae00ad064a96f5cb995)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] Revert "[3.11] gh-98724: Fix Py_CLEAR() macro side effects (#99100)" (#99573)
Victor Stinner [Mon, 21 Nov 2022 17:01:10 +0000 (18:01 +0100)] 
[3.11] Revert "[3.11] gh-98724: Fix Py_CLEAR() macro side effects (#99100)" (#99573)

Revert "gh-98724: Fix Py_CLEAR() macro side effects (#99100) (#99288)"

This reverts commit 108289085719db8b227d65ce945e806f91be8f80.

2 years agoAdd more details in test_unittest (GH-99626)
Miss Islington (bot) [Mon, 21 Nov 2022 12:23:09 +0000 (04:23 -0800)] 
Add more details in test_unittest (GH-99626)

(cherry picked from commit 653e563d80fabee8830e0b55f194f82a9beabe70)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-99578: Fix refleak in _imp.create_builtin() (GH-99642)
Miss Islington (bot) [Mon, 21 Nov 2022 11:43:23 +0000 (03:43 -0800)] 
gh-99578: Fix refleak in _imp.create_builtin() (GH-99642)

Fix a reference bug in _imp.create_builtin() after the creation of
the first sub-interpreter for modules "builtins" and "sys".
(cherry picked from commit cb2ef8b2acbb231c207207d3375b2f8b0077a6ee)

Co-authored-by: Victor Stinner <vstinner@python.org>
2 years ago[3.11] GH-95815: Document less specific error for os.remove (GH-99571) (#99641)
Miss Islington (bot) [Mon, 21 Nov 2022 11:04:55 +0000 (03:04 -0800)] 
[3.11] GH-95815: Document less specific error for os.remove (GH-99571) (#99641)

GH-95815: Document less specific error for os.remove (GH-99571)

os.remove can raise PermissionError instead of IsADirectoryError,
when the object to be removed is a directory (in particular on
macOS).

This reverts a change done in GH-14262.
(cherry picked from commit 1cae31d26ba621f6b1f0656ad3d69a0236338bad)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years ago[3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)
Miss Islington (bot) [Mon, 21 Nov 2022 10:22:10 +0000 (02:22 -0800)] 
[3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638)

gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470)

Fix a number of compile errors with GCC-12 on macOS:

1. In pylifecycle.c the compile rejects _Pragma within a declaration
2. posixmodule.c was missing a number of ..._RUNTIME macros for non-clang on macOS
3. _ctypes assumed that __builtin_available is always present on macOS
(cherry picked from commit cdde29dde90947df9bac39c1d19479914fb3db09)

Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
2 years agogh-99581: Fix a buffer overflow in the tokenizer when copying lines that fill the...
Miss Islington (bot) [Sun, 20 Nov 2022 20:53:02 +0000 (12:53 -0800)] 
gh-99581: Fix a buffer overflow in the tokenizer when copying lines that fill the available buffer (GH-99605)

(cherry picked from commit e13d1d9dda8c27691180bc618bd5e9bf43dfa89f)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2 years ago[3.11] gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215...
Lysandros Nikolaou [Sun, 20 Nov 2022 18:29:05 +0000 (19:29 +0100)] 
[3.11] gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215) (GH-99622)

gh-99211: Point to except/except* on syntax errors when mixing them (GH-99215)

(cherry picked from commit 9c4232ae8972a33f84e875cfdd866318a1233e47)

2 years ago[3.11] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode...
Serhiy Storchaka [Sun, 20 Nov 2022 09:24:45 +0000 (11:24 +0200)] 
[3.11] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH-99431). (GH-99614)

(cherry picked from commit 06d4e02c3b3526b5d90e41a0a0befa8663e08f27)

2 years agoDoc: Make functions.html readable again. (GH-99476)
Miss Islington (bot) [Sat, 19 Nov 2022 10:58:32 +0000 (02:58 -0800)] 
Doc: Make functions.html readable again. (GH-99476)

(cherry picked from commit 858cb79486b504b2645c1ee3bfdca4f386bcb7d7)

Co-authored-by: Julien Palard <julien@palard.fr>
2 years ago[3.11] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (#99365)
Miss Islington (bot) [Sat, 19 Nov 2022 10:10:42 +0000 (02:10 -0800)] 
[3.11] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (#99365)

gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095)
(cherry picked from commit 67b4d2772c5124b908f8ed9b13166a79bbeb88d2)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agoDoc: Replace question mark with fullstop (GH-99558)
Miss Islington (bot) [Fri, 18 Nov 2022 19:34:10 +0000 (11:34 -0800)] 
Doc: Replace question mark with fullstop (GH-99558)

The sentence "Set the LC_CTYPE locale to the user preferred locale." should end with a period
instead of a question mark.
(cherry picked from commit 0e09d2cc59cad61ad6a7a79aade52e9a2cfa7b34)

Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
2 years agogh-99442: Fix handling in py.exe launcher when argv[0] does not include a file extens...
Miss Islington (bot) [Fri, 18 Nov 2022 17:49:14 +0000 (09:49 -0800)] 
gh-99442: Fix handling in py.exe launcher when argv[0] does not include a file extension (GH-99542)

(cherry picked from commit a220c6d1ee3053895f502b43b47dc3a9c55fa6a3)

2 years agogh-99553: fix bug where an ExceptionGroup subclass can wrap a BaseException (GH-99572)
Miss Islington (bot) [Fri, 18 Nov 2022 16:10:55 +0000 (08:10 -0800)] 
gh-99553: fix bug where an ExceptionGroup subclass can wrap a BaseException (GH-99572)

(cherry picked from commit c8c6113398ee9a7867fe9b08bc539cceb61e2aaa)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
2 years agogh-99443: `descr_set_trampoline_call` return type should be `int` not `PyObject*...
Miss Islington (bot) [Wed, 16 Nov 2022 23:50:50 +0000 (15:50 -0800)] 
gh-99443: `descr_set_trampoline_call` return type should be `int` not `PyObject*` (GH-99444)

(cherry picked from commit bc390dd93574c3c6773958c6a7e68adc83d0bf3f)

Co-authored-by: Hood Chatham <roberthoodchatham@gmail.com>
2 years agogh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523)
Miss Islington (bot) [Wed, 16 Nov 2022 23:41:18 +0000 (15:41 -0800)] 
gh-99370: Prefer LIBDIR from sysconfig when locating libpython for test (GH-99523)

(cherry picked from commit 7c57857340befcb90394bc347c904ca62049b684)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years ago[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code...
Hood Chatham [Wed, 16 Nov 2022 16:09:34 +0000 (08:09 -0800)] 
[3.11] GH-99460: Emscripten trampolines on optimized METH_O and METH_NOARGS code paths (gh-99461) (#99514)

Manual backport of GH-99461.

2 years agogh-98940: Fix Mac/Extras.install.py File filter bug (GH-98943)
Miss Islington (bot) [Wed, 16 Nov 2022 09:45:31 +0000 (01:45 -0800)] 
gh-98940: Fix Mac/Extras.install.py File filter bug (GH-98943)

Slightly simplify the script and fix a case issue in the name of ``.DS_Store`` files.

(cherry picked from commit ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c)

Co-authored-by: zhangbo <zhangbo2012@outlook.com>
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agogh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc...
Miss Islington (bot) [Tue, 15 Nov 2022 21:10:27 +0000 (13:10 -0800)] 
gh-87604: Avoid publishing list of active per-interpreter audit hooks via the gc module (GH-99373)

(cherry picked from commit 4e4b13e8f6211abbc0d53056da11357756daa314)

Co-authored-by: Steve Dower <steve.dower@python.org>
2 years agoGH-98219: reduce sleep time in `asyncio` subprocess test (GH-99464)
Miss Islington (bot) [Tue, 15 Nov 2022 15:52:38 +0000 (07:52 -0800)] 
GH-98219: reduce sleep time in `asyncio` subprocess test (GH-99464)

(cherry picked from commit 619cadcda6a8ba4a038c1807b6566a90e25db934)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2 years agogh-99370: fix test_zippath_from_non_installed_posix (GH-99483)
Miss Islington (bot) [Tue, 15 Nov 2022 01:27:42 +0000 (17:27 -0800)] 
gh-99370: fix test_zippath_from_non_installed_posix (GH-99483)

When build with shared enabled, we need to set `LD_LIBRARY_PATH`
for the non-installed python environment in
test_zippath_from_non_installed_posix so that the python binary
and find and link the libpython.so.
(cherry picked from commit 1df0752b4d49103654abbc75c06b4dc0cf99de1c)

Co-authored-by: Kai Zhang <kylerzhang11@gmail.com>
2 years ago[3.11] gh-99357: Close the event loop when it is no longer used in test_uncancel_stru...
Miss Islington (bot) [Mon, 14 Nov 2022 18:52:10 +0000 (10:52 -0800)] 
[3.11] gh-99357: Close the event loop when it is no longer used in test_uncancel_structured_blocks (GH-99414) (#99424)

(cherry picked from commit 99972dc7450f1266e39202012827f4f3c995b0ca)

Co-authored-by: Xiao Chen <chenxiao_7@163.com>
2 years agogh-99370: Calculate zip path from prefix when in a venv (GH-99371)
Miss Islington (bot) [Mon, 14 Nov 2022 15:31:46 +0000 (07:31 -0800)] 
gh-99370: Calculate zip path from prefix when in a venv (GH-99371)

Before python3.11, when in a venv the zip path is calculated
from prefix on POSIX platforms. In python3.11 the behavior is
accidentally changed to calculating from default prefix. This
change will break venv created from a non-installed python
with a stdlib zip file. This commit restores the behavior back
to before python3.11.
(cherry picked from commit e3d4fed07429670af631e5662086b76c1ec098c4)

Co-authored-by: Kai Zhang <kylerzhang11@gmail.com>
2 years ago[Enum] update version TODO comment (GH-99458)
Miss Islington (bot) [Mon, 14 Nov 2022 05:18:13 +0000 (21:18 -0800)] 
[Enum] update version TODO comment (GH-99458)

(cherry picked from commit db115682bd639a2642c617f0b7d5b30cd7d7f472)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2 years ago[3.11] gh-98930: improve the docstring of signal.strsignal (GH-99290) (#99449)
Gregory P. Smith [Sun, 13 Nov 2022 20:21:19 +0000 (12:21 -0800)] 
[3.11] gh-98930: improve the docstring of signal.strsignal (GH-99290) (#99449)

Improves the docstring on signal.strsignal to make it explain when it returns a message, None, or when it raises ValueError.

Closes GH-98930

Co-authored-by: Gregory P. Smith <greg@krypto.org>.
(cherry picked from commit 88385b856490a5ce3c99160bde6050638f81f72e)

Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
2 years agogh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)
Miss Islington (bot) [Sun, 13 Nov 2022 19:51:26 +0000 (11:51 -0800)] 
gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)

(cherry picked from commit 343eb0f94b26f2a4c1c15505d417e8157ec19660)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
2 years agogh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabe...
Miss Islington (bot) [Sun, 13 Nov 2022 19:00:25 +0000 (11:00 -0800)] 
gh-99418: Make urllib.parse.urlparse enforce that a scheme must begin with an alphabetical ASCII character. (GH-99421)

Prevent urllib.parse.urlparse from accepting schemes that don't begin with an alphabetical ASCII character.

RFC 3986 defines a scheme like this: `scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`
RFC 2234 defines an ALPHA like this: `ALPHA = %x41-5A / %x61-7A`

The WHATWG URL spec defines a scheme like this:
`"A URL-scheme string must be one ASCII alpha, followed by zero or more of ASCII alphanumeric, U+002B (+), U+002D (-), and U+002E (.)."`
(cherry picked from commit 439b9cfaf43080e91c4ad69f312f21fa098befc7)

Co-authored-by: Ben Kallus <49924171+kenballus@users.noreply.github.com>
2 years ago[3.11] gh-98707: configure --with-system-libmpdec and --with-system-expat no longer...
Erlend E. Aasland [Sun, 13 Nov 2022 18:47:31 +0000 (19:47 +0100)] 
[3.11] gh-98707: configure --with-system-libmpdec and --with-system-expat no longer include vendored headers (GH-98711) (#99391)

(cherry picked from commit 6abec1caffdba2e282b14fe57c6ce61974de4bbe)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
2 years agogh-99392: Fix sqlite3 converter recipes (GH-99393)
Miss Islington (bot) [Sat, 12 Nov 2022 19:48:52 +0000 (11:48 -0800)] 
gh-99392: Fix sqlite3 converter recipes (GH-99393)

(cherry picked from commit dfc1b17a23fed933cffa09eec125a7e8c90ea867)

Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
2 years ago[3.11] gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395) (GH-99415)
Miss Islington (bot) [Sat, 12 Nov 2022 18:43:32 +0000 (10:43 -0800)] 
[3.11] gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395) (GH-99415)

gh-99304: [Enum] clarify what constitutes a flag alias (GH-99395)
(cherry picked from commit 73a921b0701a4c135154c14649b49a0bb797e143)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
2 years agobpo-34272: Reorganize C API tests. (GH-8551)
Miss Islington (bot) [Sat, 12 Nov 2022 17:36:42 +0000 (09:36 -0800)] 
bpo-34272: Reorganize C API tests. (GH-8551)

Move some C API tests into Lib/test/test_capi/.
(cherry picked from commit f883b7f8ee3209b52863fc662343c8cd81abdc59)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2 years agogh-80448: argparse: Fix IndexError on store_true action (GH-15656)
Miss Islington (bot) [Sat, 12 Nov 2022 02:30:38 +0000 (18:30 -0800)] 
gh-80448: argparse: Fix IndexError on store_true action (GH-15656)

(cherry picked from commit e02cc6d42aee1f0a9ee629f76576eee478224d9d)

Co-authored-by: Hai Shi <shihai1992@gmail.com>
Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
3 years agogh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)
Miss Islington (bot) [Fri, 11 Nov 2022 13:42:44 +0000 (05:42 -0800)] 
gh-87604: Clarify in docs that sys.addaudithook is not for sandboxes (GH-99372)

(cherry picked from commit c3c3871415c86088d45abcf73ccd2c2b09dc5772)

Co-authored-by: Steve Dower <steve.dower@python.org>