terryjreedy [Mon, 26 Jun 2017 05:21:02 +0000 (01:21 -0400)]
[3.6] bpo-6739: IDLE: Check for valid keybinding in config_keys (GH-2377) (#2397)
Verify user-entered key sequences by trying to bind them with tk.
Add tests for all 3 validation functions.
Original patch by G Polo. Tests added by Cheryl Sabella.
(cherry picked from commit 8c78aa7)
Brett Cannon [Fri, 23 Jun 2017 18:23:36 +0000 (11:23 -0700)]
[3.6] bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268) (#2364)
Bug didn't manifest itself when importing a module with source as .py files are always the first on the search path. The issue only showed up in bytecode-only packages where the calculated file path would be ``__init__.py/__init__.pyc``.
larryhastings [Fri, 23 Jun 2017 00:38:47 +0000 (17:38 -0700)]
Add "Misc/NEWS.d" directory tree for "blurb". GH-2329
CPython workflow is changing! We're going to start using "blurb"
to manage Misc/NEWS entries:
https://github.com/python/core-workflow
(This will be a big win for release managers, honest.)
This checkin simply populates the "Misc/NEWS.d" subdirectory tree
so that people can start putting their news entries in there.
No other changes (yet).
Victor Stinner [Tue, 20 Jun 2017 13:37:24 +0000 (15:37 +0200)]
bpo-30500: urllib: Simplify splithost by calling into urlparse. (#1849) (#2289)
The current regex based splitting produces a wrong result. For example::
http://abc#@def
Web browsers parse that URL as ``http://abc/#@def``, that is, the host
is ``abc``, the path is ``/``, and the fragment is ``#@def``.
(cherry picked from commit 90e01e50ef8a9e6c91f30d965563c378a4ad26de)
Mariatta [Tue, 20 Jun 2017 03:28:16 +0000 (20:28 -0700)]
[3.6] bpo-30420: List cwd parameter in subprocess convenience APIs (GH-1685) (GH-2253)
Partially clarify the subprocess convenience API documentation by
explicitly listing the `cwd` parameter in their abbreviated signatures.
While this has been merged as an improvement, it doesn't fully
resolve the issue, as the `cwd` should also be covered in the
"Frequently Used Arguments" section, and the fact these APIs
pass unlisted keyword arguments down to the lower level APIs
is currently still unclear.
(cherry picked from commit 368cf1d20630498ca7939069a05d744fabb570aa)
Mariatta [Fri, 16 Jun 2017 14:18:58 +0000 (07:18 -0700)]
[email] bpo-29478: Fix passing max_line_length=None from Compat32 policy (GH-595) (GH-2233)
If max_line_length=None is specified while using the Compat32 policy,
it is no longer ignored..
(cherry picked from commit b459f7482612d340b88b62edc024628595ec6337)
Zachary Ware [Fri, 16 Jun 2017 06:06:36 +0000 (01:06 -0500)]
bpo-30450: Pull Windows dependencies from GitHub rather than svn (GH-1783) (GH-2237)
The Windows build now depends on Python 3.6 to fetch externals, but it will be downloaded via NuGet (which is downloaded via PowerShell) if it is not available via `py -3.6`. This means the only thing that must be installed on a modern Windows box to do a full build of CPython with all extensions is Visual Studio.
Also fixes an outdated note about _lzma in PCbuild/readme.txt
Victor Stinner [Thu, 15 Jun 2017 22:18:15 +0000 (00:18 +0200)]
bpo-23890: Fix ref cycle in TestCase.assertRaises (#858)
unittest.TestCase.assertRaises() now manually breaks a
reference cycle to not keep objects alive longer than expected.
(cherry picked from commit bbd3cf8f1ef1e91a8d6dac6411e18b4b9084abf5)
Serhiy Storchaka [Thu, 15 Jun 2017 14:16:38 +0000 (17:16 +0300)]
[3.6] bpo-29931 fix __lt__ check in ipaddress.ip_interface for both v4 and v6. (GH-879) (#2217)
the original logic was just comparing the network address
but this is wrong because if the network address is equal then
we need to compare the ip address for breaking the tie
The public cyrus.andrew.cmu.edu IMAP server (port 993) doesn't accept
TLS connection using our self-signed x509 certificate. Remove the two
tests which are already skipped.
Before, Enter would not, for instance, complete 're.c' to 're.compile' even with 'compile' highlighted. Now it does. Before, '\n' was inserted into text, which in Shell meant compile() and possibly execute. Now cursor is left after completion.
(cherry picked from commit 32fd874afe55e396e3c9a5af35e7bb3d8e0b8f02)
When IDLE fail to start because the socket connection fails, direct people to a new subsection of the IDLE doc listing various causes and remedies.
(cherry picked from commit 188aedf8bb623d41302e10503268b0852ea91134)
Nick Coghlan [Tue, 13 Jun 2017 10:32:46 +0000 (20:32 +1000)]
[3.6] bpo-29514: Check magic number for bugfix releases (#2157)
Add a test to check the current MAGIC_NUMBER against the
expected number for the release if the current release is
at candidate or final level. On test failure, describe to
the developer the procedure for changing the magic number.
This ensures that pre-merge CI will automatically pick up
on magic number changes in maintenance releases (and
explain why those are problematic), rather than relying on
all core developers to be aware of the implications of
such changes.
Dino Viehland [Tue, 13 Jun 2017 01:46:35 +0000 (18:46 -0700)]
[3.6] bpo-30604: Move co_extra_freefuncs to interpreter state to avoid crashes in threads (#2015)
* Move co_extra_freefuncs to interpreter state to avoid crashes in
multi-threaded scenarios involving deletion of code objects
* Don't require that extra be zero initialized
* Build test list instead of defining empty test class
* Ensure extra is always assigned on success
* Keep the old fields in the thread state object, just don't use them
Add new linked list of code extra objects on a per-interpreter basis
so that interpreter state size isn't changed
* Rename __PyCodeExtraState_Get and add comment about it going away in 3.7
Fix sort order of import's in test_code.py
* Remove an extraneous space
* Remove docstrings for comments
* Touch up formatting
* Fix casing of coextra local
* Fix casing of another variable
* Prefix PyCodeExtraState with __ to match C API for getting it
Serhiy Storchaka [Mon, 12 Jun 2017 06:02:13 +0000 (09:02 +0300)]
[3.6] bpo-28994: Fixed errors handling in atexit._run_exitfuncs(). (GH-2034) (#2121)
The traceback no longer displayed for SystemExit raised in a callback registered by atexit..
(cherry picked from commit 3fd54d4a7e604067e2bc0f8cfd58bdbdc09fa7f4)
Mariatta [Sat, 10 Jun 2017 21:41:00 +0000 (14:41 -0700)]
bpo-28556: Updates to typing module (GH-2076) (GH-2087)
This PR contains two updates to typing module:
- Support ContextManager on all versions (original PR by Jelle Zijlstra).
- Add generic AsyncContextManager..
(cherry picked from commit 29fda8db16e0edab92841277fa223f844f5a92cc)
Victor Stinner [Sat, 10 Jun 2017 09:20:03 +0000 (11:20 +0200)]
bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) (#2075)
Before, it was possible to get the following sequence of
events (especially on Windows, where the C-level signal handler for
SIGINT is run in a separate thread):
- SIGINT arrives
- trip_signal is called
- trip_signal writes to the wakeup fd
- the main thread wakes up from select()-or-equivalent
- the main thread checks for pending signals, but doesn't see any
- the main thread drains the wakeup fd
- the main thread goes back to sleep
- trip_signal sets is_tripped=1 and calls Py_AddPendingCall to notify
the main thread the it should run the Python-level signal handler
- the main thread doesn't notice because it's asleep
This has been causing repeated failures in the Trio test suite:
https://github.com/python-trio/trio/issues/119
(cherry picked from commit 4ae01496971624c75080431806ed1c08e00f22c7)
Mariatta [Sat, 10 Jun 2017 03:36:28 +0000 (20:36 -0700)]
bpo-30266: support "= None" pattern in AbstractContextManager (GH-1448) (GH-2054)
contextlib.AbstractContextManager now supports anti-registration
by setting __enter__ = None or __exit__ = None, following the pattern
introduced in bpo-25958..
(cherry picked from commit 57161aac5eb9bcb0b43e551a1937ff0a84c1ec52)