Commit Graph

26429 Commits

Author SHA1 Message Date
Serhiy Storchaka ea5ed0ba51
gh-95087: Fix IndexError in parsing invalid date in the email module (GH-95201)
Co-authored-by: wouter bolsterlee <wouter@bolsterl.ee>
2022-07-25 09:17:25 +03:00
Christian Heimes 5956de16cd
gh-95212: make multiprocessing test case parallel-safe (GH-95213) 2022-07-25 06:44:40 +02:00
Jason R. Coombs 3e718cf880
gh-95218: Move tests for importlib.resources into test_importlib.resources. (#95219)
* gh-95218: Move tests for importlib.resources into test_importlib.resources.

* Also update makefile

* Include test_importlib/resources in code ownership rule.
2022-07-24 20:53:10 -04:00
Thomas Grainger 0c6f898005
gh-95051: ensure that timeouts scheduled with `asyncio.Timeout` that have already expired are deliverered promptly (#95109)
Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
2022-07-24 13:18:05 -07:00
Pablo Galindo Salgado 0047447294
gh-95185: Check recursion depth in the AST constructor (#95186)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2022-07-24 15:58:52 +01:00
Stéphane Bidoul 3c94d3395e
gh-95199: upgrade bundled setuptools to 63.2.0 (gh-95200) 2022-07-24 12:01:03 +01:00
Stéphane Bidoul 068ffafa54
gh-95194: upgrade bundled pip to 22.2 (gh-95195)
upgrade bundled pip to 22.2
2022-07-24 10:55:25 +01:00
Inada Naoki 5c7f3bcdaf
gh-93157: Fix fileinput didn't support `errors` in `inplace` mode (GH-95128) 2022-07-24 11:42:11 +09:00
Pablo Galindo Salgado 9762572d0a
gh-93351: Add news entry and what's new entry for changes in gh-93351 (#95175) 2022-07-23 19:35:44 +01:00
Erlend Egeberg Aasland a3d4d15f53
gh-95132: Correctly relay *args and **kwds from sqlite3.connect to factory (#95146)
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>
2022-07-23 09:51:28 +02:00
Stanislav Zmiev c1e929858a
gh-90385: Add `pathlib.Path.walk()` method (GH-92517)
Automerge-Triggered-By: GH:brettcannon
2022-07-22 16:55:46 -07:00
Brandt Bucher e4d3a96a11
GH-94438: Handle extended arguments and conditional pops in mark_stacks (GH-95110) 2022-07-22 16:28:03 -07:00
Brandt Bucher 900bfc53cb
GH-94036: Fix more attribute location quirks (GH-95028) 2022-07-22 13:13:16 -07:00
Brandt Bucher e402b26b7f
GH-95113: Don't use EXTENDED_ARG_QUICK in unquickened code (GH-95121) 2022-07-22 11:04:20 -07:00
Shantanu b4378948a0
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (#95106) 2022-07-21 13:26:04 -07:00
Ken Jin a6daaf2a13
Fix PyCode_Addr2Location when addrq < 0 (GH-95091) 2022-07-21 14:49:49 +01:00
Brandt Bucher 742d4614e1
GH-91409: Don't overwrite valid locations with NOP locations (GH-95067) 2022-07-20 14:27:31 -07:00
Oleg Iarygin 41e0585ffa
gh-91102: Port 8-argument _warnings.warn_explicit to Argument Clinic (#92891)
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
2022-07-20 22:24:51 +02:00
Erlend Egeberg Aasland 6dadf6ca01
gh-90016: Deprecate default sqlite3 adapters and converters (#94276)
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
2022-07-20 21:37:59 +02:00
Kumar Aditya 000a4eebe7
GH-94382: port multiprocessing static types to heap types (#94336) 2022-07-20 21:26:01 +02:00
Erlend Egeberg Aasland 8ede67cdcf
gh-54781: Move NEWS item to Tests, and improve wording (#95063) 2022-07-20 21:23:59 +02:00
Kumar Aditya 1834133e66
GH-90699: fix ref counting of static immortal strings (gh-94850) 2022-07-20 15:23:30 +09:00
Terry Jan Reedy 88e4eeba25
Remove blurb boilerplate from news item (#95033) 2022-07-20 01:48:35 -04:00
Steve Dower 49aeff49d7
gh-91256: Ensure help text has the program name even before getpath is called (GH-94929) 2022-07-19 19:39:11 +01:00
Brandt Bucher f36589510b
GH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891) 2022-07-19 09:42:40 -07:00
Shantanu 0daba82221
gh-94949: Disallow parsing parenthesised ctx mgr with old feature_version (#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>
2022-07-18 22:10:49 +01:00
Brandt Bucher daf68ba92f
GH-94822: Don't specialize when metaclasses are involved (GH-94892) 2022-07-18 10:10:22 -07:00
Brandt Bucher b407312a24
GH-94893: Ignore caches when adding LOAD_FAST_CHECKs (GH-94894) 2022-07-18 09:00:41 -07:00
Serhiy Storchaka 067f0da335
gh-94930: skipitem() in getargs.c should return non-NULL on error (GH-94931) 2022-07-18 18:07:31 +03:00
Mark Shannon 2f8bff6879
GH-94739: Mark stacks of exception handling blocks for setting frame.f_lineno in the debugger. (GH-94958) 2022-07-18 16:06:42 +01:00
Kumar Aditya 631160c262
GH-94857: fix test_io refleak (GH-94858) 2022-07-18 06:48:04 -07:00
Shantanu ae0be5a53b
gh-94947: Disallow parsing walrus with feature_version < (3, 8) (#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>
2022-07-18 10:20:12 +01:00
Christian Heimes 97b4121f93
gh-94847: Don't force inlining in debug builds of libmpdec (GH-94848) 2022-07-18 08:47:03 +02:00
Thomas Grainger 6da988a46c
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>
2022-07-16 18:07:53 -07:00
Pablo Galindo Salgado 2e9da8e352
gh-94869: Fix the location in some expressions for multi-line f-string ast nodes (#94895) 2022-07-16 19:51:53 +01:00
Steve Dower 4b4439daed
gh-90844: Allow virtual environments to correctly launch when they have spaces in the path (GH-94903) 2022-07-16 17:38:36 +01:00
Paul Moore 407ff6556c
gh-94772: Fix off-by-one error in Windows launcher (GH-94779) 2022-07-16 10:02:22 +01:00
Paul m. p. Peny bbb2ab70b6
[3.11] bpo-14916: interactive fd is not tied to stdin [type-bug] (#91469)
* bpo-14916: interactive fd is not always stdin

related to https://github.com/python/cpython/pull/31006 merged bugfix

following https://bugs.python.org/issue14916

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-07-16 09:35:19 +01:00
Christian Heimes 944ff8c57c
gh-94801: Use custom flags to check for headers and libs (#94802) 2022-07-15 14:48:01 +02:00
Nir Soffer c22f134211
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)
2022-07-15 09:13:33 +03:00
neonene 9b3f779209
gh-94841: Ensure arena_map_get() is inlined in PyObject_Free() (#94842) 2022-07-14 11:33:25 -07:00
Petr Viktorin 6cbb57f62d
gh-94731: Revert to C-style casts for _Py_CAST (GH-94782)
Co-authored-by: da-woods <dw-git@d-woods.co.uk>
2022-07-14 11:57:18 +02:00
Christian Heimes 81dca70d70
gh-93939: Build C extensions without setup.py (GH-94474)
Combines GH-93940, GH-94452, and GH-94433
2022-07-14 00:51:49 -07:00
Raymond Hettinger ed06ec1ab8
GH-81620: Add random.binomialvariate() (GH-94719) 2022-07-13 09:46:04 -05:00
Christian Heimes 0c66074e9f
gh-94773: deepfreeze: support frozensets with unsortable types (GH-94775) 2022-07-12 18:09:47 +02:00
Kumar Aditya 86c1df1872
bpo-45924: Fix asyncio incorrect traceback when future's exception is raised multiple times (GH-30274) 2022-07-11 13:32:11 +01:00
Kumar Aditya f5b76330cf
GH-94736: Fix _multiprocessing.SemLock subclassing (#94738)
* fix allocator and deallocator

* 📜🤖 Added by blurb_it.

* code review

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
2022-07-11 13:12:36 +01:00
Simon-Martin Schröder 46fc584b00
gh-87822: Make traceback module robust to exceptions from repr() of local values (GH-94691) 2022-07-11 10:14:15 +01:00
John Belmonte da717519ec
gh-93883: elide traceback indicators when possible (#93994)
* gh-93883: elide traceback indicators when possible

Elide traceback column indicators when the entire line of the
frame is implicated.  This reduces traceback length and draws
even more attention to the remaining (very relevant) indicators.

Example:
```
Traceback (most recent call last):
  File "query.py", line 99, in <module>
    bar()
  File "query.py", line 66, in bar
    foo()
  File "query.py", line 37, in foo
    magic_arithmetic('foo')
  File "query.py", line 18, in magic_arithmetic
    return add_counts(x) / 25
           ^^^^^^^^^^^^^
  File "query.py", line 24, in add_counts
    return 25 + query_user(user1) + query_user(user2)
                ^^^^^^^^^^^^^^^^^
  File "query.py", line 32, in query_user
    return 1 + query_count(db, response['a']['b']['c']['user'], retry=True)
                               ~~~~~~~~~~~~~~~~~~^^^^^
TypeError: 'NoneType' object is not subscriptable
```

Rather than going out of our way to provide indicator coverage
in every traceback test suite, the indicator test suite should
be responible for sufficient coverage (e.g. by adding a basic
exception group test to ensure that margin strings are covered).
2022-07-11 07:40:53 +01:00
MonadChains e8e4b550f5
gh-94309: Deprecate typing.Hashable/Sized (GH-94626)
Deprecate typing.Hashable/Sized. Use the collections.abc counterparts directly instead.

To be consistent with PEP 585, deprecated aliases will not raise any DeprecationWarning.
2022-07-10 19:04:01 +01:00