]> granicus.if.org Git - python/log
python
7 years agobpo-30160: Clarify intended usage of wfile (gh-1300)
jugglinmike [Wed, 24 May 2017 18:25:50 +0000 (14:25 -0400)]
bpo-30160: Clarify intended usage of wfile (gh-1300)

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.

7 years agoMove directory in .gitignore (#1787)
Steve Dower [Wed, 24 May 2017 16:24:49 +0000 (09:24 -0700)]
Move directory in .gitignore (#1787)

7 years agoAdd .idea and .iml to .gitignore (#1764)
gfyoung [Wed, 24 May 2017 15:57:37 +0000 (11:57 -0400)]
Add .idea and .iml to .gitignore (#1764)

7 years agobpo-30377: Simplify handling of COMMENT and NL in tokenize.py (#1607)
Albert-Jan Nijburg [Wed, 24 May 2017 11:31:57 +0000 (12:31 +0100)]
bpo-30377: Simplify handling of COMMENT and NL in tokenize.py (#1607)

7 years agobpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and...
Stéphane Wirtel [Wed, 24 May 2017 07:29:06 +0000 (09:29 +0200)]
bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module (#1776)

* bpo-28707: call the constructor of SimpleHTTPRequestHandler in the test with a mock object

* bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module

7 years agobpo-9146: Raise a ValueError if OpenSSL fails to init a hash func. (#1777)
Gregory P. Smith [Wed, 24 May 2017 07:04:38 +0000 (00:04 -0700)]
bpo-9146: Raise a ValueError if OpenSSL fails to init a hash func. (#1777)

This helps people in weird FIPS mode environments where common things
like MD5 are not available in the binary as a matter of policy.

7 years agoAdded effect of re.ASCII and reworded slightly (#1782)
Brian Ward [Wed, 24 May 2017 07:03:38 +0000 (00:03 -0700)]
Added effect of re.ASCII and reworded slightly (#1782)

7 years agobpo-22257: Private C-API for main interpreter initialization (PEP 432). (#1729)
Eric Snow [Wed, 24 May 2017 06:00:52 +0000 (23:00 -0700)]
bpo-22257: Private C-API for main interpreter initialization (PEP 432). (#1729)

(patch by Nick Coghlan)

7 years agobpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700)
Joel Hillacre [Wed, 24 May 2017 05:14:50 +0000 (23:14 -0600)]
bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700)

7 years agobpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)
Eric Snow [Wed, 24 May 2017 04:46:51 +0000 (21:46 -0700)]
bpo-22257: Private C-API for core runtime initialization (PEP 432). (#1772)

(patch by Nick Coghlan)

7 years agoRevert "Fixed a typo in the HTMLParser.feed docstrings" (#1771)
Serhiy Storchaka [Wed, 24 May 2017 04:20:45 +0000 (07:20 +0300)]
Revert "Fixed a typo in the HTMLParser.feed docstrings" (#1771)

* Revert "Fixed a typo in the HTMLParser.feed docstrings. The docstring started with an 'r', like a The docstring was correct. I read the patch in opposite direction, as *adding* the "r" prefix.
This reverts commit 5ba185039f1bd465d3f82531324fd3fe1ee42f0c.

7 years agoRevert an invalid change to a test (from 6b4be19). (#1770)
Eric Snow [Tue, 23 May 2017 23:40:03 +0000 (16:40 -0700)]
Revert an invalid change to a test (from 6b4be19). (#1770)

7 years agoImproves test_underpth_nosite_file to reveal why it fails. (#1763)
Steve Dower [Tue, 23 May 2017 23:25:25 +0000 (16:25 -0700)]
Improves test_underpth_nosite_file to reveal why it fails. (#1763)

* Improves test_underpth_nosite_file to reveal why it fails.

* Enable building with Windows 10 SDK.

* Fix WinSDK detection

* Fix initialization on Windows when a ._pth file exists.

* Fix tabs

* Adds comment about Py_GetPath call.

7 years agobpo-29334: Fix ssl.getpeercert for auto-handshake (#1769)
Christian Heimes [Tue, 23 May 2017 23:02:02 +0000 (16:02 -0700)]
bpo-29334: Fix ssl.getpeercert for auto-handshake (#1769)

Drop handshake_done and peer_cert members from PySSLSocket struct. The
peer certificate can be acquired from *SSL directly.
SSL_get_peer_certificate() does not trigger any network activity.
Instead of manually tracking the handshake state, simply use
SSL_is_init_finished().

In combination these changes fix auto-handshake for non-blocking
MemoryBIO connections.

Signed-off-by: Christian Heimes <christian@python.org>
7 years agobpo-22257: Fix CLI by using int instead of char (compares to EOF). (#1765)
Eric Snow [Tue, 23 May 2017 19:26:17 +0000 (12:26 -0700)]
bpo-22257: Fix CLI by using int instead of char (compares to EOF). (#1765)

7 years agoUpdate importlib.h (GH-1762)
Zachary Ware [Tue, 23 May 2017 17:23:05 +0000 (12:23 -0500)]
Update importlib.h (GH-1762)

7 years agobpo-29335 - apply suggested test_subprocess simplifications from haypo and Zach:...
Gregory P. Smith [Tue, 23 May 2017 14:49:13 +0000 (07:49 -0700)]
bpo-29335 - apply suggested test_subprocess simplifications from haypo and Zach: (#1757)

use faulthandler._sigsegv() and ctypes.util.find_library('c')

7 years agoFixed a typo in the HTMLParser.feed docstrings. The docstring started with an 'r...
Jani Šumak [Tue, 23 May 2017 13:40:54 +0000 (15:40 +0200)]
Fixed a typo in the HTMLParser.feed docstrings. The docstring started with an 'r', like a rawstring. (#1759)

7 years agocall remove_done_callback in finally section (#1688)
jimmylai [Tue, 23 May 2017 05:32:46 +0000 (22:32 -0700)]
call remove_done_callback in finally section (#1688)

7 years agobpo-30432: FileInput doesn't accept PathLike objects for file names (#1732)
Roy Williams [Tue, 23 May 2017 05:24:17 +0000 (22:24 -0700)]
bpo-30432: FileInput doesn't accept PathLike objects for file names (#1732)

* Allow FileInput to accept a single PathLike object as a parameter for `files`

Fixes

bpo-30432: FileInput doesn't accept PathLike objects for file names

* Address comments from @ambv

7 years agobpo-21056: Document return type of next method of csv reader (#146)
Amit Kumar [Tue, 23 May 2017 05:09:42 +0000 (10:39 +0530)]
bpo-21056: Document return type of next method of csv reader (#146)

7 years agobpo-22257: Small changes for PEP 432. (#1728)
Eric Snow [Tue, 23 May 2017 04:36:03 +0000 (21:36 -0700)]
bpo-22257: Small changes for PEP 432. (#1728)

PEP 432 specifies a number of large changes to interpreter startup code, including exposing a cleaner C-API. The major changes depend on a number of smaller changes. This patch includes all those smaller changes.

7 years agobpo-25532: Protect against infinite loops in inspect.unwrap() (#1717)
Thomas Kluyver [Tue, 23 May 2017 03:27:52 +0000 (04:27 +0100)]
bpo-25532: Protect against infinite loops in inspect.unwrap() (#1717)

Some objects (like test mocks) auto-generate new objects on
attribute access, which can lead to an infinite loop in
inspect.unwrap().

Ensuring references are retained to otherwise temporary objects
and capping the size of the memo dict turns this case into a
conventional exception instead.

7 years agobpo-29102: Add a unique ID to PyInterpreterState. (#1639)
Eric Snow [Tue, 23 May 2017 02:46:40 +0000 (19:46 -0700)]
bpo-29102: Add a unique ID to PyInterpreterState. (#1639)

7 years agobpo-30376: Update outdated WindowObject references (#1630)
Berker Peksag [Tue, 23 May 2017 00:16:07 +0000 (03:16 +0300)]
bpo-30376: Update outdated WindowObject references (#1630)

7 years agobpo-30395 _PyGILState_Reinit deadlock fix (#1734)
Jason Fried [Mon, 22 May 2017 23:58:55 +0000 (16:58 -0700)]
bpo-30395 _PyGILState_Reinit deadlock fix (#1734)

head_lock could be held by another thread when fork happened. We should
reset it to avoid deadlock.

7 years agobpo-23894: make lib2to3 recognize f-strings (#1733)
Łukasz Langa [Mon, 22 May 2017 23:35:48 +0000 (16:35 -0700)]
bpo-23894: make lib2to3 recognize f-strings (#1733)

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.

7 years agoAdd --with-assertions configure flag to enable C assertions(#1731)
T. Wouters [Mon, 22 May 2017 23:30:49 +0000 (01:30 +0200)]
Add --with-assertions configure flag to enable C assertions(#1731)

Defaults to 'no', but as before assertions are implied by --with-pydebug.

7 years agoMake rb'' strings work in lib2to3 (#1724)
Łukasz Langa [Mon, 22 May 2017 22:19:09 +0000 (15:19 -0700)]
Make rb'' strings work in lib2to3 (#1724)

This partially solves bpo-23894.

7 years agoRemove .bzrignore (GH-1661)
Stéphane Wirtel [Mon, 22 May 2017 21:28:28 +0000 (23:28 +0200)]
Remove .bzrignore (GH-1661)

7 years agobpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725)
Naomi Ceder [Mon, 22 May 2017 21:09:55 +0000 (14:09 -0700)]
bpo-30372: Clarify that '__builtins__' is a CPython Implementation detail (GH-1725)

7 years agoFix spelling mistakes in tkinter.py (#1716)
Vijay Kumar [Mon, 22 May 2017 16:23:52 +0000 (21:53 +0530)]
Fix spelling mistakes in tkinter.py (#1716)

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

7 years agobpo-30003: Fix handling escape characters in HZ codec (#1556)
Xiang Zhang [Mon, 22 May 2017 14:42:05 +0000 (22:42 +0800)]
bpo-30003: Fix handling escape characters in HZ codec (#1556)

7 years agoCorrected grammar mistake in documentation (#1713)
Ben Lloyd [Mon, 22 May 2017 11:06:56 +0000 (12:06 +0100)]
Corrected grammar mistake in documentation (#1713)

There was an unneeded space before a closing parenthesis in the `unittest.mock` documentation.

7 years agobpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666).
xdegaye [Mon, 22 May 2017 09:15:08 +0000 (11:15 +0200)]
bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666).

bpo-29619: Do not use HAVE_LARGEFILE_SUPPORT for type conversions (GH-1666).

* Use only the LongLong form for the conversions.

7 years agobpo-30290: IDLE: Add more tests for help_about dialog (#1697)
mlouielu [Sun, 21 May 2017 22:19:35 +0000 (06:19 +0800)]
bpo-30290: IDLE: Add more tests for help_about dialog (#1697)

Increases coverage to 99%

7 years agobpo-30415: Add new tests for the fnmatch module. (#1684)
Serhiy Storchaka [Sun, 21 May 2017 05:57:00 +0000 (08:57 +0300)]
bpo-30415: Add new tests for the fnmatch module. (#1684)

7 years ago#30014: refactor poll-related classes (#1035)
Giampaolo Rodola [Sat, 20 May 2017 09:34:44 +0000 (11:34 +0200)]
#30014: refactor poll-related classes (#1035)

* #30014: refactor poll-related classes so that poll(), epoll() and devpoll() share the same methods for register(), unregister(), close() and select()

* remove unused attribute

* use specific class attributes instead of select.* constants

* have all classes except SelectSelector a _selector attribute

* BaseException -> Exception

* be explicit in defining a close() method only for selectors which have it

* fix AttributeError

7 years agobpo-27945: Fixed various segfaults with dict. (#1657)
Serhiy Storchaka [Sat, 20 May 2017 09:30:02 +0000 (12:30 +0300)]
bpo-27945: Fixed various segfaults with dict. (#1657)

Based on patches by Duane Griffin and Tim Mitchell.

7 years agobpo-17188: DOC: Document 'from None' in raise statement (#1671)
csabella [Sat, 20 May 2017 06:48:28 +0000 (02:48 -0400)]
bpo-17188: DOC: Document 'from None' in raise statement (#1671)

Original patch by Dennis Mårtensson.

7 years agobpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652)
Serhiy Storchaka [Sat, 20 May 2017 05:48:06 +0000 (08:48 +0300)]
bpo-25794: Fix `type.__setattr__()` for non-interned attribute names. (#1652)

Based on patch by Eryk Sun.

7 years agoFix typos in multiple `.rst` files (#1668)
delirious-lettuce [Fri, 19 May 2017 20:37:57 +0000 (14:37 -0600)]
Fix typos in multiple `.rst` files (#1668)

7 years agoRemove duplicate line in Lib/http/client.py (#1665)
remitamine [Fri, 19 May 2017 12:28:35 +0000 (14:28 +0200)]
Remove duplicate line in Lib/http/client.py (#1665)

7 years agoRemove trailing semicolon in datetime doc example (GH-1653)
delirious-lettuce [Fri, 19 May 2017 01:01:00 +0000 (19:01 -0600)]
Remove trailing semicolon in datetime doc example (GH-1653)

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

Workaround for a regrtest bug.

7 years agobpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)
Jon Dufresne [Thu, 18 May 2017 14:35:54 +0000 (07:35 -0700)]
bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489)

* Replaced list(<generator expression>) with list comprehension
* Replaced dict(<generator expression>) with dict comprehension
* Replaced set(<list literal>) with set literal
* Replaced builtin func(<list comprehension>) with func(<generator
  expression>) when supported (e.g. any(), all(), tuple(), min(), &
  max())

7 years agobpo-29976: urllib.parse clarify '' in scheme values. (GH-984)
Senthil Kumaran [Thu, 18 May 2017 04:48:59 +0000 (21:48 -0700)]
bpo-29976: urllib.parse clarify '' in scheme values. (GH-984)

7 years agoIDLE test_textview: add comments and test, increase coverage to 100% (#1641)
terryjreedy [Thu, 18 May 2017 02:59:46 +0000 (22:59 -0400)]
IDLE test_textview: add comments and test, increase coverage to 100% (#1641)

7 years agobpo-30303: IDLE: Add _utest argument to textview (#1499)
Louie Lu [Wed, 17 May 2017 21:51:31 +0000 (05:51 +0800)]
bpo-30303: IDLE: Add _utest argument to textview (#1499)

7 years agobpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)
Nathaniel J. Smith [Wed, 17 May 2017 20:33:23 +0000 (13:33 -0700)]
bpo-30039: Don't run signal handlers while resuming a yield from stack (#1081)

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.

7 years agoFixes encodings in vcxproj files and adds script to automatically do it. (#1631)
Steve Dower [Wed, 17 May 2017 20:06:39 +0000 (13:06 -0700)]
Fixes encodings in vcxproj files and adds script to automatically do it. (#1631)

7 years agoAdds lib.pyproj file to solution (#1633)
Steve Dower [Wed, 17 May 2017 20:06:11 +0000 (13:06 -0700)]
Adds lib.pyproj file to solution (#1633)

* Adds lib.pyproj file to solution so that VS with Python support can open all the files in the standard library.

* Remove unexpected solution configuration.

* Remove lib.pyproj from solution to avoid memory issues on VS 2015.

7 years agobpo-30149: Fix partialmethod without explicit self parameter (#1308)
Dong-hee Na [Wed, 17 May 2017 19:00:51 +0000 (04:00 +0900)]
bpo-30149: Fix partialmethod without explicit self parameter (#1308)

7 years agobpo-30387: Fix warning in test_threading (#1634)
Victor Stinner [Wed, 17 May 2017 18:58:50 +0000 (11:58 -0700)]
bpo-30387: Fix warning in test_threading (#1634)

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.

7 years agobpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)
Xiang Zhang [Wed, 17 May 2017 13:04:00 +0000 (21:04 +0800)]
bpo-30301: Fix AttributeError when using SimpleQueue.empty() (#1601)

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

7 years agobpo-30211: bdb: add docstrings (#1350)
csabella [Tue, 16 May 2017 22:28:02 +0000 (18:28 -0400)]
bpo-30211: bdb: add docstrings (#1350)

7 years agobpo-30038: fix race condition in signal delivery + wakeup fd (#1082)
Nathaniel J. Smith [Tue, 16 May 2017 21:12:11 +0000 (14:12 -0700)]
bpo-30038: fix race condition in signal delivery + wakeup fd (#1082)

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

7 years agobpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612)
Mariatta [Tue, 16 May 2017 20:48:25 +0000 (13:48 -0700)]
bpo-30380: Pin the version of Sphinx used to build the documentation (GH-1612)

7 years agobpo-30380: Fix Sphinx 1.6.1 warnings. (#1613)
Serhiy Storchaka [Tue, 16 May 2017 20:18:09 +0000 (23:18 +0300)]
bpo-30380: Fix Sphinx 1.6.1 warnings. (#1613)

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

7 years agoFix ModuleNotFoundError typo in import reference (#1606)
Dominik Miedziński [Tue, 16 May 2017 16:40:17 +0000 (18:40 +0200)]
Fix ModuleNotFoundError typo in import reference (#1606)

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

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.

7 years agobpo-29898: Fix incorrect env variable name (GH-1576)
Berker Peksag [Tue, 16 May 2017 09:36:45 +0000 (12:36 +0300)]
bpo-29898: Fix incorrect env variable name (GH-1576)

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

7 years agoRemove unused variable in test_urllibnet. (#1598)
Senthil Kumaran [Tue, 16 May 2017 06:08:07 +0000 (23:08 -0700)]
Remove unused variable in test_urllibnet. (#1598)

7 years ago bpo-29651 - Cover edge case of square brackets in urllib docs (#1128)
Howie Benefiel [Tue, 16 May 2017 04:48:16 +0000 (23:48 -0500)]
 bpo-29651 - Cover edge case of square brackets in urllib docs (#1128)

7 years agobpo-30339: test_multiprocessing_main_handling timeout (#1593)
Victor Stinner [Mon, 15 May 2017 16:14:42 +0000 (18:14 +0200)]
bpo-30339: test_multiprocessing_main_handling timeout (#1593)

test_multiprocessing_main_handling: increase the test_source timeout
from 10 seconds to 60 seconds, since the test fails randomly on busy
buildbots.

7 years agobpo-30357: test_thread now uses threading_cleanup() (#1592)
Victor Stinner [Mon, 15 May 2017 15:55:32 +0000 (17:55 +0200)]
bpo-30357: test_thread now uses threading_cleanup() (#1592)

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>
7 years agobpo-30329: Catch Windows error 10022 on shutdown() (#1538)
Victor Stinner [Mon, 15 May 2017 15:33:45 +0000 (17:33 +0200)]
bpo-30329: Catch Windows error 10022 on shutdown() (#1538)

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.

7 years agobpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)
Serhiy Storchaka [Mon, 15 May 2017 10:21:31 +0000 (13:21 +0300)]
bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488)

in the plistlib module.  Dict values in the result of functions
readPlist() and readPlistFromBytes() are now exact dicts.

7 years agobpo-9850: Document macpath deprecation in Misc/NEWS (#1590)
Victor Stinner [Mon, 15 May 2017 09:39:10 +0000 (11:39 +0200)]
bpo-9850: Document macpath deprecation in Misc/NEWS (#1590)

7 years agobpo-9850: Deprecate the macpath module (#1540)
Victor Stinner [Mon, 15 May 2017 09:01:21 +0000 (11:01 +0200)]
bpo-9850: Deprecate the macpath module (#1540)

Co-Authored-By: Chi Hsuan Yen <yan12125@gmail.com>.
7 years agobpo-30242: resolve some undefined behaviours in struct (#1418)
Xiang Zhang [Mon, 15 May 2017 04:04:26 +0000 (12:04 +0800)]
bpo-30242: resolve some undefined behaviours in struct (#1418)

7 years agobpo-30110: fix resource leak in test_asyncio.test_events (#1413)
Xiang Zhang [Mon, 15 May 2017 03:56:40 +0000 (11:56 +0800)]
bpo-30110: fix resource leak in test_asyncio.test_events (#1413)

7 years agobpo-30224: remove outdated checks in struct (#1374)
Xiang Zhang [Mon, 15 May 2017 03:53:51 +0000 (11:53 +0800)]
bpo-30224: remove outdated checks in struct (#1374)

7 years agobpo-30354: Update data model documentation for super() (GH-1561)
csabella [Mon, 15 May 2017 03:42:00 +0000 (20:42 -0700)]
bpo-30354: Update data model documentation for super() (GH-1561)

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.

7 years agobpo-29763: Clean up _pth tests (GH-954)
Zachary Ware [Sun, 14 May 2017 20:49:46 +0000 (15:49 -0500)]
bpo-29763: Clean up _pth tests (GH-954)

7 years agobpo-30358: Document sort argument of profile.runctx() (GH-1566)
csabella [Sun, 14 May 2017 07:02:38 +0000 (03:02 -0400)]
bpo-30358: Document sort argument of profile.runctx() (GH-1566)

7 years agobpo-30299: Display a bytecode when compile a regex in debug mode. (#1491)
Serhiy Storchaka [Sun, 14 May 2017 06:05:13 +0000 (09:05 +0300)]
bpo-30299: Display a bytecode when compile a regex in debug mode. (#1491)

`re.compile(..., re.DEBUG)` now displays the compiled bytecode in
human readable form.

7 years agobpo-30340: Enhanced regular expressions optimization. (#1542)
Serhiy Storchaka [Sun, 14 May 2017 05:32:33 +0000 (08:32 +0300)]
bpo-30340: Enhanced regular expressions optimization. (#1542)

This increased the performance of matching some patterns up to 25 times.

7 years agoMove Codecov's configuration file under .github (GH-1494)
morrme [Sat, 13 May 2017 20:34:06 +0000 (15:34 -0500)]
Move Codecov's configuration file under .github (GH-1494)

7 years agobpo-30178: Add Jim Fasarakis-Hilliard to Misc/ACKS (GH-1572)
Mariatta [Sat, 13 May 2017 16:59:08 +0000 (09:59 -0700)]
bpo-30178: Add Jim Fasarakis-Hilliard to Misc/ACKS (GH-1572)

7 years agobpo-30178: Indent methods and attributes of MimeType class (GH-1306)
Jim Fasarakis-Hilliard [Sat, 13 May 2017 16:34:27 +0000 (19:34 +0300)]
bpo-30178: Indent methods and attributes of MimeType class (GH-1306)

7 years agobpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506)
Serhiy Storchaka [Sat, 13 May 2017 09:40:52 +0000 (12:40 +0300)]
bpo-28974: `object.__format__(x, '')` is now equivalent to `str(x)` (#506)

rather than `format(str(self), '')`.

7 years agobpo-30341: Improve _PyTrash_thread_destroy_chain() a little bit (#1545)
Xiang Zhang [Sat, 13 May 2017 05:36:14 +0000 (13:36 +0800)]
bpo-30341: Improve _PyTrash_thread_destroy_chain() a little bit (#1545)

* add a comment about why we need to increase trash_delete_nesting
* move increase and decrese outside of the loop

7 years agoPCbuild/build.bat: Add note about using msbuild response file. (#1551)
Charles [Fri, 12 May 2017 23:23:15 +0000 (06:23 +0700)]
PCbuild/build.bat: Add note about using msbuild response file. (#1551)

Using a response file will eliminate the headache associated with batch argument/quote processing.

For example I unsucessfully compiled python with visualcpptools when specifying VSInstallDir in the batch file (cannot find vcruntime.h)

```batch
build.bat -p x64 -e -M --no-tkinter  "/p:VCInstallDir=%VCInstallDir%"
```

but it build successfully when specifying it in a response file

msbuild.rsp:
```
/p:VCInstallDir=%VCInstallDir%
```

7 years agobpo-30291 Changes to launcher so as to allow py -3-32, -2.7-64, 3.10, etc.
Steve (Gadget) Barnes [Fri, 12 May 2017 23:21:26 +0000 (00:21 +0100)]
bpo-30291 Changes to launcher so as to allow py -3-32, -2.7-64, 3.10, etc.

bpo-30291 Changes to launcher so as to allow py -3-32, -2.7-64, 3.10, etc.

7 years agoIndented Handler sections for improved clarity. (#1554)
Vinay Sajip [Fri, 12 May 2017 08:38:13 +0000 (09:38 +0100)]
Indented Handler sections for improved clarity. (#1554)

Indented parts of the Handler class documentation for improved presentation, analogous to a recent similar change for the Logger class.

7 years agoComment as to why docs are built against Python 3.6 (#1550)
Brett Cannon [Thu, 11 May 2017 17:45:34 +0000 (10:45 -0700)]
Comment as to why docs are built against Python 3.6 (#1550)

7 years agobpo-30308: Code coverage for argument in random.shuffle (#1504)
csabella [Thu, 11 May 2017 15:19:35 +0000 (11:19 -0400)]
bpo-30308: Code coverage for argument in random.shuffle (#1504)

* bpo-30308: Code coverage for argument in random.shuffle

* bpo-30308: Code coverage for argument in random.shuffle

* bpo-30308: Code coverage for argument in random.shuffle

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

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

7 years ago#30190: fix invalid escape sequence warnings (#1534)
Giampaolo Rodola [Wed, 10 May 2017 18:13:20 +0000 (20:13 +0200)]
#30190: fix invalid escape sequence warnings (#1534)

7 years agobpo-28787: Fix out of tree --with-dtrace builds (#135)
stratakis [Wed, 10 May 2017 15:08:15 +0000 (17:08 +0200)]
bpo-28787: Fix out of tree --with-dtrace builds (#135)

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

* Unsilence directory creation

* Add Misc/NEWS and Misc/ACKS entries

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

7 years agobpo-30298: Weaken the condition of deprecation warnings for inline modifiers. (#1490)
Serhiy Storchaka [Wed, 10 May 2017 03:05:20 +0000 (06:05 +0300)]
bpo-30298: Weaken the condition of deprecation warnings for inline modifiers. (#1490)

Now allowed several subsequential inline modifiers at the start of the
pattern (e.g. '(?i)(?s)...').  In verbose mode whitespaces and comments
now are allowed before and between inline modifiers (e.g.
'(?x) (?i) (?s)...').

7 years agobpo-30320: test_eintr now uses pthread_sigmask() (#1523)
Victor Stinner [Wed, 10 May 2017 00:37:42 +0000 (02:37 +0200)]
bpo-30320: test_eintr now uses pthread_sigmask() (#1523)

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

7 years agoPCbuild/build.bat: pass command line parameters when building PGO (#1510)
Charles [Tue, 9 May 2017 21:58:48 +0000 (04:58 +0700)]
PCbuild/build.bat: pass command line parameters when building PGO (#1510)

Custom msbuild properties passed as command line need to be passed too when calling `Build` when doing PGO build.

7 years agobpo-30285: Optimize case-insensitive matching and searching (#1482)
Serhiy Storchaka [Tue, 9 May 2017 20:37:14 +0000 (23:37 +0300)]
bpo-30285: Optimize case-insensitive matching and searching (#1482)

of regular expressions.

7 years agobpo-30024: Circular imports involving absolute imports with binding (#1264)
Serhiy Storchaka [Tue, 9 May 2017 19:31:05 +0000 (22:31 +0300)]
bpo-30024: Circular imports involving absolute imports with binding (#1264)

a submodule to a name are now supported.

7 years agobpo-30273: update distutils.sysconfig for venv's created from Python (#1515)
Jeremy Kloth [Tue, 9 May 2017 15:24:13 +0000 (09:24 -0600)]
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515)

compiled out-of-tree (builddir != srcdir). (see also bpo-15366)

7 years agobpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)
Victor Stinner [Tue, 9 May 2017 09:34:01 +0000 (11:34 +0200)]
bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479)

If the child process exited with a non-zero code, don't strip the
last line of stdout anymore.

Add also a sanity check in accumulate_result().

7 years agobpo-29990: Fix range checking in GB18030 decoder (#1495)
Xiang Zhang [Tue, 9 May 2017 03:38:32 +0000 (11:38 +0800)]
bpo-29990: Fix range checking in GB18030 decoder (#1495)

When decoding a 4-byte GB18030 sequence, the first and third byte cannot exceed 0xFE.