]> granicus.if.org Git - python/log
python
7 years agobpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) GH-5612)
Miss Islington (bot) [Sun, 11 Feb 2018 00:42:22 +0000 (16:42 -0800)]
bpo-32800: Update link to w3c doc for xml default namespaces (GH-5609) GH-5612)

The new link is given in a red box on the old page.
(cherry picked from commit 8d1f2f40389c476d9240ec87a33da0373597c6af)

Co-authored-by: sblondon <sblondon@users.noreply.github.com>
7 years ago[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)
Serhiy Storchaka [Fri, 9 Feb 2018 22:01:40 +0000 (00:01 +0200)]
[3.6] bpo-30157: Fix csv.Sniffer.sniff() regex pattern. (GH-5601) (GH-5603)

Co-authored-by: Jake Davis <jcdavis@awedge.net>.
(cherry picked from commit 2411292ba8155327125d8a1da8a4c9fa003d5909)

7 years ago[3.6] Make formatting of some return codes conforming to the general style. (GH-5587...
Serhiy Storchaka [Fri, 9 Feb 2018 12:48:31 +0000 (14:48 +0200)]
[3.6] Make formatting of some return codes conforming to the general style. (GH-5587). (GH-5598)

(cherry picked from commit 5bb0005f9ff768ac443924b4bb26c3818ce8dc5a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agobpo-32802: Fix Travis build (GH-5589) (GH-5591)
Miss Islington (bot) [Thu, 8 Feb 2018 20:01:23 +0000 (12:01 -0800)]
bpo-32802: Fix Travis build (GH-5589) (GH-5591)

Fix bug in travis configuration where it did not run the tests when
a change includes both code and doc changes.
(cherry picked from commit 32921f90821ab54ffb757b7e996e5b7a71fac25e)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
7 years agobpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) (GH...
Miss Islington (bot) [Wed, 7 Feb 2018 02:11:26 +0000 (18:11 -0800)]
bpo-6135: Fix subprocess.check_output doc to mention changes in 3.6 (GH-5564) (GH-5573)

Fixes the documentation for `subprocess.check_output()` not mentioning that the encoding and errors parameters were added in 3.6.
(cherry picked from commit fc1ce810f1da593648b4d19e7d582a235ec1dd37)

Co-authored-by: Brice Gros <brice-gros@users.noreply.github.com>
7 years agobpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)
Miss Islington (bot) [Tue, 6 Feb 2018 06:51:10 +0000 (22:51 -0800)]
bpo-32777: Fix _Py_set_inheritable async-safety in subprocess (GH-5560) (GH-5563)

Fix a rare but potential pre-exec child process deadlock in subprocess on POSIX systems when marking file descriptors inheritable on exec in the child process.  This bug appears to have been introduced in 3.4 with the inheritable file descriptors support.

This also changes Python/fileutils.c `set_inheritable` to use the "slow" two `fcntl` syscall path instead of the "fast" single `ioctl` syscall path when asked to be async signal safe (by way of being asked not to raise exceptions).  `ioctl` is not a POSIX async-signal-safe approved function.

ref: http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html
(cherry picked from commit c1e46e94de38a92f98736af9a42d89c3975a9919)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
7 years agobpo-30928: IDLE - update NEWS.txt [GH-5539] (GH-5545)
Terry Jan Reedy [Mon, 5 Feb 2018 08:14:15 +0000 (03:14 -0500)]
bpo-30928: IDLE - update NEWS.txt [GH-5539] (GH-5545)

Add entry for uniform lower context; add 'since' to be explicit.
(cherry picked from commit 05e806767b857b1eab838e712828e3a7d57cabf1)

7 years ago[3.6] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH...
Miss Islington (bot) [Mon, 5 Feb 2018 03:10:00 +0000 (19:10 -0800)]
[3.6] bpo-8722: Document __getattr__ behavior with AttributeError in property (GH-5542)

When `__getattr__` is implemented, attribute lookup will always fall back to that,
even if the initial failure comes from `__getattribute__` or a descriptor's `__get__`
method (including property methods).
(cherry picked from commit d1f318105b8781b01f3507d5cb0fd841b977d5f2)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
7 years agobpo-32765: Update configdialog General tab create page docstring (GH-5529) (GH-5538)
Miss Islington (bot) [Mon, 5 Feb 2018 00:05:23 +0000 (16:05 -0800)]
bpo-32765: Update configdialog General tab create page docstring (GH-5529) (GH-5538)

Add new entries to the widget list.
(cherry picked from commit 845d86485e35a26478aedb3dc127d632fdc65759)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
7 years agoFix typo -- missing "not" (GH-5528) (GH-5531)
Miss Islington (bot) [Sun, 4 Feb 2018 18:16:33 +0000 (10:16 -0800)]
Fix typo -- missing "not" (GH-5528) (GH-5531)

7 years agobpo-32720: Fixed the definition for width and precision in format mini-language doc...
Miss Islington (bot) [Sun, 4 Feb 2018 06:26:16 +0000 (22:26 -0800)]
bpo-32720: Fixed the definition for width and precision in format mini-language doc (GH-5482) (GH-5525)

Changed the definition of width and precision from "integer" to "digit+" in format mini-language doc.
(cherry picked from commit 8b5fa289fdb04b6b919cf95fa99246aa872e47a8)

Co-authored-by: nathankerr96 <nathankerr96@gmail.com>
7 years ago[3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)
Terry Jan Reedy [Sun, 4 Feb 2018 02:00:24 +0000 (21:00 -0500)]
[3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)

 Fix typos found by codespell in docs, docstrings, and comments.
Fixes for the following files were in post-3.6 code and not backported:
Lib/ctypes/_aix.py (new), Lib/test/test_concurrent_futures.py,
Modules/_asynciomodule.c, Modules/_pickle.c, Objects/obmalloc.c.

(cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)

7 years agoUpdate Doc build for split off of 3.7 branch
Ned Deily [Sat, 3 Feb 2018 21:28:44 +0000 (16:28 -0500)]
Update Doc build for split off of 3.7 branch

7 years agobpo-32739: Show default value for rotate() (GH-5485) (GH-5515)
Miss Islington (bot) [Sat, 3 Feb 2018 18:27:40 +0000 (10:27 -0800)]
bpo-32739: Show default value for rotate() (GH-5485) (GH-5515)

(cherry picked from commit 589c718a8e3bde017350f248f7f1c009240eb52b)

Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
7 years ago[3.6] bpo-30928: prepare idlelib/NEWS.txt for 3.6.5 entries. (#5508)
Terry Jan Reedy [Sat, 3 Feb 2018 05:52:34 +0000 (00:52 -0500)]
[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.

7 years ago[3.6] bpo-32303 - Consistency fixes for namespace loaders (GH-5481) (#5504)
Barry Warsaw [Sat, 3 Feb 2018 04:21:14 +0000 (23:21 -0500)]
[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 bbbcf8693b876daae4469765aa62f8924f39a7d2)

Co-authored-by: Barry Warsaw <barry@python.org>
7 years ago[3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502)
Bar Harel [Fri, 2 Feb 2018 23:15:31 +0000 (01:15 +0200)]
[3.6] bpo-32734: Fix asyncio.Lock multiple acquire safety issue (GH-5466) (#5502)

(cherry picked from commit d41e9e0952393e64f2f9756d778553d704191086)

7 years ago [3.6] bpo-32614: Modify re examples to use a raw string to prevent wa… …rning ...
Terry Jan Reedy [Fri, 2 Feb 2018 22:37:30 +0000 (17:37 -0500)]
 [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 66771422d0541289d0b1287bc3c28e8b5609f6b4)

7 years agobpo-32674: Improve the docstring for __import__ (GH-5339) (GH-5489)
Miss Islington (bot) [Fri, 2 Feb 2018 13:32:19 +0000 (05:32 -0800)]
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 461d225b195eec5269f317323b41115516144c41)

Co-authored-by: oldk <oldk1331@users.noreply.github.com>
7 years agobpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (GH-3000...
Miss Islington (bot) [Thu, 1 Feb 2018 14:07:08 +0000 (06:07 -0800)]
bpo-31106: Fix handling of erros in posix_fallocate() and posix_fadvise() (GH-3000) (GH-3000) (#4101)

(cherry picked from commit d4b93e21c2664d6a78e0656e7a7be0807be1c352)

7 years ago[3.6] bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199...
Serhiy Storchaka [Thu, 1 Feb 2018 12:47:22 +0000 (14:47 +0200)]
[3.6] bpo-32565: Add missed versionadded directives for all new opcodes. (GH-5199). (GH-5471)

(cherry picked from commit 12e7cd8a51956a5ce373aac692ae6366c5f86584)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
7 years agobpo-32137: The repr of deeply nested dict now raises a RecursionError (GH-4570) ...
Miss Islington (bot) [Thu, 1 Feb 2018 11:57:28 +0000 (03:57 -0800)]
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 1fb72d2ad243c965d4432b4e93884064001a2607)

7 years agobpo-32735: Fix typo in f-strings datetime format specifier example (GH-5464) (GH...
Miss Islington (bot) [Wed, 31 Jan 2018 22:17:02 +0000 (14:17 -0800)]
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 b299393cc372f3ecbef4304f8eaa4c7838e975ca)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
7 years agobpo-32727: smtplib's SMTP.send_message behaves differently with from_addr and to_addr...
Miss Islington (bot) [Wed, 31 Jan 2018 20:54:09 +0000 (12:54 -0800)]
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 8d83e4ba7823827bcbc119db887004d5c3a63dc6)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
7 years ago[3.6] bpo-32583: Fix possible crashing in builtin Unicode decoders (GH-5325) (#5459)
Xiang Zhang [Wed, 31 Jan 2018 13:34:17 +0000 (21:34 +0800)]
[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 2c7fd46e11333ef5e5cce34212f7d087694f3658)

7 years ago[3.6] compare with difflib not diff(1) (GH-5450) (GH-5453)
Benjamin Peterson [Tue, 30 Jan 2018 19:31:10 +0000 (11:31 -0800)]
[3.6] compare with difflib not diff(1) (GH-5450) (GH-5453)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years ago[3.6] closes bpo-30117: fix lib2to3 ParserIdempotency test (GH-1242) (GH-5443)
Benjamin Peterson [Tue, 30 Jan 2018 18:23:17 +0000 (10:23 -0800)]
[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 14e976e00e65bf343ba0fca016c3c9132a843daf)

7 years agocloses bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH...
Miss Islington (bot) [Tue, 30 Jan 2018 07:01:32 +0000 (23:01 -0800)]
closes bpo-32721: do not fail test_hashlib if _md5 isn't available (GH-5441) (GH-5442)

(cherry picked from commit 95441809ef77a8df5e14601ade6c054ef7114c02)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
7 years ago[3.6] replace dynamic import with 'exec' with importlib.import_module (GH-5433) ...
Benjamin Peterson [Tue, 30 Jan 2018 06:02:09 +0000 (22:02 -0800)]
[3.6] replace dynamic import with 'exec' with importlib.import_module (GH-5433) (GH-5440)

(cherry picked from commit 77526f05fa788d6fb12f2121fe6b96c130d9b717)

7 years ago[3.6] Revert "bpo-32690: Preserve order of locals() (GH-5379) (#5390)"
Nick Coghlan [Tue, 30 Jan 2018 05:27:41 +0000 (15:27 +1000)]
[3.6] Revert "bpo-32690: Preserve order of locals() (GH-5379) (#5390)"

This reverts commit 9105879bfd7133ecbac67f3e9c0bacf6e477de5a
in order to keep the behaviour of locals() consistent between
3.6.4 and 3.6.5+.

7 years agobpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401) (GH-5438)
Miss Islington (bot) [Tue, 30 Jan 2018 04:16:21 +0000 (20:16 -0800)]
bpo-32701: Clarify the quotetabs flag in quopri documentation (GH-5401) (GH-5438)

(cherry picked from commit 9424dcbb3e20a26dfdd81659303b989f7d3da044)

Co-authored-by: Julien Palard <julien@palard.fr>
7 years agobpo-27931: Fix email address header parsing error (GH-5329) (GH-5431)
Miss Islington (bot) [Mon, 29 Jan 2018 22:27:55 +0000 (14:27 -0800)]
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 aa218d1649690d1c1ba86a9972f7fae646bf1a8f)

Co-authored-by: jayyyin <jayyin11043@hotmail.com>
7 years agoDocument the error return of PyLong_As* APIs. (GH-5396) (#5404)
Miss Islington (bot) [Mon, 29 Jan 2018 17:24:11 +0000 (09:24 -0800)]
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 f5b04a360e44aa9733f7a92dd66d2292d6c52955)

7 years agobpo-20891: Remove test_capi.test_bpo20891() (#5425)
Victor Stinner [Mon, 29 Jan 2018 15:35:50 +0000 (16:35 +0100)]
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.

7 years agoAdd a test for pdb until command in coroutine (GH-5427) (#5428)
Miss Islington (bot) [Mon, 29 Jan 2018 14:56:46 +0000 (06:56 -0800)]
Add a test for pdb until command in coroutine (GH-5427) (#5428)

(cherry picked from commit 4f4ef0acbad81f4b05f370e8ff14ddf949773291)

7 years agobpo-32650: Add an asyncgen pdb test (GH-5406) (#5419)
Miss Islington (bot) [Mon, 29 Jan 2018 10:41:34 +0000 (02:41 -0800)]
bpo-32650: Add an asyncgen pdb test (GH-5406) (#5419)

(cherry picked from commit 9ee1bf9ab5af8233ed8ec5c53d12a29dc1bd9c9d)

7 years agoFix minor markup typo (GH-5407) (#5416)
Miss Islington (bot) [Mon, 29 Jan 2018 09:24:09 +0000 (01:24 -0800)]
Fix minor markup typo (GH-5407) (#5416)

(cherry picked from commit 2a3260bb030b0d4620242110c0ee5abc379afa8d)

7 years ago[3.6] bpo-32650 Add support for async generators and more test for coroutines in...
Andrew Svetlov [Mon, 29 Jan 2018 06:51:07 +0000 (08:51 +0200)]
[3.6] bpo-32650 Add support for async generators and more test for coroutines in pdb  (GH-5403). (#5411)

(cherry picked from commit c7ab581db216aeeb1c2aa7af2f2198d2b7516383)

7 years agobpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400)...
Miss Islington (bot) [Mon, 29 Jan 2018 05:57:06 +0000 (21:57 -0800)]
bpo-32650: Add native coroutine support to bdb when stepping over line (GH-5400) (#5402)

(cherry picked from commit 46877024423e98d1b872bf308dacacd583327207)

7 years agobpo-32690: Preserve order of locals() (GH-5379) (#5390)
Miss Islington (bot) [Sun, 28 Jan 2018 18:13:17 +0000 (10:13 -0800)]
bpo-32690: Preserve order of locals() (GH-5379) (#5390)

(cherry picked from commit a4d00012565d716db6e6abe1b8f33eaaa4de416e)

7 years ago[3.6] bpo-32228: Reset raw_pos after unwinding the raw stream (GH-4858) (#5389)
Antoine Pitrou [Sun, 28 Jan 2018 17:42:31 +0000 (18:42 +0100)]
[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 059f58ce938d9c3f0286412a4efb1b9131339421)

7 years agoFix PyTrace_RETURN documentation (GH-5384) (GH-5386)
Miss Islington (bot) [Sun, 28 Jan 2018 15:33:23 +0000 (07:33 -0800)]
Fix PyTrace_RETURN documentation (GH-5384) (GH-5386)

It will be triggered when propagating an exception.
(cherry picked from commit 79db11ce99332d62917be9d03b31494b1ff2f96a)

7 years agobpo-32685: Improve suggestion for print statement (GH-5380)
Miss Islington (bot) [Sun, 28 Jan 2018 11:31:48 +0000 (03:31 -0800)]
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 43c0f1ac5ed8bc9c3bd048d2ce4de4c98a83de99)

7 years agobpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361...
Miss Islington (bot) [Sun, 28 Jan 2018 08:41:05 +0000 (00:41 -0800)]
bpo-32687: Fix wrong meaning of args for PyTrace_LINE/CALL in documentation (GH-5361) (GH-5377)

(cherry picked from commit 9ed0aee27c249dada410a22fff4325a4a61df36d)

7 years agoMinor grammar fixes to License.rst (GH-1174) (GH-5373)
Miss Islington (bot) [Sun, 28 Jan 2018 05:06:12 +0000 (21:06 -0800)]
Minor grammar fixes to License.rst (GH-1174) (GH-5373)

(cherry picked from commit 8312fba0a1ef8f0a1a6c1760c73a89e29cfca09a)

7 years ago[3.6] bpo-32664: Add missing "|" connector in Exceptions doc (GH-1173) (GH-5372)
Miss Islington (bot) [Sun, 28 Jan 2018 03:52:52 +0000 (19:52 -0800)]
[3.6] bpo-32664: Add missing "|" connector in Exceptions doc (GH-1173) (GH-5372)

(cherry picked from commit 992ae6444cc745c23d3bcc604983cc8e39405bd2)

7 years agoFix changed file detection on Travis (GH-3129)
Miss Islington (bot) [Sat, 27 Jan 2018 22:48:09 +0000 (14:48 -0800)]
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 b2ec3615c81ca4f3c938245842a45956da8d5acb)

7 years agoFix wrong assert in unicodeobject (GH-5340)
Miss Islington (bot) [Sat, 27 Jan 2018 17:41:24 +0000 (09:41 -0800)]
Fix wrong assert in unicodeobject (GH-5340)

(cherry picked from commit 7cc95f5069c8983afb8a55928db6956abe2d5afa)

7 years ago[3.6] bpo-32521: nis libnsl (GH-5190) (#5352)
Christian Heimes [Sat, 27 Jan 2018 08:39:16 +0000 (09:39 +0100)]
[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 29a7df78277447cf6b898dfa0b1b42f8da7abc0c)

7 years ago[3.6] bpo-27505: Retrofit module __class__ documentation from 3.7 (GH-5321)
Cheryl Sabella [Sat, 27 Jan 2018 02:45:24 +0000 (21:45 -0500)]
[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.

7 years ago[3.6] bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) ...
Bo Bayles [Sat, 27 Jan 2018 02:18:58 +0000 (20:18 -0600)]
[3.6] bpo-32304: Fix distutils upload for tar files ending with b'\r' (GH-5264) (GH-5330)

Patch by Bo Bayles.

7 years agobpo-32667: Fix tests when $PATH contains a file (GH-5322) (#5323)
Miss Islington (bot) [Thu, 25 Jan 2018 21:39:36 +0000 (13:39 -0800)]
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 b31206a223955d614d7769f95fb979d60f77bf87)

7 years agobpo-32651 Recommend getpass.getuser() (GH-5301) (#5304)
Miss Islington (bot) [Wed, 24 Jan 2018 19:09:56 +0000 (11:09 -0800)]
bpo-32651 Recommend getpass.getuser() (GH-5301) (#5304)

* bpo-32651 - In the documentation for os.getlogin(), recommend getpass.getuser()
(cherry picked from commit d499031f5f33c3ef71be7c81ef52eee6b47c42e1)

7 years agobpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056) (...
Xiang Zhang [Wed, 24 Jan 2018 14:44:53 +0000 (22:44 +0800)]
bpo-17799: Explain real behaviour of sys.settrace and sys.setprofile (GH-4056) (#5298)

(cherry picked from commit 131fd7f96c619bc7eaea956e45c6337175f4b27f)

7 years ago[3.6] bpo-32502: Discard 64-bit (and other invalid) hardware addresses (GH-5254)...
Bo Bayles [Wed, 24 Jan 2018 13:27:14 +0000 (07:27 -0600)]
[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 6b273f7f4056f8276f61a97c789d6bb4425e653c)

7 years agobpo-32635: Fix a segfault when importing the crypt module with libxcrypt. (GH-5284...
Miss Islington (bot) [Wed, 24 Jan 2018 10:11:16 +0000 (02:11 -0800)]
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 e768c86ef442ef89004089a8a34ce5909ffb90f2)

7 years agobpo-32618: Fix test_mutatingdecodehandler not testing test.mutating (GH-5269) (#5285)
Miss Islington (bot) [Tue, 23 Jan 2018 15:47:15 +0000 (07:47 -0800)]
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 370d04d1dcca50a52d59f40aff4d11434f71df6b)

7 years ago[3.6] bpo-32028: Fix suggestions for indented print statements (GH-5249)
Miss Islington (bot) [Sat, 20 Jan 2018 03:56:31 +0000 (19:56 -0800)]
[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 d57f26c753dce61f72b52b96db3a3253d9f2fc3e)

7 years agoRemoved unnecesssary bit inversion which doesn't improve dispersion statistics (GH...
Miss Islington (bot) [Thu, 18 Jan 2018 22:27:22 +0000 (14:27 -0800)]
Removed unnecesssary bit inversion which doesn't improve dispersion statistics (GH-5235) (#5236)

(cherry picked from commit fa7880604191f81cbdddc191216f7b1e39a74d8d)

7 years ago[3.6] bpo-32588 Move _distutils_findvs into its own module (GH-5227) (#5228)
Steve Dower [Thu, 18 Jan 2018 22:09:49 +0000 (09:09 +1100)]
[3.6] bpo-32588 Move _distutils_findvs into its own module (GH-5227) (#5228)

7 years agoFix typo in thread_nt.h code comment (GH-5211) (GH-5226)
Miss Islington (bot) [Thu, 18 Jan 2018 00:40:33 +0000 (16:40 -0800)]
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 6027802ca7fae118bce6afead51d01a174600d40)

7 years agoUse assertCountEqual instead of assertEqual. (GH-5223) (#5225)
Miss Islington (bot) [Wed, 17 Jan 2018 23:51:27 +0000 (15:51 -0800)]
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 3941499d6c2a4d09f2ea476f84b9c4ddc4bdefa0)

7 years agopythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5219)
Miss Islington (bot) [Wed, 17 Jan 2018 16:36:04 +0000 (08:36 -0800)]
pythoninfo: add time.time and datetime.datetime.now (GH-5214) (#5219)

(cherry picked from commit 7d91c0250408e202243c77c1dc9afdb321b6b32f)

7 years agoSkip test_readline.test_nonascii() on C locale (GH-5203) (#5204)
Miss Islington (bot) [Tue, 16 Jan 2018 17:27:29 +0000 (09:27 -0800)]
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 c495e799ed376af91ae2ddf6c4bcc592490fe294)

7 years agobpo-26163: Frozenset hash improvement (GH-5194) (#5198)
Miss Islington (bot) [Tue, 16 Jan 2018 10:27:15 +0000 (02:27 -0800)]
bpo-26163: Frozenset hash improvement (GH-5194) (#5198)

(cherry picked from commit b44c5169f64178d2ff2914187b315549e7ab0cb6)

7 years ago[3.6] bpo-32555: Fix locale encodings (#5193)
Victor Stinner [Mon, 15 Jan 2018 22:43:24 +0000 (23:43 +0100)]
[3.6] bpo-32555: Fix locale encodings (#5193)

On FreeBSD and Solaris, os.strerror() now always decode the byte
string from the current locale encoding, rather than using
ASCII/surrogateescape in some cases.

Changes:

* Add _Py_DecodeLocaleEx() and _Py_EncodeLocaleEx() which has an
  additional current_locale parameter.
* PyUnicode_DecodeLocale(), PyUnicode_DecodeLocaleAndSize() and
* PyUnicode_EncodeLocale() now always use the current locale
* encoding, instead of using Py_DecodeLocale()/Py_EncodeLocale().
* Document encoding in Py_DecodeLocale() and Py_EncodeLocale()
  documentations.
* Add USE_FORCE_ASCII define to not define
  decode_ascii_surrogateescape() on Android.

7 years ago[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)
Victor Stinner [Mon, 15 Jan 2018 22:23:47 +0000 (23:23 +0100)]
[3.6] bpo-31900: Fix localeconv() encoding for LC_NUMERIC (#4174) (#5192)

* Add _Py_GetLocaleconvNumeric() function: decode decimal_point and
  thousands_sep fields of localeconv() from the LC_NUMERIC encoding,
  rather than decoding from the LC_CTYPE encoding.
* Modify locale.localeconv() and "n" formatter of str.format() (for
  int, float and complex to use _Py_GetLocaleconvNumeric()
  internally.

(cherry picked from commit cb064fc2321ce8673fe365e9ef60445a27657f54)

7 years agobpo-26330: Update shutil.disk_usage() documentation (GH-5184) (GH-5188)
Miss Islington (bot) [Mon, 15 Jan 2018 14:32:11 +0000 (06:32 -0800)]
bpo-26330: Update shutil.disk_usage() documentation (GH-5184) (GH-5188)

Clarify that on Windows, path must be a directory.
On Unix, path can be a file or a directory.
(cherry picked from commit ee3b83547c6b0cac1da2cb44aaaea533a1d1bbc8)

7 years agobpo-15221: Update os.path.is*() documentation (GH-5185) (GH-5186)
Miss Islington (bot) [Mon, 15 Jan 2018 05:44:49 +0000 (21:44 -0800)]
bpo-15221: Update os.path.is*() documentation (GH-5185) (GH-5186)

`os.path.is*()` can return False if the file can't be accessed.
The behaviour is documented in details in `os.path.exists()`.
Link to `os.path.exists()` from `os.path.is*()`.
(cherry picked from commit b3dd18d4035803b50c65a434955966d1b3b1f363)

7 years agoAdd itertools recipe for directly finding the n-th combination (GH-5161) (#5174)
Miss Islington (bot) [Sat, 13 Jan 2018 19:21:15 +0000 (11:21 -0800)]
Add itertools recipe for directly finding the n-th combination (GH-5161) (#5174)

(cherry picked from commit d37258dd2e189141906bd234385096cd8e885d8d)

7 years agoImprove enum.Flag code example (GH-5167) (GH-5171)
Miss Islington (bot) [Sat, 13 Jan 2018 04:23:21 +0000 (20:23 -0800)]
Improve enum.Flag code example (GH-5167) (GH-5171)

The code example that demonstrate how to use enum.Flag was missing
the import of enum.auto.
(cherry picked from commit 0f31c74fcfdec8f9e6157de2c366f2273de81677)

7 years ago[3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)
Miss Islington (bot) [Fri, 12 Jan 2018 15:29:35 +0000 (07:29 -0800)]
[3.6] bpo-32521: nis libtirpc (GH-5137) (#5165)

glibc has removed Sun RPC. Use replacement libtirpc headers and library in
nis module

Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit f3031b8a7ad71d3b6ed05da7f3041d9efbe773cf)

7 years agobpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)
Miss Islington (bot) [Fri, 12 Jan 2018 10:47:36 +0000 (02:47 -0800)]
bpo-32473: Improve ABCMeta._dump_registry() readability (GH-5091)

(cherry picked from commit ae12f5d4c98f2095c2aadd58981453e955044697)

7 years agoLexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH...
Miss Islington (bot) [Fri, 12 Jan 2018 06:50:45 +0000 (22:50 -0800)]
Lexical Analysis ref doc: Fix a typo in the string concatenation internal link (GH-5157) (GH-5160)

In lexical analysis reference documentation, the internal link to
the string literal concatenation section was written as`.. _string-catenation:`.
Changed that to `.. _string-concatenation:`.
(cherry picked from commit 3764bb075a73074f55568fc7c37adde6054eb59a)

7 years agoFix version in AppVeyor config (GH-5125)
Zachary Ware [Sun, 7 Jan 2018 19:00:33 +0000 (13:00 -0600)]
Fix version in AppVeyor config (GH-5125)

7 years agobpo-31802: Fix importing native path module before importing os. (GH-4017) (#5129)
Miss Islington (bot) [Sun, 7 Jan 2018 16:35:28 +0000 (08:35 -0800)]
bpo-31802: Fix importing native path module before importing os. (GH-4017) (#5129)

(cherry picked from commit 3460198f6ba40a839f105c381f07179aba1e8c61)

7 years ago[3.6] Kill the AppVeyor file whitelist (GH-5122)
Zachary Ware [Sun, 7 Jan 2018 03:16:33 +0000 (21:16 -0600)]
[3.6] Kill the AppVeyor file whitelist (GH-5122)

It's more trouble than it's worth, since AppVeyor only checks the HEAD commit of a PR rather than the full diff against the base branch to decide which files changed.
(cherry picked from commit 7f7de371f947dc38e67505601927e9bc58fa268a)

7 years agoadvance copyright years to 2018 (GH-5094) (#5104)
Miss Islington (bot) [Sat, 6 Jan 2018 07:12:14 +0000 (23:12 -0800)]
advance copyright years to 2018 (GH-5094) (#5104)

(cherry picked from commit 65f2a6dcc2bc28a8566b74c8e9273f982331ec48)

7 years agoFix outdated comment in typeobject.c (GH-5090)
Miss Islington (bot) [Thu, 4 Jan 2018 11:06:47 +0000 (03:06 -0800)]
Fix outdated comment in typeobject.c (GH-5090)

The comment was added in 3abca127fe1565ec80f6b0a1ae48d65186ad887d.
In d78448e912126410117723c7d240bbdfff06df16, it was changed to
use PyArg_ParseTuple instead.

(cherry picked from commit 78e24d4415c37e9e9951920bc31e9ee4868d86cb)

7 years agobpo-32482: Fix suspicious code in tests for syntax and grammar. (GH-5086) (#5095)
Miss Islington (bot) [Thu, 4 Jan 2018 09:32:53 +0000 (01:32 -0800)]
bpo-32482: Fix suspicious code in tests for syntax and grammar. (GH-5086) (#5095)

(cherry picked from commit 0cc99c8cd70d422e4b345837a907db30e9180ab9)

7 years agobpo-32211: Document the existing bug in re.findall() and re.finditer(). (#4695)
Serhiy Storchaka [Thu, 4 Jan 2018 09:08:24 +0000 (11:08 +0200)]
bpo-32211: Document the existing bug in re.findall() and re.finditer(). (#4695)

7 years agobpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081)
Miss Islington (bot) [Tue, 2 Jan 2018 13:36:06 +0000 (05:36 -0800)]
bpo-32452: clarify term 'brackets' in generator tutorial (GH-5079) (#5081)

Updates documentation for generator expressions in classes tutorial: Clarify usage of ambiguous term "brackets" by replacing with "square brackets". Updated subsequent lines to respect line breaks. (GH-5079)
(cherry picked from commit f190eb59e60e2ae7a7cbd396458389a7a076e0d3)

7 years agobpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078)...
Miss Islington (bot) [Tue, 2 Jan 2018 08:20:12 +0000 (00:20 -0800)]
bpo-32478: Add tests for 'break' and 'return' inside 'finally' clause. (GH-5078) (#5083)

(cherry picked from commit 7cc42c356b0dc5ad9eaa9392789e84bd4aa1c7de)

7 years agobpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5073)
Miss Islington (bot) [Mon, 1 Jan 2018 18:51:30 +0000 (10:51 -0800)]
bpo-32416: Add two new tests in test_sys_settrace. (GH-5072) (#5073)

Move other test to more proper place.
(cherry picked from commit e8ed96550c6aa9a1e39c36e67e892994e25e2c41)

7 years agoAdd missing backslashes in PCbuild bat files (GH-5056) (GH-5057)
Zachary Ware [Sat, 30 Dec 2017 23:54:31 +0000 (17:54 -0600)]
Add missing backslashes in PCbuild bat files (GH-5056) (GH-5057)

(cherry picked from commit 6c6d3a46087bacb9c767c8cf2185505348d3796d)

7 years agoremove unused import (GH-5040) (#5042)
Miss Islington (bot) [Fri, 29 Dec 2017 07:48:10 +0000 (23:48 -0800)]
remove unused import (GH-5040) (#5042)

(cherry picked from commit e325608740bee161ca7fefd09463d63099efa1b8)

7 years agomake PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034...
Miss Islington (bot) [Fri, 29 Dec 2017 02:12:41 +0000 (18:12 -0800)]
make PatternCompiler use the packaged grammar if possible (more bpo-24960) (GH-5034) (#5036)

(cherry picked from commit e5f7dccefaa8d97ab53b3051acbb4a4d49379dc4)

7 years agobpo-32440: Update the docs URL to https in help() (GH-5030) (GH-5031)
Miss Islington (bot) [Thu, 28 Dec 2017 15:16:39 +0000 (07:16 -0800)]
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 e5681b9822c633c77ddfeb94585d58895e0ecff5)

7 years ago[3.6] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991...
Serhiy Storchaka [Wed, 27 Dec 2017 19:31:47 +0000 (21:31 +0200)]
[3.6] bpo-32416: Refactor tests for the f_lineno setter and add new tests. (GH-4991). (#5016)

(cherry picked from commit 53f9135667226f33e049e327db60fb033afbd77a)

7 years agobpo-26133: Fix typos (GH-5010) (#5014)
Miss Islington (bot) [Tue, 26 Dec 2017 10:29:29 +0000 (02:29 -0800)]
bpo-26133: Fix typos (GH-5010) (#5014)

* Fix typos
* Change warning text
* Add test
(cherry picked from commit a8f4e15f3d33084862ddd3a7d58cd00034e94f16)

7 years agobpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)
Miss Islington (bot) [Mon, 25 Dec 2017 07:40:27 +0000 (23:40 -0800)]
bpo-29084: Exclude C API for OrderedDict from the limited C API. (GH-4900) (#5007)

(cherry picked from commit 1b3029ac8370ac76fa9571aef540e10aed0667ff)

7 years agobpo-26133: Clear signals list on interpreter finalizing (GH-5002) (#5003)
Miss Islington (bot) [Sun, 24 Dec 2017 12:30:57 +0000 (04:30 -0800)]
bpo-26133: Clear signals list on interpreter finalizing (GH-5002) (#5003)

(cherry picked from commit 4f146f9ed133b9ad56d4ee7a653396836af34067)

7 years agocorrect wording (GH-4983) (#4984)
Miss Islington (bot) [Sat, 23 Dec 2017 05:49:35 +0000 (21:49 -0800)]
correct wording (GH-4983) (#4984)

(cherry picked from commit d11e8e0d11c759cd0f96aebb59de914e4d62b8cd)

7 years agobpo-24960: use pkgutil.get_data in lib2to3 to read pickled grammar files (GH-4977...
Miss Islington (bot) [Fri, 22 Dec 2017 20:51:46 +0000 (12:51 -0800)]
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 8a5877165e993afb2633cd48da5222326d3f6e0e)

7 years agobpo-20891: Skip test_embed.test_bpo20891() (#4967) (#4969)
Victor Stinner [Thu, 21 Dec 2017 23:32:27 +0000 (00:32 +0100)]
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 550ee051d605b909dd75ef686d8e1244a0994394)

7 years agobpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown (GH...
Miss Islington (bot) [Thu, 21 Dec 2017 17:42:32 +0000 (09:42 -0800)]
bpo-26133: Dont unsubscribe signals in UNIX even loop on interpreter shutdown (GH-4956) (#4962)

(cherry picked from commit 4a02543cf97e8cbf9293741379f977b85531e4c2)

7 years agobpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867...
Miss Islington (bot) [Thu, 21 Dec 2017 12:54:45 +0000 (04:54 -0800)]
bpo-32323: urllib.parse.urlsplit() must not lowercase() IPv6 scope value (GH-4867) (#4959)

(cherry picked from commit fbd605151fcf2899b14575f4ddb9ce3c55e684ab)

7 years agoFix trivial typo in pickle.rst (GH-4955) (#4958)
Miss Islington (bot) [Thu, 21 Dec 2017 09:11:06 +0000 (01:11 -0800)]
Fix trivial typo in pickle.rst (GH-4955) (#4958)

(cherry picked from commit a8d25a16452f7ee8dfc350cd028b3ae172d28ada)

7 years agocorrect the typos (GH-4950) (#4951)
Miss Islington (bot) [Thu, 21 Dec 2017 05:43:11 +0000 (21:43 -0800)]
correct the typos (GH-4950) (#4951)

(cherry picked from commit 83cb778b4a3f856f2243b0f0d36fefb5c44b388f)

7 years agobpo-32306: Clarify c.f.Executor.map() documentation (GH-4947) (#4948)
Miss Islington (bot) [Wed, 20 Dec 2017 18:19:18 +0000 (10:19 -0800)]
bpo-32306: Clarify c.f.Executor.map() documentation (GH-4947) (#4948)

The built-in map() function collects function arguments lazily, but concurrent.futures.Executor.map() does so eagerly.
(cherry picked from commit a7a751dd7b08a5bb6cb399c1b2a6ca7b24aba51d)