]> granicus.if.org Git - python/log
python
6 years agobpo-33132: Fix reference counting issues in the compiler. (GH-6209)
Serhiy Storchaka [Sat, 24 Mar 2018 20:42:35 +0000 (22:42 +0200)]
bpo-33132: Fix reference counting issues in the compiler. (GH-6209)

6 years agobpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210)
Christian Heimes [Sat, 24 Mar 2018 14:41:37 +0000 (15:41 +0100)]
bpo-33127: Compatibility patch for LibreSSL 2.7.0 (GH-6210)

LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
LibreSSL < 2.7.

Documentation updates and fixes for failing tests will be provided in
another patch set.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-24334: Remove inaccurate match_hostname call (#6211)
Christian Heimes [Sat, 24 Mar 2018 14:36:50 +0000 (15:36 +0100)]
bpo-24334: Remove inaccurate match_hostname call (#6211)

Commit 141c5e8c re-added match_hostname() call. The resurrection of the
function call was never intended and was solely a merge mistake.

Signed-off-by: Christian Heimes <christian@python.org>
6 years agobpo-32932: More revealing error message when non-str objects in __all__ (GH-5848)
Xiang Zhang [Sat, 24 Mar 2018 10:39:36 +0000 (18:39 +0800)]
bpo-32932: More revealing error message when non-str objects in __all__ (GH-5848)

6 years agobpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
Himanshu Lakhara [Fri, 23 Mar 2018 21:26:35 +0000 (02:56 +0530)]
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)

6 years agobpo-31639: Use threads in http.server module. (GH-5018)
Julien Palard [Fri, 23 Mar 2018 16:40:33 +0000 (17:40 +0100)]
bpo-31639: Use threads in http.server module. (GH-5018)

6 years agoFix a reference to the MRE book in re docs (GH-1113)
Berker Peksag [Fri, 23 Mar 2018 13:46:52 +0000 (16:46 +0300)]
Fix a reference to the MRE book in re docs (GH-1113)

Reported by Maksym Nikulyak on docs.p.o.

6 years agobpo-30953: Improve error messages and add tests for jumping (GH-6196)
Serhiy Storchaka [Fri, 23 Mar 2018 12:46:45 +0000 (14:46 +0200)]
bpo-30953: Improve error messages and add tests for jumping (GH-6196)

into/out of an except block.

6 years agobpo-33041: Rework compiling an "async for" loop. (#6142)
Serhiy Storchaka [Fri, 23 Mar 2018 12:34:35 +0000 (14:34 +0200)]
bpo-33041: Rework compiling an "async for" loop. (#6142)

* Added new opcode END_ASYNC_FOR.
* Setting global StopAsyncIteration no longer breaks "async for" loops.
* Jumping into an "async for" loop is now disabled.
* Jumping out of an "async for" loop no longer corrupts the stack.
* Simplify the compiler.

6 years agobpo-32999: ast: Convert useless check to assert (GH-6197)
INADA Naoki [Fri, 23 Mar 2018 09:19:34 +0000 (18:19 +0900)]
bpo-32999: ast: Convert useless check to assert (GH-6197)

6 years agobpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but...
Eric V. Smith [Thu, 22 Mar 2018 20:28:48 +0000 (16:28 -0400)]
bpo-32505: dataclasses: raise TypeError if a member variable is of type Field, but doesn't have a type annotation. (GH-6192)

If a dataclass has a member variable that's of type Field, but it doesn't have a type annotation, raise TypeError.

6 years agobpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189)
INADA Naoki [Thu, 22 Mar 2018 12:52:42 +0000 (21:52 +0900)]
bpo-32999: Revert GH-6002 (fc7df0e6) (GH-6189)

bpo-33018 (GH-5944) fixed bpo-32999 too.  So fc7df0e6 is not required
anymore.  Revert it except test case.

6 years agobpo-33018: Improve issubclass() error checking and message. (GH-5944)
jab [Thu, 22 Mar 2018 11:26:06 +0000 (00:26 +1300)]
bpo-33018: Improve issubclass() error checking and message. (GH-5944)

This improves error message for situations when a non-class is
checked w.r.t. an abstract base class.

6 years agoUpgrade pip to v9.0.3 and setuptools to v39.0.1 (#6184)
Donald Stufft [Thu, 22 Mar 2018 02:47:44 +0000 (22:47 -0400)]
Upgrade pip to v9.0.3 and setuptools to v39.0.1 (#6184)

6 years agoAdd 'Field' to dataclasses.__all__. (GH-6182)
Eric V. Smith [Wed, 21 Mar 2018 21:10:22 +0000 (17:10 -0400)]
Add 'Field' to dataclasses.__all__. (GH-6182)

- Add missing 'Field' to __all__.
- Improve tests to catch this.

6 years agoFIX failure on OSX sem_getvalue (#6180)
Thomas Moreau [Wed, 21 Mar 2018 17:56:27 +0000 (18:56 +0100)]
FIX failure on OSX sem_getvalue (#6180)

6 years agobpo-33078 - Fix queue size on pickling error (GH-6119)
Thomas Moreau [Wed, 21 Mar 2018 15:50:28 +0000 (16:50 +0100)]
bpo-33078 - Fix queue size on pickling error (GH-6119)

6 years agoFix typos in mmap() error messages (GH-6173)
Zackery Spytz [Wed, 21 Mar 2018 06:02:37 +0000 (00:02 -0600)]
Fix typos in mmap() error messages (GH-6173)

6 years agobpo-32896: Fix error when subclassing a dataclass with a field that uses a default_fa...
Eric V. Smith [Wed, 21 Mar 2018 02:00:23 +0000 (22:00 -0400)]
bpo-32896: Fix error when subclassing a dataclass with a field that uses a default_factory (GH-6170)

Fix the way that new annotations in a class are detected.

6 years agobpo-27683: Fix a regression for host() of ipaddress network objects (GH-6016)
Xiang Zhang [Wed, 21 Mar 2018 00:25:13 +0000 (08:25 +0800)]
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.

6 years ago bpo-18802: Add more details to ipaddress documentation (GH-6083)
Cheryl Sabella [Wed, 21 Mar 2018 00:09:15 +0000 (20:09 -0400)]
 bpo-18802: Add more details to ipaddress documentation (GH-6083)

Original patch by Jon Foster and Berker Peksag.

6 years agobpo-28247: Document Windows executable creation in zipapp (GH-6158)
Cheryl Sabella [Tue, 20 Mar 2018 22:23:19 +0000 (18:23 -0400)]
bpo-28247: Document Windows executable creation in zipapp (GH-6158)

6 years agobpo-33034: Improve exception message when cast fails for {Parse,Split}Result.port...
Matt Eaton [Tue, 20 Mar 2018 06:41:37 +0000 (01:41 -0500)]
bpo-33034: Improve exception message when cast fails for {Parse,Split}Result.port (GH-6078)

6 years agobpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152)
Eric V. Smith [Tue, 20 Mar 2018 01:07:51 +0000 (21:07 -0400)]
bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152)

If the class has a member that's a MemberDescriptorType, it's not a default value, it's from that member being in __slots__.

6 years agobpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127)
aetracht [Mon, 19 Mar 2018 18:41:32 +0000 (14:41 -0400)]
bpo-33061: Add missing 'NoReturn' to __all__ in typing.py (GH-6127)

6 years agobpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived...
Eric V. Smith [Mon, 19 Mar 2018 00:40:34 +0000 (20:40 -0400)]
bpo-32953: Dataclasses: frozen should not be inherited for non-dataclass derived classes (#6147)

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.

6 years agobpo-19417: Add test_bdb.py (GH-5217)
xdegaye [Sun, 18 Mar 2018 20:02:47 +0000 (21:02 +0100)]
bpo-19417: Add test_bdb.py (GH-5217)

6 years agoRevert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143)
Jelle Zijlstra [Sun, 18 Mar 2018 16:54:33 +0000 (09:54 -0700)]
Revert "bpo-30406: Make async and await proper keywords (#1669)" (GH-6143)

This reverts commit ac317700ce7439e38a8b420218d9a5035bba92ed.

(Reverts only the lib2to3 part.)

6 years agobpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)
Serhiy Storchaka [Sun, 18 Mar 2018 07:56:52 +0000 (09:56 +0200)]
bpo-32489: Allow 'continue' in 'finally' clause. (GH-5822)

6 years agobpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)
Serhiy Storchaka [Sun, 18 Mar 2018 07:55:53 +0000 (09:55 +0200)]
bpo-32056: Improve exceptions in aifc, wave and sunau. (GH-5951)

6 years agobpo-33041: Add tests for jumps in/out of 'async with' blocks. (#6110)
Serhiy Storchaka [Sun, 18 Mar 2018 07:53:08 +0000 (09:53 +0200)]
bpo-33041: Add tests for jumps in/out of 'async with' blocks. (#6110)

6 years agobpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
Aviv Palivoda [Sun, 18 Mar 2018 00:48:55 +0000 (02:48 +0200)]
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.

6 years agoUpdate pip to 9.0.2 and setuptools to 38.6.1 (#6133)
Donald Stufft [Sat, 17 Mar 2018 15:13:48 +0000 (11:13 -0400)]
Update pip to 9.0.2 and setuptools to 38.6.1 (#6133)

6 years agobpo-32374: m_traverse may be called with m_state=NULL (GH-5140)
Marcel Plch [Sat, 17 Mar 2018 05:41:20 +0000 (06:41 +0100)]
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.

6 years agobpo-33021: Fix GCC 7 warning (-Wmaybe-uninitialized) in mmapmodule.c (#6117)
Zackery Spytz [Wed, 14 Mar 2018 20:08:01 +0000 (14:08 -0600)]
bpo-33021: Fix GCC 7 warning (-Wmaybe-uninitialized) in mmapmodule.c (#6117)

6 years agolib2to3: Add more tests (#6101)
Łukasz Langa [Tue, 13 Mar 2018 17:53:22 +0000 (10:53 -0700)]
lib2to3: Add more tests (#6101)

6 years agobpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-6107)
xdegaye [Tue, 13 Mar 2018 17:31:31 +0000 (18:31 +0100)]
bpo-17288: Prevent jumps from 'return' and 'exception' trace events. (GH-6107)

(cherry picked from commit e32bbaf376a09c149fa7c7f2919d7c9ce4e2a055)

6 years agobpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (#5772)
Miro Hrončok [Tue, 13 Mar 2018 09:56:43 +0000 (10:56 +0100)]
bpo-32885: Tools/scripts/pathfix.py: Add -n option for no backup~ (#5772)

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.

6 years agobpo-33064: lib2to3: support trailing comma after *args and **kwargs (#6096)
Łukasz Langa [Tue, 13 Mar 2018 07:44:49 +0000 (00:44 -0700)]
bpo-33064: lib2to3: support trailing comma after *args and **kwargs (#6096)

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).

6 years agobpo-29719: Remove Date and Release field in whatsnew/3.7 and 8 (GH-6093)
Ned Deily [Tue, 13 Mar 2018 01:16:08 +0000 (21:16 -0400)]
bpo-29719: Remove Date and Release field in whatsnew/3.7 and 8 (GH-6093)

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 agobpo-22674: fix test_strsignal on OSX (GH-6085)
Antoine Pietri [Mon, 12 Mar 2018 19:03:14 +0000 (20:03 +0100)]
bpo-22674: fix test_strsignal on OSX (GH-6085)

6 years agoFix docs markup for asyncio current_task() and all_tasks() (#6089)
Andrew Svetlov [Mon, 12 Mar 2018 18:50:50 +0000 (20:50 +0200)]
Fix docs markup for asyncio current_task() and all_tasks() (#6089)

6 years agobpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (#6084)
Thomas Moreau [Mon, 12 Mar 2018 17:18:41 +0000 (18:18 +0100)]
bpo-33056 FIX leaking fd in concurrent.futures.ProcessPoolExecutor (#6084)

6 years agosignal: add strsignal() (#6017)
Antoine Pietri [Mon, 12 Mar 2018 13:42:34 +0000 (14:42 +0100)]
signal: add strsignal() (#6017)

Co-authored-by: Vajrasky Kok <sky.kok@speaklikeaking.com>
6 years agobpo-33021: Release the GIL during fstat() calls (GH-6019)
Nir Soffer [Sun, 11 Mar 2018 23:39:22 +0000 (01:39 +0200)]
bpo-33021: Release the GIL during fstat() calls (GH-6019)

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()

6 years agobpo-31804: Fix multiprocessing.Process with broken standard streams (#6079)
Antoine Pitrou [Sun, 11 Mar 2018 18:21:38 +0000 (19:21 +0100)]
bpo-31804: Fix multiprocessing.Process with broken standard streams (#6079)

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.

6 years agoDrop confusing commented out code in pystrtod.c (GH-6072)
Siddhesh Poyarekar [Sun, 11 Mar 2018 09:45:10 +0000 (15:15 +0530)]
Drop confusing commented out code in pystrtod.c (GH-6072)

6 years agobpo-32970: Improve disassembly of the MAKE_FUNCTION instruction. (GH-5937)
Serhiy Storchaka [Sun, 11 Mar 2018 09:07:06 +0000 (11:07 +0200)]
bpo-32970: Improve disassembly of the MAKE_FUNCTION instruction. (GH-5937)

6 years agobpo-32925: Optimized iterating and containing test for literal lists (GH-5842)
Serhiy Storchaka [Sun, 11 Mar 2018 08:54:47 +0000 (10:54 +0200)]
bpo-32925: Optimized iterating and containing test for literal lists (GH-5842)

consisting of non-constants: `x in [a, b]` and `for x in [a, b]`.
The case of all constant elements already was optimized.

6 years agobpo-32946: Speed up "from ... import ..." from non-packages. (GH-5873)
Serhiy Storchaka [Sun, 11 Mar 2018 08:52:37 +0000 (10:52 +0200)]
bpo-32946: Speed up "from ... import ..." from non-packages. (GH-5873)

6 years agobpo-32338: OrderedDict import is no longer needed in re. (#4891)
Serhiy Storchaka [Sun, 11 Mar 2018 06:38:13 +0000 (08:38 +0200)]
bpo-32338: OrderedDict import is no longer needed in re. (#4891)

6 years agobpo-33026: Fix jumping out of "with" block by setting f_lineno. (#6026)
Serhiy Storchaka [Sun, 11 Mar 2018 06:32:47 +0000 (08:32 +0200)]
bpo-33026: Fix jumping out of "with" block by setting f_lineno. (#6026)

6 years agobpo-32996: Improve What's New in 3.7. (#5983)
Serhiy Storchaka [Sun, 11 Mar 2018 01:48:14 +0000 (03:48 +0200)]
bpo-32996: Improve What's New in 3.7. (#5983)

6 years agobpo-33045: Fix typos in SSL documentation (GH-6065)
Matt Eaton [Sun, 11 Mar 2018 01:00:04 +0000 (19:00 -0600)]
bpo-33045: Fix typos in SSL documentation (GH-6065)

6 years agobpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)
Berker Peksag [Sun, 11 Mar 2018 00:38:50 +0000 (03:38 +0300)]
bpo-27645: Skip test_bad_target_in_transaction if SQLite == 3.8.7.1 (GH-6067)

6 years agobpo-27645: Add support for native backup facility of SQLite (GH-4238)
Emanuele Gaifas [Sat, 10 Mar 2018 22:08:31 +0000 (23:08 +0100)]
bpo-27645: Add support for native backup facility of SQLite (GH-4238)

6 years agobpo-30249: Improve struct.unpack_from() error messages (GH-6059)
Xiang Zhang [Sat, 10 Mar 2018 18:58:52 +0000 (02:58 +0800)]
bpo-30249: Improve struct.unpack_from() error messages (GH-6059)

6 years agobpo-33041: Add missed error checks when compile "async for" (#6053)
Serhiy Storchaka [Sat, 10 Mar 2018 16:49:26 +0000 (18:49 +0200)]
bpo-33041: Add missed error checks when compile "async for" (#6053)

and remove redundant code.

6 years agobpo-33041: Fixed bytecode generation for "async for" with a complex target. (#6052)
Serhiy Storchaka [Sat, 10 Mar 2018 16:22:34 +0000 (18:22 +0200)]
bpo-33041: Fixed bytecode generation for "async for" with a complex target. (#6052)

A StopAsyncIteration raised on assigning or unpacking will be now propagated
instead of stopping the iteration.

6 years agobpo-33037: Skip sending/receiving after SSL transport closing (GH-6044)
Andrew Svetlov [Sat, 10 Mar 2018 15:48:35 +0000 (17:48 +0200)]
bpo-33037: Skip sending/receiving after SSL transport closing (GH-6044)

* Skip write()/data_received() if sslpipe is destroyed

6 years agobpo-26701: Improve documentation for the rounding special methods. (#6054)
Serhiy Storchaka [Sat, 10 Mar 2018 15:18:32 +0000 (17:18 +0200)]
bpo-26701: Improve documentation for the rounding special methods. (#6054)

6 years agobpo-26701: Add documentation for __trunc__ (GH-6022)
Eric Appelt [Sat, 10 Mar 2018 08:44:12 +0000 (02:44 -0600)]
bpo-26701: Add documentation for __trunc__ (GH-6022)

`int` fails back to `__trunc__` is `__int__` isn't defined, so cover
that in the docs.

6 years agoWarn that dbm.dumb.open() can crash Python (GH-6047)
Brett Cannon [Fri, 9 Mar 2018 23:58:40 +0000 (15:58 -0800)]
Warn that dbm.dumb.open() can crash Python (GH-6047)

6 years agoWarn that compile() can crash when compiling to an AST object (GH-6043)
Brett Cannon [Fri, 9 Mar 2018 21:13:32 +0000 (13:13 -0800)]
Warn that compile() can crash when compiling to an AST object (GH-6043)

6 years agobpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter...
Brett Cannon [Fri, 9 Mar 2018 20:03:22 +0000 (12:03 -0800)]
bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960)

6 years agocontrolflow: Use full example for "5 through 9" (GH-5907)
Steven M. Vascellaro [Fri, 9 Mar 2018 19:57:21 +0000 (14:57 -0500)]
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.

6 years agobpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (#6010)
Alexey Izbyshev [Thu, 8 Mar 2018 16:03:25 +0000 (19:03 +0300)]
bpo-33016: Fix potential use of uninitialized memory in nt._getfinalpathname (#6010)

6 years agoAdd two missing error checks in hamt.c (GH-5851)
Xiang Zhang [Thu, 8 Mar 2018 05:59:46 +0000 (13:59 +0800)]
Add two missing error checks in hamt.c (GH-5851)

6 years agoFix some ipaddress documentation errors (GH-6021)
Xiang Zhang [Thu, 8 Mar 2018 04:24:36 +0000 (12:24 +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

6 years agobpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)
INADA Naoki [Wed, 7 Mar 2018 07:27:01 +0000 (16:27 +0900)]
bpo-32999: Fix ABC.__subclasscheck__ crash (GH-6002)

6 years agobpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)
Xiang Zhang [Wed, 7 Mar 2018 05:05:37 +0000 (13:05 +0800)]
bpo-32969: Expose some missing constants in zlib and fix the doc (GH-5988)

6 years agobpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)
Yury Selivanov [Tue, 6 Mar 2018 17:59:45 +0000 (12:59 -0500)]
bpo-33009: Fix inspect.signature() for single-parameter partialmethods. (GH-6004)

6 years agobpo-33005: Fix _PyGILState_Reinit() (#6001)
Victor Stinner [Tue, 6 Mar 2018 13:31:37 +0000 (14:31 +0100)]
bpo-33005: Fix _PyGILState_Reinit() (#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.

6 years agoFix strncpy warning with gcc 8 (#5840)
Siddhesh Poyarekar [Tue, 6 Mar 2018 10:34:35 +0000 (16:04 +0530)]
Fix strncpy warning with gcc 8 (#5840)

The length in strncpy is one char too short and as a result it leads
to a build warning with gcc 8.  Comment out the strncpy since the
interpreter aborts immediately after anyway.

6 years agobpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace...
Jason R. Coombs [Mon, 5 Mar 2018 23:29:08 +0000 (18:29 -0500)]
bpo-32991: Restore expectation that inspect.getfile raises TypeError on namespace package (GH-5980)

* 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.

6 years agobpo-33001: Prevent buffer overrun in os.symlink (GH-5989)
Steve Dower [Mon, 5 Mar 2018 22:26:08 +0000 (14:26 -0800)]
bpo-33001: Prevent buffer overrun in os.symlink (GH-5989)

6 years agoAdd What's New for issues 32303 and 32305 (GH-5994)
Barry Warsaw [Mon, 5 Mar 2018 20:37:12 +0000 (12:37 -0800)]
Add What's New for issues 32303 and 32305 (GH-5994)

6 years agobpo-32984: IDLE - set __file__ for startup files (GH-5981)
Terry Jan Reedy [Mon, 5 Mar 2018 16:02:46 +0000 (11:02 -0500)]
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.

6 years agobpo-30147: Add re.escape changes to 3.7 What's New (GH-5978)
Cheryl Sabella [Sun, 4 Mar 2018 23:06:57 +0000 (18:06 -0500)]
bpo-30147: Add re.escape changes to 3.7 What's New (GH-5978)

6 years agobpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)
Cheryl Sabella [Sun, 4 Mar 2018 10:41:47 +0000 (05:41 -0500)]
bpo-32857: Raise error when tkinter after_cancel() is called with None. (GH-5701)

6 years agocloses bpo-32980 Remove _PyFrame_Init (GH-5965)
Thomas Nyberg [Sun, 4 Mar 2018 06:06:01 +0000 (07:06 +0100)]
closes bpo-32980 Remove _PyFrame_Init (GH-5965)

6 years agobpo-32981: Fix catastrophic backtracking vulns (#5955)
Jamie Davis [Sun, 4 Mar 2018 05:33:32 +0000 (00:33 -0500)]
bpo-32981: Fix catastrophic backtracking vulns (#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>
6 years agoFix missing coroutine declaration in the asyncio documentation. (#5964)
Joongi Kim [Sat, 3 Mar 2018 16:43:54 +0000 (01:43 +0900)]
Fix missing coroutine declaration in the asyncio documentation. (#5964)

6 years agobpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930)
Serhiy Storchaka [Fri, 2 Mar 2018 09:53:51 +0000 (11:53 +0200)]
bpo-32964: Reuse a testing implementation of the path protocol in tests. (#5930)

6 years agobpo-30607: Use external python-doc-theme (GH-2017)
Jon Wayne Parrott [Thu, 1 Mar 2018 21:02:50 +0000 (13:02 -0800)]
bpo-30607: Use external python-doc-theme (GH-2017)

6 years agoFixed incorrect default value for dataclass unsafe_hash. (GH-5949)
Eric V. Smith [Thu, 1 Mar 2018 13:01:41 +0000 (08:01 -0500)]
Fixed incorrect default value for dataclass unsafe_hash. (GH-5949)

6 years agobpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801)
Alexey Izbyshev [Thu, 1 Mar 2018 09:13:56 +0000 (12:13 +0300)]
bpo-32903: Fix a memory leak in os.chdir() on Windows (GH-5801)

6 years agoFix typo in logging doc: picked -> pickled (GH-5942)
James Walker [Wed, 28 Feb 2018 23:46:35 +0000 (19:46 -0400)]
Fix typo in logging doc: picked -> pickled (GH-5942)

6 years agobpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862)
Cheryl Sabella [Wed, 28 Feb 2018 22:23:58 +0000 (17:23 -0500)]
bpo-32940: IDLE: Simplify StringTranslatePseudoMapping in pyparse (GH-5862)

The new code also runs faster.

6 years agoFix 3.8 whatsnew changelog link
Ned Deily [Wed, 28 Feb 2018 18:58:38 +0000 (13:58 -0500)]
Fix 3.8 whatsnew changelog link

6 years agoMinor improvements to the Windows build/release process (GH-5935)
Steve Dower [Wed, 28 Feb 2018 06:09:27 +0000 (22:09 -0800)]
Minor improvements to the Windows build/release process (GH-5935)

6 years agobpo-30928: Update idlelib/NEWS.txt, possibly for 3.7.0b2 (GH-5932)
Terry Jan Reedy [Tue, 27 Feb 2018 23:36:21 +0000 (18:36 -0500)]
bpo-30928:  Update idlelib/NEWS.txt, possibly for 3.7.0b2  (GH-5932)

6 years agoRevert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912)
Serhiy Storchaka [Tue, 27 Feb 2018 23:03:46 +0000 (01:03 +0200)]
Revert "bpo-31961: subprocess now accepts path-like args (GH-4329)" (#5912)

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

This reverts commit dd42cb71f2cb02f3a32f016137b12a146bc0d0e2.

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-31355: Travis-CI: re-enable macOS job (#5858)
Antoine Pitrou [Tue, 27 Feb 2018 20:40:37 +0000 (21:40 +0100)]
bpo-31355: Travis-CI: re-enable macOS job (#5858)

The long build queues that plagued macOS builds on Travis seem to be
a thing of the past now.

6 years agobpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)
Paul Ganssle [Tue, 27 Feb 2018 19:41:30 +0000 (14:41 -0500)]
bpo-10381, bpo-32403: What's new entries for changes to datetime (gh-5814)

* 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

6 years agobpo-31453: Add setter for min/max protocol version (#5259)
Christian Heimes [Tue, 27 Feb 2018 10:54:43 +0000 (11:54 +0100)]
bpo-31453: Add setter for min/max protocol version (#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>
6 years agobpo-32951: Disable SSLSocket/SSLObject constructor (#5864)
Christian Heimes [Tue, 27 Feb 2018 09:17:30 +0000 (10:17 +0100)]
bpo-32951: Disable SSLSocket/SSLObject constructor (#5864)

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>