summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
* bpo-41811: create SortKey members using first given value (GH-22316) (GH-22326)Miss Islington (bot)2020-09-191-0/+4
| | | | | (cherry picked from commit ae0d2a33ec05aece939a959d36fcf1df1e210a08) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.8] bpo-39728: Enum: fix duplicate `ValueError` (GH-22277) (GH-22283)Ethan Furman2020-09-171-1/+18
| | | | | | | fix default `_missing_` to return `None` instead of raising a `ValueError` Co-authored-by: Andrey Darascheka <andrei.daraschenka@leverx.com>. (cherry picked from commit c95ad7a91fbd7636f33a098d3b39964ab083bf49) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* _auto_called cleanup (GH-22285)Miss Islington (bot)2020-09-171-0/+11
| | | | | (cherry picked from commit fc23a9483ef0d7c98bea9f82392377d0b6ef7b18) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-41517: do not allow Enums to be extended (GH-22271)Miss Islington (bot)2020-09-161-0/+3
| | | | | | fix bug that let Enums be extended via multiple inheritance (cherry picked from commit 3064dbf5df1021e85b507366a7ea448c8895efe7) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-41789: honor object overrides in Enum classes (GH-22250)Miss Islington (bot)2020-09-161-1/+8
| | | | | | | | EnumMeta double-checks that `__repr__`, `__str__`, `__format__`, and `__reduce_ex__` are not the same as `object`'s, and replaces them if they are -- even if that replacement was intentionally done in the Enum being constructed. This patch fixes that. Automerge-Triggered-By: @ethanfurman (cherry picked from commit 22415ad62555d79bd583b4a7d6a96006624a8277) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* bpo-39587: Enum - use correct mixed-in data type (GH-22263)Miss Islington (bot)2020-09-151-0/+43
| | | | | (cherry picked from commit bff01f3a3aac0c15fe8fbe8b2f561f7927d117a1) Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
* [3.8] bpo-37479: Enum - use correct __format__ (GH-14545)Ethan Furman2020-09-131-1/+52
| | | | | | * bpo-37479: on Enum subclasses with mixins, __format__ uses overridden __str__. (cherry picked from commit 2f19e82fbe98ce86bcd98a176328af2808b678e8) Co-authored-by: thatneat <thatneat@users.noreply.github.com>
* bpo-41731: Make test_cmd_line_script pass with -vv (GH-22206)Miss Islington (bot)2020-09-121-1/+1
| | | | | | | Argument script_exec_args is usually an absolute file name, but twice has form ['-m', 'module_name']. (cherry picked from commit 7e711ead26fea6465e0ef2e3b8880b57ba8fc129) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-41525: Make the Python program help ASCII-only (GH-21836)Miss Islington (bot)2020-09-091-1/+5
| | | | | (cherry picked from commit 58de1dd6a8677bd213802c19204b827cb7134695) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41720: Add "return NotImplemented" in turtle.Vec2D.__rmul__(). (GH-22092)Miss Islington (bot)2020-09-071-2/+16
| | | | | (cherry picked from commit fd4cafd4700dc03cb05fc2e5263c2666d785d6e3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41401: Fix test_fspath_support in test_io. (GH-21640) (GH-22133) (GH-22135)Victor Stinner2020-09-071-1/+1
| | | | | | | | The error is exposed on non-UTF-8 locales. (cherry picked from commit 67987acd5dc9776f55f4e139e2b3d9e7a6434d9f) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> (cherry picked from commit c73ee5acc96b4bbd6885156883b224b8cc3e470c)
* bpo-41700: Skip test if the locale is not supported (GH-22081) (GH-22086)Miss Islington (bot)2020-09-041-1/+4
| | | | | | | (cherry picked from commit 54a66ade2067c373d31003ad260e1b7d14c81564) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* bpo-39010: Improve test shutdown (GH-22066) (#22083)Miss Islington (bot)2020-09-031-3/+11
| | | | | | | | | | | | Simply closing the event loop isn't enough to avoid warnings. If we don't also shut down the event loop's default executor, it sometimes logs a "dangling thread" warning. Follow-up to GH-22017 (cherry picked from commit be435ae2b064dc64f04475bec632862e1dbf605f) Co-authored-by: Ben Darnell <ben@bendarnell.com> Co-authored-by: Ben Darnell <ben@bendarnell.com>
* bpo-41696: Fix handling of debug mode in asyncio.run (GH-22069) (#22072)Miss Islington (bot)2020-09-031-0/+3
| | | | | | | | | | | | | | | | * bpo-41696: Fix handling of debug mode in asyncio.run This allows PYTHONASYNCIODEBUG or -X dev to enable asyncio debug mode when using asyncio.run * 📜🤖 Added by blurb_it. Co-authored-by: hauntsaninja <> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> (cherry picked from commit 0770ad948cb6d9f7f6c4002efd83e27c27069808) Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
* bpo-39010: Fix errors logged on proactor loop restart (GH-22017) (#22035)Miss Islington (bot)2020-09-032-0/+21
| | | | | | | | | | | Stopping and restarting a proactor event loop on windows can lead to spurious errors logged (ConnectionResetError while reading from the self pipe). This fixes the issue by ensuring that we don't attempt to start multiple copies of the self-pipe reading loop. (cherry picked from commit ea5a6363c3f8cc90b7c0cc573922b10f296073b6) Co-authored-by: Ben Darnell <ben@bendarnell.com> Co-authored-by: Ben Darnell <ben@bendarnell.com>
* [3.8] [3.9] bpo-41654: Fix deallocator of MemoryError to account for ↵Pablo Galindo2020-09-011-0/+30
| | | | | | | | | | | | | | | subclasses (GH-22020) (GH-22046) When allocating MemoryError classes, there is some logic to use pre-allocated instances in a freelist only if the type that is being allocated is not a subclass of MemoryError. Unfortunately in the destructor this logic is not present so the freelist is altered even with subclasses of MemoryError.. (cherry picked from commit 9b648a95ccb4c3b14f1e87158f5c9f5dbb2f62c0) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>. (cherry picked from commit 87e91ae2e5f81e096c32839f211c68a749a4435a) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41344: Raise ValueError when creating shared memory of size 0 (GH-21556) ↵Miss Islington (bot)2020-08-301-0/+12
| | | | | | | | | (GH-22019) (cherry picked from commit 475a5fbb5644ea200c990d85d8c264e78ab6c7ea) Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com> Co-authored-by: Vinay Sharma <vinay04sharma@icloud.com>
* bpo-41609: Fix output of pdb's whatis command for instance methods ↵Miss Islington (bot)2020-08-271-0/+41
| | | | | | | (GH-21935) (#21976) (cherry picked from commit 022bc7572f061e1d1132a4db9d085b29707701e7) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
* bpo-33660: Fix PosixPath to resolve a relative path on root (GH-21975)Miss Islington (bot)2020-08-271-0/+9
| | | | | (cherry picked from commit 94ad6c674f7687ef22853cb8d42b440d6b42ddc8) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* [3.8] bpo-32751: Wait for task cancel in asyncio.wait_for() when timeout <= ↵Elvis Pranskevichus2020-08-261-0/+31
| | | | | | | | | 0 (GH-21895) (#21967) When I was fixing bpo-32751 back in GH-7216 I missed the case when *timeout* is zero or negative. This takes care of that. Props to @aaliddell for noticing the inconsistency.. (cherry picked from commit c517fc712105c8e5930cb42baaebdbe37fc3e15f)
* bpo-37658: Fix asyncio.wait_for() to respect waited task status (GH-21894) ↵Miss Islington (bot)2020-08-261-0/+16
| | | | | | | | | | | | (#21965) Currently, if `asyncio.wait_for()` itself is cancelled it will always raise `CancelledError` regardless if the underlying task is still running. This is similar to a race with the timeout, which is handled already. (cherry picked from commit a2118a14627256197bddcf4fcecad4c264c1e39d) Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
* [3.8] bpo-41503: Fix race between setTarget and flush in ↵Miss Islington (bot)2020-08-161-0/+21
| | | | | | | | | | logging.handlers.MemoryHandler (GH-21765) (GH-21898) (cherry picked from commit 2353d77fad7ed9d11d8a4d66b5dd1306cdb94125) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com> Automerge-Triggered-By: @vsajip
* [3.9] bpo-41520: Fix second codeop regression (GH-21848)Miss Islington (bot)2020-08-131-5/+8
| | | | | | | | | Fix the repression introduced by the initial regression fix. (cherry picked from commit c818b15fa59039de67022c29085d439fa5d3ef95) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu> (cherry picked from commit f24430f1542ea2768793b48704ae2d4e241892ae) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-41520: codeop no longer ignores SyntaxWarning (GH-21838)Miss Islington (bot)2020-08-121-0/+7
| | | | | (cherry picked from commit 369a1cbdee14d9f27356fb3a8bb21e4fde289d25) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-41490: Update ensurepip to install pip 20.2.1 and setuptools 49.2.1 ↵Steve Dower2020-08-071-0/+69
| | | | (GH-21775)
* bpo-41473: Skip test_gdb with gdb 9.2 to work around gdb bug (GH-21768)Miss Islington (bot)2020-08-071-0/+5
| | | | | | | | | gdb 9.2 on Fedora Rawhide is not reliable, see: * https://bugs.python.org/issue41473 * https://bugzilla.redhat.com/show_bug.cgi?id=1866884 (cherry picked from commit e27a51c11e10d5df79b3e48dc3e7bfedfad5a794) Co-authored-by: Victor Stinner <vstinner@python.org>
* [3.8] bpo-40726: handle uninitalized end_lineno on ast.increment_lineno ↵Batuhan Taskaya2020-08-051-0/+15
| | | | | | | | | | | (GH-21745) …no (GH-20312). (cherry picked from commit 8f4380d2f5839a321475104765221a7394a9d649) Co-authored-by: Batuhan Taskaya <batuhanosmantaskaya@gmail.com> Automerge-Triggered-By: @pablogsal
* bpo-41385: Fix test_executable_without_cwd on Windows (GH-21608)Miss Islington (bot)2020-07-261-2/+4
| | | | | (cherry picked from commit b1a87300a06324c9fc7d6553906ed914489465aa) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38731: Fix NameError in command-line interface of py_compile (GH-21617)Miss Islington (bot)2020-07-251-0/+56
| | | | | (cherry picked from commit 2024d7aca100c3faa9c6730aba3de5f0528750be) Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
* bpo-41295: Reimplement the Carlo Verre "hackcheck" (GH-21528)Miss Islington (bot)2020-07-181-0/+36
| | | | | | | | Walk down the MRO backwards to find the type that originally defined the final `tp_setattro`, then make sure we are not jumping over intermediate C-level bases with the Python-level call. Automerge-Triggered-By: @gvanrossum (cherry picked from commit c53b310e5926266ce267c44a168165cacd786d6e) Co-authored-by: scoder <stefan_ml@behnel.de>
* bpo-39603: Prevent header injection in http methods (GH-18485)Miss Islington (bot)2020-07-181-0/+22
| | | | | | reject control chars in http method in http.client.putrequest to prevent http header injection (cherry picked from commit 8ca8a2e8fb068863c1138f07e3098478ef8be12e) Co-authored-by: AMIR <31338382+amiremohamadi@users.noreply.github.com>
* bpo-41304: Ensure python3x._pth is loaded on Windows (GH-21495)Miss Islington (bot)2020-07-151-2/+34
| | | | | (cherry picked from commit 936a66094591dc0e67d4a60c170148bb700ec016) Co-authored-by: Steve Dower <steve.dower@python.org>
* [3.8] bpo-39017: Avoid infinite loop in the tarfile module (GH-21454) (GH-21483)Miss Islington (bot)2020-07-152-0/+7
| | | | | | | | | | Avoid infinite loop when reading specially crafted TAR files using the tarfile module (CVE-2019-20907). (cherry picked from commit 5a8d121a1f3ef5ad7c105ee378cc79a3eac0c7d4) Co-authored-by: Rishi <rishi_devan@mail.com> Automerge-Triggered-By: @encukou
* bpo-41288: Fix a crash in unpickling invalid NEWOBJ_EX. (GH-21458)Miss Islington (bot)2020-07-131-0/+18
| | | | | | Automerge-Triggered-By: @tiran (cherry picked from commit 4f309abf55f0e6f8950ac13d6ec83c22b8d47bf8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-40597: Allow email.contextmanager set_content() to set a null string. ↵Miss Islington (bot)2020-07-081-0/+13
| | | | | | | (GH-20542) (cherry picked from commit 4fa61a7732923f92de0f7830c12da48c4cec937f) Co-authored-by: Mark Sapiro <mark@msapiro.net>
* bpo-41218: Improve the test cases for test_compile_top_level_await_no_coro ↵Miss Islington (bot)2020-07-061-3/+5
| | | | | | | (GH-21363) (cherry picked from commit c2c1f1f906cdeb40576880d4b6a4f8fcbc016eb8) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-41218: Only mark async code with CO_COROUTINE. (GH-21357)Miss Islington (bot)2020-07-061-0/+19
| | | | | | | | 3.8.3 had a regression where compiling with ast.PyCF_ALLOW_TOP_LEVEL_AWAIT woudl agressively mark things are coroutine even if there were not. (cherry picked from commit bd46174a5a09a54e5ae1077909f923f56a7cf710) Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
* bpo-29778: Ensure python3.dll is loaded from correct locations when Python ↵Miss Islington (bot)2020-07-061-7/+24
| | | | | | | | | is embedded (GH-21297) (GH-21352) Also enables using debug build of `python3_d.dll` Reference: CVE-2020-15523 (cherry picked from commit dcbaa1b49cd9062fb9ba2b9d49555ac6cd8c60b5) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-39960: Allow heap types in the "Carlo Verre" hack check that override ↵scoder2020-07-051-0/+8
| | | | | "tp_setattro()" (GH-21092) (GH-21339) Backport to Py3.8.
* bpo-41162: Clear audit hooks later during finalization (GH-21222)Steve Dower2020-07-032-42/+0
| | | Co-authored-by: Konge <zkonge@outlook.com>
* [3.8] bpo-41043: Escape literal part of the path for glob(). (GH-20994). ↵Serhiy Storchaka2020-07-0212-13/+13
| | | | | (GH-21277) (cherry picked from commit 935586845815f5b4c7814794413f6a812d4bd45f)
* bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface ↵Miss Islington (bot)2020-06-291-0/+12
| | | | | | | | | | | (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) Co-authored-by: Ravi Teja P <rvteja92@gmail.com>
* bpo-41048: mimetypes should read the rule file using UTF-8, not the locale ↵Miss Islington (bot)2020-06-291-0/+12
| | | | | | | encoding (GH-20998) (cherry picked from commit 7f569c9bc0079906012b3034d30fe8abc742e7fc) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>
* [3.8] bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) (GH-21200)Serhiy Storchaka2020-06-281-13/+22
| | | | | Fix also a resource warning when store counts and module info. (cherry picked from commit 04cdeb7a5617c48102f45b965e683b12cdf934f8)
* [3.8] bpo-35975: Only use cf_feature_version if PyCF_ONLY_AST in cf_flags ↵Guido van Rossum2020-06-281-0/+20
| | | | (#21023)
* [3.8] bpo-41009: fix requires_OS_version() class decorator (GH-20942) (GH-20948)Christian Heimes2020-06-251-19/+19
| | | | | | | | Signed-off-by: Christian Heimes <christian@python.org> Automerge-Triggered-By: @tiran. (cherry picked from commit bb6ec14479f18c32e71e43f2785f177aa17aabbd) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-41113: Fix test_warnings on non-Western locales. (GH-21143)Miss Islington (bot)2020-06-251-3/+3
| | | | | (cherry picked from commit 0f8ec1fff01173803645ad6a8aea24997bf66fc1) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-35773: Fix test_bdb on non-UTF-8 locales. (GH-21136)Miss Islington (bot)2020-06-251-1/+1
| | | | | (cherry picked from commit 94eee69e9b3a7e7d33142a47ffea560beb8f1596) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41074: Fix support of non-ASCII names and SQL in msilib. (GH-21126)Miss Islington (bot)2020-06-251-2/+12
| | | | | | | | * Fix support of non-ASCII names in functions OpenDatabase() and init_database(). * Fix support of non-ASCII SQL in method Database.OpenView(). (cherry picked from commit 55939b1708d6fc0d36d2be11ccdc6bf207e1bd41) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)Miss Islington (bot)2020-06-241-2/+2
| | | | | (cherry picked from commit a7dc71470156680f1fd5243290c6d377824b7ef4) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>