summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
...
* bpo-29890: Test IPv*Interface construction with tuple argument (GH-30862)Miss Islington (bot)2022-05-031-0/+8
| | | | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit b295a92c50b128e494f47c28f12b8e9eac2927ea) Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
* bpo-46604: fix function name in ssl module docstring (GH-31064)Miss Islington (bot)2022-05-031-3/+4
| | | | | | | | The function fetch_server_certificate is replaced by get_server_certificate in the module. I reflected the change in the module docstrings. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit feca9bbd1f6489f2b6d2783bfc22fdb96e45b69f) Co-authored-by: Kossi GLOKPOR <83467320+glk0@users.noreply.github.com>
* bpo-46415: Use f-string for ValueError in ↵Miss Islington (bot)2022-05-032-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | ipaddress.ip_{address,network,interface} helper functions (GH-30642) `IPv*Network` and `IPv*Interface` constructors accept a 2-tuple of (address description, netmask) as the address parameter. When the tuple-based address is used errors are not propagated correctly through the `ipaddress.ip_*` helper because of the %-formatting now expecting several arguments: In [7]: ipaddress.ip_network(("192.168.100.0", "fooo")) ... TypeError: not all arguments converted during string formatting Compared to: In [8]: ipaddress.IPv4Network(("192.168.100.0", "foo")) ... NetmaskValueError: 'foo' is not a valid netmask Use an f-string to make sure the error is always properly formatted. Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 52dc9c3066bcdc67a7a45d41cf158ecb1434d5f3) Co-authored-by: Thomas Cellerier <thomascellerier@gmail.com>
* gh-92106: Add test that subscription works on arbitrary TypedDicts (GH-92176)Miss Islington (bot)2022-05-031-0/+13
| | | | | (cherry picked from commit 81fb3548be5a18bf40a6f4505a02cc7fb72c9c34) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-46787: Fix `ProcessPoolExecutor exception` memory leak (GH-31408) (GH-31408)Miss Islington (bot)2022-05-021-0/+3
| | | | | | | Do not store `ProcessPoolExecutor` work item exception traceback that prevents exception frame locals from being garbage collected. (cherry picked from commit 9c204b148fad9742ed19b3bce173073cdec79819) Co-authored-by: themylogin <themylogin@gmail.com>
* [3.9] Remove effbot urls (GH-26308). (#92162)Thaddeus14992022-05-021-1/+0
| | | | | (cherry picked from commit e9f66aedf44ccc3be27975cfb070a44ce6a6bd13) Co-authored-by: E-Paine <63801254+E-Paine@users.noreply.github.com>
* concurrent.futures: Fix typo in docstring (GH-92121)Miss Islington (bot)2022-05-021-1/+1
| | | | | (cherry picked from commit b11243e85e020ed2f524bdd83c339faf11ef03d4) Co-authored-by: Yiannis Hadjicharalambous <hadjicharalambous.yiannis@gmail.com>
* bpo-36819: Fix crashes in built-in encoders with weird error handlers (GH-28593)Miss Islington (bot)2022-05-021-9/+168
| | | | | | | | | If the error handler returns position less or equal than the starting position of non-encodable characters, most of built-in encoders didn't properly re-size the output buffer. This led to out-of-bounds writes, and segfaults. (cherry picked from commit 18b07d773e09a2719e69aeaa925d5abb7ba0c068) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] gh-92049: Forbid pickling constants re._constants.SUCCESS etc ↵Serhiy Storchaka2022-05-011-0/+2
| | | | | | | | (GH-92070) (GH-92073) (GH-92102) Previously, pickling did not fail, but the result could not be unpickled. (cherry picked from commit 6d0d547033e295f91f05030322acfbb0e280fc1f) (cherry picked from commit e8ff3c92f69b475aa20ba7c08efccbc329f9b42e)
* bpo-43323: Fix UnicodeEncodeError in the email module (GH-32137)Miss Islington (bot)2022-04-305-6/+34
| | | | | | | | It was raised if the charset itself contains characters not encodable in UTF-8 (in particular \udcxx characters representing non-decodable bytes in the source). (cherry picked from commit e91dee87edcf6dee5dd78053004d76e5f05456d4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-26792: Improve docstrings of runpy module run_functions (GH-30729)Miss Islington (bot)2022-04-291-8/+28
| | | | | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com> (cherry picked from commit 117836f123a1c65d9ba50401822b883f11f0a347) Co-authored-by: Humbled Drugman <humbled.drugman@gmail.com>
* gh-91832: Add 'required' attr to argparse.Action repr (GH-91841)Miss Islington (bot)2022-04-282-2/+5
| | | | | | | | | | | | GH- Adding 'required' to names in Lib.argparse.Action gh-91832: Added 'required' to the list `names` in `Lib.argparse.Action`. Changed constant strings that test the Action object. Automerge-Triggered-By: GH:merwok (cherry picked from commit 4ed3900041c688a02dca1eb3323083d720dd0d93) Co-authored-by: Abhigyan Bose <abhigyandeepbose@gmail.com>
* [3.9] gh-91810: Expand ElementTree.write() tests to use non-ASCII data ↵Serhiy Storchaka2022-04-271-17/+80
| | | | | | (GH-91989). (GH-91994) (cherry picked from commit f60b4c3d74f241775f80affe60dcba6448634fe3)
* Fix missing `f` prefix on f-strings (GH-91910)Miss Islington (bot)2022-04-272-2/+2
| | | | | (cherry picked from commit f882d33778ee2625ab32d90e28edb6878fb8af93) Co-authored-by: Alexander Shadchin <alexandr.shadchin@gmail.com>
* gh-91914: Fix test_curses on non-UTF-8 locale (GH-91919)Miss Islington (bot)2022-04-261-1/+6
| | | | | (cherry picked from commit f41c16bf512778fca4bfabca887c4c303cc21896) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* gh-91916: Fix test_runpy on non-UTF-8 locale (GH-91920)Miss Islington (bot)2022-04-261-2/+1
| | | | | | | | | | | | If use a non-builtin codec, partially implemented in Python (e.g. ISO-8859-15), a new RecursionError (with empty error message) can be raised while handle a RecursionError. Testing for error message was needed to distinguish a recursion error from arbitrary RuntimeError. After introducing RecursionError, it became unnecessary. (cherry picked from commit a568585069174cec35ce26cdf4d4862c634d9f6d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* RE: Add more tests for inline flag "x" and re.VERBOSE (GH-91854)Miss Islington (bot)2022-04-231-5/+27
| | | | | (cherry picked from commit 6b45076bd62407103433daea8acf085a99e6cb7e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] gh-91575: Update case-insensitive matching in re to the latest Unicode ↵Miss Islington (bot)2022-04-222-9/+76
| | | | | | | | | version (GH-91580). (GH-91661) (GH-91837) (cherry picked from commit 1c2fcebf3c5e2ab41d376bb481834445617c8f3c) (cherry picked from commit 1748816e80b23744667e239b49b477c0e283d201) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] gh-91700: Validate the group number in conditional expression in RE ↵Miss Islington (bot)2022-04-222-0/+12
| | | | | | | | | | | | | (GH-91702) (GH-91831) (GH-91836) In expression (?(group)...) an appropriate re.error is now raised if the group number refers to not defined group. Previously it raised RuntimeError: invalid SRE code. (cherry picked from commit 48ec61a89a959071206549819448405c2cea61b0) (cherry picked from commit 080781cd49b13da4a73db87b6f5e0c7aeec83e92) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] gh-90568: Fix exception type for \N with a named sequence in RE ↵Miss Islington (bot)2022-04-222-2/+6
| | | | | | | | | | (GH-91665) (GH-91830) (GH-91834) re.error is now raised instead of TypeError. (cherry picked from commit 6ccfa31421393910b52936e0447625db06f2a655) (cherry picked from commit 9c18d783c38fca57a63b61aa778d8a8d18945d95) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.10] gh-91676 gh-91260 unittest.IsolatedAsyncioTestCase no longer leaks ↵Miss Islington (bot)2022-04-191-0/+2
| | | | | | | | | | its executor (GH-91680) For things like test_asyncio.test_thread this was causing frequent "environment modified by test" errors as the executor threads had not always stopped running after the test was over. (cherry picked from commit 61570ae0bc1507a62bee9d8b9bc2ff7155da7061) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* gh-91231: multiprocessing BaseManager waits 1.0 second (GH-91701)Miss Islington (bot)2022-04-191-1/+1
| | | | | | | | Shutting down a multiprocessing BaseManager now waits for 1 second until the process completes, rather than 0.1 second, after the process is terminated. (cherry picked from commit a885f10325eb2fc27cd50ace5614666ea688ab66) Co-authored-by: Victor Stinner <vstinner@python.org>
* Add more tests for group names and refs in RE (GH-91695)Miss Islington (bot)2022-04-191-15/+41
| | | | | (cherry picked from commit 74070085da5322ac83c954f101f2caa150655be2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.9] [3.10] gh-91607: Fix several test_concurrent_futures tests to actually ↵Gregory P. Smith2022-04-171-54/+42
| | | | | | | | | | | | | | | | | | | | test what they claim (GH-91600) (GH-91612) (#91617) * Fix test_concurrent_futures to actually test what it says. Many ProcessPoolExecutor based tests were ignoring the mp_context and using the default instead. This meant we lacked proper test coverage of all of them. Also removes the old _prime_executor() worker delay seeding code as it appears to have no point and causes 20-30 seconds extra latency on this already long test. It also interfered with some of the refactoring to fix the above to not needlessly create their own executor when setUp has already created an appropriate one. * Don't import the name from multiprocessing directly to avoid confusion. (cherry picked from commit 7fa3a5a2197896066e3fe53ee325ac6ab54c3414) (cherry picked from commit 9a458934f7be37c59525350f1f9ecbdcd69903c1)
* gh-90879: Fix missing parameter for put_nowait() (GH-91514)Miss Islington (bot)2022-04-141-1/+1
| | | | | (cherry picked from commit 0fc3517cf46ec79b4681c31916d4081055a7ed09) Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
* gh-87497: Document that urllib.request sends headers in camel case (GH-24661)Miss Islington (bot)2022-04-141-0/+9
| | | | | | Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com> (cherry picked from commit 325d6f50357474c7d9fd2475be0e2481f7ae0476) Co-authored-by: Alix Lourme <alix.lourme@gmail.com>
* gh-88513: clarify shutil.copytree's dirs_exist_ok arg (GH-91434) (GH-91465)Miss Islington (bot)2022-04-131-3/+5
| | | | | | | * add a paragraph to document this kwarg in detail * update docstring in the source accordingly (cherry picked from commit f33e2c87a83917b5139d97fd8ef7cba7223ebef5) Co-authored-by: Jack DeVries <jdevries3133@gmail.com>
* [3.9] GH-89074: Fixed IsolatedAsyncioTestCase from throwing an exception on ↵Miss Islington (bot)2022-04-122-1/+21
| | | | | | | leaked tasks (GH-27765) (#91471) (cherry picked from commit 2cb1a6806c0cefab0c3a40fdd428a89a4392570e) Co-authored-by: Bar Harel <bar.harel@biocatch.com>
* bpo-47103: Copy pgort140.dll into output directory when building ↵Steve Dower2022-04-081-14/+5
| | | | PGInstrument on Windows (GH-32083)
* Fix whitespace/indentation issues in test_sys (GH-32369) (GH-32373)Ken Jin2022-04-061-2/+2
| | | (cherry picked from commit da922409ac3e65c6bf2911401c7dfdf8ee6e0036)
* bpo-46484:Add test for Calendar.iterweekdays (GH-30825)Miss Islington (bot)2022-04-041-0/+8
| | | | | (cherry picked from commit 48269ea9fdbc5804f80962364f95e69097c417ba) Co-authored-by: 180909 <734461790@qq.com>
* bpo-47205: Skip error check of sched_get/setaffinity on FreeBSD (GH-32285)Miss Islington (bot)2022-04-031-2/+6
| | | | | (cherry picked from commit b82cdd1dac9a9be52051abd90a1ce69236ac41f4) Co-authored-by: Christian Heimes <christian@python.org>
* [3.9] bpo-47089: Avoid test_compileall failures on Windows (GH-32037). ↵Jeremy Kloth2022-04-021-49/+36
| | | | | | | | (GH-32240) * [3.9] bpo-47089: Avoid test_compileall failures on Windows (GH-32037). (cherry picked from commit 76b8a075b8a79b08468fd0ed06a489a5c815bc11) Co-authored-by: Jeremy Kloth <jeremy.kloth@gmail.com>
* Fix typo in the sqlite3 docs (GH-31915) (GH-32158)Miss Islington (bot)2022-03-291-1/+1
| | | | | | Co-authored-by: Jonathan <89750679+AHypnotoad@users.noreply.github.com> (cherry picked from commit 66584c890d016e40d707400130d1cd98f2aedde9) Co-authored-by: Jonathan <jonathan.joyner94@gmail.com>
* bpo-27929: resolve names only for AF_INET/AF_INET6 with asyncio (GH-32131)Miss Islington (bot)2022-03-281-1/+2
| | | | | | Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com> (cherry picked from commit 5c30388f3c586ba2f33e349e22e5949cb92de621) Co-authored-by: Vincent Bernat <vincent@bernat.ch>
* Python 3.9.12v3.9.12Łukasz Langa2022-03-231-37/+41
|
* bpo-47101: list only activated algorithms in hashlib.algorithms_available ↵Miss Islington (bot)2022-03-231-0/+4
| | | | | | | (GH-32076) (cherry picked from commit 48e2010d92076b472922fa632fffc98ee150004f) Co-authored-by: Christian Heimes <christian@python.org>
* 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-183/+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.9] bpo-45997: Fix asyncio.Semaphore re-acquiring order (GH-31910) (GH-32049)Andrew Svetlov2022-03-222-6/+35
| | | | | | 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>
* bpo-38256: Fix binascii.crc32 large input. (GH-32000) (GH-32013) (GH-32015)Gregory P. Smith2022-03-211-0/+10
| | | | | | | Inputs >= 4GiB to `binascii.crc32(...)` when compiled to use the zlib crc32 implementation (the norm on POSIX) no longer return the wrong result. (cherry picked from commit 4c989e19c84ec224655bbbde9422e16d4a838a80)
* 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>
* [3.9] bpo-40296: Fix supporting generic aliases in pydoc (GH-30253). ↵Miss Islington (bot)2022-03-193-10/+82
| | | | | | | (GH-31976) (GH-31981) (cherry picked from commit cd44afc573e2e2de8d7e5a9119c347373066cd10) (cherry picked from commit a5b7678a67ac99edd50822827b772e7d9afc8e64)
* 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.9] bpo-14156: Make argparse.FileType work correctly for binary file modes ↵Serhiy Storchaka2022-03-182-17/+106
| | | | | | | | | | when argument is '-' (GH-13165) (GH-31979) 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>
* [3.9] bpo-46421: Fix unittest filename evaluation when called as a module ↵Miss Islington (bot)2022-03-182-1/+12
| | | | | | | | (GH-30654) (GH-31970) (cherry picked from commit a0db11b10fca0fee6bb2b8d6277e266bad8c0fdb) Co-authored-by: Bader Zaidan <bader@zaidan.pw>
* [3.9] bpo-42782: fix broken shutil test (GH-31971)Jelle Zijlstra2022-03-181-3/+3
| | | | | We were using os_helper, which doesn't exist on 3.9. This wasn't caught because the test is only run as root. I confirmed that when run as root, the test previously failed and now passes.
* bpo-45979: Fix Tkinter tests with old Tk (>= 8.5.12) (GH-31938)Miss Islington (bot)2022-03-172-3/+5
| | | | | (cherry picked from commit dbbe4d2d0075fa0e95b069fb4780d79aae3514c7) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* 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-162-26/+24
| | | | | | | IsolatedAnsyncioTestCase (GH-31946) (cherry picked from commit 3dd9bfac04d3dcdbfd3f8011a6c9d4b9ac8c116a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>