Commit Graph

98671 Commits

Author SHA1 Message Date
Ned Deily 0cb82eb7e5 Update Doc build for split off of 3.7 branch 2018-02-03 16:28:44 -05:00
Miss Islington (bot) 7eb3d1e7da bpo-32739: Show default value for rotate() (GH-5485) (GH-5515)
(cherry picked from commit 589c718a8e)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
2018-02-03 10:27:40 -08:00
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
Terry Jan Reedy fbf8e823c0
[3.6] bpo-32614: Modify re examples to use a raw string to prevent wa… …rning (GH-5265) (GH-5500)
Modify RE examples in documentation to use raw strings to prevent DeprecationWarning.
Add text to REGEX HOWTO to highlight the deprecation.  Approved by Serhiy Storchaka.

(cherry picked from commit 66771422d0)
2018-02-02 17:37:30 -05:00
Miss Islington (bot) f61951b10c bpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5489)
Clarify that the level argument is used to determine whether to
perform absolute or relative imports: 0 is absolute, while a positive number
is the number of parent directories to search relative to the current module.
(cherry picked from commit 461d225b19)

Co-authored-by: oldk <oldk1331@users.noreply.github.com>
2018-02-02 08:32:19 -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
Serhiy Storchaka 8cf7ebb32d
[3.6] bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199). (GH-5471)
(cherry picked from commit 12e7cd8a51)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-02-01 14:47:22 +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) 581ce25e1f bpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464) (GH-5465)
The f-string example for using datetime format specifier does not match the given output.
Changed the format from %b to %B so it matches the output of "January".
(cherry picked from commit b299393cc3)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
2018-01-31 17:17:02 -05: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
Nick Coghlan 05f91a42cd
[3.6] Revert "bpo-32690: Preserve order of locals() (GH-5379) (#5390)"
This reverts commit 9105879bfd
in order to keep the behaviour of locals() consistent between
3.6.4 and 3.6.5+.
2018-01-30 15:27:41 +10:00
Miss Islington (bot) 04f99ba9d7 bpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401) (GH-5438)
(cherry picked from commit 9424dcbb3e)

Co-authored-by: Julien Palard <julien@palard.fr>
2018-01-29 20:16:21 -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
Miss Islington (bot) 5869861823 Document the error return of PyLong_As* APIs. (GH-5396) (#5404)
Document the error return of PyLong_As* APIs.

A frequent Python C API usage error is neglecting to check the return
value and/or PyErr_Occurred().
(cherry picked from commit f5b04a360e)
2018-01-29 09:24:11 -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
Miss Islington (bot) 190de183e5 Fix minor markup typo (GH-5407) (#5416)
(cherry picked from commit 2a3260bb03)
2018-01-29 01:24:09 -08: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
Miss Islington (bot) 9105879bfd bpo-32690: Preserve order of locals() (GH-5379) (#5390)
(cherry picked from commit a4d0001256)
2018-01-28 10:13:17 -08: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) 33febfb039 Fix PyTrace_RETURN documentation (GH-5384) (GH-5386)
It will be triggered when propagating an exception.
(cherry picked from commit 79db11ce99)
2018-01-28 23:33:23 +08: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) 854f0424de bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361) (GH-5377)
(cherry picked from commit 9ed0aee27c)
2018-01-28 16:41:05 +08:00
Miss Islington (bot) 0135dfdc1f Minor grammar fixes to License.rst (GH-1174) (GH-5373)
(cherry picked from commit 8312fba0a1)
2018-01-27 21:06:12 -08: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
Miss Islington (bot) 4d2dd64471 Fix changed file detection on Travis (GH-3129)
Travis when merging changes from a pull request onto the target branch
does not perform a rebase, instead it does a simple merge which causes
the PR commits to retain their commit dates. This means that the commit
log can potentially look like:

PR merge <-- HEAD
normal master commit <- master
more commits from normal workflow
PR commit 1
another master commit
PR commit 2

Performing a git diff from PR commit 2 to master will accidentally
include files that should not be there.

Closes python/core-workflow#14

(cherry picked from commit b2ec3615c8)
2018-01-28 01:48:09 +03:00
Miss Islington (bot) d7274c6638 Fix wrong assert in unicodeobject (GH-5340)
(cherry picked from commit 7cc95f5069)
2018-01-28 02:41:24 +09:00
Christian Heimes 12ae40766e
[3.6] bpo-32521: nis libnsl (GH-5190) (#5352)
* bpo-32521: nis libnsl (#5190)

The nismodule is now compatible with new libnsl and headers location

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 29a7df7827)
2018-01-27 09:39:16 +01:00
Cheryl Sabella 8f68cb7db3 [3.6] bpo-27505: Retrofit module __class__ documentation from 3.7 (GH-5321)
The module `__class__` attribute documentation added to 3.7 for PEP 562
(dynamic module attributes) also applies to earlier versions. This backports
that subset of the new docs to the 3.6 branch so that it will appear in the
main online documentation and in the final 3.6 binary release.

Patch by Cheryl Sabella.
2018-01-27 12:45:24 +10: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
Miss Islington (bot) 196b8cbab2 bpo-32651 Recommend getpass.getuser() (GH-5301) (#5304)
* bpo-32651 - In the documentation for os.getlogin(), recommend getpass.getuser()
(cherry picked from commit d499031f5f)
2018-01-24 14:09:56 -05:00
Xiang Zhang fd844efa9c
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056) (#5298)
(cherry picked from commit 131fd7f96c)
2018-01-24 22:44:53 +08: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) 8e230e1eb3 bpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284) (#5296)
glibc is deprecating libcrypt in favor of libxcrypt, however python assumes
that crypt.h will always be included. This change makes the header inclusion
explicit when libxcrypt is present on the system.
(cherry picked from commit e768c86ef4)
2018-01-24 11:11:16 +01: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
Miss Islington (bot) 051650ab8d Removed unnecesssary bit inversion which doesn't improve dispersion statistics (GH-5235) (#5236)
(cherry picked from commit fa78806041)
2018-01-18 14:27:22 -08: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) f31c70b0d6 Fix typo in thread_nt.h code comment (GH-5211) (GH-5226)
The comment for PyThread_allocate_lock says "It has too be implemented ...".
There was an extra "o" in ".. to be implemented.."
(cherry picked from commit 6027802ca7)
2018-01-17 16:40:33 -08: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