Commit Graph

48806 Commits

Author SHA1 Message Date
Miss Islington (bot) efeda8b4a1
GH-95097: fix `asyncio.run` for tasks without `uncancel` method (GH-95211) (GH-95387)
(cherry picked from commit 54f48844d1)

Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-29 14:38:02 +02:00
Miss Islington (bot) 309c8f316d
gh-89610: Add .pyi as a recognised extension for IDLE on macOS (GH-95393)
This allows opening stub files by double clicking on them in the Finder.

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 06fc249135)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-28 16:28:50 -07:00
Miss Islington (bot) 1368a1f724
gh-95359: Fix py.exe launcher handling of per-user py.ini and command names (GH-95399)
(cherry picked from commit 38bb2068fe)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-07-28 13:52:13 -07:00
Miss Islington (bot) 763801aae2
gh-95166: cancel map waited on future on timeout (GH-95169) (GH-95364)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
(cherry picked from commit e16d4ed590)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-28 12:56:21 +02:00
Serhiy Storchaka 33efd7f7a3
[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 ebad53a4dc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-07-28 09:51:45 +03:00
Miss Islington (bot) 547f0bb82f
gh-95339: update bundled pip to 22.2.1 (gh-95340)
(cherry picked from commit 226d02bb10)

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
2022-07-27 12:11:15 -07:00
Miss Islington (bot) 131fc72700
[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>
2022-07-27 11:15:29 +02:00
Miss Islington (bot) f083adfdac
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 b8c528694e)

Co-authored-by: Roman Novak <44512421+romanngg@users.noreply.github.com>
2022-07-27 10:08:21 +02:00
Miss Islington (bot) c72940a609
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 152eb90311)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-27 10:07:32 +02:00
Miss Islington (bot) 7df3a1ce4b
gh-95285: py.exe launcher fails with short argv0 (GH-95295) (GH-95298)
(cherry picked from commit 7ac5bb3e6a)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-07-27 10:06:59 +02:00
Miss Islington (bot) 6fe7e0264f
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 d7db9dc3cc)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-07-26 12:20:33 +02:00
Miss Islington (bot) 86eb500068
[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 0047447294)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-07-26 12:19:22 +02:00
Miss Islington (bot) 19d953682e
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 0c6f898005)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-26 12:16:12 +02:00
Pablo Galindo 0771d71eea
Python 3.11.0b5 2022-07-25 23:21:18 +01:00
Pablo Galindo Salgado 7f73194339
[3.11] GH-92678: Expose managed dict clear and visit functions (GH-95246). (#95256)
Co-authored-by: Mark Shannon <mark@hotpy.org>
2022-07-25 23:05:27 +01:00
Mark Shannon e5ff5ec3ff
[3.11] GH-94739: Backport GH-94958 to 3.11 (#94965) 2022-07-25 12:11:06 +01:00
Miss Islington (bot) 3ec139fa4d
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 ea5ed0ba51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-07-24 23:40:17 -07:00
Miss Islington (bot) 49d038496e
gh-95212: make multiprocessing test case parallel-safe (GH-95213)
(cherry picked from commit 5956de16cd)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-24 22:11:30 -07:00
Miss Islington (bot) 687dd50760
gh-95199: upgrade bundled setuptools to 63.2.0 (gh-95200)
(cherry picked from commit 3c94d3395e)

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
2022-07-24 04:28:24 -07:00
Miss Islington (bot) 9639cc1126
gh-95194: upgrade bundled pip to 22.2 (gh-95195)
upgrade bundled pip to 22.2
(cherry picked from commit 068ffafa54)

Co-authored-by: Stéphane Bidoul <stephane.bidoul@gmail.com>
2022-07-24 03:22:12 -07:00
Miss Islington (bot) 00cda6b530
gh-95174: Handle missing waitpid and gethostbyname in WASI (GH-95181)
(cherry picked from commit 8184f0fce3)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-23 23:30:39 -07:00
Miss Islington (bot) 22f06d6ce3
gh-93157: Fix fileinput didn't support `errors` in `inplace` mode (GH-95128)
(cherry picked from commit 5c7f3bcdaf)

Co-authored-by: Inada Naoki <songofacandy@gmail.com>
2022-07-23 20:05:10 -07:00
Miss Islington (bot) 0d688bd2b6
gh-90473: Fix more tests on platforms without umask (GH-95164)
(cherry picked from commit 6839324894)

Co-authored-by: Christian Heimes <christian@python.org>
2022-07-23 03:51:29 -07:00
Erlend Egeberg Aasland 5d3f2fbf37
[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 a3d4d15f53)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
2022-07-23 10:23:19 +02:00
Brandt Bucher 064462a719
[3.11] GH-94036: Fix more attribute location quirks (GH-95028) (GH-95156)
(cherry picked from commit 900bfc53cb)
2022-07-22 17:31:06 -07:00
Miss Islington (bot) bbdacb402b
GH-94438: Handle extended arguments and conditional pops in mark_stacks (GH-95110)
(cherry picked from commit e4d3a96a11)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-07-22 16:48:53 -07:00
Brandt Bucher 5a48ab01e9
[3.11] GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) (GH-95143)
(cherry picked from commit e402b26b7f)
2022-07-22 11:56:10 -07:00
Miss Islington (bot) deacc3c9a6
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (GH-95106)
(cherry picked from commit b4378948a0)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-07-21 13:52:11 -07:00
Miss Islington (bot) d19b5d8533
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 834bd5dd76)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-21 06:01:05 -07:00
Miss Islington (bot) 57375d1d74
gh-90654: Remove unneeded blank line (GH-95044) (#95047)
(cherry picked from commit bd390ef825)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-20 18:03:35 -04:00
Brandt Bucher e2fce3a8e7
[3.11] GH-91409: Don't overwrite valid locations with NOP locations (GH-95067) (GH-95068)
(cherry picked from commit 742d4614e1)
2022-07-20 15:01:42 -07:00
Miss Islington (bot) 2ac1096423
gh-94998: Remove redundant condition in test_sqlite3/__main__.py (GH-95052)
(cherry picked from commit 9d09e7b026)

Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
2022-07-20 10:01:58 -07:00
Miss Islington (bot) 6cc9489a3a
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
(cherry picked from commit ed4441567e)

Co-authored-by: Oleg Iarygin <oleg@arhadthedev.net>
2022-07-20 09:19:35 -07:00
Miss Islington (bot) 1093804b88
gh-90654: Add item missing from idlelib/NEWS.txt (GH-95038)
(cherry picked from commit acb105a7c1)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
2022-07-20 00:43:27 -07:00
Miss Islington (bot) 9487e8d250
GH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891)
(cherry picked from commit f36589510b)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-07-19 10:12:39 -07:00
Miss Islington (bot) fbd24068c2
test_concurrent_futures: Fix unneeded/confusing format call (GH-93119)
Added in 339fd46cb7 - but as noted in a comment, the test only tests ThreadPoolExecutor.
(cherry picked from commit 3f2dd0a7c0)

Co-authored-by: Florian Bruhin <me@the-compiler.org>
2022-07-18 19:42:19 -07:00
Miss Islington (bot) 7733aa048e
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 0daba82221)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-07-18 14:57:45 -07:00
Ethan Furman be84daf52a
Revert "gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)" (#94981)
This reverts commit 30f28ac296.
2022-07-18 13:56:21 -07:00
Brandt Bucher eda2f90094
[3.11] GH-94822: Don't specialize when metaclasses are involved (GH-94892) (GH-94980)
(cherry picked from commit daf68ba92f)

Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
2022-07-18 11:55:07 -07:00
Miss Islington (bot) ec6ed6681d
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931)
(cherry picked from commit 067f0da335)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-07-18 08:41:22 -07:00
Miss Islington (bot) 7dc236d116
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 ae0be5a53b)

Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
2022-07-18 02:46:21 -07:00
Miss Islington (bot) e747562345
gh-94601: [Enum] fix inheritance for __str__ and friends (GH-94942)
(cherry picked from commit c961d14f85)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-07-17 19:18:41 -07:00
Miss Islington (bot) 8d0249e345
gh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds (GH-94926)
(cherry picked from commit 07aeb7405e)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-17 10:49:01 -07:00
Miss Islington (bot) 1c63734217
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928)
(cherry picked from commit 044a593cbb)

Co-authored-by: Steve Dower <steve.dower@python.org>
2022-07-17 08:49:57 -07:00
Miss Islington (bot) 65d87a2cb8
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 f6b3a07b7d (bpo-44493: Add missing terminated NUL in sockaddr_un's length (GH-26866)
(cherry picked from commit c22f134211)

Co-authored-by: Nir Soffer <nsoffer@redhat.com>
2022-07-17 08:39:22 -07:00
Serhiy Storchaka 107c21c5d5
gh-94864: Fix PyArg_Parse* with deprecated format units "u" and "Z" (GH-94902)
It returned 1 (success) when warnings are turned into exceptions.
2022-07-17 08:23:37 +03:00
Miss Islington (bot) 30f28ac296
gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)
(cherry picked from commit c20186c397)

Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
2022-07-16 21:53:41 -07:00
Miss Islington (bot) ccbf85382c
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 6da988a46c)

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2022-07-16 18:31:25 -07:00
Miss Islington (bot) e121cb5814
gh-94869: Fix the location in some expressions for multi-line f-string ast nodes (GH-94895)
(cherry picked from commit 2e9da8e352)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
2022-07-16 12:16:51 -07:00
Miss Islington (bot) b040617195
gh-94772: Fix off-by-one error in Windows launcher (GH-94779)
(cherry picked from commit 407ff6556c)

Co-authored-by: Paul Moore <p.f.moore@gmail.com>

Co-authored-by: Paul Moore <p.f.moore@gmail.com>
2022-07-16 10:42:08 +01:00