]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Sat, 17 Dec 2022 07:19:54 +0000 (23:19 -0800)]
gh-97909: Fix markup for `PyMethodDef` members (GH-100089)
(cherry picked from commit
8edcb30c3f8bdd8099a093146fedbd9b63a3f667 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Miss Islington (bot) [Sat, 17 Dec 2022 06:53:20 +0000 (22:53 -0800)]
Document that zipfile's pwd parameter is a `bytes` object (GH-100209)
(cherry picked from commit
5ee7eb9debb12914f36c5ccee92460a681516fd6 )
Co-authored-by: JustAnotherArchivist <JustAnotherArchivist@users.noreply.github.com>
colorfulappl [Sat, 17 Dec 2022 06:36:06 +0000 (14:36 +0800)]
[3.10] gh-96002: Add functional test for Argument Clinic (GH-96178) (#100232)
(cherry picked from commit
c450c8c9ed6e420025f39d0e4850a79f8160cdcd )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 16 Dec 2022 19:15:12 +0000 (11:15 -0800)]
gh-99830: asyncio: Document returns of remove_{reader,writer} (GH-100302)
(cherry picked from commit
5234e1cbea686e38392f113707db322ad8405048 )
Co-authored-by: Ben Darnell <ben@bendarnell.com>
Miss Islington (bot) [Fri, 16 Dec 2022 19:02:41 +0000 (11:02 -0800)]
"Compound statement" docs: Fix with-statement step indexing (GH-100286)
Back in commit
226e6e7d4326cf91ef37e13528eb1f62de1bb832
an item was added to the list, renumbering all the rest of the
items, but the forward-reference wasn't updated to match.
(cherry picked from commit
f23236a92d8796ae91772adaf27c3485fda963e8 )
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Miss Islington (bot) [Tue, 13 Dec 2022 11:03:22 +0000 (03:03 -0800)]
GH-100206: use versionadded for the addition of sysconfig.get_default_scheme (GH-100207)
(cherry picked from commit
d3ea82aaf940167482df1e08d6482de8f2dd8526 )
Co-authored-by: Filipe Laíns <lains@riseup.net>
Miss Islington (bot) [Mon, 12 Dec 2022 12:40:09 +0000 (04:40 -0800)]
Fix: typo (Indention) (GH-99904)
Example needed to be indented. Was trying to call a context manger `pr` (from ` with cProfile.Profile() as pr:`) wot perform ` pr.print_stats()` once it had already exited.
(cherry picked from commit
8711b59f7ac1803307d340e357e025043fbe2f39 )
Co-authored-by: jarrodcolburn <jcourtlandcolburn@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
Miss Islington (bot) [Mon, 12 Dec 2022 04:26:30 +0000 (20:26 -0800)]
gh-70393: Clarify mention of "middle" scope (GH-98839)
(cherry picked from commit
70be5e42f6e288de32e0df3c77ac22a9ddf1a74b )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sat, 10 Dec 2022 10:28:51 +0000 (02:28 -0800)]
gh-99728: correct typo in `datetime` format codes documentation (GH-99750)
(cherry picked from commit
d5f8a2b6ad408368e728a389da918cead3ef7ee9 )
Co-authored-by: Brad Wolfe <brad.wolfe@gmail.com>
Miss Islington (bot) [Sat, 10 Dec 2022 09:24:46 +0000 (01:24 -0800)]
gh-100049: fix `repr` for `mappingproxy` in dictionary view example doc (GH-100052)
(cherry picked from commit
7c0fb71fbfa8682f56c15832e2c793a6180f2ec0 )
Co-authored-by: ram vikram singh <ramvikrams243@gmail.com>
Miss Islington (bot) [Fri, 9 Dec 2022 13:17:25 +0000 (05:17 -0800)]
bpo-43984: Allow winreg.SetValueEx to set -1 without treating it as an error (GH-25775)
(cherry picked from commit
a29a7b9b786d6b928c4bb4e6e683a3788e3ab1c1 )
Co-authored-by: Shreyan Avigyan <shreyan.avigyan@gmail.com>
Miss Islington (bot) [Thu, 8 Dec 2022 20:45:32 +0000 (12:45 -0800)]
gh-96250: Improve sqlite3 injection attack example (GH-99270)
(cherry picked from commit
41d4ac9da348ca33056e271d71588b2dc3a6d48d )
Co-authored-by: Jia Junjie <62194633+jiajunjie@users.noreply.github.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Thu, 8 Dec 2022 09:02:28 +0000 (01:02 -0800)]
[3.10] bpo-44817: Ignore additional errors in ntpath.realpath (GH-27574) (GH-100023)
(cherry picked from commit
124ecd657646f808d1d3282c37ee19aae6bcb47f )
Co-authored-by: Michael Förderer <michael.foerderer@gmx.de>
Miss Islington (bot) [Thu, 8 Dec 2022 04:17:35 +0000 (20:17 -0800)]
gh-98778: Update HTTPError to initialize properly even if fp is None (gh-99966)
(cherry picked from commit
dc8a86893df37e137cfe992e95e7d66cd68e9eaf )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Miss Islington (bot) [Wed, 7 Dec 2022 17:24:41 +0000 (09:24 -0800)]
gh-83035: handle decorator with nested parens in inspect.getsource (GH-99654)
(cherry picked from commit
68e41295b8611a990de68f15c89f1eb3dea51867 )
Co-authored-by: Carl Meyer <carl@oddbird.net>
Pablo Galindo Salgado [Wed, 7 Dec 2022 13:52:05 +0000 (13:52 +0000)]
[3.10] gh-100050: Fix an assertion error when raising unclosed parenthesis errors in the tokenizer (GH-100065) (#100073)
Automerge-Triggered-By: GH:pablogsal.
(cherry picked from commit
97e7004cfe48305bcd642c653b406dc7470e196d )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Pablo Galindo [Tue, 6 Dec 2022 21:18:42 +0000 (21:18 +0000)]
Post 3.10.9
Pablo Galindo [Tue, 6 Dec 2022 18:30:42 +0000 (18:30 +0000)]
Python 3.10.9
Łukasz Langa [Tue, 6 Dec 2022 17:40:30 +0000 (18:40 +0100)]
[3.10] gh-93453: Only emit deprecation warning in asyncio.get_event_loop when a new event loop is created (#100059)
It no longer emits a deprecation warning if the current event loop was set.
(cherry picked from commit
3fae04b10e2655a20a3aadb5e0d63e87206d0c67 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Miss Islington (bot) [Tue, 6 Dec 2022 10:34:49 +0000 (02:34 -0800)]
[3.10] gh-100001: Remove doc typo, add versionadded (GH-100042) (#100044)
(cherry picked from commit
bed15f87eadc726122185cf41efcdda289f4a7b1 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Mon, 5 Dec 2022 22:47:57 +0000 (14:47 -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>
Miss Islington (bot) [Mon, 5 Dec 2022 21:16:14 +0000 (13:16 -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>
Eric V. Smith [Mon, 5 Dec 2022 19:19:09 +0000 (14:19 -0500)]
[3.10] dataclasses.rst: Prevent horizontal scrolling (gh-100025). (gh-100029)
(cherry picked from commit
51ee0a29e9b20c3e4a94a675e73a894ee2fe447b )
Co-authored-by: Ram Rachum <ram@rachum.com>
Co-authored-by: Ram Rachum <ram@rachum.com>
Łukasz Langa [Mon, 5 Dec 2022 16:58:30 +0000 (17:58 +0100)]
[3.10] gh-60203: Revert changes in cycle.__setstate__ (GH-99982) (#100017)
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>
Miss Islington (bot) [Mon, 5 Dec 2022 16:05:17 +0000 (08:05 -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>
Miss Islington (bot) [Sun, 4 Dec 2022 19:58:31 +0000 (11:58 -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>
Serhiy Storchaka [Sun, 4 Dec 2022 13:08:24 +0000 (15:08 +0200)]
[3.10] gh-60203: Always pass True/False as boolean arguments in tests (GH-99983) (GH-99989)
Unless we explicitly test non-bool values.
(cherry picked from commit
76f43fc09af29401cc0cec7710b03e4dbf8a4578 )
Miss Islington (bot) [Sun, 4 Dec 2022 00:59:47 +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>
Luke Garland [Fri, 2 Dec 2022 10:13:33 +0000 (03:13 -0700)]
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>
Miss Islington (bot) [Thu, 1 Dec 2022 13:32:15 +0000 (05:32 -0800)]
gh-99845: _PyObject_DictPointer(): fix dictoffset cast (GH-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.
(cherry picked from commit
9707bf228e008485a3fbb63aa7ee28cf88014f91 )
Co-authored-by: Victor Stinner <vstinner@python.org>
Sam James [Thu, 1 Dec 2022 11:02:49 +0000 (11:02 +0000)]
[3.10] GH-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declara… (#99920)
[3.10] gh-99086: Fix -Wstrict-prototypes, -Wimplicit-function-declaration warnings in configure.ac (GH-99406)
Follow up to
12078e78f6e4a21f344e4eaff529e1ff3b97734f .
(cherry picked from commit
e35ca417fe81a64985c2b29e863ce418ae75b96e )
Co-authored-by: Sam James <sam@gentoo.org>
Miss Islington (bot) [Wed, 30 Nov 2022 23:14:47 +0000 (15:14 -0800)]
[3.10] GH-98906 ```re``` module: ```search() vs. match()``` section should mention ```fullmatch()``` (GH-98916) (GH-99913)
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>
Miss Islington (bot) [Tue, 29 Nov 2022 20:41:38 +0000 (12:41 -0800)]
Docs: improve accuracy of socketserver reference (GH-24767)
(cherry picked from commit
052bc128ac0bcafd36a0cbee5f4c2a10d74468dc )
Co-authored-by: Géry Ogam <gery.ogam@gmail.com>
Miss Islington (bot) [Tue, 29 Nov 2022 20:39:16 +0000 (12:39 -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>
Steve Dower [Tue, 29 Nov 2022 16:43:36 +0000 (16:43 +0000)]
gh-90717: Update the documentation for the altchars paremeter in base64 library (GH-94187)
Co-authored-by: Sam Ezeh <sam.z.ezeh@gmail.com>
Miss Islington (bot) [Mon, 28 Nov 2022 19:17:31 +0000 (11:17 -0800)]
[3.10] gh-99811: Use correct variable to search for time in format string (GH-99812) (GH-99852)
(cherry picked from commit
1d1bb95abdcafe92c771fb3dc4722351b032cc24 )
Co-authored-by: cemysce <13400533+cemysce@users.noreply.github.com>
Kumar Aditya [Mon, 28 Nov 2022 11:27:37 +0000 (16:57 +0530)]
[3.10] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and s… (#99842)
[3.10] bpo-31718: Fix io.IncrementalNewlineDecoder SystemErrors and segfaults (GH-18640)
Co-authored-by: Oren Milman <orenmn@gmail.com>
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>.
(cherry picked from commit
53eef27133c1da395b3b4d7ce0ab1d5b743ffb41 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Miss Islington (bot) [Mon, 28 Nov 2022 11:26:05 +0000 (03:26 -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>
Miss Islington (bot) [Mon, 28 Nov 2022 07:08:12 +0000 (23:08 -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>
Miss Islington (bot) [Sun, 27 Nov 2022 21:16:34 +0000 (13:16 -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>
Miss Islington (bot) [Sun, 27 Nov 2022 06:47:07 +0000 (22:47 -0800)]
doc: Remove backslashes in doctest grammar docs (GH-29346)
(cherry picked from commit
22860dbbc8b53954055847d2bb036af68b4ea409 )
Co-authored-by: George Zhang <geetransit@gmail.com>
Miss Islington (bot) [Sun, 27 Nov 2022 06:35:36 +0000 (22:35 -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>
Jason R. Coombs [Sat, 26 Nov 2022 18:22:13 +0000 (13:22 -0500)]
[3.10] gh-99795: Fix typo in importlib.resources.abc (GH-99796) (GH-99800)
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>
Co-authored-by: busywhitespace <busywhitespace@tuta.io>
Miss Islington (bot) [Sat, 26 Nov 2022 13:52:12 +0000 (05:52 -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>
Miss Islington (bot) [Sat, 26 Nov 2022 10:13:30 +0000 (02:13 -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>
Miss Islington (bot) [Sat, 26 Nov 2022 09:49:08 +0000 (01:49 -0800)]
[3.10] gh-99502: mention bytes-like objects as input in `secrets.compare_digest` (GH-99512) (#99790)
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>
Miss Islington (bot) [Sat, 26 Nov 2022 00:11:48 +0000 (16:11 -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>
Miss Islington (bot) [Fri, 25 Nov 2022 13:21:00 +0000 (05:21 -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>
Miss Islington (bot) [Fri, 25 Nov 2022 13:18:41 +0000 (05:18 -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>
Miss Islington (bot) [Thu, 24 Nov 2022 16:27:11 +0000 (08:27 -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>
Miss Islington (bot) [Wed, 23 Nov 2022 20:15:16 +0000 (12:15 -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>
Dong Uk, Kang [Wed, 23 Nov 2022 18:39:04 +0000 (03:39 +0900)]
[3.10] gh-88863: Clear ref cycles to resolve leak when asyncio.open_connection raises (GH-95739) (#99722)
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>
Miss Islington (bot) [Wed, 23 Nov 2022 11:04:16 +0000 (03:04 -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>
Miss Islington (bot) [Tue, 22 Nov 2022 18:57:45 +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>
Miss Islington (bot) [Tue, 22 Nov 2022 18:17:18 +0000 (10:17 -0800)]
[3.10] gh-99146 struct module documentation should have more predictable examples/warnings (GH-99141) (GH-99703)
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>
Serhiy Storchaka [Tue, 22 Nov 2022 17:11:57 +0000 (19:11 +0200)]
[3.10] gh-99645: Fix a bug in handling class cleanups in unittest.TestCase (GH-99646) (GH-99699)
Now addClassCleanup() uses separate lists for different TestCase subclasses,
and doClassCleanups() only cleans up the particular class.
(cherry picked from commit
c2102136be569e6fc8ed90181f229b46d07142f8 )
Serhiy Storchaka [Tue, 22 Nov 2022 15:13:37 +0000 (17:13 +0200)]
[3.10] Add more details in test_unittest (GH-99626). (GH-99692)
(cherry picked from commit
653e563d80fabee8830e0b55f194f82a9beabe70 )
Ronald Oussoren [Tue, 22 Nov 2022 11:33:32 +0000 (12:33 +0100)]
[3.10] GH-97001: Release GIL in termios extension (GH-99503) (#99680)
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>
Miss Islington (bot) [Tue, 22 Nov 2022 11:06:26 +0000 (03:06 -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>
Miss Islington (bot) [Mon, 21 Nov 2022 11:44:56 +0000 (03:44 -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>
Miss Islington (bot) [Mon, 21 Nov 2022 11:05:32 +0000 (03:05 -0800)]
[3.10] GH-95815: Document less specific error for os.remove (GH-99571) (#99639)
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>
Pablo Galindo Salgado [Sun, 20 Nov 2022 22:30:15 +0000 (22:30 +0000)]
[3.10] gh-99581: Fix a buffer overflow in the tokenizer when copying lines that fill the available buffer (GH-99605). (#99630)
Miss Islington (bot) [Sun, 20 Nov 2022 16:06:57 +0000 (08:06 -0800)]
[3.10] gh-98086: Now ``patch.dict`` can decorate async functions (GH-98095) (GH-99366)
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: Chris Withers <chris@withers.org>
Serhiy Storchaka [Sun, 20 Nov 2022 10:45:50 +0000 (12:45 +0200)]
[3.10] gh-78453: Move Unicode C API tests from test_unicode to test_capi.test_unicode (GH-99431). (GH-99617)
(cherry picked from commit
06d4e02c3b3526b5d90e41a0a0befa8663e08f27 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Stanley [Sun, 20 Nov 2022 05:01:35 +0000 (21:01 -0800)]
[3.10] Remove trailing space to fix azure failures (#99611)
Stanley [Sat, 19 Nov 2022 14:44:52 +0000 (06:44 -0800)]
[3.10] gh-85073: Add some missing links to source (GH-99363) (#99589)
(cherry picked from commit
27d8dc2c9d3de886a884f79f0621d4586c0e0f7a )
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Miss Islington (bot) [Fri, 18 Nov 2022 19:34:17 +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>
Miss Islington (bot) [Tue, 15 Nov 2022 20:52:14 +0000 (12:52 -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>
Kamil Turek [Sun, 13 Nov 2022 23:55:58 +0000 (00:55 +0100)]
[3.10] gh-92119: ctypes: Print exception class name instead of its representation (GH-98302) (#99452)
gh-92119: ctypes: Print exception class name instead of its representation (#98302)
(cherry picked from commit
b9dedfe61dce2997e3e6be318d8c50b0c19c9394 )
Miss Islington (bot) [Sun, 13 Nov 2022 19:40:18 +0000 (11:40 -0800)]
gh-99275: Fix `SystemError` in `ctypes` during `__initsubclass__` (GH-99283)
(cherry picked from commit
343eb0f94b26f2a4c1c15505d417e8157ec19660 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 12 Nov 2022 19:47:59 +0000 (11:47 -0800)]
gh-99392: Fix sqlite3 converter recipes (GH-99393)
(cherry picked from commit
dfc1b17a23fed933cffa09eec125a7e8c90ea867 )
Co-authored-by: naglis <827324+naglis@users.noreply.github.com>
Miss Islington (bot) [Sat, 12 Nov 2022 17:36:49 +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>
Miss Islington (bot) [Sat, 12 Nov 2022 02:16:18 +0000 (18:16 -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>
Miss Islington (bot) [Fri, 11 Nov 2022 13:41:41 +0000 (05:41 -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>
Miss Islington (bot) [Fri, 11 Nov 2022 01:32:30 +0000 (17:32 -0800)]
gh-98366: use sphinx.locale._ as gettext() in pyspecific.py (GH-98437)
fix(doc-tools): use sphinx.locale._ as gettext() for backward-compatibility in pyspecific.py
[why] spinix 5.3 changed locale.translators from a defaultdict(gettext.NullTranslations) to a dict, which leads to failure of pyspecific.py. Use sphinx.locale._ as gettext to fix the issue.
(cherry picked from commit
d26ee8a0a552de111b8245ef0de63e3f3f535d9f )
Co-authored-by: Wei-Hsiang (Matt) Wang <mattwang44@gmail.com>
Miss Islington (bot) [Thu, 10 Nov 2022 21:27:42 +0000 (13:27 -0800)]
GH-99183: Document behavior of count() for empty substrings (GH-99339)
(cherry picked from commit
2f4af2d99cffed6ba81e4b8fd886de6ae8625a3f )
Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
Jason R. Coombs [Thu, 10 Nov 2022 15:59:38 +0000 (10:59 -0500)]
[3.10] gh-99130: Apply bugfixes from importlib_metadata 4.11.4. (#99132)
Miss Islington (bot) [Thu, 10 Nov 2022 12:59:25 +0000 (04:59 -0800)]
gh-74044: inspect.signature for wrappers around decorated bound methods (GH-736)
(cherry picked from commit
dbf2faf579b4094387d65ee41f049456ca67c446 )
Co-authored-by: Anton Ryzhov <anton@ryzhov.me>
Miss Islington (bot) [Thu, 10 Nov 2022 11:19:30 +0000 (03:19 -0800)]
gh-99320: remove tests for old-style class from `test_complex` (GH-99321)
(cherry picked from commit
26726c76494d85c7b565b764c732dd4473458409 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 8 Nov 2022 21:08:08 +0000 (13:08 -0800)]
gh-99238: clarify the type of the env dict. (GH-99253)
(cherry picked from commit
2eee9d9cd7eb1e396fa9a4af7c5fadeeafbdaa38 )
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 8 Nov 2022 16:33:28 +0000 (08:33 -0800)]
Fix broken link in `asyncio-subprocesses` doc (GH-99214)
GH- Fix broken link in Doc/library/asyncio-subprocess.rst
This is a trivial fix in documentation to fix a broken link.
There is a broken link in [Doc/library/asyncio-subprocess.rst](https://docs.python.org/3/library/asyncio-subprocess.htmlGH-asyncio.subprocess.Process) for the function ``wait_for``:

I suppose this refers to the function ``asyncio.wait_for`` which is not clear in the docs.
This PR fixes the link and the result looks like the following:

(cherry picked from commit
acf4d5d5bdecbc8756276731e09bae245d88518d )
Co-authored-by: Mikael Koli <koli.mikael@gmail.com>
Automerge-Triggered-By: GH:AlexWaygood
Miss Islington (bot) [Tue, 8 Nov 2022 03:23:16 +0000 (19:23 -0800)]
[3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (GH-99222)
There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.
(cherry picked from commit
d315722564927c7202dd6e111dc79eaf14240b0d )
(cherry picked from commit
a6f6c3a3d6f2b580f2d87885c9b8a9350ad7bf15 )
Co-authored-by: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Co-authored-by: Gregory P. Smith <greg@krypto.org>
Miss Islington (bot) [Tue, 8 Nov 2022 02:30:38 +0000 (18:30 -0800)]
gh-99124: use concrete exception types in `test_builtin` (GH-99125)
(cherry picked from commit
c32bc1bffd9d63ede0d0505abab983247a3ad0c6 )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Tue, 8 Nov 2022 02:19:33 +0000 (18:19 -0800)]
gh-98513: Test abstract methods of some `collections` types (GH-98516)
(cherry picked from commit
a309ad9f76db4ab9a8f933ab1ffea78ecaca827f )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Mon, 7 Nov 2022 18:56:21 +0000 (10:56 -0800)]
[3.10] gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002) (GH-99213)
gh-96746: Docs: Clear up Py_TPFLAGS_DISALLOW_INSTANTIATION inheritance (GH-99002)
The flag is not inherited, but its effect -- a NULL tp_new -- is.
Drop hints for people who come here wanting to “disallow instantiation”.
(cherry picked from commit
1438b779971605e516bd0a4051a704d6ffbbd58d )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Miss Islington (bot) [Mon, 7 Nov 2022 17:14:28 +0000 (09:14 -0800)]
doc: Formatting and typo fixes (GH-98974)
(cherry picked from commit
728e42fcf51cbb2108caf1382df224c13b53d024 )
Co-authored-by: jmcb <joelsgp@protonmail.com>
Miss Islington (bot) [Mon, 7 Nov 2022 12:08:39 +0000 (04:08 -0800)]
bpo-38523: ignore_dangling_symlinks does not apply recursively (GH-22937)
(cherry picked from commit
5ff81da6d3a8eb01fc5500fd1c9eaa6543286301 )
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Miss Islington (bot) [Mon, 7 Nov 2022 10:16:54 +0000 (02:16 -0800)]
[3.10] [ GH-99155: Fix `NormalDist` pickle with `0` and `1` protocols (GH-99156). (GH-99188) (GH-99190)
Miss Islington (bot) [Mon, 7 Nov 2022 06:05:20 +0000 (22:05 -0800)]
gh-96055: Update faulthandler to emit proper unexpect signal number (gh-99162)
(cherry picked from commit
f626b7b504df454d289527a4f922b09deeae9e21 )
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Erlend E. Aasland [Sun, 6 Nov 2022 21:39:34 +0000 (22:39 +0100)]
[3.10] gh-99086: Fix implicit int compiler warning in configure check for PTHREAD_SCOPE_SYSTEM (GH-99085) (#99119)
(cherry picked from commit
12078e78f6e4a21f344e4eaff529e1ff3b97734f )
Co-authored-by: Sam James <sam@cmpct.info>
Co-authored-by: Sam James <sam@cmpct.info>
Miss Islington (bot) [Sun, 6 Nov 2022 20:23:01 +0000 (12:23 -0800)]
gh-94286 Fix documentation of print default param (GH-94297)
(cherry picked from commit
2db55e0c0069a928775fa819973a76f840c5ab5a )
Co-authored-by: Nouran Ali <nouranalimohammed@gmail.com>
Miss Islington (bot) [Sun, 6 Nov 2022 19:50:12 +0000 (11:50 -0800)]
gh-99051: remove duplicated test from `test_weakref` (GH-99052)
(cherry picked from commit
8463cb55dabb78571e32d8c8c7de8679ab421c2c )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sun, 6 Nov 2022 14:44:28 +0000 (06:44 -0800)]
gh-83004: Clean up refleak in _pickle initialisation (GH-98841)
(cherry picked from commit
d3b82b4463c4eb51954c0afd98342f0c5e479baa )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 6 Nov 2022 14:38:26 +0000 (06:38 -0800)]
gh-83004: Clean up refleak in _zoneinfo initialisation (GH-98842)
(cherry picked from commit
31f2f6568d89564cc1d686cd6b75ba5578aaa748 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Sun, 6 Nov 2022 12:15:29 +0000 (04:15 -0800)]
`test_typing`: use all pickle protocols (GH-99154)
(cherry picked from commit
a0bc75e2fdd53680cb147881bcb3754bd56aa2fa )
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Miss Islington (bot) [Sat, 5 Nov 2022 19:00:12 +0000 (12:00 -0700)]
gh-99134: Update bundled pip to 22.3.1 (gh-99135)
Update bundled pip to 22.3.1
(cherry picked from commit
47ab8480e71ab3949a336a94c7fd146b1fce595d )
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Miss Islington (bot) [Fri, 4 Nov 2022 15:20:35 +0000 (08:20 -0700)]
[3.11] gh-90867: test.support.wait_process() uses LONG_TIMEOUT (GH-99071) (GH-99098)
The test.support.wait_process() function now uses a timeout of
LONG_TIMEOUT seconds by default, instead of SHORT_TIMEOUT. It
doesn't matter if a Python buildbot is slower, it only matters that
the process completes. The timeout should just be shorter than
"forever".
(cherry picked from commit
a9a8c8712665377cfa83af4b632b0db529ec1853 )
Co-authored-by: Victor Stinner <vstinner@python.org>
(cherry picked from commit
f09da28768b77713566e932e912f107b6b57e8fd )
Miss Islington (bot) [Fri, 4 Nov 2022 13:12:47 +0000 (06:12 -0700)]
minor edits to locale doc (GH-98537)
(cherry picked from commit
c0bf7607a1c215cd92f2976c9e915b913fc149d1 )
Co-authored-by: Skip Montanaro <skip.montanaro@gmail.com>
Miss Islington (bot) [Thu, 3 Nov 2022 23:31:33 +0000 (16:31 -0700)]
Docs: add `named` to the list of styles in the sqlite3.paramstyle attr docs (GH-99078)
(cherry picked from commit
016c7d37b6acfe2203542a2655080c6402b3be1f )
Co-authored-by: Nick Pope <nick@nickpope.me.uk>
Miss Islington (bot) [Thu, 3 Nov 2022 14:58:44 +0000 (07:58 -0700)]
gh-83004: Clean up refleak in _io initialisation (GH-98840)
(cherry picked from commit
1208037246eeab4c5c003f1651edfefb045e6fb7 )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>