summaryrefslogtreecommitdiff
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* [3.7] bpo-37500: Revert commit 85ed1712e428f93408f56fc684816f9a85b0ebc0 ↵Pablo Galindo2019-07-081-14/+0
| | | | | (GH-14605) https://bugs.python.org/issue37500
* bpo-37463: match_hostname requires quad-dotted IPv4 (GH-14499)Christian Heimes2019-07-022-10/+28
| | | | | | | | | | | | | | | | ssl.match_hostname() no longer accepts IPv4 addresses with additional text after the address and only quad-dotted notation without trailing whitespaces. Some inet_aton() implementations ignore whitespace and all data after whitespace, e.g. '127.0.0.1 whatever'. Short notations like '127.1' for '127.0.0.1' were already filtered out. The bug was initially found by Dominik Czarnota and reported by Paul Kehrer. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37463
* bpo-34602: Avoid failures setting macOS stack resource limit (GH-14546)Miss Islington (bot)2019-07-021-16/+0
| | | | | | | | | | | | | | | | | | | | Under some conditions the earlier fix for bpo-18075, "Infinite recursion tests triggering a segfault on Mac OS X", now causes failures on macOS when attempting to change stack limit with resource.setrlimit resource.RLIMIT_STACK, like regrtest does when running the test suite. The reverted change had specified a non-default stack size when linking the python executable on macOS. As of macOS 10.14.4, the previous code causes a hard failure when running tests, although similar failures had been seen under some conditions under some earlier systems. Reverting the change to the interpreter stack size at link time helped for release builds but caused some tests to fail when built --with-pydebug. Try the opposite approach: continue to build the interpreter with an increased stack size on macOS and remove the failing setrlimit call in regrtest initialization. This will definitely avoid the resource.RLIMIT_STACK error and should have no, or fewer, side effects. (cherry picked from commit 5bbbc733e6cc0804f19b071944af8d4719e26ae6) Co-authored-by: Ned Deily <nad@python.org>
* [3.7] bpo-37440: Enable TLS 1.3 post-handshake auth in http.client ↵Miss Islington (bot)2019-07-012-0/+25
| | | | | | | | | | | | | | | (GH-14448) (GH-14496) Post-handshake authentication is required for conditional client cert authentication with TLS 1.3. https://bugs.python.org/issue37440 (cherry picked from commit d1bd6e79da1ee56dc1b902d804216ffd267399db) Co-authored-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37440
* [3.7] bpo-37428: Don't set PHA verify flag on client side (GH-14421) (GH-14493)Miss Islington (bot)2019-07-011-0/+31
| | | | | | | | | | | | | | | | | | | SSLContext.post_handshake_auth = True no longer sets SSL_VERIFY_POST_HANDSHAKE verify flag for client connections. Although the option is documented as ignored for clients, OpenSSL implicitly enables cert chain validation when the flag is set. Signed-off-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37428 (cherry picked from commit f0f5930ac88482ef896283db5be9b8d508d077db) Co-authored-by: Christian Heimes <christian@python.org> https://bugs.python.org/issue37428
* bpo-37369: Fix venv and test symlinking (GH-14456)Steve Dower2019-07-014-47/+96
|
* bpo-37369: Fixes path for sys.executable when running from the Microsoft ↵Steve Dower2019-07-013-14/+3
| | | | Store (GH-14450)
* [3.7] bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304) ↵Miss Islington (bot)2019-07-011-0/+25
| | | | | | | | | | | | | (GH-14369) * bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304) * The UTF-8 incremental decoders fails now fast if encounter a sequence that can't be handled by the error handler. * The UTF-16 incremental decoders with the surrogatepass error handler decodes now a lone low surrogate with final=False. (cherry picked from commit 894263ba80af4b7733c2df95b527e96953922656) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* 3.7.4rc1v3.7.4rc1Ned Deily2019-06-181-61/+64
|
* bpo-34903: Document that some strptime formats only require 1 digit (GH-14149)Miss Islington (bot)2019-06-181-0/+35
| | | | | | | | | | For datetime.datetime.strptime(), the leading zero for some two-digit formats is optional. This adds a footnote to the strftime/strptime documentation to reflect this fact, and adds some tests to ensure that it is true. bpo-34903 (cherry picked from commit 6b9c204ee77a0de87d6f51a3d4547a18604cef9e) Co-authored-by: Mike Gleen <mike.gleen@gmail.com>
* bpo-35031: also disable TLS 1.3 for test_start_tls_server_1 on macOS ↵Miss Islington (bot)2019-06-181-2/+4
| | | | | | | (GH-14188) (GH-14192) (cherry picked from commit a514f782b822bd7bca7c8d78be7bd53bc25c1908) Co-authored-by: Ned Deily <nad@python.org>
* bpo-5680: IDLE: Customize running a module (GH-13763)Miss Islington (bot)2019-06-179-50/+193
| | | | | | The initialize options are 1) add command line options, which are appended to sys.argv as if passed on a real command line, and 2) skip the shell restart. The customization dialog is accessed by a new entry on the Run menu. (cherry picked from commit 201bc2d18b60adb05810d2a6ab396047bc527088) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-37321: Edit IDLE subprocess connection error messages. (GH-14170)Miss Islington (bot)2019-06-173-9/+14
| | | | | | Mainly, add a doc reference to message in pyshell. (cherry picked from commit 8fac1221097aaf6ac37ed9ea727ee7892085e183) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-37039: Make IDLE's Zoom Height adjust to users' screens (GH-13678)Miss Islington (bot)2019-06-173-28/+117
| | | | | | | Measure required height by quickly maximizing once per screen. A search for a better method failed. (cherry picked from commit 5bff3c86ab77e9d831b3cd19b45654c7eef22931) Co-authored-by: Tal Einat <taleinat+github@gmail.com>
* bpo-35031, test_asycio: disable TLS 1.3 in test_start_tls_server_1() (GH-14148)Miss Islington (bot)2019-06-171-0/+6
| | | | | | | | bpo-35031, bpo-35998: Reintroduce workaround on Windows and FreeBSD in test_start_tls_server_1() of test_asyncio: disable TLS v1.3 on the client context. (cherry picked from commit c034b7824f5a7c50f2946ab3931633200e31d903) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-37267: Do not check for FILE_TYPE_CHAR in os.dup() on Windows (GH-14051) ↵Miss Islington (bot)2019-06-171-0/+9
| | | | | | | | | (GH-14141) On Windows, os.dup() no longer creates an inheritable fd when handling a character file. (cherry picked from commit 28fca0c422b425a6be43be31add0a5328c16b0b8) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-36688: Adding an implementation of RLock in _dummy_thread (GH-12943)Miss Islington (bot)2019-06-172-1/+52
| | | | | (cherry picked from commit c5905f39bcf4ef895d42eede41bb5a2f071a501d) Co-authored-by: Joost Lek <vlabakje@gmail.com>
* bpo-37220: Fix 2.7 test -R crash on Windows. (GH-13957)Miss Islington (bot)2019-06-161-2/+2
| | | | | | The patch needed for 2.7 should make the test more stable on 3.x also. (cherry picked from commit 66d47da86aff15be34adbec02596bb3188684c0d) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-35922: Fix RobotFileParser when robots.txt has no relevant crawl delay ↵Miss Islington (bot)2019-06-162-14/+22
| | | | | | | | or request rate (GH-11791) Co-Authored-By: Tal Einat <taleinat+github@gmail.com> (cherry picked from commit 8047e0e1c620f69cc21f9ca48b24bf2cdd5c3668) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* Fix typo in Lib/concurrent/futures/thread.py (GH-13953)Miss Islington (bot)2019-06-152-2/+2
| | | | | (cherry picked from commit 552ace7498722f1add9f3782751b0d365f4c24c8) Co-authored-by: ubordignon <48903745+ubordignon@users.noreply.github.com>
* [3.7] bpo-37279: Fix asyncio sendfile support when extra data are sent in ↵Andrew Svetlov2019-06-152-3/+4
| | | | | | | fallback mode. (GH-14075). (GH-14103) (cherry picked from commit ef2152354f03a165c5e3adb53e2276934fabd50a) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* Use threadpool for reading from file in sendfile fallback mode (GH-14076)Miss Islington (bot)2019-06-151-1/+1
| | | | | (cherry picked from commit 0237265e8287141c40faa8719da3a2d21d511d0d) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on ↵Miss Islington (bot)2019-06-142-1/+18
| | | | | | | Windows (GH-14081) (cherry picked from commit 9765efcb39fc03d5b1abec3924388974470a8bd5) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
* bpo-35998: Avoid TimeoutError in test_asyncio: test_start_tls_server_1() ↵Victor Stinner2019-06-141-18/+19
| | | | | (GH-14080) (GH-14086) (cherry picked from commit f0749da9a535375f05a2015e8960e8ae54877349)
* [3.7] bpo-37269: Correctly optimise conditionals with constant booleans ↵Pablo Galindo2019-06-141-0/+7
| | | | | | | | | | | | | (GH-14071) (GH-14073) Fix a regression introduced by af8646c8054d0f4180a2013383039b6a472f9698 that was causing code of the form: if True and False: do_something() to be optimized incorrectly, eliminating the block.. (cherry picked from commit 05f831865545b08c9a21cfb7773af58b76ec64cb) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* bpo-36402: Fix threading._shutdown() race condition (GH-13948) (GH-14050) ↵Miss Islington (bot)2019-06-132-12/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (GH-14054) * bpo-36402: Fix threading._shutdown() race condition (GH-13948) Fix a race condition at Python shutdown when waiting for threads. Wait until the Python thread state of all non-daemon threads get deleted (join all non-daemon threads), rather than just wait until Python threads complete. * Add threading._shutdown_locks: set of Thread._tstate_lock locks of non-daemon threads used by _shutdown() to wait until all Python thread states get deleted. See Thread._set_tstate_lock(). * Add also threading._shutdown_locks_lock to protect access to threading._shutdown_locks. * Add test_finalization_shutdown() test. (cherry picked from commit 468e5fec8a2f534f1685d59da3ca4fad425c38dd) * bpo-36402: Fix threading.Thread._stop() (GH-14047) Remove the _tstate_lock from _shutdown_locks, don't remove None. (cherry picked from commit 6f75c873752a16a7ad8f35855b1e29f59d048e84) (cherry picked from commit e40a97a721d46307dfdc2b0322028ccded6eb571) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-31829: Make protocol 0 pickles be loadable in text mode in Python 2. ↵Miss Islington (bot)2019-06-122-4/+18
| | | | | | | | (GH-11859) Escape ``\r``, ``\0`` and ``\x1a`` (end-of-file on Windows) in Unicode strings. (cherry picked from commit 38ab7d4721b422547f7b46b9d68968863fa70573) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* [3.7] bpo-36520: Email header folded incorrectly (GH-13608) (GH-13910)Abhilash Raj2019-06-112-0/+132
| | | | | | | | | | | | | | | | | | | | | | * [bpo-36520](https://bugs.python.org/issue36520): reset the encoded word offset when starting a new line during an email header folding operation * 📜🤖 Added by blurb_it. * [bpo-36520](https://bugs.python.org/issue36520): add an additional test case, and provide descriptive comments for the test_folding_with_utf8_encoding_* tests * [bpo-36520](https://bugs.python.org/issue36520): fix whitespace issue * [bpo-36520](https://bugs.python.org/issue36520): changes per reviewer request -- remove extraneous backslashes; add whitespace between terminating quotes and line-continuation backslashes; use "bpo-" instead of "issue GH-" in comments (cherry picked from commit f6713e84afc5addcfa8477dbdf2c027787f711c0) Co-authored-by: websurfer5 <49998481+websurfer5@users.noreply.github.com> https://bugs.python.org/issue36520
* Fix test_posix if RWF_HIPRI is defined but not preadv2. (GH-13980)Miss Islington (bot)2019-06-111-0/+2
| | | | | | If preadv2 is not available, preadv will raise NotImplementedError. (cherry picked from commit 44867bb9376e324493f0149ac8b3c33f23c9050d) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* closes bpo-33758: Skip test_get_type_hints_modules_forwardref. (GH-13977)Miss Islington (bot)2019-06-111-2/+2
| | | | | | This test "works" if things are run in the right order, so it's better to use @skip than @expectedFailure here. (cherry picked from commit 910b3fcb01c29f18ffd53086e36cd2cb9e5fae55) Co-authored-by: Benjamin Peterson <benjamin@python.org>
* bpo-36607: Eliminate RuntimeError raised by asyncio.all_tasks() (GH-13971)Miss Islington (bot)2019-06-111-6/+32
| | | | | | | | If internal tasks weak set is changed by another thread during iteration. https://bugs.python.org/issue36607 (cherry picked from commit 65aa64fae89a24491aae84ba0329eb8f3c68c389) Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
* [3.7] bpo-37219: Remove erroneous optimization for differencing an empty set ↵Raymond Hettinger2019-06-111-0/+6
| | | | | | (GH-13965) (GH-13968)
* bpo-37173: Show passed class in inspect.getfile error (GH-13861)Miss Islington (bot)2019-06-082-3/+21
| | | | | | | | | | | | | | | Currently, inspect.getfile(str) will report nonsense: ```pytb >>> inspect.getfile(str) TypeError: <module 'builtins' (built-in)> is a built-in class ``` This fixes that https://bugs.python.org/issue37173 (cherry picked from commit d407d2a7265f6102e51a1d62b3fd28b4f7a78d16) Co-authored-by: Philipp A <flying-sheep@web.de>
* bpo-34886: Fix subprocess.run handling of exclusive arguments (GH-11727)Miss Islington (bot)2019-06-081-2/+2
| | | | | | | | | Fix an unintended ValueError from :func:`subprocess.run` when checking for conflicting `input` and `stdin` or `capture_output` and `stdout` or `stderr` args when they were explicitly provided but with `None` values within a passed in `**kwargs` dict rather than as passed directly by name. (cherry picked from commit 8cc605acdda5aff250ab4c9b524a7560f90ca9f3) Co-authored-by: Rémi Lapeyre <remi.lapeyre@henki.fr>
* Use assertEqual(). (#13886)Miss Islington (bot)2019-06-071-2/+2
|
* IDLE: Standardize naming convention for DummyEditwin in tests (GH-13876)Miss Islington (bot)2019-06-071-2/+2
| | | | | | * Change from Dummy_Editwin to DummyEditwin to match other tests. (cherry picked from commit 7f8a38a7c47823c17adab469fcb4f762f4e945b7) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-37188: Fix a divide-by-zero in arrays of size-0 objects (GH-13881) (#13882)Miss Islington (bot)2019-06-071-0/+15
|
* bpo-37177: make IDLE's search dialogs transient (GH-13869)Miss Islington (bot)2019-06-062-5/+8
| | | | | | This avoids the search dialogs being hidden behind the editor window. (cherry picked from commit 554450fb4e95066e825bdb4a2d544a490daeebdc) Co-authored-by: Tal Einat <taleinat@gmail.com>
* bpo-21315: Fix parsing of encoded words with missing leading ws. (GH-13425) ↵Miss Islington (bot)2019-06-063-3/+45
| | | | | | | | | | | | | | | | | (#13846) * bpo-21315: Fix parsing of encoded words with missing leading ws. Because of missing leading whitespace, encoded word would get parsed as unstructured token. This patch fixes that by looking for encoded words when splitting tokens with whitespace. Missing trailing whitespace around encoded word now register a defect instead. Original patch suggestion by David R. Murray on bpo-21315. (cherry picked from commit 66c4f3f38b867d8329b28c032bb907fd1a2f22d2) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
* Don't report deleted attributes in __dir__ (GHGH-10148)Miss Islington (bot)2019-06-062-2/+13
| | | | | | | | | When an attribute is deleted from a Mock, a sentinel is added rather than just deleting the attribute. This commit checks for such sentinels when returning the child mocks in the __dir__ method as users won't expect deleted attributes to appear when performing dir(mock). (cherry picked from commit 0df635c7f8aa69e56a092bd4f142f0f164741ab2) Co-authored-by: Mario Corchero <mariocj89@gmail.com>
* bpo-30835: email: Fix AttributeError when parsing invalid CTE (GH-13598)Miss Islington (bot)2019-06-052-1/+10
| | | | | | | | | | | | | | | | | | | | | | * bpo-30835: email: Fix AttributeError when parsing invalid Content-Transfer-Encoding Parsing an email containing a multipart Content-Type, along with a Content-Transfer-Encoding containing an invalid (non-ASCII-decodable) byte will fail. email.feedparser.FeedParser._parsegen() gets the header and attempts to convert it to lowercase before comparing it with the accepted encodings, but as the header contains an invalid byte, it's returned as a Header object rather than a str. Cast the Content-Transfer-Encoding header to a str to avoid this. Found using the AFL fuzzer. Reported-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Andrew Donnellan <andrew@donnellan.id.au> * Add email and NEWS entry for the bugfix. (cherry picked from commit aa79707262f893428665ef45b5e879129abca4aa) Co-authored-by: Abhilash Raj <maxking@users.noreply.github.com>
* bpo-35763: Make IDLE calltip note about '/' less obtrusive (GH-13791)Miss Islington (bot)2019-06-042-61/+67
| | | | | | Add it to the end of the first line if there is room. Tests were reworked. (cherry picked from commit 949fe976d5c62ae63ed505ecf729f815d0baccfc) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
* bpo-37153: test_venv.test_mutiprocessing() calls pool.terminate() (GH-13816) ↵Miss Islington (bot)2019-06-041-2/+4
| | | | | | | | | (GH-13819) test_venv.test_mutiprocessing() now explicitly calls pool.terminate() to wait until the pool completes. (cherry picked from commit bc6469f79ca13217b784fb47da7ec83484a3debe) Co-authored-by: Victor Stinner <vstinner@redhat.com>
* bpo-36742: Corrects fix to handle decomposition in usernames (GH-13812)Miss Islington (bot)2019-06-042-8/+9
| | | | | (cherry picked from commit 8d0ef0b5edeae52960c7ed05ae8a12388324f87e) Co-authored-by: Steve Dower <steve.dower@python.org>
* IDLE: Fix typos in docs and comments (GH-13749)Miss Islington (bot)2019-06-0211-11/+11
| | | | | (cherry picked from commit d9677f36fe486e86bb86f2cd59cb7fc3804bdac1) Co-authored-by: Xtreak <tir.karthi@gmail.com>
* bpo-37014: Update docstring and Documentation of fileinput.FileInput(). ↵Miss Islington (bot)2019-06-021-3/+3
| | | | | | | | | | | | | | (GH-13545) (GH-13753) * bpo-37014: Update docstring and Documentation of fileinput.FileInput() * Explain the behavior of fileinput.FileInput() when reading stdin. * Update blurb. * bpo-37014: Fix typo in the docstring and documentation. (cherry picked from commit aca273e2401ca3151e15e984f400233b7f255e15) Co-authored-by: Michele Angrisano <michele.angrisano@gmail.com>
* bpo-35610: IDLE - Replace .context_use_ps1 with .prompt_last_line (GH-11307)Miss Islington (bot)2019-06-027-13/+11
| | | | | | Changes in bpo- 31858 made the less informative 'context_use_ps1' redundant. (cherry picked from commit 6bdc4dee01788599808c7858e2fe9fdd72cf6792) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-32411: IDLE: Remove line number sort in browser.py (GH-5011)Miss Islington (bot)2019-06-013-17/+20
| | | | | | Insertion in line order makes sorting keys by line order unneeded. (cherry picked from commit 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f) Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
* bpo-36813: Fix QueueListener to call task_done() upon termination. (GH-13113)Miss Islington (bot)2019-06-012-0/+12
| | | | | | | | | | Fixed QueueListener in order to avoid random deadlocks. Unable to add regression tests atm due to time constraints, will add it in a bit. Regarding implementation, although it's nested, it does not cause performance issues whatsoever, and does not call task_done() in case of an exception (which is the right thing to do IMHO). https://bugs.python.org/issue36813 (cherry picked from commit 6b282e18877ec84e927b381b4ce187eaf4ba3dd7) Co-authored-by: Bar Harel <bzvi7919@gmail.com>
* bpo-33361: Fix bug with seeking in StreamRecoders (GH-8278)Miss Islington (bot)2019-05-312-0/+31
| | | | | (cherry picked from commit a6ec1ce1ac05b1258931422e96eac215b6a05459) Co-authored-by: Ammar Askar <ammar_askar@hotmail.com>