summaryrefslogtreecommitdiffstats
path: root/Lib/test
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* bpo-41094: Fix decoding errors with audit when open files. (GH-21095)Miss Islington (bot)2020-06-241-2/+2
| | | | | (cherry picked from commit 6c6810d98979add7a89391c3c38990d0859f7a29) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41068: Fix read after write in zipfile for non-ASCII files names. (GH-21040)Miss Islington (bot)2020-06-221-0/+5
| | | | | (cherry picked from commit 36ff513f82e372ed3cea0bf7cbdf15a1ef6dab9e) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-40824: Do not mask errors in __iter__ in "in" and the operator module. ↵Miss Islington (bot)2020-06-222-0/+14
| | | | | | | | | | (GH-20537) Unexpected errors in calling the __iter__ method are no longer masked by TypeError in the "in" operator and functions operator.contains(), operator.indexOf() and operator.countOf(). (cherry picked from commit cafe1b6e9d3594a34aba50e872d4198296ffaadf) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41058: Use source file encoding in pdb.find_function(). (GH-21010)Miss Islington (bot)2020-06-211-13/+39
| | | | | (cherry picked from commit 19fcffa92773e008e4f5efb80047420a0cfafeec) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-41040: Fix test_modulefinder. (GH-20991)Miss Islington (bot)2020-06-191-1/+2
| | | | | (cherry picked from commit a041e116db5f1e78222cbf2c22aae96457372680) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38377: Fix skip_if_broken_multiprocessing_synchronize() on macOS (GH-20984)Miss Islington (bot)2020-06-191-8/+9
| | | | | | | | skip_if_broken_multiprocessing_synchronize() only attempts for create a semaphore on Linux to fix multiprocessing test_resource_tracker_reused() on macOS. (cherry picked from commit 3358da4054b9b0b045eb47dc74dee3d58bfbb1d5) Co-authored-by: Victor Stinner <vstinner@python.org>
* bpo-38377: Add support.skip_if_broken_multiprocessing_synchronize() ↵Victor Stinner2020-06-187-12/+37
| | | | | | | | | | | (GH-20944) (GH-20962) (GH-20966) On Linux, skip tests using multiprocessing if the current user cannot create a file in /dev/shm/ directory. Add the skip_if_broken_multiprocessing_synchronize() function to the test.support module. (cherry picked from commit ddbeb2f3e02a510c5784ffd74c5e09e8c70b5881) (cherry picked from commit b1e736113484c99acb57e4acb417b91a9e58e7ff)
* bpo-41003: Fix test_copyreg when numpy is installed (GH-20935) (GH-20945) ↵Victor Stinner2020-06-172-5/+20
| | | | | | | | | | | | | (GH-20946) Fix test_copyreg when numpy is installed: test.pickletester now saves/restores warnings.filters when importing numpy, to ignore filters installed by numpy. Add the save_restore_warnings_filters() function to the test.support.warnings_helper module. (cherry picked from commit 8362893e3fe083df2ec8bb94c28b1a78383eadbf) (cherry picked from commit b39d41ba1b77f7bc51c4d6f6d0e336693192cb3a)
* bpo-38488: Upgrade bundled versions of pip & setuptools (GH-20491) (GH-20900)Ned Deily2020-06-151-1/+1
| | | Co-authored-by: Xavier Fernandez <xav.fernandez@gmail.com>
* bpo-40448: ensurepip: Do not use cache (GH-19812)Miss Islington (bot)2020-06-151-8/+8
| | | | | | | | | | | | | | | | | ensurepip optionally installs or upgrades 'pip' and 'setuptools' using the version of those modules bundled with Python. The internal PIP installation routine by default temporarily uses its cache, if it exists. This is undesirable as Python builds and installations may be independent of the user running the build, whilst PIP cache location is dependent on the user's environment and outside of the build environment. At the same time, there's no value in using the cache while installing bundled modules. This change disables PIP caching when used in ensurepip. (cherry picked from commit 4a3a682b12f93a03888e8b59f439bc5fe30d6055) Co-authored-by: Krzysztof Konopko <kkonopko@users.noreply.github.com>
* bpo-34226: fix cgi.parse_multipart without content_length (GH-8530)Miss Islington (bot)2020-06-151-0/+14
| | | | | | | | | | | | In Python 3.7 the behavior of parse_multipart changed requiring CONTENT-LENGTH header, this fix remove this header as required and fix FieldStorage read_lines_to_outerboundary, by not using limit when it's negative, since by default it's -1 if not content-length and keeps substracting what was read from the file object. Also added a test case for this problem. (cherry picked from commit d8cf3514dd4682419a66f6e834bb384ee34afc95) Co-authored-by: roger <rogerduran@gmail.com>
* bpo-40855: Fix ignored mu and xbar parameters (GH-20835) (GH-20863)Miss Islington (bot)2020-06-131-0/+12
|
* bpo-40834: Fix truncate when sending str object with channel (GH-20555)Miss Islington (bot)2020-06-131-0/+3
| | | | | (cherry picked from commit 29c117202e386bad1d66ae336e2fefa1a1809ee0) Co-authored-by: An Long <aisk@users.noreply.github.com>
* bpo-40964: disable remote IMAP tests (GH-20836)Christian Heimes2020-06-121-0/+3
| | | | | | Remote host cyrus.andrew.cmu.edu is blocking incoming connections and is causing test suite to fail. Signed-off-by: Christian Heimes <christian@python.org>