]> granicus.if.org Git - python/log
python
7 years ago[3.6] Fix TypeError is asyncio/proactor_events (GH-993) (#2061)
Yury Selivanov [Sat, 10 Jun 2017 04:15:28 +0000 (00:15 -0400)]
[3.6] Fix TypeError is asyncio/proactor_events (GH-993) (#2061)

(cherry picked from commit 34792d25ab7329241ea24595286d65d54c266274)

7 years agobpo-30266: support "= None" pattern in AbstractContextManager (GH-1448) (GH-2054)
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)

7 years ago[3.6] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)
Zachary Ware [Sat, 10 Jun 2017 03:26:31 +0000 (22:26 -0500)]
[3.6] bpo-30417: Disable `cpu` resource on AppVeyor (GH-1951)

(cherry picked from commit 42e3acda86829def9adc354fbee77597b849bf9e)

7 years ago[3.6] bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536...
Mariatta [Sat, 10 Jun 2017 01:33:31 +0000 (18:33 -0700)]
[3.6] bpo-30335: Add deprecation alias entry for assertNotRegexpMatches (GH-1536) (GH-2055)

Document that assertNotRegexpMatches is a deprecated alias for assertNotRegex.
(cherry picked from commit 74921ed8941fce14c2a53dc7280f43eb01fe4ed8)

7 years ago[3.6] Make codecov config on master the only config used (GH-2041) (GH-2052)
Brett Cannon [Sat, 10 Jun 2017 00:02:04 +0000 (17:02 -0700)]
[3.6] Make codecov config on master the only config used (GH-2041) (GH-2052)

This will allow for centralized management of the Codecov config to prevent skew as well as easier management going forward.

Closes python/core-workflowGH-81.
(cherry picked from commit 11ffb4543bc000dea527bcc0417e2f8bda13790f)

7 years agoBreak circular references when closing SSLTransport objects (#981) (#2049)
Yury Selivanov [Fri, 9 Jun 2017 23:14:35 +0000 (19:14 -0400)]
Break circular references when closing SSLTransport objects (#981) (#2049)

7 years agoClosing transport during handshake process leaks socket (#480) (#2044)
Yury Selivanov [Fri, 9 Jun 2017 22:33:31 +0000 (18:33 -0400)]
Closing transport during handshake process leaks socket (#480) (#2044)

7 years ago[3.6] Clarify what --enable-optimizations does (GH-1847) (GH-2039)
Brett Cannon [Fri, 9 Jun 2017 21:34:32 +0000 (14:34 -0700)]
[3.6] Clarify what --enable-optimizations does (GH-1847) (GH-2039)

(cherry picked from commit b4e5fee6f5bcc50500ea6261a22021db58955b55)

7 years agoFix waiter cancellation in asyncio.Lock (#1031) (#2037)
Yury Selivanov [Fri, 9 Jun 2017 21:07:48 +0000 (17:07 -0400)]
Fix waiter cancellation in asyncio.Lock (#1031) (#2037)

Avoid a deadlock when the waiter who is about to take the lock is
cancelled

Issue #27585

7 years ago[3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack (GH...
Yury Selivanov [Fri, 9 Jun 2017 21:06:39 +0000 (17:06 -0400)]
[3.6] bpo-30039: Don't run signal handlers while resuming a yield from stack (GH-1081) (#1640)

If we have a chain of generators/coroutines that are 'yield from'ing
each other, then resuming the stack works like:

- call send() on the outermost generator
- this enters _PyEval_EvalFrameDefault, which re-executes the
  YIELD_FROM opcode
- which calls send() on the next generator
- which enters _PyEval_EvalFrameDefault, which re-executes the
  YIELD_FROM opcode
- ...etc.

However, every time we enter _PyEval_EvalFrameDefault, the first thing
we do is to check for pending signals, and if there are any then we
run the signal handler. And if it raises an exception, then we
immediately propagate that exception *instead* of starting to execute
bytecode. This means that e.g. a SIGINT at the wrong moment can "break
the chain" – it can be raised in the middle of our yield from chain,
with the bottom part of the stack abandoned for the garbage collector.

The fix is pretty simple: there's already a special case in
_PyEval_EvalFrameEx where it skips running signal handlers if the next
opcode is SETUP_FINALLY. (I don't see how this accomplishes anything
useful, but that's another story.) If we extend this check to also
skip running signal handlers when the next opcode is YIELD_FROM, then
that closes the hole – now the exception can only be raised at the
innermost stack frame.

This shouldn't have any performance implications, because the opcode
check happens inside the "slow path" after we've already determined
that there's a pending signal or something similar for us to process;
the vast majority of the time this isn't true and the new check
doesn't run at all..
(cherry picked from commit ab4413a7e9bda95b6fcd517073e2a51dafaa1624)

7 years agobpo-30524: Write unit tests for FASTCALL (#2022) (#2030)
Victor Stinner [Fri, 9 Jun 2017 20:28:32 +0000 (22:28 +0200)]
bpo-30524: Write unit tests for FASTCALL (#2022) (#2030)

Test C functions:

* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()
(cherry picked from commit 3b5cf85edc188345668f987c824a2acb338a7816)

7 years ago[3.6] IDLE test_textview: add comments and test, increase coverage to 100% (GH-1641...
terryjreedy [Fri, 9 Jun 2017 19:59:31 +0000 (15:59 -0400)]
[3.6] IDLE test_textview: add comments and test, increase coverage to 100% (GH-1641) (#2018)

(cherry picked from commit 295304d412700cc6621bb592109fa42249a9dcdb)

7 years agobpo-24755: Document asyncio.wrap_future (GH-603) (GH-2019)
Mariatta [Fri, 9 Jun 2017 14:32:46 +0000 (07:32 -0700)]
bpo-24755: Document asyncio.wrap_future (GH-603) (GH-2019)

(cherry picked from commit 824f6879121413e09439fffef54580413e44bf46)

7 years ago[3.6] bpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366
Nick Coghlan [Fri, 9 Jun 2017 12:37:53 +0000 (22:37 +1000)]
[3.6] bpo-19180: Updated references for RFC 1750, RFC 3280 & RFC 4366

* RFC 1750 has been been obsoleted by RFC 4086.
* RFC 3280 has been obsoleted by RFC 5280.
* RFC 4366 has been obsoleted by RFC 6066.
(cherry picked from commit 63c2c8ac17750ba2be2cfc4e339cae1f4edee54f)

7 years agobpo-30524: Fix _PyStack_UnpackDict() (#1886)
Victor Stinner [Fri, 9 Jun 2017 11:24:53 +0000 (13:24 +0200)]
bpo-30524: Fix _PyStack_UnpackDict() (#1886)

* bpo-29259: Remove unused func parameter of _PyStack_UnpackDict()
* bpo-29286: Change _PyStack_UnpackDict() prototype to be able to
  notify of failure when args is NULL. _PyStack_UnpackDict() now
  returns -1 on error.

7 years ago[3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. ...
Serhiy Storchaka [Thu, 8 Jun 2017 21:38:06 +0000 (00:38 +0300)]
[3.6] bpo-30529: Fix errors for invalid whitespaces in f-string subexpressions. (GH-1888) (#2013)

'invalid character in identifier' now is raised instead of
'f-string: empty expression not allowed' if a subexpression contains
only whitespaces and they are not accepted by Python parser.
(cherry picked from commit 2e9cd58)

7 years agobpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)
Victor Stinner [Thu, 8 Jun 2017 21:14:07 +0000 (23:14 +0200)]
bpo-30418: Popen.communicate() always ignore EINVAL (#2002) (#2004)

On Windows, subprocess.Popen.communicate() now also ignore EINVAL
on stdin.write() if the child process is still running but closed the
pipe.
(cherry picked from commit d52aa31378ae43e044a300edfe8285954c167216)

7 years agobpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)
Victor Stinner [Thu, 8 Jun 2017 21:13:12 +0000 (23:13 +0200)]
bpo-30601: Fix a refleak in WindowsConsoleIO (#2003) (#2008)

Fix a reference leak in _io._WindowsConsoleIO: PyUnicode_FSDecoder()
always initialize decodedname when it succeed and it doesn't clear
input decodedname object.
(cherry picked from commit 29adc13bd797d9c9e7fcb893a7c49ce7f7ad388c)

7 years ago[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)
Denis Osipov [Thu, 8 Jun 2017 12:02:05 +0000 (17:02 +0500)]
[3.6] bpo-30584: Fix test_os fails on non-English Windows (GH-1980) (#1999)

* Fix bpo-30584

* Adding a comment mentionning the bpo and explaining what is the identifier

* Add Denis Osipov to Misc/ACKS
(cherry picked from commit 897bba75632dfce87c355e3cd4700468357715a7)

7 years ago[3.6] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1994)
Nathaniel J. Smith [Thu, 8 Jun 2017 11:14:40 +0000 (04:14 -0700)]
[3.6] bpo-30594: Fixed refcounting in newPySSLSocket (GH-1992) (#1994)

If pass a server_hostname= that fails IDNA decoding to SSLContext.wrap_socket or SSLContext.wrap_bio, then the SSLContext object had a spurious Py_DECREF called on it, eventually leading to segfaults.
(cherry picked from commit 65ece7ca2366308fa91a39a8dfa255e6bdce3cca)

7 years ago[3.6] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#1990)
Matthias Klose [Thu, 8 Jun 2017 01:07:41 +0000 (18:07 -0700)]
[3.6] trivial: update config.{guess,sub} from gnu.org. (GH-1987) (#1990)

* Update config.{guess,sub} from gnu.org.
(cherry picked from commit 6f46683a6257f22f25d136ed080d58d0c060a43b)

7 years agobpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985)
Antoine Pietri [Wed, 7 Jun 2017 17:18:56 +0000 (19:18 +0200)]
bpo-30177: pathlib: include the full path in resolve(strict=False) (#1893) (#1985)

7 years ago[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)
Nate [Wed, 7 Jun 2017 04:21:34 +0000 (21:21 -0700)]
[3.6] bpo-29822: make inspect.isabstract() work during __init_subclass__ (#1979)

At the time when an abstract base class' __init_subclass__ runs,
ABCMeta.__new__ has not yet finished running, so in the presence of
__init_subclass__, inspect.isabstract() can no longer depend only on
TPFLAGS_IS_ABSTRACT.
(cherry picked from commit fcfe80ec2592fed8b3941c79056a8737abef7d3b)

7 years agobpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527...
Nate [Wed, 7 Jun 2017 00:31:03 +0000 (17:31 -0700)]
bpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527) (GH-1282)

Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.

* added a test combining ABCMeta and __init_subclass__
* Added NEWS item

(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)

* [3.6] bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527)

Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.

* added a test combining ABCMeta and __init_subclass__
* Added NEWS item.
(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)

* **kwargs -> ``kwargs`` in attempts to fix the Travis build.

* Quote the **kwargs

7 years agobpo-29596: Improve clinic howto documentation (GH-1710) (GH-1976)
gfyoung [Tue, 6 Jun 2017 21:17:18 +0000 (17:17 -0400)]
bpo-29596: Improve clinic howto documentation (GH-1710) (GH-1976)

Clarify that `two-pass` buffer can only be dumped once, and it prints out all text sent to it during all processing, even from Clinic blocks *after* the dumping point.

7 years ago[3.6] bpo-30557: faulthandler now correctly filters and displays exception … (#1960)
Steve Dower [Tue, 6 Jun 2017 20:47:14 +0000 (13:47 -0700)]
[3.6] bpo-30557: faulthandler now correctly filters and displays exception … (#1960)

* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows (#1924)

* bpo-30557: faulthandler now correctly filters and displays exception codes on Windows

* Adds test for non-fatal exceptions.

* Adds bpo number to comment.

* bpo-30557: Fix test_faulthandler (#1969)

On Windows 8, 8.1 and 10 at least, the exit code is the exception
code (no bit is cleared).

7 years agobpo-30583: Fix typo in datetime dateutil documentation (GH-1972) (GH-1974)
wim glenn [Tue, 6 Jun 2017 19:32:14 +0000 (14:32 -0500)]
bpo-30583: Fix typo in datetime dateutil documentation (GH-1972) (GH-1974)

Replace `datetuil` into `dateutil`
(cherry picked from commit 53f2af16551eb3a080da313257603c31ef8b93b4)

7 years ago[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)
Serhiy Storchaka [Tue, 6 Jun 2017 16:23:02 +0000 (19:23 +0300)]
[3.6] bpo-30567: Fix refleak in sys.getwindowsversion (GH-1940) (#1970)

(cherry picked from commit 48fb766)

7 years ago[3.6] bpo-30303: IDLE: Add _utest argument to textview (GH-1499) (#1916)
Mariatta [Tue, 6 Jun 2017 15:56:59 +0000 (08:56 -0700)]
[3.6] bpo-30303: IDLE: Add _utest argument to textview (GH-1499) (#1916)

(cherry picked from commit ba365da9cee8901fad08ab0b61c7489c110e5c97)

7 years ago[3.6] Install dependencies in Travis OSX build (GH-1952)
Zachary Ware [Tue, 6 Jun 2017 03:41:17 +0000 (22:41 -0500)]
[3.6] Install dependencies in Travis OSX build (GH-1952)

(cherry picked from commit 167e0fc211c06df)

7 years agobpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)
Nick Coghlan [Tue, 6 Jun 2017 02:19:37 +0000 (12:19 +1000)]
bpo-30052: Always regenerate cross-references (GH-1339) (GH-1921)

The patch for bpo-30052 changed the preferred link target
for :func:`bytes` and :func`bytearray` references to be the
respective type definitions rather than the corresponding
builtin function entries.

This patch changes the daily documentation builds to disable
the output caching in Sphinx, in order to ensure that
cross-reference changes like this one are reliably picked
up and applied automatically after merging.
(cherry picked from commit 7a82f9c2b94d31c8f4cc8bb8e3151765d8b148d7)

7 years ago[3.6] bpo-30417: Disable 'cpu' and 'tzdata' resources on Travis (GH-1928)
Zachary Ware [Tue, 6 Jun 2017 00:10:21 +0000 (19:10 -0500)]
[3.6] bpo-30417: Disable 'cpu' and 'tzdata' resources on Travis (GH-1928)

Also weakens the 'should this be run?' regex to allow all builds when .travis.yml changes.
(cherry picked from commit c53b13b270767948fddb58b287149c499f9a03c4)

7 years agobpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943)
csabella [Mon, 5 Jun 2017 03:12:23 +0000 (23:12 -0400)]
bpo-30538: Update count() in Functional Programming HOWTO (GH-1919) (GH-1943)

* bpo-30538: Update count() in Functional HOWTO
* bpo-30538: Update enumerate() arguments in Functional HOWTO
(cherry picked from commit 9be4ff359daa67cde6246494f643ed7cd2825d46)

7 years agobpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)
Mariatta [Mon, 5 Jun 2017 03:06:48 +0000 (20:06 -0700)]
bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)

Update the code example in Functions and Methods section
Remove objtype argument in MethodType
(cherry picked from commit 1bced56567335745f91676192fc39c06aab30da9)

7 years ago[3.6] Only run AppVeyor on long-lived branches (GH-1941)
Zachary Ware [Mon, 5 Jun 2017 00:50:37 +0000 (19:50 -0500)]
[3.6] Only run AppVeyor on long-lived branches (GH-1941)

Also on the short-lived `buildbot-custom` branch.
(cherry picked from commit d3bedf356aca04ed9135a84b08)

7 years ago[3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised...
Zachary Ware [Sun, 4 Jun 2017 22:14:03 +0000 (17:14 -0500)]
[3.6] Fix skipping test_UNC_path on AppVeyor due to a different error being raised (GH-1920)

We get `ERROR_BAD_NETPATH` (53) on AppVeyor which is translated to
ENOENT (2).
(cherry picked from commit 7a99625e0d95cd88ed8842d8677b5beea1fde5ae)

7 years ago[3.6] Turn on macOS builds for Travis (GH-1846) (#1929)
Brett Cannon [Sat, 3 Jun 2017 17:33:53 +0000 (10:33 -0700)]
[3.6] Turn on macOS builds for Travis (GH-1846) (#1929)

Initially the macOS builds are allowed to fail until such time that they can be determined to be stable and not add an unacceptable amount of time to the overall Travis-passing process.
(cherry picked from commit 21c2dd7cf8414c903f0e83cf1d6b7f02f645f422)

7 years agobpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW...
Steve Dower [Fri, 2 Jun 2017 21:39:05 +0000 (14:39 -0700)]
bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails (#1912) (#1925)

* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

* bpo-30544: _io._WindowsConsoleIO.write raises the wrong error when WriteConsoleW fails

7 years agobpo-30052: Link `bytes` & `bytearray` to stdtypes not functions (GH-1271) (GH-1915)
Mariatta [Fri, 2 Jun 2017 04:56:24 +0000 (21:56 -0700)]
bpo-30052: Link `bytes` & `bytearray` to stdtypes not functions  (GH-1271) (GH-1915)

Builtin container types have two potential link targets in the docs:

- their entry in the list of builtin callables
- their type documentation

This change brings `bytes` and `bytearray` into line with other
container types by having cross-references default to linking to
their type documentation, rather than their builtin callable entry..
(cherry picked from commit c6db4811f9ea3aeff0e1fafe1c60a22835ef359e)

7 years agobpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH...
Matthias Bussonnier [Fri, 2 Jun 2017 03:26:15 +0000 (20:26 -0700)]
bpo-29660: traceback: Document that etype is ignored in some places. (GH-344) (GH-1913)

(cherry picked from commit cdb89cd)

7 years agobpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1676...
Xiang Zhang [Thu, 1 Jun 2017 14:20:27 +0000 (22:20 +0800)]
bpo-30378: Fix the problem that SysLogHandler can't handle IPv6 addresses (#1676) (#1903)

7 years agobpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1905)
Mariatta [Thu, 1 Jun 2017 14:12:01 +0000 (07:12 -0700)]
bpo-30499: Remove a deprecated note about sets. (GH-1848) (GH-1905)

(cherry picked from commit 0737ee20671d60802a7ef40f653fe449f1921de0)

7 years agobpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1897)
Mariatta [Thu, 1 Jun 2017 02:49:01 +0000 (19:49 -0700)]
bpo-22702: Clarify documentation of str.join & bytes.join (GH-156) (GH-1897)

The "iterable iterable" phrasing created confusion between the term
reference and the parameter name.

This simplifies the phrasing to just use the parameter name
without linking directly to the term definition.
(cherry picked from commit 08e2f355d04d3cbea5751ce1275306ee3f569b32)

7 years agobpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894)
csabella [Thu, 1 Jun 2017 01:53:24 +0000 (21:53 -0400)]
bpo-27618: Clarify that threading.Lock is a factory function (GH-1307) (GH-1894)

(cherry picked from commit 56ddfd2eea4d98456a9a99bf2a718f21ee6b2be2)

7 years ago[3.6] Fix Travis config to reinstate test build (GH-1879) (GH-1889)
Brett Cannon [Wed, 31 May 2017 22:52:39 +0000 (15:52 -0700)]
[3.6] Fix Travis config to reinstate test build (GH-1879) (GH-1889)

(cherry picked from commit a5aa72ac789052411797c6f079ffff0a9fdbf82c)

7 years ago[3.6] Fix a trivial typo in global section (GH-1497) (GH-1880)
Mariatta [Wed, 31 May 2017 05:08:04 +0000 (22:08 -0700)]
[3.6] Fix a trivial typo in global section (GH-1497) (GH-1880)

(cherry picked from commit f34c6850203a2406c4950af7a9c8a134145df4ea)

7 years agobpo-17188: add missing periods at the end of sentences (GH-1875) (GH-1876)
Mariatta [Tue, 30 May 2017 22:37:43 +0000 (15:37 -0700)]
bpo-17188: add missing periods at the end of sentences (GH-1875) (GH-1876)

(cherry picked from commit 9efad1e5aef32a6d8ca288793e8ee6df8782f615)

7 years ago[3.6] Build docs in parallel (GH-1842) (GH-1872)
Mariatta [Tue, 30 May 2017 22:29:24 +0000 (15:29 -0700)]
[3.6] Build docs in parallel (GH-1842) (GH-1872)

(cherry picked from commit eba68e2c42e149acecb15bbeb692786e2540157d)

7 years agobpo-30354: Update data model documentation for super() (GH-1561) (GH-1868)
csabella [Tue, 30 May 2017 20:48:22 +0000 (16:48 -0400)]
bpo-30354: Update data model documentation for super() (GH-1561) (GH-1868)

The data model section of the language reference was written well
before the zero-argument form of super() was added.

To avoid giving the impression that they're doing something
unusual, this updates the description of `__new__` and `__init__`
to use the zero-argument form.

Patch by Cheryl Sabella.
(cherry picked from commit 12b1c180986fc744331b8f30d3d2f49a0fdb43dd)

7 years agobpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)
csabella [Tue, 30 May 2017 20:27:39 +0000 (16:27 -0400)]
bpo-17188: DOC: Document 'from None' in raise statement (GH-1671) (GH-1867)

Original patch by Dennis Mårtensson.
(cherry picked from commit 763557eac06ba60d7c5133e4f80df8870d8f917e)

7 years agoImprove grammar in The Import System documentation (GH-1862) (GH-1863)
Mariatta [Tue, 30 May 2017 16:29:06 +0000 (09:29 -0700)]
Improve grammar in The Import System documentation (GH-1862) (GH-1863)

Replace `an ModuleNotFoundError` with `a ModuleNotFoundError`.
Replace `an path` with `a path`.
(cherry picked from commit 9c972b578002cc3bbbf2ebf2856c69de892bc9e2)

7 years ago[3.6] bpo-30361: Use better example for mixed-type operands (GH-1701) (#1856)
Mariatta [Mon, 29 May 2017 22:19:31 +0000 (15:19 -0700)]
[3.6] bpo-30361: Use better example for mixed-type operands (GH-1701) (#1856)

(cherry picked from commit e405d4b8dfb8b497e1c3d1f0f8e28030040c165e)

7 years ago[3.6] bpo-30470: Deprecate invalid ctypes call protection on Windows. (GH-1810) ...
Mariatta [Sat, 27 May 2017 14:58:25 +0000 (07:58 -0700)]
[3.6] bpo-30470: Deprecate invalid ctypes call protection on Windows. (GH-1810) (GH-1833)

Calling Ctypes functions is deprecated in 3.6.2 and will be removed in 3.7.
(cherry picked from commit f931fd1c2ad969db72460d3ab41e3d1a4a62c371)

7 years ago[3.6] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1287)
Mariatta [Sat, 27 May 2017 14:20:24 +0000 (07:20 -0700)]
[3.6] bpo-29960 _random.Random corrupted on exception in setstate(). … (#1287)

(cherry picked from commit 9616a82e7802241a4b74cf7ae38d43c37bf66e48)

7 years ago[3.6] bpo-30398: Add a docstring for re.error. (GH-1647) (#1830)
Serhiy Storchaka [Sat, 27 May 2017 13:37:40 +0000 (16:37 +0300)]
[3.6] bpo-30398: Add a docstring for re.error. (GH-1647) (#1830)

Also document that some attributes may be None.
(cherry picked from commit 12d6b5d)

7 years ago[3.6] Fix the signature of JSONDecodeError (no end parameter). (GH-1827) (#1828)
Serhiy Storchaka [Sat, 27 May 2017 13:37:11 +0000 (16:37 +0300)]
[3.6] Fix the signature of JSONDecodeError (no end parameter). (GH-1827) (#1828)

Unlikely to the simplejson module, json.JSONDecodeError doesn't accept the end argument.
(cherry picked from commit 5becf38)

7 years ago[3.6] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc ...
Antoine Pitrou [Thu, 25 May 2017 14:57:46 +0000 (16:57 +0200)]
[3.6] bpo-30414: multiprocessing.Queue._feed do not break from main loop on exc (GH-1683) (#1815)

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.

* bpo-30414: multiprocesing.Queue._feed do not break from main loop on exc

Queue background running thread was not handling exceptions correctly.
Any exception occurred inside thread (putting unpickable object) cause
feeder to finish running. After that every message put into queue is
silently ignored.
(cherry picked from commit bc50f03db4f58c869b78e98468e374d7e61f1227)

7 years ago[3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro...
Serhiy Storchaka [Thu, 25 May 2017 12:32:08 +0000 (15:32 +0300)]
[3.6] bpo-29943: Do not replace the function PySlice_GetIndicesEx() with a macro (GH-1049) (#1813)

if Py_LIMITED_API is not defined.
(cherry picked from commit 49a9059)

7 years ago[3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812)
Serhiy Storchaka [Thu, 25 May 2017 11:18:55 +0000 (14:18 +0300)]
[3.6] bpo-29104: Fixed parsing backslashes in f-strings. (GH-490) (#1812)

(cherry picked from commit 0cd7a3f)

7 years ago[3.6] bpo-30160: Clarify intended usage of wfile (gh-1300) (GH-1793)
Zachary Ware [Wed, 24 May 2017 21:11:01 +0000 (16:11 -0500)]
[3.6] bpo-30160: Clarify intended usage of wfile (gh-1300) (GH-1793)

The library does not enforce compliance with the HTTP protocol,
so violations are not technically disallowed. Extend the stream's
description to avoid suggesting that intentional protocol violations are
not supported.
(cherry picked from commit a083c8e)

7 years agobpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1790)
Stéphane Wirtel [Wed, 24 May 2017 18:59:06 +0000 (20:59 +0200)]
bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) (#1790)

7 years ago[3.6] bpo-30376: Update outdated WindowObject references (GH-1630) (#1746)
Kushal Das [Tue, 23 May 2017 16:57:04 +0000 (09:57 -0700)]
[3.6] bpo-30376: Update outdated WindowObject references (GH-1630) (#1746)

(cherry picked from commit 93fc20b73eea3da0b6305aaee951e5dd22d5c408)

7 years ago[3.6] call remove_done_callback in finally section (GH-1688) (#1755)
Łukasz Langa [Tue, 23 May 2017 07:36:23 +0000 (00:36 -0700)]
[3.6] call remove_done_callback in finally section (GH-1688) (#1755)

(cherry picked from commit 21b3e04c13212b29e8c35ffc36eed8603fde08f4)

7 years agoFix spelling mistakes in tkinter.py (#1751)
Vijay Kumar [Tue, 23 May 2017 06:14:02 +0000 (11:44 +0530)]
Fix spelling mistakes in tkinter.py (#1751)

Ran the docstrings through spell checker, and fixed spelling issues.

7 years ago[3.6] bpo-21056: Document return type of next method of csv reader (GH-146) (#1749)
Mariatta [Tue, 23 May 2017 05:27:02 +0000 (22:27 -0700)]
[3.6] bpo-21056: Document return type of next method of csv reader (GH-146) (#1749)

(cherry picked from commit d618c8c6d31b9b288f8a070417683974eb98e3ba)

7 years ago[3.6] Add --with-assertions configure flag to enable C assertions(GH-1731) (#1739)
T. Wouters [Tue, 23 May 2017 05:25:17 +0000 (07:25 +0200)]
[3.6] Add --with-assertions configure flag to enable C assertions(GH-1731) (#1739)

Defaults to 'no', but as before assertions are implied by --with-pydebug..
(cherry picked from commit ddbfa2c35b298a56f0b813656745bca9cb7334f1)

7 years ago[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)
Łukasz Langa [Tue, 23 May 2017 05:23:29 +0000 (22:23 -0700)]
[3.6] bpo-23894: make lib2to3 recognize f-strings (GH-1733) (#1737)

Note: this doesn't unpack f-strings into the underlying JoinedStr AST.

Ideally we'd fully implement JoinedStr here but given its additional
complexity, I think this is worth bandaiding as is. This unblocks tools like
https://github.com/google/yapf to format 3.6 syntax using f-strings.
(cherry picked from commit 1b9530c536664276ce866ae602ce04adce0810e1)

7 years ago[3.6] bpo-30395 _PyGILState_Reinit deadlock fix (GH-1734) (#1740)
Łukasz Langa [Tue, 23 May 2017 05:23:05 +0000 (22:23 -0700)]
[3.6] bpo-30395 _PyGILState_Reinit deadlock fix (GH-1734) (#1740)

head_lock could be held by another thread when fork happened. We should
reset it to avoid deadlock.
(cherry picked from commit f82c951d1c5416f3550d544e50ff5662d3836e73)

7 years ago[3.6] Make rb'' strings work in lib2to3 (GH-1724) (#1730)
Łukasz Langa [Mon, 22 May 2017 23:35:15 +0000 (16:35 -0700)]
[3.6] Make rb'' strings work in lib2to3 (GH-1724) (#1730)

This partially solves bpo-23894.
(cherry picked from commit 0c4aca54dcf0c54f299c78aa71fe8f48ff04f9d9)

7 years ago[3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail ...
Mariatta [Mon, 22 May 2017 21:36:19 +0000 (14:36 -0700)]
[3.6] bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725) (GH-1727)

(cherry picked from commit 43c8a9e39bb2d4f25ed7ae17a55f34e375d1868b)

7 years agobpo-30003: Fix handling escape characters in HZ codec (#1556) (#1719)
Xiang Zhang [Mon, 22 May 2017 17:03:00 +0000 (01:03 +0800)]
bpo-30003: Fix handling escape characters in HZ codec (#1556) (#1719)

7 years ago[3.6] Fix typos in multiple `.rst` files (GH-1668) (#1702)
delirious-lettuce [Sun, 21 May 2017 21:26:01 +0000 (15:26 -0600)]
[3.6] Fix typos in multiple `.rst` files (GH-1668) (#1702)

(cherry picked from commit 3378b2062c7fbb77a9b5e6d315d6b94160fac69a)

7 years ago[3.6] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1694)
Serhiy Storchaka [Sun, 21 May 2017 07:35:39 +0000 (10:35 +0300)]
[3.6] bpo-30415: Add new tests for the fnmatch module. (GH-1684) (#1694)

(cherry picked from commit 8175547)

7 years agobpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1692)
Senthil Kumaran [Sun, 21 May 2017 06:23:03 +0000 (23:23 -0700)]
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984) (GH-1692)

(cherry picked from commit 906f5330b9c9a74cad1cf27fddaf77e99dff9edd)

7 years ago[3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)
Serhiy Storchaka [Sat, 20 May 2017 10:06:26 +0000 (13:06 +0300)]
[3.6] bpo-27945: Fixed various segfaults with dict. (GH-1657) (#1677)

Based on patches by Duane Griffin and Tim Mitchell.
(cherry picked from commit 753bca3934a7618a4fa96e107ad1c5c18633a683)

7 years ago[3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652...
Serhiy Storchaka [Sat, 20 May 2017 07:23:31 +0000 (10:23 +0300)]
[3.6] bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (GH-1652) (#1673)

Based on patch by Eryk Sun.
(cherry picked from commit d896985bb2de49046f9b6879e906d1e4db255e23)

7 years agobpo-27103: regrtest disables -W if -R is used (#1651) (#1656)
Victor Stinner [Thu, 18 May 2017 20:36:51 +0000 (13:36 -0700)]
bpo-27103: regrtest disables -W if -R is used (#1651) (#1656)

Workaround for a regrtest bug.
(cherry picked from commit fcdd9b6b7e73427ce5aa63cf095312f603c4edce)

7 years agobpo-30387: Fix warning in test_threading (#1634) (#1636)
Victor Stinner [Wed, 17 May 2017 21:49:38 +0000 (14:49 -0700)]
bpo-30387: Fix warning in test_threading (#1634) (#1636)

test_is_alive_after_fork() now joins directly the thread to avoid the
following warning added by bpo-30357:

Warning -- threading_cleanup() failed to cleanup 0 threads
after 2 sec (count: 0, dangling: 21)

Use also a different exit code to catch generic exit code 1.
(cherry picked from commit f8d05b3a24e745ab4a974b891ac1389e2f11ce4d)

7 years agotmtotuple(): use time_t for gmtoff (#1276) (#1635)
Victor Stinner [Wed, 17 May 2017 21:45:45 +0000 (14:45 -0700)]
tmtotuple(): use time_t for gmtoff (#1276) (#1635)

timegm() return type is time_t, not int. Use time_t to prevent the
following compiler warning on Windows:

timemodule.c: warning C4244: '=': conversion from 'time_t' to 'int',
              possible loss of data
(cherry picked from commit 0d659e5614cad512a1940125135b443b3eecb5d7)

7 years agoRemove unused variable in test_urllibnet. (#1598) (#1600)
Senthil Kumaran [Wed, 17 May 2017 17:51:01 +0000 (10:51 -0700)]
Remove unused variable in test_urllibnet. (#1598) (#1600)

(cherry picked from commit 1bd7d299bd2a91f8267f97a413568ab8fe7fdfbb)

7 years agobpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1628)
Xiang Zhang [Wed, 17 May 2017 14:03:35 +0000 (22:03 +0800)]
bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601) (#1628)

Under *spawn* and *forkserver* start methods, SimpleQueue.empty() could
raise AttributeError due to not setting _poll in __setstate__.

7 years agoFix ModuleNotFoundError typo in import reference (#1610)
Dominik Miedziński [Wed, 17 May 2017 06:17:55 +0000 (08:17 +0200)]
Fix ModuleNotFoundError typo in import reference (#1610)

(cherry picked from commit c138d84b8d27d338872587aae69a73d8f9d16641)

7 years agobpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1625)
Victor Stinner [Wed, 17 May 2017 00:58:02 +0000 (17:58 -0700)]
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) (#1625)

compiled out-of-tree (builddir != srcdir). (see also bpo-15366)
(cherry picked from commit dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3)

7 years agobpo-30357: test_thread now uses threading_cleanup() (#1592) (#1622)
Victor Stinner [Wed, 17 May 2017 00:06:14 +0000 (17:06 -0700)]
bpo-30357: test_thread now uses threading_cleanup() (#1592) (#1622)

test_thread: setUp() now uses support.threading_setup() and
support.threading_cleanup() to wait until threads complete to avoid
random side effects on following tests.

Co-Authored-By: Grzegorz Grzywacz <grzegorz.grzywacz@nazwa.pl>
(cherry picked from commit 79ef7f8e88a4972c4aecf95cfc5cd934f1861e08)

7 years agobpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1620)
Victor Stinner [Tue, 16 May 2017 22:29:41 +0000 (15:29 -0700)]
bpo-30329: Catch Windows error 10022 on shutdown() (#1538) (#1620)

Catch the Windows socket WSAEINVAL error (code 10022) in imaplib and
poplib on shutdown(SHUT_RDWR): An invalid operation was attempted

This error occurs sometimes on SSL connections.
(cherry picked from commit 83a2c2879839da2e10037f5e4af1bd1dafbf1a52)

7 years agobpo-29898: Fix incorrect env variable name (GH-1576)
Berker Peksag [Tue, 16 May 2017 21:31:39 +0000 (00:31 +0300)]
bpo-29898: Fix incorrect env variable name (GH-1576)

It should read PYTHONLEGACYWINDOWSSTDIO as stated
in section "Add legacy mode" in PEP 528.

(cherry picked from commit 87fa8a780e9045a26c735f085c07bba4b2d0be60)

7 years agobpo-30380: Pin the version of Sphinx used to build the docs (GH-1612) (GH-1617)
Brett Cannon [Tue, 16 May 2017 21:28:21 +0000 (14:28 -0700)]
bpo-30380: Pin the version of Sphinx used to build the docs (GH-1612) (GH-1617)

7 years ago[3.6] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1614)
Serhiy Storchaka [Tue, 16 May 2017 21:09:23 +0000 (00:09 +0300)]
[3.6] bpo-30380: Fix Sphinx 1.6.1 warnings. (GH-1613) (#1614)

* Use explicit numbering for footnotes referred by explicit number.
* Restore missed footnote reference in stdtypes.rst.
* Fix literal strings formatting in howto/urllib2.rst.
* Update susp-ignored.csv for zipapp.rst.
* Fix suspicious mark up in Misc/NEWS..
(cherry picked from commit d97b7dc94b19063f0589d401bdc4aaadc7030762)

7 years ago[3.6] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (...
Serhiy Storchaka [Tue, 16 May 2017 15:16:15 +0000 (18:16 +0300)]
[3.6] bpo-30375: Correct the stacklevel of regex compiling warnings. (GH-1595) (#1604)

Warnings emitted when compile a regular expression now always point
to the line in the user code.  Previously they could point into inners
of the re module if emitted from inside of groups or conditionals..
(cherry picked from commit c7ac7280c321b3c1679fe5f657a6be0f86adf173)

7 years ago bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1596)
Senthil Kumaran [Tue, 16 May 2017 05:41:07 +0000 (22:41 -0700)]
 bpo-29651 - Cover edge case of square brackets in urllib docs (#1128) (#1596)

(cherry picked from commit f6e863d868a621594df2a8abe072b5d4766e7137)

7 years agobpo-30242: resolve some undefined behaviours in struct (#1418) (#1586)
Xiang Zhang [Mon, 15 May 2017 05:17:28 +0000 (13:17 +0800)]
bpo-30242: resolve some undefined behaviours in struct (#1418) (#1586)

7 years agobpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1584)
Xiang Zhang [Mon, 15 May 2017 05:17:01 +0000 (13:17 +0800)]
bpo-30110: fix resource leak in test_asyncio.test_events (#1413) (#1584)

7 years agobpo-30358: Document sort argument of profile.runctx() (GH-1566)
Berker Peksag [Sun, 14 May 2017 15:30:48 +0000 (18:30 +0300)]
bpo-30358: Document sort argument of profile.runctx() (GH-1566)

(cherry picked from commit 99776296230ddd8429ebad2d07854b8c27ea10ab)

7 years ago[3.6] Move Codecov's configuration file under .github (GH-1494) (GH-1574)
Brett Cannon [Sat, 13 May 2017 20:51:24 +0000 (13:51 -0700)]
[3.6] Move Codecov's configuration file under .github (GH-1494) (GH-1574)

(cherry picked from commit cbddf58c797f850a5b06f317a4bb7ab69c6e9715)

7 years ago[3.6] bpo-30178: Indent methods and attributes of MimeType class (GH-1306) (#1570)
Mariatta [Sat, 13 May 2017 16:42:39 +0000 (09:42 -0700)]
[3.6] bpo-30178: Indent methods and attributes of MimeType class (GH-1306) (#1570)

(cherry picked from commit c71168090df435c1eb8c03005b11df764cd7ebd6)

7 years ago[3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549)
Victor Stinner [Fri, 12 May 2017 22:21:50 +0000 (00:21 +0200)]
[3.6] bpo-30345: Update test_gdb.py and python-gdb.py from master (#1549)

* python-gdb.py supports method-wrapper

bpo-29367: python-gdb.py now supports also method-wrapper (wrapperobject)
objects.

(cherry picked from commit 611083331d534481ca7956a376e38fb0e9ef3854)

* Update and enhance python-gdb.py

bpo-29259: Detect PyCFunction is the current frame, not only in the
older frame.

7 years agobpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)
INADA Naoki [Thu, 11 May 2017 12:56:42 +0000 (21:56 +0900)]
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1546)

when there are no more `await` or `yield (from)` before return in coroutine,
cancel was ignored.

example:

    async def coro():
        asyncio.Task.current_task().cancel()
        return 42
    ...
    res = await coro()  # should raise CancelledError

(cherry picked from commit 991adca012f5e106c2d4040ce619c696ba6f9c46)

7 years ago[3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543)
stratakis [Thu, 11 May 2017 11:13:18 +0000 (13:13 +0200)]
[3.6] bpo-28787: Fix out of tree --with-dtrace builds (GH-135) (#1543)

* bpo-28787: Fix out of tree --with-dtrace builds

* Unsilence directory creation

* Add Misc/NEWS and Misc/ACKS entries.
(cherry picked from commit f6eae5bf1c5d7b83e5d5bdbecfff928e478c1cfd)

7 years agobpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) (#1529)
Xiang Zhang [Wed, 10 May 2017 11:00:15 +0000 (19:00 +0800)]
bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) (#1529)

7 years agobpo-30320: test_eintr now uses pthread_sigmask() (#1523) (#1524)
Victor Stinner [Wed, 10 May 2017 06:47:22 +0000 (08:47 +0200)]
bpo-30320: test_eintr now uses pthread_sigmask() (#1523) (#1524)

Rewrite sigwaitinfo() and sigtimedwait() unit tests for EINTR using
pthread_sigmask() to fix a race condition between the child and the
parent process.

Remove the pipe which was used as a weak workaround against the race
condition.

sigtimedwait() is now tested with a child process sending a signal
instead of testing the timeout feature which is more unstable
(especially regarding to clock resolution depending on the platform).
(cherry picked from commit 211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f)