summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Python 3.10.4v3.10.4Pablo Galindo2022-03-231-37/+41
|
* bpo-2604: Make doctest.DocTestCase reset globs in teardown (GH-31932)Miss Islington (bot)2022-03-222-0/+19
| | | | | | | | Co-authored-by: Piet Delport Co-authored-by: Hugo Lopes Tavares Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 7ba7eae50803b11766421cb8aae1780058a57e2b) Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
* bpo-44336: Prevent tests hanging on child process handles on Windows (GH-26578)Jeremy Kloth2022-03-222-185/+117
| | | | | | | Replace the child process `typeperf.exe` with a daemon thread that reads the performance counters directly. This prevents the issues that arise from inherited handles in grandchild processes (see issue37531 for discussion). We only use the load tracker when running tests in multiprocess mode. This prevents inadvertent interactions with tests expecting a single threaded environment. Displaying load is really only helpful for buildbots running in multiprocess mode anyway. Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
* [3.10] bpo-45997: Fix asyncio.Semaphore re-acquiring order (GH-31910) (#32047)Miss Islington (bot)2022-03-222-6/+36
| | | | | Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 32e77154ddfc514a3144d5912bffdd957246fd6c) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.10] bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013)Gregory P. Smith2022-03-201-1/+9
| | | | | Inputs >= 4GiB to `binascii.crc32(...)` when compiled to use the zlib crc32 implementation (the norm on POSIX) no longer return the wrong result.
* [3.10] bpo-47022: Document asynchat, asyncore and smtpd removals in 3.12 ↵Hugo van Kemenade2022-03-203-3/+4
| | | | | | | | (GH-31891) (#31997) Document the deprecation of asyncore, asynchat, and smtpd with a slated removal in Python 3.12 thanks to PEP 594.. (cherry picked from commit 77473846439b8a3eae66de1a1cfe931619f38513) Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
* bpo-42369: Fix thread safety of zipfile._SharedFile.tell (GH-26974)Miss Islington (bot)2022-03-201-1/+3
| | | | | | | | | | | | | The `_SharedFile` tracks its own virtual position into the file as `self._pos` and updates it after reading or seeking. `tell()` should return this position instead of calling into the underlying file object, since if multiple `_SharedFile` instances are being used concurrently on the same file, another one may have moved the real file position. Additionally, calling into the underlying `tell` may expose thread safety issues in the underlying file object because it was called without taking the lock. (cherry picked from commit e730ae7effe4f13b24f1b5fb1fca005709c86acb) Co-authored-by: Kevin Mehall <km@kevinmehall.net>
* bpo-39394: Improve warning message in the re module (GH-31988)Miss Islington (bot)2022-03-192-4/+9
| | | | | | | A warning about inline flags not at the start of the regular expression now contains the position of the flag. (cherry picked from commit 4142961b9f5ad3bf93976a6a7162f8049e354018) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] bpo-40296: Fix supporting generic aliases in pydoc (GH-30253). (GH-31976)Serhiy Storchaka2022-03-183-10/+91
| | | | (cherry picked from commit cd44afc573e2e2de8d7e5a9119c347373066cd10)
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Miss Islington (bot)2022-03-182-3/+5
| | | | | (cherry picked from commit dbbe4d2d0075fa0e95b069fb4780d79aae3514c7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46421: Fix unittest filename evaluation when called as a module (GH-30654)Miss Islington (bot)2022-03-182-1/+12
| | | | | (cherry picked from commit a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb) Co-authored-by: Bader Zaidan <bader@zaidan.pw>
* bpo-47038: Increase a test timeout for slow CI machines (GH-31951)Miss Islington (bot)2022-03-171-1/+1
| | | | | (cherry picked from commit a7c54148322781cb0f332d440a3454d550ef6414) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-47038: Rewrite missed asyncio.wait_for test to use ↵Miss Islington (bot)2022-03-172-26/+24
| | | | | | | | | IsolatedAnsyncioTestCase (GH-31946) (#31948) (cherry picked from commit 3dd9bfac04d3dcdbfd3f8011a6c9d4b9ac8c116a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-47038: Rewrite asyncio.wait_for test to use IsolatedAsyncioTestCase ↵Miss Islington (bot)2022-03-163-313/+270
| | | | | | | | | (GH-31942) (GH-31943) (cherry picked from commit dd0082c627713634c7fd88ad33d18b5cc9f4a7b8) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Python 3.10.3v3.10.3Pablo Galindo2022-03-161-78/+100
|
* bpo-43253: Don't call shutdown() for invalid socket handles (GH-31892)Miss Islington (bot)2022-03-152-1/+9
| | | | | (cherry picked from commit 70155412f1543f100d4aa309b8691cbcabd3e0e1) Co-authored-by: Maximilian Hils <git@maximilianhils.com>
* bpo-20392: Fix inconsistency with uppercase file extensions in ↵Miss Islington (bot)2022-03-152-6/+11
| | | | | | | mimetypes.guess_type (GH-30229) (cherry picked from commit 5dd7ec52b83e7f239774cf7478106fcc7b0a36f3) Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
* Revert "bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)" (GH-31880)Ned Deily2022-03-143-1/+1
| | | | This reverts commit 25962e4e60235645f945d23281431b30b3c3d573 as it breaks test_bdb and test_distutils with installed Pythons.
* [3.10] bpo-47004: Sync with importlib_metadata 4.11.3. (GH-31854). (GH-31857)Jason R. Coombs2022-03-132-3/+40
| | | | | (cherry picked from commit b1e286860742e7ba6fadc75e3ddb6c2899a56919) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-46986: Upgrade bundled setuptools to 60.9.3 (GH-31820)Miss Islington (bot)2022-03-133-1/+1
| | | | | (cherry picked from commit c99ac3c364ee21be72263791b71ee8b55f64de08) Co-authored-by: Pradyun Gedam <pgedam@bloomberg.net>
* [3.10] bpo-46985: Upgrade bundled pip to 22.0.4 (GH-31819) (GH-31849)Miss Islington (bot)2022-03-133-1/+1
| | | | | | | | (cherry picked from commit d87f1b787ed38dfd307d82452f2efe9dc5b93942) Co-authored-by: Pradyun Gedam <pgedam@bloomberg.net> Automerge-Triggered-By: GH:ned-deily
* [3.10] bpo-46581: Propagate private vars via _GenericAlias.copy_with ↵Matt Bogosian2022-03-112-7/+27
| | | | | | | | | | | | | | | | | (GH-31061) (GH-31821) (Cherry-picked from 32bf3597922ac3f613989582afa2bff43bea8a2f.) GH-26091 added the _typevar_types and _paramspec_tvars instance variables to _GenericAlias. However, they were not propagated consistently. This commit addresses the most prominent deficiency identified in bpo-46581 (namely their absence from _GenericAlias.copy_with), but there could be others. Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] bpo-46198: rename duplicate tests and remove unused code (GH-30297) ↵Jelle Zijlstra2022-03-109-14/+7
| | | | | | | (GH-31796) (cherry picked from commit 6c83c8e6b56b57a8a794e7b6c07837be4ce3bb97) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* bpo-24959: fix unittest.assertRaises bug where traceback entries are dropped ↵Miss Islington (bot)2022-03-082-14/+94
| | | | | | | from chained exceptions (GH-23688) (cherry picked from commit 88b7d86a73da9388aa65c96401c2984c8c16f8db) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
* bpo-46955: Expose asyncio.base_events.Server as asyncio.Server (GH-31760)Miss Islington (bot)2022-03-081-1/+1
| | | | | | | | | This change aligns the documentation at https://docs.python.org/3/library/asyncio-eventloop.htmlGH-asyncio.Server with the actual implementation Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit da80d6b2f3beff519cb1457d5e055168c89f7224) Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
* bpo-44439: _ZipWriteFile.write() handle buffer protocol correctly (GH-29468)Miss Islington (bot)2022-03-082-1/+17
| | | | | | Co-authored-by: Marco Ribeiro <marcoffee@users.noreply.github.com> (cherry picked from commit 36dd7396fcd26d8bf9919d536d05d7000becbe5b) Co-authored-by: Ma Lin <animalize@users.noreply.github.com>
* [3.10] bpo-46940: Don't override existing AttributeError suggestion ↵Pablo Galindo Salgado2022-03-071-0/+18
| | | | | | | | | | | | | | | information (GH-31710) (GH-31724) When an exception is created in a nested call to PyObject_GetAttr, any external calls will override the context information of the AttributeError that we have already placed in the most internal call. This will cause the suggestions we create to nor work properly as the attribute name and object that we will be using are the incorrect ones. To avoid this, we need to check first if these attributes are already set and bail out if that's the case.. (cherry picked from commit 3b3be05a164da43f201e35b6dafbc840993a4d18) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-43292: Fix file leak in `ET.iterparse()` when not exhausted (GH-31696)Miss Islington (bot)2022-03-072-7/+17
| | | | | | Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit 496c428de3318c9c5770937491b71dc3d3f18a6a) Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>
* bpo-14156: Make argparse.FileType work correctly for binary file modes when ↵Miss Islington (bot)2022-03-062-17/+106
| | | | | | | | | argument is '-' (GH-13165) Also made modes containing 'a' or 'x' act the same as a mode containing 'w' when argument is '-' (so 'a'/'x' return sys.stdout like 'w', and 'ab'/'xb' return sys.stdout.buffer like 'wb'). (cherry picked from commit eafec26ae5327bb23b6dace2650b074c3327dfa0) Co-authored-by: MojoVampire <shadowranger+github@gmail.com>
* Lib/typing.py copy edits originating from GH-31061 (GH-31684)Miss Islington (bot)2022-03-051-3/+3
| | | | | (cherry picked from commit 2031149b9a7dfab5f5bad63f417e19f4fc2b9661) Co-authored-by: Matt Bogosian <eb3f73+github+com@yaymail.com>
* bpo-25415: Remove confusing sentence from IOBase docstrings (PR-31631)Miss Islington (bot)2022-03-041-3/+2
| | | | | (cherry picked from commit cedd2473a9bebe07f3ced4f341cf58a2fef07b03) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
* [3.10] bpo-46913: Fix test_ctypes, test_hashlib, test_faulthandler on UBSan ↵Victor Stinner2022-03-042-8/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-31675) * bpo-46913: Fix test_faulthandler.test_sigfpe() on UBSAN (GH-31662) Disable undefined behavior sanitizer (UBSAN) on faulthandler_sigfpe(). (cherry picked from commit 4173d677a1d7c72bb32d292fbff1b4cf073d615c) * bpo-46913: Fix test_faulthandler.test_read_null() on UBSan (GH31672) Disable undefined behavior sanitizer (UBSan) on faulthandler._read_null(). (cherry picked from commit 65b92ccdec2ee4a99e54aaf7ae2d9bbc2ebfe549) * bpo-46913: test_hashlib skips _sha3 tests on UBSan (GH-31673) If Python is built with UBSan, test_hashlib skips tests on the _sha3 extension which currently has undefined behaviors. This change allows to run test_hashlib to check for new UBSan regression, but the known _sha3 undefined behavior must be fixed. (cherry picked from commit 6d0d7d2b8c1e04fd51c6cb29cc09a41b60b97b7b) * bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674) If Python is built with UBSan, test_ctypes now skips test_shorts(). This change allows to run test_ctypes to check for new UBSan regression, but the known test_shorts() undefined behavior must be fixed. (cherry picked from commit ad1b04451d3aca2c6fa6dbe2891676a4e0baac49)
* bpo-46643: Fix stringized P.args/P.kwargs with get_type_hints (GH-31238)Miss Islington (bot)2022-03-032-1/+14
| | | | | (cherry picked from commit 75d2d945b4e28ca34506b2d4902367b61a8dff82) Co-authored-by: Gregory Beauregard <greg@greg.red>
* [3.10] bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632) (GH-31634)Victor Stinner2022-03-0214-49/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor sanitiser skip tests into test.support (GH-30889) * Refactor sanitizer skip tests into test.support (cherry picked from commit b1cb8430504931f7854eac5d32cba74770078a4e) * Add skips to crashing tests under sanitizers instead of manually skipping them (GH-30897) (cherry picked from commit a27505345e34d462139f5f8b6b5e7c9a59955150) * bpo-46633: Skip tests on ASAN and/or MSAN builds (GH-31632) Skip tests on ASAN and/or MSAN builds: * multiprocessing tests * test___all__ * test_concurrent_futures * test_decimal * test_peg_generator * test_tools (cherry picked from commit 9204bb72a2da5885facc747e63d2bd2d654606fe) Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
* bpo-46756: Fix authorization check in urllib.request (GH-31353)Miss Islington (bot)2022-02-252-8/+25
| | | | | | | | | Fix a bug in urllib.request.HTTPPasswordMgr.find_user_password() and urllib.request.HTTPPasswordMgrWithPriorAuth.is_authenticated() which allowed to bypass authorization. For example, access to URI "example.org/foobar" was allowed if the user was authorized for URI "example.org/foo". (cherry picked from commit e2e72567a1c94c548868f6ee5329363e6036057a) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46820: Refactor tests for ambiguous end of numerical literal (GH-31494)Miss Islington (bot)2022-02-251-89/+25
| | | | | (cherry picked from commit 98c3bea4d1c7335135e60946d0ec8cd5031fb6c0) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* Inherit asyncio proactor datagram transport from asyncio.DatagramTransport ↵Miss Islington (bot)2022-02-232-1/+3
| | | | | | | | | (GH-31512) (GH-31514) (cherry picked from commit cff4d5c5d29528299ec1ac5b3b3a6f7735577c01) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46827: pass sock.type to getaddrinfo in sock_connect (GH-31499)Miss Islington (bot)2022-02-222-1/+21
| | | | | | | | Co-authored-by: Thomas Grainger <tagrain@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 8fb94893e4a870ed3533e80c4bc2f1ebf1cfa9e7) Co-authored-by: Thomas Grainger <tagrain@gmail.com>
* bpo-46820: Fix a SyntaxError in a numeric literal followed by "not in" ↵Miss Islington (bot)2022-02-221-0/+9
| | | | | | | | | | | (GH-31479) (GH-31493) Fix parsing a numeric literal immediately (without spaces) followed by "not in" keywords, like in "1not in x". Now the parser only emits a warning, not a syntax error. (cherry picked from commit 090e5c4b946b28f50fce445916c5d3ec45c8f45f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46811: Make test suite support Expat >=2.4.5 (GH-31453) (GH-31472)Miss Islington (bot)2022-02-212-8/+15
| | | | | | | | | | | | | | | | | | | Curly brackets were never allowed in namespace URIs according to RFC 3986, and so-called namespace-validating XML parsers have the right to reject them a invalid URIs. libexpat >=2.4.5 has become strcter in that regard due to related security issues; with ET.XML instantiating a namespace-aware parser under the hood, this test has no future in CPython. References: - https://datatracker.ietf.org/doc/html/rfc3968 - https://www.w3.org/TR/xml-names/ Also, test_minidom.py: Support Expat >=2.4.5 (cherry picked from commit 2cae93832f46b245847bdc252456ddf7742ef45e) Co-authored-by: Sebastian Pipping <sebastian@pipping.org>
* bpo-39327: Close file descriptors as soon as possible in shutil.rmtree ↵Miss Islington (bot)2022-02-211-2/+10
| | | | | | | | | | | (GH-31384) It fixes the "Text File Busy" OSError when using 'rmtree' on a windows-managed filesystem in via the VirtualBox shared folder (and possible other scenarios like a windows-managed network file system). (cherry picked from commit b77158b4da449ec5b8f682816a79d004fd65ed07) Co-authored-by: Lital Natan <litaln@gmail.com>
* [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642) (GH-31030)Erlend Egeberg Aasland2022-02-211-63/+65
| | | | | | | | | | | * [3.10] bpo-43853: Expand test suite for SQLite UDF's (GH-27642). (cherry picked from commit 3eb3b4f270757f66c7fb6dcf5afa416ee1582a4b) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> * Fix test_func_return_too_large_int GH-27613 (bpo 44839) was not backported, so exceptions differ between main (3.11) and older versions.
* bpo-46672: fix `NameError` in `asyncio.gather` if type check fails ↵Miss Islington (bot)2022-02-202-1/+16
| | | | | | | | | | (GH-31187) (GH-31440) Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> (cherry picked from commit 4ab8167b9c60d1a04b2e3116d0c52db254b68cda) Co-authored-by: Nikita Sobolev <mail@sobolevn.me> Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* [3.10] replace `self` param with more appropriate `cls` in classmethods ↵Andrew Svetlov2022-02-201-2/+2
| | | | | | | | | (GH-31402) (GH-31446) (cherry picked from commit a3fcca4af1cb418dc802feb75100ecc1a286afaa) Co-authored-by: Josh Smith <cmyuiosu@gmail.com> Co-authored-by: Josh Smith <cmyuiosu@gmail.com>
* [3.10] Raise TypeError if SSLSocket is passed to asyncio transport-based ↵Andrew Svetlov2022-02-202-10/+20
| | | | | | | methods (GH-31442). (GH-31443) (cherry picked from commit 1f9d4c93af380d00bf2e24bc5f5ce662d41504aa) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-46603: improve coverage of `typing._strip_annotations` (GH-31063)Miss Islington (bot)2022-02-191-0/+9
| | | | | (cherry picked from commit 25c0b9d243b64ccd2eeab483089eaf7e4b4d5834) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
* Fix mistake in barry_as_FLUFL test (GH-31392)Miss Islington (bot)2022-02-181-1/+1
| | | | | | Use assertEqual(), not assertTrue(lineno, 2) (cherry picked from commit 5f1c205dcec0adf68b76ba78247a0ec1fa9a7b66) Co-authored-by: Patrick Reader <_@pxeger.com>
* [3.10] bpo-46333: Honor `module` parameter in ForwardRef (GH-30536) (GH-31379)Miss Islington (bot)2022-02-172-2/+15
| | | | | | | | | | | | | | | The `module` parameter carries semantic information about the forward ref. Forward refs are different if they refer to different module even if they have the same name. This affects the `__eq__`, `__repr__` and `__hash__` methods. Co-authored-by: Andreas Hangauer <andreas.hangauer@siemens.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> (cherry picked from commit 6e7b813195f9bd6a2a15c1f00ef2c0180f6c751a) Co-authored-by: aha79 <34090357+aha79@users.noreply.github.com> Automerge-Triggered-By: GH:JelleZijlstra
* [3.10] bpo-46724: Use `JUMP_ABSOLUTE` for all backward jumps. (GH-31326) ↵Mark Shannon2022-02-161-2/+2
| | | | (GH-31354)
* bpo-46762: Fix an assert failure in f-strings where > or < is the last ↵Miss Islington (bot)2022-02-161-0/+2
| | | | | | | character if the f-string is missing a trailing right brace. (GH-31365) (cherry picked from commit ffd9f8ff84ed53c956b16d027f7d2926ea631051) Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>