Commit Graph

41652 Commits

Author SHA1 Message Date
Terry Jan Reedy 72584d23a5
[3.6] bpo-30928: prepare idlelib/NEWS.txt for 3.6.5 entries. (#5508)
Add 3.6.4 and 3.6.5 headers; move 3.6.3 header below 3.6.4 entries; fix dates.
2018-02-03 00:52:34 -05:00
Barry Warsaw a71397fb66
[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.

https://bugs.python.org/issue32303
https://bugs.python.org/issue32305.
(cherry picked from commit bbbcf8693b)

Co-authored-by: Barry Warsaw <barry@python.org>
2018-02-02 23:21:14 -05:00
Bar Harel 7e4cf8e95d [3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502)
(cherry picked from commit d41e9e0952)
2018-02-02 18:15:31 -05:00
Miss Islington (bot) 3a04c52a9e bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (GH-3000) (GH-3000) (#4101)
(cherry picked from commit d4b93e21c2)
2018-02-01 16:07:08 +02:00
Miss Islington (bot) 688b6dec4e bpo-32137: The repr of deeply nested dict now raises a RecursionError (GH-4570) (GH-4689)
instead of crashing due to a stack overflow.

This perhaps will fix similar problems in other extension types.
(cherry picked from commit 1fb72d2ad2)
2018-02-01 13:57:28 +02:00
Miss Islington (bot) 85a92d00bd bpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and to_addrs (GH-5451) (#5455)
Do not pass the name field in the 'from' address in the SMTP envelope.
(cherry picked from commit 8d83e4ba78)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
2018-01-31 15:54:09 -05:00
Xiang Zhang ea94fce696
[3.6] bpo-32583: Fix possible crashing in builtin Unicode decoders (GH-5325) (#5459)
When using customized decode error handlers, it is possible for builtin decoders
to write out-of-bounds and then crash..
(cherry picked from commit 2c7fd46e11)
2018-01-31 21:34:17 +08:00
Benjamin Peterson eb126eddbd
[3.6] compare with difflib not diff(1) (GH-5450) (GH-5453)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-01-30 11:31:10 -08:00
Benjamin Peterson a23a2c555c
[3.6] closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) (GH-5443)
Fix two (in my opinion) spurious failure conditions in the lib2to3.tests.test_parser.TestParserIdempotency test_parser test.

    Use the same encoding found in the initial file to write a temp file for a diff. This retains the BOM if the encoding was initially utf-8-sig.

    If the file cannot be parsed using the normal grammar, try again with no print statement which should succeed for valid files using future print_function

For case (1), the driver was correctly handling a BOM in a utf-8 file, but then the test was not writing a comparison file using 'utf-8-sig' to diff against, so the BOM got removed. I don't think that is the fault of the parser, and lib2to3 will retain the BOM.

For case (2), lib2to3 pre-detects the use of from __future__ import print_function or allows the user to force this interpretation with a -p flag, and then selects a different grammar with the print statement removed. That makes the test cases unfair to this test as the driver itself doesn't know which grammar to use. As a minimal fix, the test will try using a grammar with the print statement, and if that fails fall back on a grammar without it. A more thorough handling of the idempotency test would to be to parse all files using both grammars and ignore if one of the two failed but otherwise check both. I didn't think this was necessary but can change..
(cherry picked from commit 14e976e00e)
2018-01-30 10:23:17 -08:00
Miss Islington (bot) 6b2bbcc4cc closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH-5442)
(cherry picked from commit 95441809ef)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-01-29 23:01:32 -08:00
Benjamin Peterson 88fa79a10a
[3.6] replace dynamic import with 'exec' with importlib.import_module (GH-5433) (GH-5440)
(cherry picked from commit 77526f05fa)
2018-01-29 22:02:09 -08:00
Miss Islington (bot) 6ea75b174d bpo-27931: Fix email address header parsing error (GH-5329) (GH-5431)
Correctly handle addresses whose username is an empty quoted string.
(cherry picked from commit aa218d1649)

Co-authored-by: jayyyin <jayyin11043@hotmail.com>
2018-01-29 14:27:55 -08:00
Victor Stinner 0cecc22842
bpo-20891: Remove test_capi.test_bpo20891() (#5425)
My first fix is not enough to make test_bpo20891() reliable. A second
fix is needed and it was decided to not backport it, so remove the
test instead.

For Python 3.6, the workaround is to call PyEval_InitThreads() before
spawning the first C thread.

Python 3.7 will have both fixes.
2018-01-29 16:35:50 +01:00
Miss Islington (bot) 757aad6748 Add a test for pdb until command in coroutine (GH-5427) (#5428)
(cherry picked from commit 4f4ef0acba)
2018-01-29 16:56:46 +02:00
Miss Islington (bot) d9c743b2d1 bpo-32650: Add an asyncgen pdb test (GH-5406) (#5419)
(cherry picked from commit 9ee1bf9ab5)
2018-01-29 12:41:34 +02:00
Andrew Svetlov 3cfb84c657
[3.6] bpo-32650 Add support for async generators and more test for coroutines in pdb (GH-5403). (#5411)
(cherry picked from commit c7ab581db2)
2018-01-29 08:51:07 +02:00
Miss Islington (bot) 543ec005a4 bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400) (#5402)
(cherry picked from commit 4687702442)
2018-01-29 07:57:06 +02:00
Antoine Pitrou 1d896ed2cd
[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)
Ensure that ``truncate()`` preserves the file position (as reported by ``tell()``) after writes longer than the buffer size..
(cherry picked from commit 059f58ce93)
2018-01-28 18:42:31 +01:00
Miss Islington (bot) b3b4b81d01 bpo-32685: Improve suggestion for print statement (GH-5380)
Better account for single-line compound statements and
semi-colon separated statements when suggesting
Py3 replacements for Py2 print statements.

Initial patch by Nitish Chandra.
(cherry picked from commit 43c0f1ac5e)
2018-01-28 21:31:48 +10:00
Miss Islington (bot) d331515847 [3.6] bpo-32664: Add missing "|" connector in Exceptions doc (GH-1173) (GH-5372)
(cherry picked from commit 992ae6444c)
2018-01-27 19:52:52 -08:00
Bo Bayles 995c60d265 [3.6] bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5330)
Patch by Bo Bayles.
2018-01-26 21:18:58 -05:00
Miss Islington (bot) 255dbd2102 bpo-32667: Fix tests when $PATH contains a file (GH-5322) (#5323)
Some tests failed when the PATH environment variable contained a path
to an existing file. Fix tests to ignore also NotADirectoryError, not
only FileNotFoundError and PermissionError.
(cherry picked from commit b31206a223)
2018-01-25 22:39:36 +01:00
Bo Bayles d69794f4df [3.6] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-5254) (#5290)
* [3.6] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-5254).
(cherry picked from commit 6b273f7f40)
2018-01-24 08:27:14 -05:00
Miss Islington (bot) 6abbf14a87 bpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (GH-5269) (#5285)
It should test both test.replacing and test.mutating instead of test test.replacing twice.
(cherry picked from commit 370d04d1dc)
2018-01-23 23:47:15 +08:00
Miss Islington (bot) 4002d5dbf4 [3.6] bpo-32028: Fix suggestions for indented print statements (GH-5249)
The suggested replacement for print statements previously failed to account
for leading whitespace and hence could end up including unwanted text in
the proposed call to the print builtin.

Patch by Sanyam Khurana.
(cherry picked from commit d57f26c753)
2018-01-20 13:56:31 +10:00
Steve Dower ccf7f05c5d
[3.6] bpo-32588 Move _distutils_findvs into its own module (GH-5227) (#5228) 2018-01-19 09:09:49 +11:00
Miss Islington (bot) 8d1e41d414 Use assertCountEqual instead of assertEqual. (GH-5223) (#5225)
This test doesn't care about order, the underlying filesystem APIs do not
guarantee directory listings on subsequent calls will be in the same order.
(cherry picked from commit 3941499d6c)
2018-01-17 15:51:27 -08:00
Miss Islington (bot) 4e09c0c858 pythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5219)
(cherry picked from commit 7d91c02504)
2018-01-17 17:36:04 +01:00
Miss Islington (bot) c2740e8a26 Skip test_readline.test_nonascii() on C locale (GH-5203) (#5204)
bpo-29240: On FreeBSD, if the LC_CTYPE locale is "C" or "POSIX",
writing and reading non-ASCII bytes into/from a TTY works,
but readline or ncurses ignores non-ASCII bytes on read.
(cherry picked from commit c495e799ed)
2018-01-16 18:27:29 +01:00
Miss Islington (bot) cf4cd4bccb Add itertools recipe for directly finding the n-th combination (GH-5161) (#5174)
(cherry picked from commit d37258dd2e)
2018-01-13 11:21:15 -08:00
Miss Islington (bot) a91662affe bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
(cherry picked from commit ae12f5d4c9)
2018-01-12 19:47:36 +09:00
Miss Islington (bot) 94a3facc0e bpo-31802: Fix importing native path module before importing os. (GH-4017) (#5129)
(cherry picked from commit 3460198f6b)
2018-01-07 18:35:28 +02:00
Miss Islington (bot) a70d5ff992 bpo-32482: Fix suspicious code in tests for syntax and grammar. (GH-5086) (#5095)
(cherry picked from commit 0cc99c8cd7)
2018-01-04 11:32:53 +02:00
Miss Islington (bot) aea95c2fbd bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078) (#5083)
(cherry picked from commit 7cc42c356b)
2018-01-02 10:20:12 +02:00
Miss Islington (bot) 439ce8a939 bpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5073)
Move other test to more proper place.
(cherry picked from commit e8ed96550c)
2018-01-01 20:51:30 +02:00
Miss Islington (bot) 1b2812a7b4 remove unused import (GH-5040) (#5042)
(cherry picked from commit e325608740)
2017-12-28 23:48:10 -08:00
Miss Islington (bot) 85f71aa9d6 make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5036)
(cherry picked from commit e5f7dccefa)
2017-12-28 18:12:41 -08:00
Miss Islington (bot) 6eb232c52a bpo-32440: Update the docs URL to https in help() (GH-5030) (GH-5031)
In pydoc.py, the reference to Python' documentation was in http.
The link has been updated to use https.
(cherry picked from commit e5681b9822)
2017-12-28 07:16:39 -08:00
Serhiy Storchaka ea98eba346
[3.6] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991). (#5016)
(cherry picked from commit 53f9135667)
2017-12-27 21:31:47 +02:00
Miss Islington (bot) 32518b439b bpo-26133: Fix typos (GH-5010) (#5014)
* Fix typos
* Change warning text
* Add test
(cherry picked from commit a8f4e15f3d)
2017-12-26 12:29:29 +02:00
Miss Islington (bot) 5ff5d1167d bpo-26133: Clear signals list on interpreter finalizing (GH-5002) (#5003)
(cherry picked from commit 4f146f9ed1)
2017-12-24 14:30:57 +02:00
Miss Islington (bot) 6ba0637727 correct wording (GH-4983) (#4984)
(cherry picked from commit d11e8e0d11)
2017-12-22 21:49:35 -08:00
Miss Islington (bot) c1b8eb8006 bpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977) (#4979)
This is more complicated than it should be because we need to preserve the
useful mtime-based regeneration feature that lib2to3.pgen2.driver.load_grammar
has. We only look for the pickled grammar file with pkgutil.get_data and only if
the source file does not exist.
(cherry picked from commit 8a5877165e)
2017-12-22 12:51:46 -08:00
Victor Stinner 2e1ef00171
bpo-20891: Skip test_embed.test_bpo20891() (#4967) (#4969)
Skip the test failing randomly because of known race condition.

Skip the test to fix macOS buildbots until a decision is made on the
proper fix for the race condition.

(cherry picked from commit 550ee051d6)
2017-12-22 00:32:27 +01:00
Miss Islington (bot) 3bc68cff5b bpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown (GH-4956) (#4962)
(cherry picked from commit 4a02543cf9)
2017-12-21 19:42:32 +02:00
Miss Islington (bot) fdb148f949 bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959)
(cherry picked from commit fbd605151f)
2017-12-21 14:54:45 +02:00
Yury Selivanov 572636d425
bpo-27456: Ensure TCP_NODELAY is set on linux (#4231) (#4898)
(cherry picked from commit e796b2fe26)
2017-12-15 21:53:08 -05:00
Miss Islington (bot) 7d1fbecd6a bpo-32294: Fix multiprocessing test_semaphore_tracker() (GH-4885) (#4887)
Run the child process with -E option to ignore the PYTHONWARNINGS
environment variable.
(cherry picked from commit 9402c8367b)
2017-12-15 17:26:46 +01:00
Serhiy Storchaka b580f4f2bf
[3.6] bpo-30416: Protect the optimizer during constant folding. (#4865)
It no longer spends much time doing complex calculations and no
longer consumes much memory for creating large constants that will
be dropped later.

This fixes also bpo-21074.
2017-12-15 14:12:14 +02:00
Serhiy Storchaka b82da9ebb2
[3.6] bpo-27169: The __debug__ constant is now optimized out at compile time. (GH-4880) (#4882)
This fixes also bpo-22091..
(cherry picked from commit 3325a6780c)
2017-12-15 13:26:26 +02:00