]> granicus.if.org Git - python/log
python
6 years agobpo-32185: Don't send IP in SNI TLS extension (#5865)
Christian Heimes [Sun, 25 Feb 2018 08:47:02 +0000 (09:47 +0100)]
bpo-32185: Don't send IP in SNI TLS extension (#5865)

The SSL module no longer sends IP addresses in SNI TLS extension on
platforms with OpenSSL 1.0.2+ or inet_pton.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-17232: Clarify docs for -O and -OO command line options (GH-5839)
Miss Islington (bot) [Sun, 25 Feb 2018 03:46:16 +0000 (19:46 -0800)]
bpo-17232: Clarify docs for -O and -OO command line options (GH-5839)

The 'optimization' is for space in the executable file, not for run time.
(cherry picked from commit 186b606d8a2ea4fd51b7286813302c8e8c7006cc)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-31518: Change TLS protocol for Debian (#3660)
Christian Heimes [Sat, 24 Feb 2018 23:45:24 +0000 (00:45 +0100)]
bpo-31518: Change TLS protocol for Debian (#3660)

Debian Unstable has disabled TLS 1.0 and 1.1 for SSLv23_METHOD(). Change
TLS/SSL protocol of some tests to PROTOCOL_TLS or PROTOCOL_TLSv1_2 to
make them pass on Debian.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)
Miss Islington (bot) [Sat, 24 Feb 2018 17:43:05 +0000 (09:43 -0800)]
bpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)

(cherry picked from commit 42c35d9c0c8175332f50fbe034a001fe52f057b9)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)
Miss Islington (bot) [Sat, 24 Feb 2018 03:16:00 +0000 (19:16 -0800)]
bpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)

Adjust tests and user modules to match.
(cherry picked from commit c29c03a34a9f3c82704b66f323ce5ea9dc89c8af)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
Miss Islington (bot) [Fri, 23 Feb 2018 18:22:27 +0000 (10:22 -0800)]
bpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)

`whilst` and `while` are both english words, `whilst` is not as commonly used.
This can be confusing to readers whose primary language is not english.
(cherry picked from commit 98f42aac23f3863973cb6e9964c5212cfd3a1d98)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
6 years ago[3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)
Anselm Kruis [Fri, 23 Feb 2018 16:27:54 +0000 (17:27 +0100)]
[3.6] bpo-30028: make test.support.temp_cwd() fork-safe (GH-1066) (GH-5826)

Make test.support.temp_cwd() fork-safe. The context manager test.support.temp_cwd() no longer removes the temporary directory when executing in a process other than the parent it entered from.
If a forked child exits the context manager it won't do the cleanup..
(cherry picked from commit 33dddac00ba8d9b72cf21b8698504077eb3c23ad)

Co-authored-by: Anselm Kruis <a.kruis@science-computing.de>
6 years agobpo-32087: Doc: Make "deprecated-removed" directive translatable (GH-4473)
Miss Islington (bot) [Fri, 23 Feb 2018 12:14:04 +0000 (04:14 -0800)]
bpo-32087: Doc: Make "deprecated-removed"  directive translatable (GH-4473)

(cherry picked from commit 0febc053736112d7bb9081742b3ac0ece7b973e7)

Co-authored-by: cocoatomo <cocoatomo77@gmail.com>
6 years agobpo-32457: Improves handling of denormalized executable path when launching Python...
Steve Dower [Thu, 22 Feb 2018 20:33:16 +0000 (12:33 -0800)]
bpo-32457: Improves handling of denormalized executable path when launching Python (GH-5756) (#5818)

6 years agobpo-30449: Improve __slots__ documentation (GH-1819)
Miss Islington (bot) [Thu, 22 Feb 2018 17:37:40 +0000 (09:37 -0800)]
bpo-30449: Improve __slots__ documentation (GH-1819)

(cherry picked from commit 2b44e302ec3079363c4d5c875677945953705c58)

Co-authored-by: Aaron Hall, MBA <aaronchall@yahoo.com>
6 years agobpo-32905: IDLE - remove unused code in pyparse module (GH-5807)
Miss Islington (bot) [Thu, 22 Feb 2018 07:04:05 +0000 (23:04 -0800)]
bpo-32905: IDLE - remove unused code in pyparse module (GH-5807)

dump is similar to print but less flexible.  lastopenbracketpos is now always initialized in _study2, as was stmt_bracketing, so the class settings are not needed.  get_last_open_bracket_pos is never called.
(cherry picked from commit 451d1edaf4d27c4e632d81246d308e8dd6ea945f)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-32874: IDLE: add tests for pyparse (GH-5755)
Miss Islington (bot) [Thu, 22 Feb 2018 04:34:43 +0000 (20:34 -0800)]
bpo-32874: IDLE: add tests for pyparse (GH-5755)

There are no code changes other than comments and docstrings.
(cherry picked from commit c84cf6c03fce1fb73bfaf91d7909f1c2708f14a2)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32889: update valgrind suppressions (GH-5779)
Miss Islington (bot) [Wed, 21 Feb 2018 06:31:54 +0000 (22:31 -0800)]
bpo-32889: update valgrind suppressions (GH-5779)

Py_ADDRESS_IN_RANGE was renamed address_in_range in 3.6
(commit 3924f93794fd740c547b44884f73303196475cd5).
(cherry picked from commit ba518804bf4c1ea01df5e622b333d3116cbaa3bd)

Co-authored-by: Paul Price <price@astro.princeton.edu>
6 years agobpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)
Miss Islington (bot) [Wed, 21 Feb 2018 06:07:17 +0000 (22:07 -0800)]
bpo-32008: don't use PROTOCOL_TLSv1 in example (GH-5789)

It's bad form to pin to an old version of TLS. ssl.SSLContext has the right
protocol default, so let's not pass anyway.
(cherry picked from commit e9edee0b65650c4f9db90cefc2e9a8125bad762c)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
6 years agobpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)
Miss Islington (bot) [Wed, 21 Feb 2018 05:24:37 +0000 (21:24 -0800)]
bpo-28886: doc: Move deprecated abc decorators to separate section (GH-176)

(cherry picked from commit 52c6b89796a7ec391db20281e05b256f57e97b35)

Co-authored-by: Harshul jain <harshulrobo@gmail.com>
6 years agocloses bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)
Miss Islington (bot) [Wed, 21 Feb 2018 05:21:12 +0000 (21:21 -0800)]
closes bpo-32859: Don't retry dup3() if it is not available at runtime (GH-5708)

os.dup2() tests for dup3() system call availability at runtime,
but doesn't remember the result across calls, repeating
the test on each call with inheritable=False.

Since the caller of os.dup2() is expected to hold the GIL,
fix this by making the variable holding the test result static.
(cherry picked from commit b3caf388a0418f6c031e4dbdcc0c1ce7e5cc36bd)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years agobpo-32540: Update venv documentation (GH-5736)
Miss Islington (bot) [Wed, 21 Feb 2018 04:26:21 +0000 (20:26 -0800)]
bpo-32540: Update venv documentation (GH-5736)

If the directory already exists, it will be re-used.
(cherry picked from commit e8eb972514cad6086b752754c1d34d703c04dd82)

Co-authored-by: TROUVERIE Joachim <joachim.trouverie@linoame.fr>
6 years agobpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is...
Miss Islington (bot) [Tue, 20 Feb 2018 22:17:30 +0000 (14:17 -0800)]
bpo-31848: Fix broken error handling in Aifc_read.initfp() when the SSND chunk is not found (GH-5240)

Initialize self._ssnd_chunk so that aifc.Error is raised as intended,
not AttributeError.
(cherry picked from commit 80d20b918bd8a882043c493a7f958333ecb41727)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length...
Miss Islington (bot) [Tue, 20 Feb 2018 19:46:06 +0000 (11:46 -0800)]
bpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length() (GH-5767)

Dropped the part that says: "For objects that do not provide sequence protocol".
(cherry picked from commit 7a1e1786f98ad49caa157dcdf14ada9d0b07d0fd)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-32409: Ensures activate.bat can handle Unicode contents (GH-5766)
Miss Islington (bot) [Tue, 20 Feb 2018 02:18:43 +0000 (18:18 -0800)]
bpo-32409: Ensures activate.bat can handle Unicode contents (GH-5766)

(cherry picked from commit 6240917b773b52f8883387b9e3a5f327a4372068)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agobpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)
Miss Islington (bot) [Mon, 19 Feb 2018 20:49:46 +0000 (12:49 -0800)]
bpo-30121: Fix test_subprocess for Windows Debug builds (GH-5758)

(cherry picked from commit 5537646bfacec463b450871dde31cb06c44a0556)

Co-authored-by: Zachary Ware <zachary.ware@gmail.com>
6 years agobpo-32682: Improve libz version parsing in test_zilb (GH-5347)
Miss Islington (bot) [Mon, 19 Feb 2018 04:31:15 +0000 (20:31 -0800)]
bpo-32682: Improve libz version parsing in test_zilb (GH-5347)

(cherry picked from commit 4c7108a77144493d0aa6fc0105b67d3797e143f5)

Co-authored-by: pmp-p <pmp-p@users.noreply.github.com>
6 years agoImprove error message for "setup.py upload" without dist files (GH-21060)
Miss Islington (bot) [Mon, 19 Feb 2018 04:14:27 +0000 (20:14 -0800)]
Improve error message for "setup.py upload" without dist files (GH-21060)

(cherry picked from commit 08a6926b2584040fe3c3f06263b0b5f1fbbdc24c)

Co-authored-by: Éric Araujo <merwok@netwok.org>
6 years agobpo-31972: Improve docstrings for pathlib classes (GH-5310)
Miss Islington (bot) [Mon, 19 Feb 2018 00:37:00 +0000 (16:37 -0800)]
bpo-31972: Improve docstrings for pathlib classes (GH-5310)

(cherry picked from commit dfa015cf77a148d229ddc0a5b063562c9f9664f2)

Co-authored-by: chason <chason@gmail.com>
6 years ago[3.6] Clean up Travis config (GH-5727)
Zachary Ware [Sun, 18 Feb 2018 21:44:49 +0000 (15:44 -0600)]
[3.6] Clean up Travis config (GH-5727)

(cherry picked from commit 7eb3f8226ea7b79dae4e4e8b05730cfe0d9af7c1)

6 years agobpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739)
Miss Islington (bot) [Sun, 18 Feb 2018 18:58:09 +0000 (10:58 -0800)]
bpo-32869: Fix incorrect dst buffer size for MultiByteToWideChar (GH-5739)

This function expects the destination buffer size to be given
in wide characters, not bytes.
(cherry picked from commit b3b4a9d3001f1fc7df8efcccdce081de54fa5eab)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years ago[3.6] Improves the ability to build in CI (GH-5730)
Steve Dower [Sun, 18 Feb 2018 04:35:03 +0000 (20:35 -0800)]
[3.6] Improves the ability to build in CI (GH-5730)

6 years ago[3.6] bpo-30638: Add clinic to `make regen-all` (GH-5671)
Zachary Ware [Sun, 18 Feb 2018 01:27:22 +0000 (19:27 -0600)]
[3.6] bpo-30638: Add clinic to `make regen-all` (GH-5671)

Also, use PYTHON_FOR_REGEN for clinic and blake2s_impl.c rather than PYTHON_FOR_BUILD, and update .travis.yml to make use of the change.
(cherry picked from commit d6ff8a7037903497eff95fa32bdac2b6adf71505)

6 years agobpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)
Miss Islington (bot) [Sat, 17 Feb 2018 07:14:41 +0000 (23:14 -0800)]
bpo-32852: Fix trace changing sys.argv to tuple. (GH-5692)

(cherry picked from commit 9f4223261fd129ad7b9a09b2b0d625d1bb90b22b)

Co-authored-by: Kyle Altendorf <sda@fstab.net>
6 years agoDOC: fix documentation for copyright and credits (GH-5706)
Miss Islington (bot) [Sat, 17 Feb 2018 04:16:52 +0000 (20:16 -0800)]
DOC: fix documentation for copyright and credits (GH-5706)

Adapt documentation for `copyright` and `credits` to reality.  Previously, the documentation implied that all each of `copyright`,
`credits`, and `license`, would print a message to call the object in order to see the full text.  In reality, only `license` exhibits this
behaviour, and `copyright` and `credit` print their full text either when printed, displayed, or called.
(cherry picked from commit 243d6d71265be1996a8326002deae429106a5fba)

Co-authored-by: Gerrit Holl <gerrit.holl@gmail.com>
6 years agobpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712)
Miss Islington (bot) [Sat, 17 Feb 2018 03:58:11 +0000 (19:58 -0800)]
bpo-32860: Fix a missing asterisk in the documentation for glob.iglob() (GH-5712)

(cherry picked from commit 6887d86e9a04b9c5718b08e5d9e1ca3cc1f53721)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agoUpdate comment in posixmodule.c (GH-5681)
Miss Islington (bot) [Wed, 14 Feb 2018 21:16:36 +0000 (13:16 -0800)]
Update comment in posixmodule.c (GH-5681)

A closing parentheses was missing.

Signed-off-by: Ngie Cooper <yaneurabeya@gmail.com>
(cherry picked from commit 7745ec4e356ac1f4eaf43b155f4482c20a907d48)

Co-authored-by: ngie-eign <1574099+ngie-eign@users.noreply.github.com>
6 years agobpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683)
Miss Islington (bot) [Wed, 14 Feb 2018 10:10:18 +0000 (02:10 -0800)]
bpo-32841: Fix cancellation in awaiting asyncio.Condition (GH-5665) (GH-5683)

(cherry picked from commit 5746510b7aef423fa4afc92b2abb919307b1dbb9)

Co-authored-by: Bar Harel <bzvi7919@gmail.com>
6 years ago[3.6] remove mercurial dot files (GH-5558)
Benjamin Peterson [Wed, 14 Feb 2018 04:28:46 +0000 (20:28 -0800)]
[3.6] remove mercurial dot files (GH-5558)

(cherry picked from commit 2b86f4cb2cd339f545804a9abb8c4d4cc28d9488)

6 years agoFix installation instructions for *nix (GH-5605)
Miss Islington (bot) [Wed, 14 Feb 2018 04:00:38 +0000 (20:00 -0800)]
Fix installation instructions for *nix (GH-5605)

Remove pkg_add -r python from FreeBSD installation section.
Moved to OpenBSD.
(cherry picked from commit 3384d38d51a2c3450e742175db5d6d638fa5d2eb)

Co-authored-by: Eitan Adler <grimreaper@users.noreply.github.com>
6 years agobpo-27846: Delete incorrect note in base64 docs (GH-5666)
Miss Islington (bot) [Wed, 14 Feb 2018 00:48:28 +0000 (16:48 -0800)]
bpo-27846: Delete incorrect note in base64 docs (GH-5666)

This note incorrectly stated that "Base64 has an expansion factor of 6
to 4" (it is actually 4 to 3). It was decided to remove the note.

(cherry picked from commit 88c38a4049ded0e1f197fec3e76be7c0c0e83d7a)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-31787: Skip refleak check when _hashlib is not available (GH-5660)
Miss Islington (bot) [Tue, 13 Feb 2018 15:33:50 +0000 (07:33 -0800)]
bpo-31787: Skip refleak check when _hashlib is not available (GH-5660)

(cherry picked from commit f0bc645dfede8118c84844bad319cd952c4d1905)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)
INADA Naoki [Tue, 13 Feb 2018 13:15:24 +0000 (22:15 +0900)]
bpo-31787: Prevent refleaks when calling __init__() more than once (GH-3995)

(cherry picked from commit d019bc8319ea35e93bf4baa38098ff1b57cd3ee5)

6 years agobpo-32827: Fix usage of _PyUnicodeWriter_Prepare() in decoding errors handler. (GH...
Miss Islington (bot) [Tue, 13 Feb 2018 09:32:46 +0000 (01:32 -0800)]
bpo-32827: Fix usage of _PyUnicodeWriter_Prepare() in decoding errors handler. (GH-5636)

(cherry picked from commit b7e2d67f7c035f09c921ca4e7a36529cd502ccf7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years ago[3.6] bpo-32370: Use the correct encoding for ipconfig output in the uuid module...
Serhiy Storchaka [Tue, 13 Feb 2018 09:15:21 +0000 (11:15 +0200)]
[3.6] bpo-32370: Use the correct encoding for ipconfig output in the uuid module. (GH-5608). (#5654)

(cherry picked from commit da6c3da6c33c6bf794f741e348b9c6d86cc43ec5)

Co-authored-by: Segev Finer <segev208@gmail.com>
6 years agobpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646)
Miss Islington (bot) [Mon, 12 Feb 2018 23:40:12 +0000 (15:40 -0800)]
bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646)

Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
(cherry picked from commit 688722cedd6437910ff185ecf94fb3b749ad37f2)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639)
Miss Islington (bot) [Mon, 12 Feb 2018 20:53:50 +0000 (12:53 -0800)]
bpo-32826: Add "encoding=utf-8" to open() in idle_test/test_help_about. (GH-5639)

GUI test test_file_buttons() only looks at initial ascii-only lines,
but failed on systems where open() defaults to 'ascii' because
readline() internally reads and decodes far enough ahead to encounter
a non-ascii character in CREDITS.txt.
(cherry picked from commit f34e03ec0ea6a4cef8d966087c77e616c4a5893b)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-29248: Fix os.readlink() on Windows (GH-5577)
Miss Islington (bot) [Mon, 12 Feb 2018 18:14:08 +0000 (10:14 -0800)]
bpo-29248: Fix os.readlink() on Windows (GH-5577)

The PrintNameOffset field of the reparse data buffer
was treated as a number of characters instead of bytes.

(cherry picked from commit 3c34aad4e7a95913ec7db8e5e948a8fc69047bf7)

Co-authored-by: SSE4 <tomskside@gmail.com>
6 years agobpo-32720: Fixed the replacement field grammar documentation. (GH-5544) (GH-5547)
Miss Islington (bot) [Mon, 12 Feb 2018 08:07:55 +0000 (00:07 -0800)]
bpo-32720: Fixed the replacement field grammar documentation. (GH-5544) (GH-5547)

`arg_name` and `element_index` are defined as `digit`+ instead of `integer`.
(cherry picked from commit 7a561afd2c79f63a6008843b83733911d07f0119)

Co-authored-by: Mariatta <Mariatta@users.noreply.github.com>
6 years agoFix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5570)
Miss Islington (bot) [Mon, 12 Feb 2018 07:35:56 +0000 (23:35 -0800)]
Fix typo in Include/objimpl.h, the word "has" was missing (GH-5568) (GH-5570)

It now reads: ...be aware that Python has no control over...
(cherry picked from commit 517da1e58f4c489d4b31579852cde5f7113da08e)

Co-authored-by: Alexey <forestbiiird@gmail.com>
6 years agoFix AppVeyor doc short-circuit (GH-5634)
Miss Islington (bot) [Sun, 11 Feb 2018 22:21:32 +0000 (14:21 -0800)]
Fix AppVeyor doc short-circuit (GH-5634)

(cherry picked from commit 6ea20fc719dcaf102d2cefa1786f0421514f7a58)

6 years ago[3.6] Add short-circuit for doc changes to AppVeyor (GH-5628)
Zachary Ware [Sun, 11 Feb 2018 19:56:57 +0000 (13:56 -0600)]
[3.6] Add short-circuit for doc changes to AppVeyor (GH-5628)

(cherry picked from commit 28607e0dd9417ce44a109980ffd60697c1afdea0)

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)