]> granicus.if.org Git - python/log
python
6 years agobpo-32896: Fix error when subclassing a dataclass with a field that uses a default_fa...
Miss Islington (bot) [Wed, 21 Mar 2018 09:17:30 +0000 (02:17 -0700)]
bpo-32896: Fix error when subclassing a dataclass with a field that uses a default_factory (GH-6170) (GH-6171)

Fix the way that new annotations in a class are detected.
(cherry picked from commit 8f6eccdc64cab735c47620fea948e64b19f83684)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoFix typos in mmap() error messages (GH-6173)
Miss Islington (bot) [Wed, 21 Mar 2018 06:24:41 +0000 (23:24 -0700)]
Fix typos in mmap() error messages (GH-6173)

(cherry picked from commit 9308dea3e1fd565d50a76a667e4e8ef0568b7053)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
6 years agobpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
Miss Islington (bot) [Wed, 21 Mar 2018 01:22:23 +0000 (18:22 -0700)]
bpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)

The result of host() was not empty when the network is constructed by a tuple containing an
integer mask and only 1 bit left for addresses.
(cherry picked from commit 10b134a07c898c2fbc5fd3582503680a54ed80a2)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-18802: Add more details to ipaddress documentation (GH-6083)
Miss Islington (bot) [Wed, 21 Mar 2018 00:30:43 +0000 (17:30 -0700)]
bpo-18802: Add more details to ipaddress documentation (GH-6083)

Original patch by Jon Foster and Berker Peksag.
(cherry picked from commit 5609b78392d59c7362ef8aa5c4a4529325f01f27)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-28247: Document Windows executable creation in zipapp (GH-6158)
Miss Islington (bot) [Tue, 20 Mar 2018 22:44:21 +0000 (15:44 -0700)]
bpo-28247: Document Windows executable creation in zipapp (GH-6158)

(cherry picked from commit 4be79f29463f632cd8b48486feadc2ed308fb520)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years ago[3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)
Miss Islington (bot) [Tue, 20 Mar 2018 19:16:30 +0000 (12:16 -0700)]
[3.7] bpo-33021: Release the GIL during fstat() calls (GH-6019) (GH-6159)

fstat may block for long time if the file descriptor is on a
non-responsive NFS server, hanging all threads. Most fstat() calls are
handled by _Py_fstat(), releasing the GIL internally, but but
_Py_fstat_noraise() does not release the GIL, and most calls release the
GIL explicitly around it.

This patch fixes last 2 calls to _Py_fstat_no_raise(), avoiding hangs
when calling:
- mmap.mmap()
- os.urandom()
- random.seed()
(cherry picked from commit 4484f9dca9149da135bbae035f10a50d20d1cbbb)

Co-authored-by: Nir Soffer <nirsof@gmail.com>
6 years agobpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152...
Miss Islington (bot) [Tue, 20 Mar 2018 01:31:22 +0000 (18:31 -0700)]
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152) (GH-6153)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.
(cherry picked from commit 7389fd935c95b4b6f094312294e703ee0de18719)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived...
Miss Islington (bot) [Mon, 19 Mar 2018 01:03:36 +0000 (18:03 -0700)]
bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (GH-6147) (GH-6148)

If a non-dataclass derives from a frozen dataclass, allow attributes to be set.
Require either all of the dataclasses in a class hierarchy to be frozen, or all non-frozen.
Store `@dataclass` parameters on the class object under `__dataclass_params__`. This is needed to detect frozen base classes.
(cherry picked from commit f199bc655eb50c28e94010714629b376bbbd077b)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)
Miss Islington (bot) [Sun, 18 Mar 2018 20:50:41 +0000 (13:50 -0700)]
bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)

(cherry picked from commit 134cb01cda50f02725575808130b05d2d776693f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-19417: Add test_bdb.py (GH-5217)
Miss Islington (bot) [Sun, 18 Mar 2018 20:25:15 +0000 (13:25 -0700)]
bpo-19417: Add test_bdb.py (GH-5217)

(cherry picked from commit 3fe33043ee83d19e15551094fc1e0984617ded3c)

Co-authored-by: xdegaye <xdegaye@gmail.com>
6 years agoRevert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)
Miss Islington (bot) [Sun, 18 Mar 2018 19:15:52 +0000 (12:15 -0700)]
Revert "bpo-30406: Make async and await proper keywords (GH-1669)" (GH-6143)

This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.

(Reverts only the lib2to3 part.)
(cherry picked from commit f64aae46da292f71f6be750026cd052362e066bc)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
6 years ago[3.7] bpo-33041: Add tests for jumps in/out of 'async with' blocks. (GH-6110). (GH...
Serhiy Storchaka [Sun, 18 Mar 2018 10:31:37 +0000 (12:31 +0200)]
[3.7] bpo-33041: Add tests for jumps in/out of 'async with' blocks. (GH-6110). (GH-6140)

(cherry picked from commit bc300ce205f99acb1ef92c37de06dc76147e073b)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
Miss Islington (bot) [Sun, 18 Mar 2018 06:24:33 +0000 (23:24 -0700)]
bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)

It was actually fixed in SQLite 3.8.8, not 3.8.7.

(cherry picked from commit bbf7bb7a636b3112ef6f6b31df385606d52517ce)

Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
6 years agoUpdate pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (#6134)
Miss Islington (bot) [Sat, 17 Mar 2018 15:46:05 +0000 (08:46 -0700)]
Update pip to 9.0.2 and setuptools to 38.6.1 (GH-6133) (#6134)

(cherry picked from commit 7f81bb2addbbccfa45a2fc1aa6030f26dcf4bd78)

Co-authored-by: Donald Stufft <donald@stufft.io>
6 years agobpo-32374: m_traverse may be called with m_state=NULL (GH-5140)
Miss Islington (bot) [Sat, 17 Mar 2018 06:03:56 +0000 (23:03 -0700)]
bpo-32374:  m_traverse may be called with m_state=NULL (GH-5140)

Multi-phase initialized modules allow m_traverse to be called while the
module is still being initialized, so module authors may need to account
for that.
(cherry picked from commit c2b0b12d1a137ada1023ab7c10b8d9a0249d95f9)

Co-authored-by: Marcel Plch <gmarcel.plch@gmail.com>
6 years ago[3.7] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772...
Miss Islington (bot) [Wed, 14 Mar 2018 17:52:28 +0000 (10:52 -0700)]
[3.7] bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (GH-5772) (#6103)

Creating backup files with ~ suffix can be undesirable in some environment,
such as when building RPM packages. Instead of requiring the user to remove
those files manually, option -n was added, that simply disables this feature.

-n was selected because 2to3 has the same option with this behavior.
(cherry picked from commit 5affd5c29eb1493cb31ef3cfdde15538ac134689)

Co-authored-by: Miro Hrončok <miro@hroncok.cz>
6 years agolib2to3: Add more tests (GH-6101) (#6108)
Miss Islington (bot) [Tue, 13 Mar 2018 18:20:38 +0000 (11:20 -0700)]
lib2to3: Add more tests (GH-6101) (#6108)

(cherry picked from commit 74f56878cdee18d485e4f8b485d55ce62e38f4c9)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
6 years agobpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (GH-6084) (#6092)
Miss Islington (bot) [Tue, 13 Mar 2018 09:10:57 +0000 (02:10 -0700)]
bpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (GH-6084) (#6092)

(cherry picked from commit 095ee415cee41bf24c3a1108c23307e5baf168dd)

Co-authored-by: Thomas Moreau <thomas.moreau.2010@gmail.com>
6 years ago[3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-5928)
xdegaye [Tue, 13 Mar 2018 08:52:35 +0000 (09:52 +0100)]
[3.7] bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-5928)

6 years agobpo-33064: lib2to3: support trailing comma after *args and **kwargs (GH-6096) (#6097)
Miss Islington (bot) [Tue, 13 Mar 2018 08:08:02 +0000 (01:08 -0700)]
bpo-33064: lib2to3: support trailing comma after *args and **kwargs (GH-6096) (#6097)

New tests also added.

I also made the comments in line with the builtin Grammar/Grammar. PEP 306 was
withdrawn, Kees Blom's railroad program has been lost to the sands of time for
at least 16 years now (I found a python-dev post from people looking for it).
(cherry picked from commit b51f5de71163f096d2d5229ede5379cdb284f651)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
6 years agobpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094)
Ned Deily [Tue, 13 Mar 2018 01:16:54 +0000 (21:16 -0400)]
bpo-29719: Remove Date and Release field in whatsnew/3.7 (GH-6094)

6 years agoAdd macOS installer Conclusion file
Ned Deily [Mon, 12 Mar 2018 19:44:21 +0000 (15:44 -0400)]
Add macOS installer Conclusion file

6 years agoFix docs markup for asyncio current_task() and all_tasks() (GH-6089)
Miss Islington (bot) [Mon, 12 Mar 2018 19:12:05 +0000 (12:12 -0700)]
Fix docs markup for asyncio current_task() and all_tasks() (GH-6089)

(cherry picked from commit b21505e7109bafe75d87ab63d524b4e749157dbd)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agobpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) (GH...
Miss Islington (bot) [Sun, 11 Mar 2018 18:42:37 +0000 (11:42 -0700)]
bpo-31804: Fix multiprocessing.Process with broken standard streams (GH-6079) (GH-6080)

In some conditions the standard streams will be None or closed in the child process (for example if using "pythonw" instead of "python" on Windows).  Avoid failing with a non-0 exit code in those conditions.

Report and initial patch by poxthegreat.
(cherry picked from commit e756f66c83786ee82f5f7d45931ae50a6931dd7f)

Co-authored-by: Antoine Pitrou <pitrou@free.fr>
6 years ago[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026)....
Serhiy Storchaka [Sun, 11 Mar 2018 07:30:13 +0000 (09:30 +0200)]
[3.7] bpo-33026: Fix jumping out of "with" block by setting f_lineno. (GH-6026). (#6074)

(cherry picked from commit 26c9f565d016db21257a60d29ab2c99383dd5ac7)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32338: OrderedDict import is no longer needed in re. (GH-4891)
Miss Islington (bot) [Sun, 11 Mar 2018 07:01:58 +0000 (23:01 -0800)]
bpo-32338: OrderedDict import is no longer needed in re. (GH-4891)

(cherry picked from commit b931bd0a2fe7e9293339019352baf3317166b769)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32996: Improve What's New in 3.7. (GH-5983)
Miss Islington (bot) [Sun, 11 Mar 2018 06:29:30 +0000 (22:29 -0800)]
bpo-32996: Improve What's New in 3.7. (GH-5983)

(cherry picked from commit 51302a5fcc557e6afc0bf1e3b371f5f37c76dc77)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-33045: Fix typos in SSL documentation (GH-6065)
Miss Islington (bot) [Sun, 11 Mar 2018 01:21:27 +0000 (17:21 -0800)]
bpo-33045: Fix typos in SSL documentation (GH-6065)

(cherry picked from commit 9cf8c42f3231d3f066670d087a997bd1278482a0)

Co-authored-by: Matt Eaton <agnosticdev@gmail.com>
6 years agobpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
Miss Islington (bot) [Sun, 11 Mar 2018 00:59:11 +0000 (16:59 -0800)]
bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)

(cherry picked from commit 7280a4eef5fbe17e8ac82afd71fe6e51843240a5)

Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
6 years agocontrolflow: Use full example for "5 through 9" (GH-5907)
Miss Islington (bot) [Sat, 10 Mar 2018 23:25:14 +0000 (15:25 -0800)]
controlflow: Use full example for "5 through 9" (GH-5907)

Replace example result of "5 through 9" with complete list: "5, 6, 7, 8, 9".
This format is more consistent with the surrounding examples.
(cherry picked from commit 83d7062d2dc5eacfef578e072bca4747c346fdae)

Co-authored-by: Steven M. Vascellaro <S.Vascellaro@gmail.com>
6 years agobpo-32836: Remove obsolete code from symtable pass (GH-5680)
Miss Islington (bot) [Sat, 10 Mar 2018 23:11:47 +0000 (15:11 -0800)]
bpo-32836: Remove obsolete code from symtable pass (GH-5680)

When comprehensions switched to using a nested scope, the old
code for generating a temporary name to hold the accumulation
target became redundant, but was never actually removed.

Patch by Nitish Chandra.
(cherry picked from commit 3a087beddd9f0955eb9080a6fd1499ff89ca74bf)

Co-authored-by: Nitish Chandra <nitishchandrachinta@gmail.com>
6 years agobpo-27645: Add support for native backup facility of SQLite (GH-4238)
Miss Islington (bot) [Sat, 10 Mar 2018 22:29:19 +0000 (14:29 -0800)]
bpo-27645: Add support for native backup facility of SQLite (GH-4238)

(cherry picked from commit d7aed4102d2a40c74553240c7f03585624d27aea)

Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
6 years ago[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)
Serhiy Storchaka [Sat, 10 Mar 2018 18:45:05 +0000 (20:45 +0200)]
[3.7] bpo-33041: Add missed error checks when compile "async for" (GH-6053) (GH-6060)

and remove redundant code.
(cherry picked from commit 67ee07795bcd84b679c000780212d4d81a1490a3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) (GH-6057)
Miss Islington (bot) [Sat, 10 Mar 2018 16:27:01 +0000 (08:27 -0800)]
bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044) (GH-6057)

* Skip write()/data_received() if sslpipe is destroyed
(cherry picked from commit 5e80a71ab67045fecec46573a1892e240b569ace)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agobpo-26701: Improve documentation for the rounding special methods. (GH-6054)
Miss Islington (bot) [Sat, 10 Mar 2018 15:49:24 +0000 (07:49 -0800)]
bpo-26701: Improve documentation for the rounding special methods. (GH-6054)

(cherry picked from commit 496431ffb6c29719332bf2af773349e8dd85e45a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-26701: Add documentation for __trunc__ (GH-6049)
Miss Islington (bot) [Sat, 10 Mar 2018 15:10:32 +0000 (07:10 -0800)]
bpo-26701: Add documentation for __trunc__ (GH-6049)

`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.
(cherry picked from commit 308eab979d153f1ab934383dc08bc4546ced8b6c)

Co-authored-by: Eric Appelt <eric.appelt@gmail.com>
6 years agoWarn that dbm.dumb.open() can crash Python (GH-6047) (GH-6048)
Miss Islington (bot) [Sat, 10 Mar 2018 00:12:54 +0000 (16:12 -0800)]
Warn that dbm.dumb.open() can crash Python (GH-6047) (GH-6048)

(cherry picked from commit 10485ebd40669d3e17ab4f477c8c898543bcccd1)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agoWarn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)
Miss Islington (bot) [Fri, 9 Mar 2018 21:40:26 +0000 (13:40 -0800)]
Warn that compile() can crash when compiling to an AST object (GH-6043) (GH-6045)

(cherry picked from commit f7a6ff6fcab32a53f262ba3f8a072c27afc330d7)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agobpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter...
Miss Islington (bot) [Fri, 9 Mar 2018 20:35:42 +0000 (12:35 -0800)]
bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960) (GH-6041)

(cherry picked from commit 7a7f100eb352d08938ee0f5ba59c18f56dc4a7b5)

Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
6 years agobpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)
Miss Islington (bot) [Fri, 9 Mar 2018 18:14:14 +0000 (10:14 -0800)]
bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

test_asyncio hangs indefinitely on macOS 10.13.2+ on `read_pty_output()`
using the KqueueSelector. Closing `proto.transport` (as is done in
`write_pty_output()`) seems to fix it.
(cherry picked from commit 12f74d8608c15cacd9d5786524e2be9ca36f007e)

Co-authored-by: Nathan Henrie <n8henrie@users.noreply.github.com>
6 years agobpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (GH...
Miss Islington (bot) [Thu, 8 Mar 2018 16:26:43 +0000 (08:26 -0800)]
bpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (GH-6010)

(cherry picked from commit 3b20d3454e8082e07dba93617793de5dc9237828)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years agoAdd two missing error checks in hamt.c (GH-5851)
Miss Islington (bot) [Thu, 8 Mar 2018 06:21:34 +0000 (22:21 -0800)]
Add two missing error checks in hamt.c (GH-5851)

(cherry picked from commit 3c7ac7ea2098c672e50402d1d1b5ee9f14586437)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agoFix some ipaddress documentation errors (GH-6021)
Miss Islington (bot) [Thu, 8 Mar 2018 04:35:52 +0000 (20:35 -0800)]
Fix some ipaddress documentation errors (GH-6021)

* fix a typo: documention -> documentation
* fix the type of IPv?Network.hostmask
* add documentation about IPv?Network.netmask
* fix IPv6Network constructor doc that extended netmasks are not supported
(cherry picked from commit e405096ea91f516d411095b6fea4eec9668eac88)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)
Miss Islington (bot) [Wed, 7 Mar 2018 07:47:40 +0000 (23:47 -0800)]
bpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)

(cherry picked from commit fc7df0e664198cb05cafd972f190a18ca422989c)

Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
6 years agobpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)
Miss Islington (bot) [Wed, 7 Mar 2018 05:26:19 +0000 (21:26 -0800)]
bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)

(cherry picked from commit bc3f2289b9007396bfb7f986bee477b6176c1822)

Co-authored-by: Xiang Zhang <angwerzx@126.com>
6 years agobpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)
Miss Islington (bot) [Tue, 6 Mar 2018 18:23:48 +0000 (10:23 -0800)]
bpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)

(cherry picked from commit 8a387219bdfb6ee34928d6168ac42ca559f11c9a)

Co-authored-by: Yury Selivanov <yury@magic.io>
6 years agobpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace...
Miss Islington (bot) [Tue, 6 Mar 2018 15:16:11 +0000 (07:16 -0800)]
bpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace package (GH-5980) (GH-5997)

* bpo-32991: Add test capturing expectation.

DocTestFinder.find should return an empty list for doctests in a namespace package.

* bpo-32991: Restore expectation that inspect.getfile on a namespace package raises TypeError.
(cherry picked from commit b9650a04a81355c8a7dcd0464c28febfb4bfc0a9)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
6 years agobpo-33005: Fix _PyGILState_Reinit() (GH-6001)
Miss Islington (bot) [Tue, 6 Mar 2018 13:52:27 +0000 (05:52 -0800)]
bpo-33005: Fix _PyGILState_Reinit() (GH-6001)

Fix a crash on fork when using a custom memory allocator (ex: using
PYTHONMALLOC env var).

_PyGILState_Reinit() and _PyInterpreterState_Enable() now use the
default RAW memory allocator to allocate a new interpreters mutex on
fork.
(cherry picked from commit 5d92647102fac9e116b98ab8bbc632eeed501c34)

Co-authored-by: Victor Stinner <victor.stinner@gmail.com>
6 years agobpo-33001: Prevent buffer overrun in os.symlink (GH-5989)
Miss Islington (bot) [Mon, 5 Mar 2018 23:12:56 +0000 (15:12 -0800)]
bpo-33001: Prevent buffer overrun in os.symlink (GH-5989)

(cherry picked from commit 6921e73e33edc3c61bc2d78ed558eaa22a89a564)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agoAdd What's New for issues 32303 and 32305 (GH-5994) (GH-5995)
Miss Islington (bot) [Mon, 5 Mar 2018 20:51:56 +0000 (12:51 -0800)]
Add What's New for issues 32303 and 32305 (GH-5994) (GH-5995)

(cherry picked from commit 4c19b95734faee4c390c1d0569dc876980c33d2c)

Co-authored-by: Barry Warsaw <barry@python.org>
6 years agobpo-32984: IDLE - set __file__ for startup files (GH-5981)
Miss Islington (bot) [Mon, 5 Mar 2018 16:49:15 +0000 (08:49 -0800)]
bpo-32984: IDLE - set __file__ for startup files (GH-5981)

Like Python, IDLE optionally runs one startup file in the Shell window
before presenting the first interactive input prompt.  For IDLE,
option -s runs a file named in environmental variable IDLESTARTUP or
PYTHONSTARTUP; -r file runs file.  Python sets __file__ to the startup
file name before running the file and unsets it before the first
prompt.  IDLE now does the same when run normally, without the -n
option.
(cherry picked from commit 22c82be5df70c3d51e3f89b54fe1d4fb84728c1e)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years ago[3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)
Miss Islington (bot) [Sun, 4 Mar 2018 23:22:32 +0000 (15:22 -0800)]
[3.7] bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978) (GH-5979)

(cherry picked from commit 18fd89246333bfa1b76c1623df689214f3ce2bf3)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)
Miss Islington (bot) [Sun, 4 Mar 2018 12:00:33 +0000 (04:00 -0800)]
bpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)

(cherry picked from commit 74382a3f175ac285cc924a73fd758e8dc3cc41bb)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32981: Fix catastrophic backtracking vulns (GH-5955)
Miss Islington (bot) [Sun, 4 Mar 2018 05:55:07 +0000 (21:55 -0800)]
bpo-32981: Fix catastrophic backtracking vulns (GH-5955)

* Prevent low-grade poplib REDOS (CVE-2018-1060)

The regex to test a mail server's timestamp is susceptible to
catastrophic backtracking on long evil responses from the server.

Happily, the maximum length of malicious inputs is 2K thanks
to a limit introduced in the fix for CVE-2013-1752.

A 2KB evil response from the mail server would result in small slowdowns
(milliseconds vs. microseconds) accumulated over many apop calls.
This is a potential DOS vector via accumulated slowdowns.

Replace it with a similar non-vulnerable regex.

The new regex is RFC compliant.
The old regex was non-compliant in edge cases.

* Prevent difflib REDOS (CVE-2018-1061)

The default regex for IS_LINE_JUNK is susceptible to
catastrophic backtracking.
This is a potential DOS vector.

Replace it with an equivalent non-vulnerable regex.

Also introduce unit and REDOS tests for difflib.

Co-authored-by: Tim Peters <tim.peters@gmail.com>
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: Jamie Davis <davisjam@vt.edu>
(cherry picked from commit 0e6c8ee2358a2e23117501826c008842acb835ac)

6 years agoFix missing coroutine declaration in the asyncio documentation. (GH-5964)
Miss Islington (bot) [Sat, 3 Mar 2018 21:22:49 +0000 (13:22 -0800)]
Fix missing coroutine declaration in the asyncio documentation. (GH-5964)

(cherry picked from commit 13cfd57dcf58485d6242fd8118c6ea4b10e29aab)

Co-authored-by: Joongi Kim <me@daybreaker.info>
6 years agobpo-32964: Reuse a testing implementation of the path protocol in tests. (GH-5930)
Miss Islington (bot) [Fri, 2 Mar 2018 10:17:51 +0000 (02:17 -0800)]
bpo-32964: Reuse a testing implementation of the path protocol in tests. (GH-5930)

(cherry picked from commit b21d155f57d284aecf9092a9bd24258293965c2f)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agoAdd What's new entry for datetime.fromisoformat (GH-5559) (GH-5939)
Miss Islington (bot) [Thu, 1 Mar 2018 18:48:10 +0000 (10:48 -0800)]
Add What's new entry for datetime.fromisoformat (GH-5559) (GH-5939)

Documents bpo-15873
(cherry picked from commit 22864bc8e4a076bbac748ccda6c27f1ec41b53e7)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
6 years agoFixed incorrect default value for dataclass unsafe_hash. (GH-5949) (GH-5950)
Miss Islington (bot) [Thu, 1 Mar 2018 13:30:13 +0000 (05:30 -0800)]
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949) (GH-5950)

(cherry picked from commit 5da8cfb838fa1bf3529c085c6dce1adf3d1eaf62)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801) (#5945)
Miss Islington (bot) [Thu, 1 Mar 2018 10:28:41 +0000 (02:28 -0800)]
bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801) (#5945)

(cherry picked from commit 3e197c7a6740d564ad52fb7901c07d5ff49460f5)

Co-authored-by: Alexey Izbyshev <izbyshev@users.noreply.github.com>
6 years agoFix typo in logging doc: picked -> pickled (GH-5942)
Miss Islington (bot) [Wed, 28 Feb 2018 23:58:58 +0000 (15:58 -0800)]
Fix typo in logging doc: picked -> pickled (GH-5942)

(cherry picked from commit 982c7233846e8fbdb1e0ca23c8ae3f6362645307)

Co-authored-by: James Walker <19191463+jdswalker@users.noreply.github.com>
6 years agobpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862)
Miss Islington (bot) [Wed, 28 Feb 2018 23:08:21 +0000 (15:08 -0800)]
bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862)

The new code also runs faster.
(cherry picked from commit f0daa880a405c8de6743e44fa46006754aa145c9)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agoMinor improvements to the Windows build/release process (GH-5935)
Miss Islington (bot) [Wed, 28 Feb 2018 06:30:48 +0000 (22:30 -0800)]
Minor improvements to the Windows build/release process (GH-5935)

(cherry picked from commit 881323db717f9b6ffe30d14104a2925c77f28db7)

Co-authored-by: Steve Dower <steve.dower@microsoft.com>
6 years agoMoving on to 3.7.0b2+
Ned Deily [Wed, 28 Feb 2018 04:59:44 +0000 (23:59 -0500)]
Moving on to 3.7.0b2+

6 years agoUpdate NEWS, docs, and patchlevel for 3.7.0b2 v3.7.0b2
Ned Deily [Wed, 28 Feb 2018 00:49:18 +0000 (19:49 -0500)]
Update NEWS, docs, and patchlevel for 3.7.0b2

6 years agobpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932)
Miss Islington (bot) [Wed, 28 Feb 2018 00:07:45 +0000 (16:07 -0800)]
bpo-30928:  Update idlelib/NEWS.txt, possibly for 3.7.0b2  (GH-5932)

(cherry picked from commit 0954c9e9c8fbea452f56120df592f2061d3209c7)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agoRevert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH...
Miss Islington (bot) [Tue, 27 Feb 2018 23:30:30 +0000 (15:30 -0800)]
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (GH-5912) (GH-5931)

* Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)"

This reverts commit dd42cb71f2cb02f3a32f016137b12a146bc0d0e2.
(cherry picked from commit be50a7b627d0aa37e08fa8e2d5568891f19903ce)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agoUpdate macOS installer resources
Ned Deily [Tue, 27 Feb 2018 22:39:50 +0000 (17:39 -0500)]
Update macOS installer resources

6 years agobpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8
Ned Deily [Tue, 27 Feb 2018 22:36:12 +0000 (17:36 -0500)]
bpo-32901: update macOS 10.9+ installer to Tcl/Tk 8.6.8

6 years agobpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) (gh-5929)
Miss Islington (bot) [Tue, 27 Feb 2018 19:58:28 +0000 (11:58 -0800)]
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814) (gh-5929)

* Add What's New entry for addition of datetime.timezone to the C API

Closes bpo-10381

* Add what's new entry for date and datetime optimizations

Closes bpo-32403
(cherry picked from commit 5bd04f964b4f1bcdbd0fa36de04f087c2db07cfe)

Co-authored-by: Paul Ganssle <pganssle@users.noreply.github.com>
6 years agobpo-31453: Add setter for min/max protocol version (GH-5259)
Miss Islington (bot) [Tue, 27 Feb 2018 11:41:04 +0000 (03:41 -0800)]
bpo-31453: Add setter for min/max protocol version (GH-5259)

OpenSSL 1.1 has introduced a new API to set the minimum and maximum
supported protocol version. The API is easier to use than the old
OP_NO_TLS1 option flags, too.

Since OpenSSL has no call to set minimum version to highest supported,
the implementation emulate maximum_version = MINIMUM_SUPPORTED and
minimum_version = MAXIMUM_SUPPORTED by figuring out the minumum and
maximum supported version at compile time.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[3.7] bpo-32951: Disable SSLSocket/SSLObject constructor (GH-5864) (#5925)
Christian Heimes [Tue, 27 Feb 2018 10:17:32 +0000 (11:17 +0100)]
[3.7] bpo-32951: Disable SSLSocket/SSLObject constructor (GH-5864) (#5925)

Direct instantiation of SSLSocket and SSLObject objects is now prohibited.
The constructors were never documented, tested, or designed as public
constructors. The SSLSocket constructor had limitations. For example it was
not possible to enabled hostname verification except was
ssl_version=PROTOCOL_TLS_CLIENT with cert_reqs=CERT_REQUIRED.

SSLContext.wrap_socket() and SSLContext.wrap_bio are the recommended API
to construct SSLSocket and SSLObject instances. ssl.wrap_socket() is
also deprecated.

The only test case for direct instantiation was added a couple of days
ago for IDNA testing.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-28124: deprecate ssl.wrap_socket() (GH-5888)
Miss Islington (bot) [Tue, 27 Feb 2018 09:45:31 +0000 (01:45 -0800)]
bpo-28124: deprecate ssl.wrap_socket() (GH-5888)

The ssl module function ssl.wrap_socket() has been de-emphasized
and deprecated in favor of the more secure and efficient
SSLContext.wrap_socket() method.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (GH-5663)
Miss Islington (bot) [Tue, 27 Feb 2018 08:17:49 +0000 (00:17 -0800)]
bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes (GH-5663)

* bpo-32947: OpenSSL 1.1.1-pre1 / TLS 1.3 fixes

Misc fixes and workarounds for compatibility with OpenSSL 1.1.1-pre1 and
TLS 1.3 support. With OpenSSL 1.1.1, Python negotiates TLS 1.3 by
default. Some test cases only apply to TLS 1.2. Other tests currently
fail because the threaded or async test servers stop after failure.

I'm going to address these issues when OpenSSL 1.1.1 reaches beta.

OpenSSL 1.1.1 has added a new option OP_ENABLE_MIDDLEBOX_COMPAT for TLS
1.3. The feature is enabled by default for maximum compatibility with
broken middle boxes. Users should be able to disable the hack and CPython's test suite needs
it to verify default options.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-32960: For dataclasses, disallow inheriting frozen from non-frozen classes and...
Miss Islington (bot) [Tue, 27 Feb 2018 01:59:55 +0000 (17:59 -0800)]
bpo-32960: For dataclasses, disallow inheriting frozen from non-frozen classes and vice-versa, (GH-5919) (GH-5920)

This restriction will be relaxed at a future date.
(cherry picked from commit 2fa6b9eae07e2385e2acbf2e40093a21fb3a10c4)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agobpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434)
Miss Islington (bot) [Tue, 27 Feb 2018 00:50:09 +0000 (16:50 -0800)]
bpo-32713: Fix tarfile.itn for large/negative float values. (GH-5434)

(cherry picked from commit 72d9b2be36f091793ae7ffc5ad751f040c6e6ad3)

Co-authored-by: Joffrey F <f.joffrey@gmail.com>
6 years agobpo-32222: Fix pygettext skipping docstrings for funcs with arg typehints (GH-4745)
Miss Islington (bot) [Mon, 26 Feb 2018 23:23:26 +0000 (15:23 -0800)]
bpo-32222: Fix pygettext skipping docstrings for funcs with arg typehints (GH-4745)

(cherry picked from commit eee72d4778a5513038edd5236cdd87ccce2bc60a)

Co-authored-by: Tobotimus <Tobotimus@users.noreply.github.com>
6 years agobpo-32394: Remove some TCP options on old version Windows. (GH-5523)
Miss Islington (bot) [Mon, 26 Feb 2018 18:36:17 +0000 (10:36 -0800)]
bpo-32394: Remove some TCP options on old version Windows. (GH-5523)

(cherry picked from commit 19e7d48ce89422091f9af93038b9fee075d46e9e)

Co-authored-by: animalize <animalize@users.noreply.github.com>
6 years agoRevert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
Miss Islington (bot) [Mon, 26 Feb 2018 16:22:24 +0000 (08:22 -0800)]
Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)

(cherry picked from commit 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)
Miss Islington (bot) [Mon, 26 Feb 2018 14:25:40 +0000 (06:25 -0800)]
bpo-32922: dbm.open() now encodes filename with the filesystem encoding. (GH-5832)

(cherry picked from commit 6f600ff1734ca2fdcdd37a809adf8130f0d8cc4e)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_has...
Miss Islington (bot) [Mon, 26 Feb 2018 09:43:35 +0000 (01:43 -0800)]
bpo-32929: Dataclasses: Change the tri-state hash parameter to the boolean unsafe_hash. (GH-5891) (GH-5902)

unsafe_hash=False is now the default. It is the same behavior as the old hash=None parameter. unsafe_hash=True will try to add __hash__. If it already exists, TypeError is raised.
(cherry picked from commit dbf9cff48a4ad0fd58e1c623ce1f36c3dd3d5f38)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoFix 'deecorator' typo in test/test_dataclasses (GH-5899)
Miss Islington (bot) [Mon, 26 Feb 2018 03:09:05 +0000 (19:09 -0800)]
Fix 'deecorator' typo in test/test_dataclasses (GH-5899)

(cherry picked from commit 973cae07d6ce7f5a93bd9cd3bcb724a96cfe14e9)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
6 years agobpo-32500: Correct the documentation for PySequence_Size() and PySequence_Length...
Miss Islington (bot) [Sun, 25 Feb 2018 21:19:55 +0000 (13:19 -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-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)
Miss Islington (bot) [Sun, 25 Feb 2018 19:35:52 +0000 (11:35 -0800)]
bpo-31454: Include information about "import X as Y" in Modules tutorial (GH-4041)

(cherry picked from commit fbee88244e8921afdb29fde51a9a010a8ae18277)

Co-authored-by: Mario Corchero <mariocj89@gmail.com>
6 years agobpo-25059: Clarify the print separator usage in tutorial (GH-5879)
Miss Islington (bot) [Sun, 25 Feb 2018 19:13:33 +0000 (11:13 -0800)]
bpo-25059: Clarify the print separator usage in tutorial (GH-5879)

By default `print` adds spaces between its arguments.
(cherry picked from commit 84c4b0cc67ceb4b70842b78c718b6e8214874d6a)

Co-authored-by: Cheryl Sabella <cheryl.sabella@gmail.com>
6 years agobpo-32622: Native sendfile on windows (GH-5565)
Miss Islington (bot) [Sun, 25 Feb 2018 17:10:58 +0000 (09:10 -0800)]
bpo-32622: Native sendfile on windows (GH-5565)

* Support sendfile on Windows Proactor event loop naively.
(cherry picked from commit a19fb3c6aaa7632410d1d9dcb395d7101d124da4)

Co-authored-by: Andrew Svetlov <andrew.svetlov@gmail.com>
6 years agoExhaustively test dataclass hashing when no hash= value is provided. This is in antic...
Miss Islington (bot) [Sun, 25 Feb 2018 16:56:30 +0000 (08:56 -0800)]
Exhaustively test dataclass hashing when no hash= value is provided. This is in anticipation of changing how non-default hashing is handled. (GH-5834) (GH-5889)

(cherry picked from commit 718070db26b35da4aedc03088c58558a833ccf6e)

Co-authored-by: Eric V. Smith <ericvsmith@users.noreply.github.com>
6 years agoDelete a broken threading.local example (GH-5870)
Miss Islington (bot) [Sun, 25 Feb 2018 15:23:25 +0000 (07:23 -0800)]
Delete a broken threading.local example (GH-5870)

This code never did anything correct or useful. The class attribute will never be affected, and the condition will never be true.
(cherry picked from commit 5fb632e83136399bad9427ee23ec8b771695290a)

Co-authored-by: Aaron Gallagher <habnabit@users.noreply.github.com>
6 years ago[3.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5880)
Miss Islington (bot) [Sun, 25 Feb 2018 12:18:43 +0000 (04:18 -0800)]
[3.7] bpo-30622: Fix NPN for OpenSSL 1.1.1-pre1 (GH-5876) (#5880)

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874)
Miss Islington (bot) [Sun, 25 Feb 2018 12:07:24 +0000 (04:07 -0800)]
[3.7] bpo-32647: Link ctypes extension with libdl. (GH-5550) (#5874)

The ctypes module used to depend on indirect linking for dlopen. The shared
extension is now explicitly linked against libdl on platforms with dl.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[3.7] bpo-31809: test secp ECDH curves (GH-4036) (#5872)
Miss Islington (bot) [Sun, 25 Feb 2018 09:56:11 +0000 (01:56 -0800)]
[3.7] bpo-31809: test secp ECDH curves (GH-4036) (#5872)

Add tests to verify connection with secp384r1 ECDH curves.
(cherry picked from commit b7b9225831a729bff84eb7c43bad138416b994fe)

Co-authored-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:24:08 +0000 (19:24 -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 ago[3.7] bpo-30622: Improve NPN support detection (GH-5859) (#5860)
Miss Islington (bot) [Sat, 24 Feb 2018 22:04:27 +0000 (14:04 -0800)]
[3.7] bpo-30622: Improve NPN support detection (GH-5859) (#5860)

The ssl module now detects missing NPN support in LibreSSL.

Co-Authored-By: Bernard Spil <brnrd@FreeBSD.org>
Signed-off-by: Christian Heimes <christian@python.org>
(cherry picked from commit 6cdb7954b0a578d899e4b78b868ea59eef08480a)

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[3.7] bpo-24334: Cleanup SSLSocket (GH-5252) (#5857)
Miss Islington (bot) [Sat, 24 Feb 2018 20:51:56 +0000 (12:51 -0800)]
[3.7] bpo-24334: Cleanup SSLSocket (GH-5252) (#5857)

* The SSLSocket is no longer implemented on top of SSLObject to
  avoid an extra level of indirection.
* Owner and session are now handled in the internal constructor.
* _ssl._SSLSocket now uses the same method names as SSLSocket and
  SSLObject.
* Channel binding type check is now handled in C code. Channel binding
  is always available.

The patch also changes the signature of SSLObject.__init__(). In my
opinion it's fine. A SSLObject is not a user-constructable object.
SSLContext.wrap_bio() is the only valid factory.
(cherry picked from commit 141c5e8c2437a9fed95a04c81e400ef725592a17)

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[3.7] bpo-32931: fix macOS 10.9+ installer c++ compiler name (GH-5856)
Miss Islington (bot) [Sat, 24 Feb 2018 19:59:25 +0000 (11:59 -0800)]
[3.7] bpo-32931: fix macOS 10.9+ installer c++ compiler name (GH-5856)

(cherry picked from commit acd7163c0a0674b2fb6cc0178d52cf90c953fbae)

Co-authored-by: Ned Deily <nad@python.org>
6 years agobpo-31966: Fixed WindowsConsoleIO.write() for writing empty data. (GH-5754)
Miss Islington (bot) [Sat, 24 Feb 2018 17:39:18 +0000 (09:39 -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 ago[3.7] bpo-32819: Simplify and improve ssl.match_hostname (GH-5620) (#5847)
Miss Islington (bot) [Sat, 24 Feb 2018 14:06:46 +0000 (06:06 -0800)]
[3.7] bpo-32819: Simplify and improve ssl.match_hostname (GH-5620) (#5847)

ssl.match_hostname() has been simplified and no longer depends on re and
ipaddress module for wildcard and IP addresses. Error reporting for invalid
wildcards has been improved.

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

Co-authored-by: Christian Heimes <christian@python.org>
6 years ago[bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) (GH-5843)
Miss Islington (bot) [Sat, 24 Feb 2018 03:18:28 +0000 (19:18 -0800)]
[bpo-28414] Make all hostnames in SSL module IDN A-labels (GH-5128) (GH-5843)

Previously, the ssl module stored international domain names (IDNs)
as U-labels. This is problematic for a number of reasons -- for
example, it made it impossible for users to use a different version
of IDNA than the one built into Python.

After this change, we always convert to A-labels as soon as possible,
and use them for all internal processing. In particular, server_hostname
attribute is now an A-label, and on the server side there's a new
sni_callback that receives the SNI servername as an A-label rather than
a U-label.
(cherry picked from commit 11a1493bc4198f1def5e572049485779cf54dc57)

Co-authored-by: Christian Heimes <christian@python.org>
6 years agobpo-32916: IDLE: Change `str` to `code` in pyparse (GH-5830)
Miss Islington (bot) [Sat, 24 Feb 2018 02:59:53 +0000 (18:59 -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-32838: Fix Python versions in the table of magic numbers. (GH-5658)
Miss Islington (bot) [Fri, 23 Feb 2018 19:01:54 +0000 (11:01 -0800)]
bpo-32838: Fix Python versions in the table of magic numbers. (GH-5658)

(cherry picked from commit 4af8fd561433826ac897c55e41a087a5c5dbacf3)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
6 years agobpo-32923: Unittest doc: replace `whilst` with `while` (GH-5833)
Miss Islington (bot) [Fri, 23 Feb 2018 18:14:23 +0000 (10:14 -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>