Commit Graph

48926 Commits

Author SHA1 Message Date
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
Christian Heimes 8184f0fce3
gh-95174: Handle missing waitpid and gethostbyname in WASI (GH-95181) 2022-07-24 08:04:06 +02: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
Raymond Hettinger a2fbc51198
Compute v only when needed. (#95183) 2022-07-23 18:07:17 -05:00
Christian Heimes 23f6944c37
gh-90385: Add skip_unless_symlink decorator to test_walk_symlink_location (GH-95182) 2022-07-23 23:42:04 +02:00
Christian Heimes 6839324894
gh-90473: Fix more tests on platforms without umask (GH-95164) 2022-07-23 12:26:31 +02: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
David Benjamin 934b25dcc4
Fix typo in PROTOCOL_TO_TLS_VERSION in test_ssl (GH-95119)
This appears to be a typo. It causes try_protocol_combo to try to turn
on SSL 3.0 when testing PROTOCOL_SSLv23 (aka PROTOCOL_TLS), which
doesn't make any sense. Fix it to be PROTOCOL_SSLv3.

Without this, try_protocol_combo is actually setting
context.minimum_version to SSLv3 when called as
try_protocol_combo(ssl.PROTOCOL_TLS, ssl.PROTOCOL_TLS, True)

One would think this causes a no-ssl3 OpenSSL build to fail, but OpenSSL
forgot to make SSL_CTX_set_min_proto_version(SSL3_VERSION) does not
notice no-ssl3, so this typo has gone undetected. But we should still
fix the typo because, presumably, a future version of OpenSSL will
remove SSL 3.0 and do so more thoroughly, at which point this will
break.
2022-07-21 17:38:15 -07:00
Shantanu b4378948a0
gh-95105: Return Iterator from wsgiref.types.InputStream.__iter__ (#95106) 2022-07-21 13:26:04 -07:00
Thomas Grainger 834bd5dd76
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.
2022-07-21 14:35:20 +03:00
Barney Gale fd4a42d890
gh-82116: add comment explaining use of `list(scandir_it)` in pathlib. (GH-94939)
Automerge-Triggered-By: GH:brettcannon
2022-07-20 14:34:13 -07:00
Brandt Bucher 742d4614e1
GH-91409: Don't overwrite valid locations with NOP locations (GH-95067) 2022-07-20 14:27:31 -07: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
Erlend Egeberg Aasland 9d09e7b026
gh-94998: Remove redundant condition in test_sqlite3/__main__.py (#95052) 2022-07-20 18:07:47 +02:00
Oleg Iarygin ed4441567e
gh-94844: Add pathlib support to shutil archive management (GH-94846)
Co-authored-by: Barney Gale <barney.gale@gmail.com>
2022-07-20 18:55:12 +03:00
Terry Jan Reedy bd390ef825
gh-90654: Remove unneeded blank line (#95044) 2022-07-20 05:38:56 -04:00
Terry Jan Reedy acb105a7c1
gh-90654: Add item missing from idlelib/NEWS.txt (#95038) 2022-07-20 03:18:10 -04:00
Erlend Egeberg Aasland be09bae608
gh-93370: Don't print deprecated pysqlite version in test_sqlite3 (#95017) 2022-07-19 23:04:20 +02:00
Brandt Bucher f36589510b
GH-91153: Handle mutating __index__ methods in bytearray item assignment (GH-94891) 2022-07-19 09:42:40 -07:00
Florian Bruhin 3f2dd0a7c0
test_concurrent_futures: Fix unneeded/confusing format call (#93119)
Added in 339fd46cb7 - but as noted in a comment, the test only tests ThreadPoolExecutor.
2022-07-18 19:12: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
Ethan Furman 73eab9f35c
Revert "gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913)" (#94985)
This reverts commit c20186c397.
2022-07-18 13:22:52 -07:00
Michael Droettboom 4b5360c7d5
Revert "gh-94816: Improve coverage of decode_linetable (GH-94853)" (GH-94982)
This reverts commit 20b9d2a658.
2022-07-18 13:08:31 -07:00
Brandt Bucher daf68ba92f
GH-94822: Don't specialize when metaclasses are involved (GH-94892) 2022-07-18 10:10:22 -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
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
Ethan Furman c961d14f85
gh-94601: [Enum] fix inheritance for __str__ and friends (GH-94942) 2022-07-17 18:51:04 -07:00
Thomas Grainger 07aeb7405e
gh-72889: Remove redundant mock.Mock()._is_coroutine = False workarounds (#94926) 2022-07-17 10:21:58 -07:00
Steve Dower 044a593cbb
gh-91348: Restore frame argument to sys._getframe audit event (GH-94928) 2022-07-17 16:11:24 +01:00
Ethan Furman c20186c397
gh-93910: [Enum] restore member.member restriction while keeping performance boost (GH-94913) 2022-07-16 18:13:57 -07: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
Paul Moore 407ff6556c
gh-94772: Fix off-by-one error in Windows launcher (GH-94779) 2022-07-16 10:02:22 +01:00
Michael Droettboom 582ae86b3f
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
2022-07-15 10:00:27 -07: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
Michael Droettboom df4d53a09a
gh-94808: Add coverage for boolobject.c:bool_new (GH-94859)
`bool_new` had no coverage.

Automerge-Triggered-By: GH:brandtbucher
2022-07-14 16:53:06 -07:00
Michael Droettboom 625ba9bdff
GH-94808: Cover handling non-finite numbers from round when ndigits is provided (GH-94860) 2022-07-14 14:46:40 -07:00
Michael Droettboom 20b9d2a658
gh-94816: Improve coverage of decode_linetable (GH-94853)
This makes calls to co_lnotab to exercise this code, as well
as generating synthetically large code to exercise the corner
cases where line numbers need multiple bytes.

Automerge-Triggered-By: GH:brandtbucher
2022-07-14 14:34:50 -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
Terry Jan Reedy 6a15f918b5
idlelib: replace 'while 1' with 'while True' (#94827) 2022-07-13 21:09:07 -04:00
da-woods 8d7089f0a0
gh-94499 Add test for private name mangling in class pattern matching (#94500)
The current status quo is that private attribute names are not
mangled when a class is matched. I've added a test to
document/legimize this behaviour.

Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
2022-07-13 09:13:10 -07:00
Raymond Hettinger ed06ec1ab8
GH-81620: Add random.binomialvariate() (GH-94719) 2022-07-13 09:46:04 -05:00
Itay cceac5dd06
gh-94713 - Replacing while 1 with while True (#94714) 2022-07-12 22:53:14 -05:00