summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* 3.7.5v3.7.5Ned Deily2019-10-141-1/+1
|
* [3.7] bpo-38449: Revert "bpo-22347: Update mimetypes.guess_type to allow ↵Abhilash Raj2019-10-143-11/+2
| | | | | | | | | | oper parsing of URLs (GH-15685)" (GH-16724) (GH-16727) Reverts GH-15687 which caused the issue. https://bugs.python.org/issue22347 https://bugs.python.org/issue38449
* bpo-36953: Delay removal of ABCs from collections. (GH-13409)Miss Islington (bot)2019-10-141-2/+2
| | | | | | | | | Bump the removal to 3.9, indicate collections.abc available since 3.3, replace version-changed directive to deprecated-removed. https://bugs.python.org/issue36953 (cherry picked from commit eea47e09394dfb64d3a59a601d947d25bb1bdc96) Co-authored-by: Matthias Bussonnier <mbussonnier@ucmerced.edu>
* bpo-38368: Added fix for ctypes crash when handling arrays in ↵Vinay Sajip2019-10-141-0/+52
| | | | | structs/unions. (GH-16589) (GH-16672) (cherry picked from commit e8bedbddadaa86be6bd86dc32dbdbd53933a4988)
* bpo-38344: Fix syntax in activate.bat (GH-16533)Miss Islington (bot)2019-10-141-1/+1
| | | | | (cherry picked from commit e310af9e2941c2fbb7370e003276cc37eb230f16) Co-authored-by: James Abel <j@abel.co>
* bpo-34344 Fix AbstractEventLoopPolicy.get_event_loop docstring (GH-16463)Miss Islington (bot)2019-10-141-2/+2
| | | | | (cherry picked from commit b23a8423a923077e4f83d3f328bb7542b4c940ed) Co-authored-by: idomic <michael.ido@gmail.com>
* 3.7.5rc1v3.7.5rc1Ned Deily2019-10-011-28/+55
|
* bpo-36670: Multiple regrtest bugfixes (GH-16511)Miss Islington (bot)2019-10-013-133/+175
| | | | | | | | | | | | | | | | | | | * Windows: Fix counter name in WindowsLoadTracker. Counter names are localized: use the registry to get the counter name. Original change written by Lorenz Mende. * Regrtest.main() now ensures that the Windows load tracker is also killed if an exception is raised * TestWorkerProcess now ensures that worker processes are no longer running before exiting: kill also worker processes when an exception is raised. * Enhance regrtest messages and warnings: include test name, duration, add a worker identifier, etc. * Rename MultiprocessRunner to TestWorkerProcess * Use print_warning() to display warnings. Co-Authored-By: Lorenz Mende <Lorenz.mende@gmail.com> (cherry picked from commit 982bfa4da07b2e5749a0f4e68f99e972bcc3a549) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* Fix and improve `asyncio.run()` docs (GH-16403) (GH-16505)Miss Islington (bot)2019-10-011-5/+1
| | | | | (cherry picked from commit e407013089259e4c0b271703e1975bbcd578a2d5) Co-authored-by: Kyle Stanley <aeros167@gmail.com>
* bpo-38019: correctly handle pause/resume reading of closed asyncio unix pipe ↵Miss Islington (bot)2019-09-292-0/+38
| | | | | | | (GH-16472) (cherry picked from commit 58498bc7178608b1ab031994ca09c43889ce3e76) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.7] bpo-38216, bpo-36274: Allow subclasses to separately override ↵Jason R. Coombs2019-09-282-10/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | validation and encoding behavior (GH-16448) (GH-16461) * bpo-38216: Allow bypassing input validation * bpo-36274: Also allow the URL encoding to be overridden. * bpo-38216, bpo-36274: Add tests demonstrating a hook for overriding validation, test demonstrating override encoding, and a test to capture expectation of the interface for the URL. * Call with skip_host to avoid tripping on the host checking in the URL. * Remove obsolete comment. * Make _prepare_path_encoding its own attr. This makes overriding just that simpler. Also, don't use the := operator to make backporting easier. * Add a news entry. * _prepare_path_encoding -> _encode_prepared_path() * Once again separate the path validation and request encoding, drastically simplifying the behavior. Drop the guarantee that all processing happens in _prepare_path.. (cherry picked from commit 7774d7831e8809795c64ce27f7df52674581d298) Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
* bpo-38243, xmlrpc.server: Escape the server_title (GH-16373)Miss Islington (bot)2019-09-272-1/+18
| | | | | | | Escape the server title of xmlrpc.server.DocXMLRPCServer when rendering the document page as HTML. (cherry picked from commit e8650a4f8c7fb76f570d4ca9c1fbe44e91c8dfaa) Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* [3.7] bpo-38275: Skip ssl tests for disabled versions (GH-16427)Christian Heimes2019-09-261-56/+146
| | | | | | | | | | test_ssl now handles disabled TLS/SSL versions better. OpenSSL's crypto policy and run-time settings are recognized and tests for disabled versions are skipped. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38275 (cherry picked from commit df6ac7e2b82d921a6e9ff5571b40c6dbcf635581)
* bpo-38239: Fix test_gdb for Link Time Optimization (LTO) (GH-16422) (GH-16426)Victor Stinner2019-09-261-2/+9
| | | (cherry picked from commit 64b4a3a2deabcd4103fac2759a311fe94159b4d1)
* bpo-38271: encrypt private key test files with AES256 (GH-16385)Miss Islington (bot)2019-09-253-86/+87
| | | | | | | | | | | | | | | The private keys for test_ssl were encrypted with 3DES in traditional PKCSGH-5 format. 3DES and the digest algorithm of PKCSGH-5 are blocked by some strict crypto policies. Use PKCSGH-8 format with AES256 encryption instead. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue38271 Automerge-Triggered-By: @tiran (cherry picked from commit bfd0c963d88f3df69489ee250655e2b8f3d235bd) Co-authored-by: Christian Heimes <christian@python.org>
* bpo-38260: Add Docs on asyncio.run (GH-16337)Miss Islington (bot)2019-09-251-0/+4
| | | | | | | | | | Add docs about return and raise exception on asyncio.run https://bugs.python.org/issue38260 Automerge-Triggered-By: @asvetlov (cherry picked from commit 17deb16883fa574a86e42551cc37f044182347ad) Co-authored-by: Emmanuel Arias <emmanuelarias30@gmail.com>
* [3.7] bpo-36871: Handle spec errors in assert_has_calls (GH-16364) (GH-16374)Gregory P. Smith2019-09-252-3/+37
| | | | | | | | | | | | | Handle spec errors in assert_has_calls (GH-16005) (GH-16364) The fix in PR 13261 handled the underlying issue about the spec for specific methods not being applied correctly, but it didn't fix the issue that was causing the misleading error message. The code currently grabs a list of responses from _call_matcher (which may include exceptions). But it doesn't reach inside the list when checking if the result is an exception. This results in a misleading error message when one of the provided calls does not match the spec. https://bugs.python.org/issue36871 Co-authored-by: Samuel Freilich <sfreilich@google.com> (cherry picked from commit 1a17a054f6314ce29cd2632c28aeed317a615360)
* bpo-22273: Update ctypes to correctly handle arrays in small structur… ↵Miss Islington (bot)2019-09-251-0/+41
| | | | | (GH-15839) (GH-16369) (cherry picked from commit 12f209eccb1587e8c98057d9c5f865c21f4a16c1)
* bpo-37123: multiprocessing test_mymanager() accepts SIGTERM (GH-16349)Miss Islington (bot)2019-09-241-5/+6
| | | | | | | | | | | Multiprocessing test test_mymanager() now also expects -SIGTERM, not only exitcode 0. bpo-30356: BaseManager._finalize_manager() sends SIGTERM to the manager process if it takes longer than 1 second to stop, which happens on slow buildbots. (cherry picked from commit b0e1ae5f5430433766e023c1a6936aeba0f2b84e) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-38212: Increase MP test_queue_feeder_donot_stop_onexc() timeout (GH-16348)Miss Islington (bot)2019-09-241-2/+1
| | | | | | | Multiprocessing tests: increase test_queue_feeder_donot_stop_onexc() timeout from 1 to 60 seconds. (cherry picked from commit 99799c722065d0524f3ab0bc455e1938bb8dc60f) Co-authored-by: Victor Stinner <vstinner@python.org>
* Updated incorrect level-setting code to use setLevel(). (GH-16325) (GH-16326)Miss Islington (bot)2019-09-222-6/+7
| | | (cherry picked from commit 1d094af716e8ce5e5710e1dfbce7832ba333be55)
* Doc: Fix spelling errors of 'initial' in enum.py (GH-16314)Miss Islington (bot)2019-09-211-1/+1
| | | | | (cherry picked from commit bb16fb2cb8dca1fa1d67621c3175793eda7dbdc2) Co-authored-by: HongWeipeng <hongweichen8888@sina.com>
* bpo-37531: sync regrtest with master branch (GH-16285) (GH-16289)Victor Stinner2019-09-192-17/+26
| | | (cherry picked from commit fb7746d5d10ec4a34198da672018ba15f5667079)
* [3.7] bpo-38191: Accept arbitrary keyword names in NamedTuple(). (GH-16222) ↵Serhiy Storchaka2019-09-172-1/+52
| | | | | | | (GH-16239) This includes such names as "cls", "self", "typename" and "fields". (cherry picked from commit 2bf31ccab3d17f3f35b42dca97f99576dfe2fc7d)
* bpo-38013: make async_generator_athrow object tolerant to throwing ↵Miss Islington (bot)2019-09-171-0/+22
| | | | | | | | | | | | | exceptions (GH-16070) Even when the helper is not started yet. This behavior follows conventional generator one. There is no reason for `async_generator_athrow` to handle `gen.throw()` differently. https://bugs.python.org/issue38013 (cherry picked from commit c275312a6284bd319ea33c9abd7e15c230eca43f) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-37531: regrtest main process uses shorter timeout (GH-16220) (GH-16223)Miss Islington (bot)2019-09-171-6/+6
| | | | | | | | | When using multiprocesss (-jN), the main process now uses a timeout of 60 seconds instead of the double of the --timeout value. The buildbot server stops a job which does not produce any output in 1200 seconds. (cherry picked from commit 46b0b81220a23bc4aee5ba3ba67e8cf1b5df7960) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-38185: Fixed case-insensitive string comparison in sqlite3.Row indexing. ↵Miss Islington (bot)2019-09-171-7/+18
| | | | | | | (GH-16190) (cherry picked from commit f669581a9527afb0d2325f9845a86715c0ba365d) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-35379: When exiting IDLE, catch any AttributeError. (GH-16212)Miss Islington (bot)2019-09-172-4/+14
| | | | | | | | One happens when EditorWindow.close is called twice. Printing a traceback, when IDLE is run from a terminal, is useless and annoying. (cherry picked from commit dfd34a9cd58e8150c324190f746de919e140abe8) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-38175: Fix a memory leak in comparison of sqlite3.Row objects. (GH-16155)Miss Islington (bot)2019-09-171-7/+21
| | | | | (cherry picked from commit 8debfa50407107ff2329d01081cdc12d359f1d12) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-38183: Test_idle ignores user config directory GH-16198)Miss Islington (bot)2019-09-174-35/+42
| | | | | | | It no longer tries to create or access .idlerc or any files within. Users must run IDLE to discover problems with saving settings. (cherry picked from commit 0048afc16a7e7301d5c565237db271505e5fbed9) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* Doc: Fix Wikipedia link for functools.lru_cache (GH-16183)Miss Islington (bot)2019-09-161-1/+1
| | | | | (cherry picked from commit 336b3064d8981bc7f76c5cc6f6a0527df69771d6) Co-authored-by: amist <amistern0@gmail.com>
* [3.7] bpo-38100: Fix spelling error in unittest.mock code (GH-16195)Stéphane Wirtel2019-09-161-3/+3
| | | | | | | https://bugs.python.org/issue38100 Automerge-Triggered-By: @matrixise
* Fix typo in test_api.py. (GH-16119)Miss Islington (bot)2019-09-131-1/+1
| | | | | (cherry picked from commit 0bc17ea2f5966f429b5b8d6b4ccb9c01f1f610d0) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-34706: Preserve subclassing in inspect.Signature.from_callable ↵Miss Islington (bot)2019-09-132-3/+10
| | | | | | | | | | | | | (GH-16108) (GH-16114) https://bugs.python.org/issue34706 Specifically in the case of a class that does not override its constructor signature inherited from object. These are Buck Evan @bukzor's changes cherrypicked from GH-9344. (cherry picked from commit 5b9ff7a0dcb16d6f5c3cd4f1f52e0ca6a4bde586) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.7] bpo-12144: Handle cookies with expires attribute in ↵Xtreak2019-09-132-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CookieJar.make_cookies (GH-13921) (GH-16092) * [3.7] bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies (GH-13921) Handle time comparison for cookies with `expires` attribute when `CookieJar.make_cookies` is called. Co-authored-by: Demian Brecht <demianbrecht@gmail.com> https://bugs.python.org/issue12144 Automerge-Triggered-By: @asvetlov (cherry picked from commit bb41147) Co-authored-by: Xtreak <tir.karthi@gmail.com> * Use warnings module instead of test.support.check_no_warnings * [3.7] bpo-12144: Handle cookies with expires attribute in CookieJar.make_cookies (GH-13921) Handle time comparison for cookies with `expires` attribute when `CookieJar.make_cookies` is called. Co-authored-by: Demian Brecht <demianbrecht@gmail.com> https://bugs.python.org/issue12144 Automerge-Triggered-By: @asvetlov. (cherry picked from commit bb41147eab15a2958f4ad38261e5bf608f6ace1b) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* Fix the ImportWarning regarding __spec__ and __package__ being None (GH-16003)Miss Islington (bot)2019-09-131-3/+4
| | | | | (cherry picked from commit 6e1a30b15e73ebc82e6790495fd54cc8971723ec) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* Revert "bpo-37785: Fix xgettext warning in argparse (GH-15161)" (GH-16082)Julien Palard2019-09-131-3/+2
| | | | | This reverts commit b50eff65906f8e9b4597cb0128ea1729341346fc because it's an incompatible change that would have broken the existing translations.
* bpo-37785: Fix xgettext warning in argparse (GH-15161)Miss Islington (bot)2019-09-131-2/+3
| | | | | (cherry picked from commit 42671aea2db6cbc54369617da0fd3545048e0a45) Co-authored-by: Jakub Kulík <Kulikjak@gmail.com>
* closes bpo-37803: pdb: fix handling of options (--help / --version) (GH-15193)Miss Islington (bot)2019-09-121-1/+1
| | | | | | | | | The "--" should not be included with long options passed to getopt.getopt. Fixes https://bugs.python.org/issue37803 (cherry picked from commit 855df7f273c3988c72f01e51ba57091887ec38b2) Co-authored-by: Daniel Hahler <github@thequod.de>
* bpo-21872: fix lzma library decompresses data incompletely (GH-14048)Miss Islington (bot)2019-09-121-0/+163
| | | | | | | | | | * 1. add test case with wrong behavior * 2. fix bug when max_length == -1 * 3. allow b"" as valid input data for decompress_buf() * 4. when max_length >= 0, let needs_input mechanism works * add more asserts to test case (cherry picked from commit 4ffd05d7ec47cfd0d7fc95dce851633be9663255) Co-authored-by: animalize <animalize@users.noreply.github.com>
* bpo-37885: venv: Don't produce unbound variable warning on deactivate (GH-15974)Miss Islington (bot)2019-09-112-1/+21
| | | | | | | | | | | | | Before, running deactivate from a bash shell configured to treat undefined variables as errors (`set -u`) would produce a warning: ``` $ python3 -m venv test $ source test/bin/activate (test) $ deactivate -bash: $1: unbound variable ``` (cherry picked from commit 5209e586b7cac9a43b2c44349a26b1b0af06ead3) Co-authored-by: Daniel Abrahamsson <hamsson@gmail.com>
* bpo-36634: Fixes activate.bat when existing values contain double quotes ↵Miss Islington (bot)2019-09-111-25/+13
| | | | | | | (GH-15924) (cherry picked from commit 574b324bdc9a126b5a4488c3613f11ad2555415e) Co-authored-by: Steve Dower <steve.dower@python.org>
* bpo-36919: make test_source_encoding.test_issue2301 ↵Miss Islington (bot)2019-09-111-1/+1
| | | | | | | | implementation-independent (GH-13639) (GH-15953) * bpo-36919: make test_issue2301 implementation-independent (cherry picked from commit b6643dcfc26859f935e4b3a6a2a203e8ef5320e2) Co-authored-by: Pavel Koneski <pavel.koneski@gmail.com>
* [3.8] bpo-37409: fix relative import with no parent (GH-14956) (GH-15913)Miss Islington (bot)2019-09-112-0/+9
| | | | | | | | | | | | | | | | | | | Relative imports use resolve_name to get the absolute target name, which first seeks the current module's absolute package name from the globals: If __package__ (and __spec__.parent) are missing then import uses __name__, truncating the last segment if the module is a submodule rather than a package __init__.py (which it guesses from whether __path__ is defined). The __name__ attempt should fail if there is no parent package (top level modules), if __name__ is '__main__' (-m entry points), or both (scripts). That is, if both __name__ has no subcomponents and the module does not seem to be a package __init__ module then import should fail.. (cherry picked from commit 92420b3e679959a7d0ce875875601a4cee45231e) Co-authored-by: Ben Lewis <benjimin@users.noreply.github.com> (cherry picked from commit 0a6693a469cfb1dd5c8048d8cb4231a7b5883251) Co-authored-by: Brett Cannon <54418+brettcannon@users.noreply.github.com>
* [3.7] bpo-35168: Make shlex.punctuation_chars read-only (GH-11631) (GH-15926)Vinay Sajip2019-09-112-1/+13
| | | | | (cherry picked from commit 972cf5c06a5ba16ad243a442dbb9c15307fbed95) Co-authored-by: Alex <a.v.shkop@gmail.com>
* bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has… ↵Miss Islington (bot)2019-09-112-3/+22
| | | | | | | | | | | | | | (GH-10638) * bpo-20504 : in cgi.py, fix bug when a multipart/form-data request has no content-length header * Add Misc/NEWS.d/next file. * Add rst formatting for NEWS.d/next file * Reaplce assert by self.assertEqual (cherry picked from commit 2d7cacacc310b65b43e7e2de89e7722291dea6a4) Co-authored-by: Pierre Quentel <pierre.quentel@gmail.com>
* bpo-35066: Make trailing percent test more portable. (GH-15907)Miss Islington (bot)2019-09-111-4/+9
| | | | | | Different libc implementations have different behavior when presented with trailing % in strftime strings. To make test_strftime_trailing_percent more portable, compare the output of datetime.strftime directly to that of time.strftime rather than hardcoding. (cherry picked from commit f2173ae38fa49235c3cdc28ae2ca2e19a375a596) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-37424: Avoid a hang in subprocess.run timeout output capture (GH-14490)Miss Islington (bot)2019-09-112-9/+48
| | | | | | | | | | Fixes a possible hang when using a timeout on subprocess.run() while capturing output. If the child process spawned its own children or otherwise connected its stdout or stderr handles with another process, we could hang after the timeout was reached and our child was killed when attempting to read final output from the pipes. (cherry picked from commit 580d2782f70f8e0bed7ec20abb03d740cb83b5da) Co-authored-by: Gregory P. Smith <greg@krypto.org>
* [3.7] bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) (GH-15874)Victor Stinner2019-09-102-19/+63
| | | | | | | | | | | bpo-37531: Enhance regrtest multiprocess timeout (GH-15345) * Write a message when killing a worker process * Put a timeout on the second popen.communicate() call (after killing the process) * Put a timeout on popen.wait() call * Catch popen.kill() and popen.wait() exceptions (cherry picked from commit de2d9eed8bc628533e1628b843cc4c7a5010f6e5)
* Fix subprocess docstring typo (GH-15812)Miss Islington (bot)2019-09-101-1/+1
| | | | | (cherry picked from commit 182e1d1f849757439f2031504f142fa4e1251611) Co-authored-by: Matthias <xmatthias@outlook.com>