]>
git.ipfire.org Git - thirdparty/Python/cpython.git/log
Miss Islington (bot) [Thu, 28 Jul 2022 10:29:50 +0000 (03:29 -0700)]
gh-95355: Check tokens[0] after allocating memory (GH-95356)
GH-95355
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit
b946f529efb4a623ac4ad968d8091edb81ebdcdb )
Co-authored-by: Honglin Zhu <zhuhonglin.zhl@alibaba-inc.com>
Kumar Aditya [Thu, 28 Jul 2022 10:24:36 +0000 (15:54 +0530)]
[3.11] GH-93899: fix checks for eventfd flags (GH-95170). (#95342)
(cherry picked from commit
4dd099bafff14639ef5d2185965016d8f253353f )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Serhiy Storchaka [Thu, 28 Jul 2022 06:51:45 +0000 (09:51 +0300)]
[3.11] gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999) (GH-95353)
When keyword argument name is an instance of a str subclass with
overloaded methods __eq__ and __hash__, the former code could not find
the name of an extraneous keyword argument to report an error, and
_PyArg_UnpackKeywords() returned success without setting the
corresponding cell in the linearized arguments array. But since the number
of expected initialized cells is determined as the total number of passed
arguments, this lead to reading NULL as a keyword parameter value, that
caused SystemError or crash or other undesired behavior.
(cherry picked from commit
ebad53a4dc1bb591820724a22cef9b8459185b5f )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Wed, 27 Jul 2022 19:11:15 +0000 (12:11 -0700)]
gh-95339: update bundled pip to 22.2.1 (gh-95340)
(cherry picked from commit
226d02bb109d08601fbccd645e9d67aee2e5bcdc )
Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Miss Islington (bot) [Wed, 27 Jul 2022 15:55:44 +0000 (08:55 -0700)]
[3.11] gh-95324: Emit a warning if an object doesn't call PyObject_GC_UnTrack during deallocation in debug mode (GH-95325) (#95336)
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Wed, 27 Jul 2022 14:11:00 +0000 (07:11 -0700)]
gh-95174: Move WASIX logic into wasi-env (GH-95320)
wasi-env now sets WASIX flags. This allows us to control all build
parameter for wasm32-wasi buildbot from CPython repository.
Also export and improve SYSROOT parameter.
(cherry picked from commit
2833f3798dc3647e850b303a4d0fa00609a0ae9b )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Wed, 27 Jul 2022 13:33:01 +0000 (06:33 -0700)]
gh-95273: Normalise sqlite3 reference wording (GH-95274)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit
2361908a9d5553102f2b2294af44852a76d2ab03 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Wed, 27 Jul 2022 12:56:07 +0000 (05:56 -0700)]
gh-94630: Fixup sqlite3 argument spec docs for connection execute* methods (GH-95319)
(cherry picked from commit
2b37395612ece0a8c37439801087ba9e2c56702f )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 27 Jul 2022 12:37:43 +0000 (05:37 -0700)]
GH-95045: gc untrack _lsprof.Profiler before deallocating it (GH-95315)
Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit
deacf391d7a1b3ab49bffa16088b3500fdb4c435 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Christian Heimes [Wed, 27 Jul 2022 10:51:36 +0000 (12:51 +0200)]
[3.11] gh-94801: Fix regression in configure's CPPFLAGS handling (GH-95288) (GH-95297)
(cherry picked from commit
9af7f87d763ed6e1c5f56ae40d8242ab22866b33 )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Wed, 27 Jul 2022 10:32:02 +0000 (03:32 -0700)]
gh-95041: Fail syslog.syslog in case inner call to syslog.openlog fails (GH-95264)
(cherry picked from commit
b1f648efc56ff17e18ec2b7402d59a771b305004 )
Co-authored-by: Noam Cohen <noam@noam.me>
Miss Islington (bot) [Wed, 27 Jul 2022 09:16:38 +0000 (02:16 -0700)]
[3.11] gh-95085: Promote Emscripten and WASI to PEP 11 tier 3 (GH-95086) (GH-95307)
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Wed, 27 Jul 2022 09:15:29 +0000 (02:15 -0700)]
[3.11] gh-95280: Fix test_get_ciphers on systems without RSA key exchange (GH-95282) (GH-95310)
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Wed, 27 Jul 2022 08:08:21 +0000 (01:08 -0700)]
Fix minor docstring issues in `dataclasses.py`. (gh-93024) (GH-95286)
Previously, when using `functools.wrap` around them (and inherit their docstrings), sphinx renders the docstrings badly and raises warnings about wrong indent.
(cherry picked from commit
b8c528694edb7a31020116956cc4daf07a5cd97f )
Co-authored-by: Roman Novak <44512421+romanngg@users.noreply.github.com>
Miss Islington (bot) [Wed, 27 Jul 2022 08:07:32 +0000 (01:07 -0700)]
gh-95291: Use import helper to improve sqlite3 audit tests (GH-95292) (GH-95293)
Now the tests are correctly reported as skipped if sqlite3 is not available.
(cherry picked from commit
152eb90311fdf294510b5d077332580ba18c0ee4 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 27 Jul 2022 08:06:59 +0000 (01:06 -0700)]
gh-95285: py.exe launcher fails with short argv0 (GH-95295) (GH-95298)
(cherry picked from commit
7ac5bb3e6a1cf780aea8164fdba09db993a21d6f )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Wed, 27 Jul 2022 08:05:50 +0000 (01:05 -0700)]
gh-94635: Add sqlite3 'Introduction' and 'Tutorial' doc headings (GH-95269) (GH-95304)
(cherry picked from commit
2e35a13e46663acf665da06267c54e66c7ecf18d )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:21:48 +0000 (03:21 -0700)]
gh-95041: Fix several minor issues in syslog.openlog() (GH-95058) (GH-95261)
* syslog_get_argv() swallows exceptions, but not in all cases.
* if ident is non UTF-8 encodable, syslog.openlog() fails after setting the
global reference to ident. Now the C string saved internally in the previous
call to openlog() points to the freed memory.
* PySys_Audit() can crash if ident is NULL.
* There may be a race condition with syslog.syslog(), because the global
reference to ident is decrefed before setting the new value.
* Possible use of freed memory if syslog.openlog() is called while
the GIL is released in syslog.syslog().
(cherry picked from commit
68c555a50a2b74731b0db0f4dcbf51b2c11d4853 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:20:51 +0000 (03:20 -0700)]
gh-93351: Add news entry and what's new entry for changes in gh-93351 (GH-95175) (GH-95177)
(cherry picked from commit
9762572d0aa3569ba82eeceb708ddea9f12918fd )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:20:33 +0000 (03:20 -0700)]
gh-91810: Fix regression with writing an XML declaration with encoding='unicode' (GH-93426) (GH-93793)
Suppress writing an XML declaration in open files in ElementTree.write()
with encoding='unicode' and xml_declaration=None.
If file patch is passed to ElementTree.write() with encoding='unicode',
always open a new file in UTF-8.
(cherry picked from commit
d7db9dc3cc5b44d0b4ce000571fecf58089a01ec )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:19:22 +0000 (03:19 -0700)]
[3.11] gh-95185: Check recursion depth in the AST constructor (GH-95186) (GH-95208)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit
00474472944944b346d8409cfded84bb299f601a )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:17:59 +0000 (03:17 -0700)]
gh-95235: Add explicit parameter list to some sqlite3 methods (GH-95240) (GH-95263)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit
5012bedc7ca7d78b5a42bf60eef55bac263f4060 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Tue, 26 Jul 2022 10:17:05 +0000 (03:17 -0700)]
gh-95205: Improve WASM README.md (GH-95267) (GH-95270)
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
(cherry picked from commit
e8f3e8f0ab8aa5d667229ce9694e6e1477e524fd )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Tue, 26 Jul 2022 10:16:12 +0000 (03:16 -0700)]
gh-95051: ensure that timeouts scheduled with `asyncio.Timeout` that have already expired are deliverered promptly (GH-95109) (GH-95216)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit
0c6f898005099be189ee65bcfda659f5fc13b802 )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Pablo Galindo [Tue, 26 Jul 2022 10:12:43 +0000 (11:12 +0100)]
Post 3.11.0b5
Pablo Galindo [Mon, 25 Jul 2022 22:18:57 +0000 (23:18 +0100)]
Python 3.11.0b5
Pablo Galindo Salgado [Mon, 25 Jul 2022 22:05:27 +0000 (23:05 +0100)]
[3.11] GH-92678: Expose managed dict clear and visit functions (GH-95246). (#95256)
Co-authored-by: Mark Shannon <mark@hotpy.org>
Miss Islington (bot) [Mon, 25 Jul 2022 16:55:01 +0000 (09:55 -0700)]
gh-95235: Document undocumented parameters in sqlite3 functions and methods (GH-95236)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
(cherry picked from commit
ac6a94c669cba8c8384a61b4304c87cc83728335 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Mon, 25 Jul 2022 16:26:46 +0000 (09:26 -0700)]
gh-93610: Improve docs for importlib.resources (GH-93611) (GH-95247)
(cherry picked from commit
ccd7c7a0bde2587ee0e1e685f4651b50d90bd464 )
Co-authored-by: Petr Viktorin <encukou@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Co-authored-by: Stanley <46876382+slateny@users.noreply.github.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
Mark Shannon [Mon, 25 Jul 2022 11:11:06 +0000 (12:11 +0100)]
[3.11] GH-94739: Backport GH-94958 to 3.11 (#94965)
Miss Islington (bot) [Mon, 25 Jul 2022 09:52:47 +0000 (02:52 -0700)]
gh-95205: Improve wasm README (GH-95206)
Co-authored-by: Christian Heimes <christian@python.org>
(cherry picked from commit
310f94871a923f6cf3dc9259e732ce2376578b26 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Miss Islington (bot) [Mon, 25 Jul 2022 06:40:17 +0000 (23:40 -0700)]
gh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201)
Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
(cherry picked from commit
ea5ed0ba51c10cfdde7651a475438551964dfdfc )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 25 Jul 2022 05:11:30 +0000 (22:11 -0700)]
gh-95212: make multiprocessing test case parallel-safe (GH-95213)
(cherry picked from commit
5956de16cd00e7e1cf5cbf3d7b4a930eaa928321 )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Sun, 24 Jul 2022 22:01:47 +0000 (15:01 -0700)]
gh-95173: Revert commit
51ed2c56a1852cd6b09c85ba81312dc9782772ce (GH-95176)
(cherry picked from commit
9007dec606b790c05e158e588b696f3c210c2795 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Sun, 24 Jul 2022 11:28:24 +0000 (04:28 -0700)]
gh-95199: upgrade bundled setuptools to 63.2.0 (gh-95200)
(cherry picked from commit
3c94d3395edbcd299cbdacd09660ed88e654eeef )
Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Miss Islington (bot) [Sun, 24 Jul 2022 10:22:12 +0000 (03:22 -0700)]
gh-95194: upgrade bundled pip to 22.2 (gh-95195)
upgrade bundled pip to 22.2
(cherry picked from commit
068ffafa5465e9388a940692d1720266a1b37257 )
Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
Miss Islington (bot) [Sun, 24 Jul 2022 06:30:39 +0000 (23:30 -0700)]
gh-95174: Handle missing waitpid and gethostbyname in WASI (GH-95181)
(cherry picked from commit
8184f0fce3b734413e3d3a282f1425d3cb8507fd )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Sun, 24 Jul 2022 03:05:10 +0000 (20:05 -0700)]
gh-93157: Fix fileinput didn't support `errors` in `inplace` mode (GH-95128)
(cherry picked from commit
5c7f3bcdafedd60a385e8ca5403bc6b0b7a862b3 )
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Pablo Galindo Salgado [Sat, 23 Jul 2022 18:44:44 +0000 (19:44 +0100)]
[3.11] gh-93351: Add news entry and what's new entry for changes in gh-93351 (GH-95175) (#95178)
(cherry picked from commit
9762572d0aa3569ba82eeceb708ddea9f12918fd )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 23 Jul 2022 11:09:10 +0000 (04:09 -0700)]
gh-90473: Check for HAVE_KILL in main.c:exit_sigint (GH-95165)
(cherry picked from commit
d291a82df33cd8c917a374fef2a2373beda78b77 )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Sat, 23 Jul 2022 10:51:29 +0000 (03:51 -0700)]
gh-90473: Fix more tests on platforms without umask (GH-95164)
(cherry picked from commit
68393248947adaa61962cd44e9d49c44017ba94f )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Sat, 23 Jul 2022 10:03:05 +0000 (03:03 -0700)]
gh-89758: Track all socket module dependencies (GH-95157)
(cherry picked from commit
41a5b84eaf7c52d1d4aa0a8d3d135a09f5f7190e )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Sat, 23 Jul 2022 09:33:17 +0000 (02:33 -0700)]
Doc: Add omitted secondary prompt in inputoutput tutorial (GH-30317)
For the continuation lines, "..." should present as secondary prompt
(cherry picked from commit
de28ee8f755760fda13b481a34b1f326984d293a )
Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
Erlend Egeberg Aasland [Sat, 23 Jul 2022 08:23:19 +0000 (10:23 +0200)]
[3.11] gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory (GH-95146) (#95158)
This PR partially reverts gh-24421 (PR) and fixes the remaining concerns
given in gh-93044 (issue):
- keyword arguments are passed as positional arguments to factory()
- if an argument is not passed to sqlite3.connect(), its default value
is passed to factory()
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>.
(cherry picked from commit
a3d4d15f53777662ce0957500e5a538ce7161f5e )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
Brandt Bucher [Sat, 23 Jul 2022 00:31:06 +0000 (17:31 -0700)]
[3.11] GH-94036: Fix more attribute location quirks (GH-95028) (GH-95156)
(cherry picked from commit
900bfc53cb133e8bc2b122362ec04256f623d5b0 )
Miss Islington (bot) [Fri, 22 Jul 2022 23:48:53 +0000 (16:48 -0700)]
GH-94438: Handle extended arguments and conditional pops in mark_stacks (GH-95110)
(cherry picked from commit
e4d3a96a113070fde433834a6c9fb79ebeebad4a )
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Miss Islington (bot) [Fri, 22 Jul 2022 20:21:41 +0000 (13:21 -0700)]
Fix copy-friendliness of tutorial example (GH-93424)
(cherry picked from commit
34d11f1b0c0e1936a37581e0fb0daec637afca47 )
Co-authored-by: Chenwei Xiao <chanvinxiao@163.com>
Brandt Bucher [Fri, 22 Jul 2022 18:56:10 +0000 (11:56 -0700)]
[3.11] GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) (GH-95143)
(cherry picked from commit
e402b26b7fb953a2f0c17a0044bb6d6cbd726e54 )
Miss Islington (bot) [Fri, 22 Jul 2022 17:13:02 +0000 (10:13 -0700)]
Fix async method reference links in `compound_stmts` docs (GH-94935)
(cherry picked from commit
79d2f549adcbbefd4f2c0a0c9dd572bbbf252c62 )
Co-authored-by: July Tikhonov <july.tikh@gmail.com>
Miss Islington (bot) [Fri, 22 Jul 2022 16:58:34 +0000 (09:58 -0700)]
Fix scheme count in `sysconfig` whatsnew entry (GH-94110)
(cherry picked from commit
9c47cf337c595618dcac81efdefb8254e8ee2edf )
Co-authored-by: Frank Dana <ferdnyc@gmail.com>
Miss Islington (bot) [Fri, 22 Jul 2022 16:57:07 +0000 (09:57 -0700)]
Fix incorrect directive in multiprocessing module documentation (GH-93517)
(cherry picked from commit
346aabf916e8f6d9ea9fa9b9e21502faec92e502 )
Co-authored-by: oda-gitso <105083118+oda-gitso@users.noreply.github.com>
Miss Islington (bot) [Fri, 22 Jul 2022 16:45:20 +0000 (09:45 -0700)]
Closes gh-95133: docs, fix indentation level in TestCase.assertLogs example (GH-95134)
(cherry picked from commit
2a9c227ac11f7d8fc6d756542dd3410be0a6b6b0 )
Co-authored-by: Alexandru Mărășteanu <alexei@users.noreply.github.com>
Miss Islington (bot) [Fri, 22 Jul 2022 07:43:12 +0000 (00:43 -0700)]
gh-81040: Improve sqlite3.Cursor.rowcount docs (GH-94940)
(cherry picked from commit
f9b3706df65c4962646587b437a4eb39289dfd4c )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Fri, 22 Jul 2022 00:44:54 +0000 (17:44 -0700)]
gh-95112: Fix What's New 3.11 contribution note periods (GH-95115)
Some are missing, a few placed after the ')'.
(cherry picked from commit
8df8ef974374a3bb3ca3eef1ee676f7f173dad5c )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Fri, 22 Jul 2022 00:09:14 +0000 (17:09 -0700)]
gh-95112: Fix What's New 3.10 contribution note periods (GH-95114)
Some are missing, a few placed after the ')'.
One ') was missing.
(cherry picked from commit
c944649ffc06f155acea8454f9449fdccad0a74e )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Thu, 21 Jul 2022 20:52:11 +0000 (13:52 -0700)]
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (GH-95106)
(cherry picked from commit
b4378948a066821ce5147940ce3c1a80bc018b3c )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Miss Islington (bot) [Thu, 21 Jul 2022 19:11:07 +0000 (12:11 -0700)]
gh-95095: Use SSL_CTX_get_max_proto_version instead of SSL_CTX_ctrl (GH-95096)
The wrapper macros are more readable and match the form recommended in
the OpenSSL documentation. They also slightly less error-prone, as the
mapping of arguments to SSL_CTX_ctrl is not always clear. (Though in
this case it's straightforward.)
https://www.openssl.org/docs/man1.1.1/man3/SSL_CTX_get_max_proto_version.html
(cherry picked from commit
936f71e5d4f50f2238b0320d44f7fb5f88e39809 )
Co-authored-by: David Benjamin <davidben@davidben.net>
Miss Islington (bot) [Thu, 21 Jul 2022 15:23:06 +0000 (08:23 -0700)]
[3.11] GH-95060: Fix PyCode_Addr2Location when addrq < 0 (GH-95094)
(cherry picked from commit
a6daaf2a132efbb1965b4502ff8a8cf3b5afed0e )
Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Miss Islington (bot) [Thu, 21 Jul 2022 13:01:05 +0000 (06:01 -0700)]
gh-95010: Fix asyncio GenericWatcherTests.test_create_subprocess_fails_with_inactive_watcher (GH-95009)
The test was never run, because it was missing the TestCase class.
The test failed because the wrong attribute was patched.
(cherry picked from commit
834bd5dd766cf212fb20d65d8a046c62a33006d4 )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Miss Islington (bot) [Thu, 21 Jul 2022 00:11:01 +0000 (17:11 -0700)]
GH-95029: Describe Windows Store package isolation and redirection in more detail (GH-95030)
(cherry picked from commit
b1924b10069fb797845284552fb9da931b1ffdb9 )
Co-authored-by: Anthony Shaw <anthony.p.shaw@gmail.com>
Miss Islington (bot) [Wed, 20 Jul 2022 22:03:35 +0000 (15:03 -0700)]
gh-90654: Remove unneeded blank line (GH-95044) (#95047)
(cherry picked from commit
bd390ef825c5f2ad86e0966173a6bcaca85a56f2 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Brandt Bucher [Wed, 20 Jul 2022 22:01:42 +0000 (15:01 -0700)]
[3.11] GH-91409: Don't overwrite valid locations with NOP locations (GH-95067) (GH-95068)
(cherry picked from commit
742d4614e1a645d765dbf76c19bd9a818239b1cb )
Miss Islington (bot) [Wed, 20 Jul 2022 19:33:38 +0000 (12:33 -0700)]
gh-54781: Move NEWS item to Tests, and improve wording (GH-95063)
(cherry picked from commit
8ede67cdcf36d5f6988cb935a6f85a1e14196f78 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 20 Jul 2022 17:01:58 +0000 (10:01 -0700)]
gh-94998: Remove redundant condition in test_sqlite3/__main__.py (GH-95052)
(cherry picked from commit
9d09e7b0263c248659f3b4a2c597fca9ac4f8f91 )
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Miss Islington (bot) [Wed, 20 Jul 2022 16:19:35 +0000 (09:19 -0700)]
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
(cherry picked from commit
ed4441567ec480d1e4d8f982bd1f7347e4d03c42 )
Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
Miss Islington (bot) [Wed, 20 Jul 2022 10:42:05 +0000 (03:42 -0700)]
GH-94851: fix immortal objects refcounting in compiler (gh-95040)
(cherry picked from commit
74761548862eb5a324c23d86a6233d884f386f2e )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Wed, 20 Jul 2022 07:43:27 +0000 (00:43 -0700)]
gh-90654: Add item missing from idlelib/NEWS.txt (GH-95038)
(cherry picked from commit
acb105a7c1f435f93fee08e292ee12438f716abd )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Wed, 20 Jul 2022 07:17:52 +0000 (00:17 -0700)]
gh-93939: Use new MODULE_name_STATE in wasm_assets script (GH-95035)
(cherry picked from commit
0f34c7e2d3163525813dbd644f30db58e6d36af2 )
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Wed, 20 Jul 2022 06:56:47 +0000 (23:56 -0700)]
GH-90699: fix ref counting of static immortal strings (gh-94850)
(cherry picked from commit
1834133e66d95a143c9df5f068b3109927aefd65 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Terry Jan Reedy [Wed, 20 Jul 2022 06:23:28 +0000 (02:23 -0400)]
[3.11] Remove blurb boilerplate from news item(#95033) (#95036)
Cherry-picked from
88e4eeba25df999866b23448b95dce2769c2da86
Miss Islington (bot) [Tue, 19 Jul 2022 19:03:15 +0000 (12:03 -0700)]
gh-91256: Ensure help text has the program name even before getpath is called (GH-94929)
(cherry picked from commit
49aeff49d71fa4bd935212340410311f13879447 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Tue, 19 Jul 2022 17:12:39 +0000 (10:12 -0700)]
GH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891)
(cherry picked from commit
f36589510b8708fa224d799d5b328deab558aa4e )
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Miss Islington (bot) [Tue, 19 Jul 2022 11:58:44 +0000 (04:58 -0700)]
Remove out of date reference to YIELD_FROM from docs. (GH-94966) (GH-94975)
(cherry picked from commit
c41d4d09172bf28ba9e5760498bd494a3521a123 )
Co-authored-by: Mark Shannon <mark@hotpy.org>
Co-authored-by: Mark Shannon <mark@hotpy.org>
Miss Islington (bot) [Tue, 19 Jul 2022 02:42:19 +0000 (19:42 -0700)]
test_concurrent_futures: Fix unneeded/confusing format call (GH-93119)
Added in
339fd46cb764277cbbdc3e78dcc5b45b156bb6ae - but as noted in a comment, the test only tests ThreadPoolExecutor.
(cherry picked from commit
3f2dd0a7c0b1a5112f2164dce78fcfaa0c4b39c7 )
Co-authored-by: Florian Bruhin <me@the-compiler.org>
Miss Islington (bot) [Mon, 18 Jul 2022 21:57:45 +0000 (14:57 -0700)]
gh-94949: Disallow parsing parenthesised ctx mgr with old feature_version (GH-94950)
* gh-94949: Disallow parsing parenthesised ctx manager with old feature_version
* 📜🤖 Added by blurb_it.
* Allow it with feature_version=(3, 9) as well
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit
0daba822212cd5d6c63384a27f390f0945330c2b )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Ethan Furman [Mon, 18 Jul 2022 20:56:21 +0000 (13:56 -0700)]
Revert "gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)" (#94981)
This reverts commit
30f28ac296e506b336e0ab56c41422a53c36d0c2 .
Brandt Bucher [Mon, 18 Jul 2022 18:55:07 +0000 (11:55 -0700)]
[3.11] GH-94822: Don't specialize when metaclasses are involved (GH-94892) (GH-94980)
(cherry picked from commit
daf68ba92f315bfd239a0c993f9f683fb90325fb )
Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Miss Islington (bot) [Mon, 18 Jul 2022 17:34:09 +0000 (10:34 -0700)]
Fix incorrect double indent in ast doc (GH-94976)
Warning directive indent was 4 rather than 3 spaces.
(cherry picked from commit
a25a803c4c452c70da11be3e80004b47646bff4c )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 18 Jul 2022 16:46:26 +0000 (09:46 -0700)]
In ast doc, update 'below' to 'above' (GH-94967)
The included asdl file was moved from 'below' to 'above' in 3.9.
(cherry picked from commit
7b617be4ab6df871cfa9d2127908cb1373578dc0 )
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Miss Islington (bot) [Mon, 18 Jul 2022 15:41:22 +0000 (08:41 -0700)]
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)
(cherry picked from commit
067f0da33506f70c36a67d5f3d8d011c8dae10c9 )
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Miss Islington (bot) [Mon, 18 Jul 2022 14:17:55 +0000 (07:17 -0700)]
GH-94857: fix test_io refleak (GH-94858)
(cherry picked from commit
631160c262b40bf4ce3da6cd7bbb972ae2e9fc91 )
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Miss Islington (bot) [Mon, 18 Jul 2022 12:42:42 +0000 (05:42 -0700)]
[3.11] gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848) (GH-94951)
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Mon, 18 Jul 2022 09:46:21 +0000 (02:46 -0700)]
gh-94947: Disallow parsing walrus with feature_version < (3, 8) (GH-94948)
* gh-94947: Disallow parsing walrus with feature_version < (3, 8)
* oops, commit the parser
* 📜🤖 Added by blurb_it.
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit
ae0be5a53bb4caee3de4888341addd9c94133f2d )
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Christian Heimes [Mon, 18 Jul 2022 06:46:49 +0000 (08:46 +0200)]
[3.11] gh-94801: Use custom flags to check for headers and libs (GH-94802) (GH-94881)
Co-authored-by: Christian Heimes <christian@python.org>
Miss Islington (bot) [Mon, 18 Jul 2022 02:18:41 +0000 (19:18 -0700)]
gh-94601: [Enum] fix inheritance for __str__ and friends (GH-94942)
(cherry picked from commit
c961d14f85a0e3e53d5ad1182206ef34030f10b8 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Sun, 17 Jul 2022 17:49:01 +0000 (10:49 -0700)]
gh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds (GH-94926)
(cherry picked from commit
07aeb7405ea42729b95ecae225f1d96a4aea5121 )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Miss Islington (bot) [Sun, 17 Jul 2022 15:49:57 +0000 (08:49 -0700)]
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)
(cherry picked from commit
044a593cbbe1639e906e06c47504dd1020ddfee4 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Sun, 17 Jul 2022 15:39:22 +0000 (08:39 -0700)]
gh-94821: Fix autobind of empty unix domain address (GH-94826)
When binding a unix socket to an empty address on Linux, the socket is
automatically bound to an available address in the abstract namespace.
>>> s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
>>> s.bind("")
>>> s.getsockname()
b'\x0075499'
Since python 3.9, the socket is bound to the one address:
>>> s.getsockname()
b'\x00'
And trying to bind multiple sockets will fail with:
Traceback (most recent call last):
File "/home/nsoffer/src/cpython/Lib/test/test_socket.py", line 5553, in testAutobind
s2.bind("")
OSError: [Errno 98] Address already in use
Added 2 tests:
- Auto binding empty address on Linux
- Failing to bind an empty address on other platforms
Fixes
f6b3a07b7df6 (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
(cherry picked from commit
c22f134211743cd5ad14cec1dd4f527bee542b4c )
Co-authored-by: Nir Soffer <nsoffer@redhat.com>
Miss Islington (bot) [Sun, 17 Jul 2022 14:46:43 +0000 (07:46 -0700)]
gh-92348: Add quotes to support building on Windows with spaces in directory name (GH-94925)
(cherry picked from commit
5c19ddab65f91d190ec94c494e95c5d551a45efc )
Co-authored-by: Steve Dower <steve.dower@python.org>
Serhiy Storchaka [Sun, 17 Jul 2022 05:23:37 +0000 (08:23 +0300)]
gh-94864: Fix PyArg_Parse* with deprecated format units "u" and "Z" (GH-94902)
It returned 1 (success) when warnings are turned into exceptions.
Miss Islington (bot) [Sun, 17 Jul 2022 04:53:41 +0000 (21:53 -0700)]
gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)
(cherry picked from commit
c20186c3972ff38577c4c5e32ca86748210983d2 )
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
Miss Islington (bot) [Sun, 17 Jul 2022 02:23:57 +0000 (19:23 -0700)]
gh-91181: Add a What's New entry for dropping bytes support for `sys.path` (GH-94918)
(cherry picked from commit
ec4745b5f2c2a460f12c97243c5b7d875f24b0c8 )
Co-authored-by: Brett Cannon <brett@python.org>
Miss Islington (bot) [Sun, 17 Jul 2022 01:31:25 +0000 (18:31 -0700)]
gh-91181: drop support for bytes on sys.path (GH-31934)
Support for bytes broke sometime between Python 3.2 and 3.6 and has been broken ever since. Trying to bring back supports is surprisingly difficult in the face of -b and checking for keys in sys.path_importer_cache. Since the support was broken for so long, trying to overcome the difficulty of bringing back the support has been deemed not worth it.
Co-authored-by: Eryk Sun <eryksun@gmail.com>
Co-authored-by: Brett Cannon <brett@python.org>
(cherry picked from commit
6da988a46c8955755624ad9878288d5214fceb4e )
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
Miss Islington (bot) [Sat, 16 Jul 2022 19:16:51 +0000 (12:16 -0700)]
gh-94869: Fix the location in some expressions for multi-line f-string ast nodes (GH-94895)
(cherry picked from commit
2e9da8e3522764d09f1d6054a2be567e91a30812 )
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Miss Islington (bot) [Sat, 16 Jul 2022 17:11:34 +0000 (10:11 -0700)]
gh-90844: Allow virtual environments to correctly launch when they have spaces in the path (GH-94903)
(cherry picked from commit
4b4439daed3992a5c5a83b86596d6e00ac3c1203 )
Co-authored-by: Steve Dower <steve.dower@python.org>
Miss Islington (bot) [Sat, 16 Jul 2022 09:42:08 +0000 (02:42 -0700)]
gh-94772: Fix off-by-one error in Windows launcher (GH-94779)
(cherry picked from commit
407ff6556cc999d692b264466ad8d32304a09bce )
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Co-authored-by: Paul Moore <p.f.moore@gmail.com>
Miss Islington (bot) [Fri, 15 Jul 2022 22:21:34 +0000 (15:21 -0700)]
Add additional pointers to pathlib's mapping to os.path functions (GH-94828)
* Add additional pointers to pathlib's mapping to os.path functions
os.path.splitext has a somewhat quirky signature since it mixes the path and filename components but I wanted the documentation to mention `PurePath.stem` as the natural counterpart to `PurePath.suffix` for the common use of `os.path.splitext` to turn "file.py" into "file" and "py".
Technically this could have some discussion of how to handle the parent directory hierarchy but that seems a bit out of keeping with the spirit of this table so I omitted mentioning `PurePath.parents` here.
* Update Doc/library/pathlib.rst
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
(cherry picked from commit
3789c635772fbdeb5d0fc32aa811fd6b1d935a60 )
Co-authored-by: Chris Adams <chris@improbable.org>
Miss Islington (bot) [Fri, 15 Jul 2022 17:37:13 +0000 (10:37 -0700)]
gh-94808: Add coverage for boolobject.c:bool_new (GH-94859) (GH-94883)
`bool_new` had no coverage.
Automerge-Triggered-By: GH:brandtbucher
(cherry picked from commit
df4d53a09ab9fd9116d1b52bdc42133e019ca82b )
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Miss Islington (bot) [Fri, 15 Jul 2022 17:34:18 +0000 (10:34 -0700)]
[3.11] GH-94808: Cover handling non-finite numbers from round when ndigits is provided (GH-94860) (GH-94882)
(cherry picked from commit
625ba9bdff51baddf9d5e156e5facf05fa1003d6 )
Co-authored-by: Michael Droettboom <mdboom@gmail.com>
Automerge-Triggered-By: GH:brandtbucher
Miss Islington (bot) [Fri, 15 Jul 2022 17:28:47 +0000 (10:28 -0700)]
gh-94814: Improve coverage of _PyCode_CreateLineArray (GH-94852)
The case where there are more than (1 << 15) lines was not covered.
I don't know if increasing test coverage requires a blurb -- let me know if it does.
Automerge-Triggered-By: GH:brandtbucher
(cherry picked from commit
582ae86b3f07d806f145b3eb9009efd9fbf2e041 )
Co-authored-by: Michael Droettboom <mdboom@gmail.com>