Commit graph

38945 commits

Author SHA1 Message Date
Yury Selivanov
db522dc862 bpo-29742: asyncio get_extra_info() throws exception (#525) (#646) 2017-03-12 17:06:04 -04:00
Yury Selivanov
216803d8e1 Fix wrapping into StopIteration of return values in generators and coroutines (#644) (#648) 2017-03-12 17:03:46 -04:00
orenmn
e2c88bdd6b bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements 2017-03-09 21:29:22 +02:00
Serhiy Storchaka
5fad493dc6 [3.5] bpo-29773: Add more cases for testing string to float conversion errors. (#587)
(cherry picked from commit 9e6ac83aca)
2017-03-09 21:02:15 +02:00
Benjamin Peterson
312f7dfb7c Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) (#556)
This reverts commit ace5c0fdd9.
2017-03-07 23:56:52 -08:00
Nick Coghlan
93602e3af7 [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169)
bpo-27286 fixed a problem where BUILD_MAP_UNPACK_WITH_CALL could
be emitted with an incorrect oparg value, causing the eval loop
to access the wrong stack entry when attempting to read the
function name.

The associated magic number change caused significant problems when
attempting to upgrade to 3.5.3 for anyone that relies on pre-cached
bytecode remaining valid across maintenance releases.

This patch restores the ability to import legacy bytecode generated
by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.

Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
and tests and integration by Nick Coghlan.
2017-03-08 16:41:01 +10:00
Ivan Levkivskyi
997cc69a68 Backport fix for spurious refleak failures (#482) 2017-03-05 21:19:42 +02:00
Petr Motejlek
c6e199f2e9 bpo-29615: backport to 3.5 (#479) 2017-03-05 18:14:26 +02:00
Ned Deily
a2edd3ae40 [3.5] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) (#455)
* bpo-27593: Get SCM build info from git instead of hg. (#446)

sys.version and the platform module python_build(),
python_branch(), and python_revision() functions now use
git information rather than hg when building from a repo.

Based on original patches by Brett Cannon and Steve Dower.
(cherry picked from commit 5c4b0d063a)

(cherry picked from commit 95c50e5aed)
2017-03-04 01:34:19 -05:00
Seth M. Larson
f7f024a721 bpo-29704: Fix asyncio.SubprocessStreamProtocol closing (#405) 2017-03-03 12:23:44 -05:00
Berker Peksag
d0620bcd4e Add Python version since deprecation in base64 methods. (#33) (#430)
Allow developers to not have to either test on N Python versions or
looked through multiple versions of the docs to know whether they can
easily update.

(cherry picked from commit c643a967dd)
2017-03-03 18:07:01 +03:00
Mariatta
0ad7b628ed getpass: update docstrings (GH-49) (GH-420)
(cherry picked from commit baf7bb30a0)
2017-03-02 21:56:28 -08:00
Yury Selivanov
80fbacc936 asyncio: Optimize _get_running_loop() to call getpid() only when there's a loop 2017-03-03 00:00:57 -05:00
Yury Selivanov
8b73b6198b bpo-29703: asyncio: Fix creating new event loops in child processes. (#411) 2017-03-02 21:40:57 -05:00
Martijn Pieters
bc144f0abf bpo-28598: Support __rmod__ for RHS subclasses of str in % string formatting operations (#94) 2017-02-27 19:07:27 +03:00
Xiang Zhang
8400ae209b bpo-29376: Fix assertion error in threading._DummyThread.is_alive() (GH-329) 2017-02-27 11:46:37 +08:00
INADA Naoki
b7fb1e25c8 bpo-29110: Fix file object leak in aifc.open (GH-311)
(cherry picked from commit 03f68b6) (GH-162)
(cherry picked from commit 5dc33ee) (GH-293)
2017-02-27 04:35:00 +09:00
Berker Peksag
6b585fddc9 Fix unittest.mock._Call: don't ignore name (#307)
Issue #28961: Fix unittest.mock._Call helper: don't ignore the name parameter
anymore.

Patch written by Jiajun Huang.

(cherry picked from commits 84b6fb0eea
and dea1536fd3)

Conflicts:

	Misc/NEWS
2017-02-26 16:06:11 +03:00
Mariatta
bc33cd4e7a [3.5] bpo-28556: Update to typing: treat subscripted generics as proxies (GH-265) (GH-269)
(cherry picked from commit abb3b8ad94)
(cherry picked from commit 365cb5bb90)
2017-02-24 16:41:19 -08:00
Arne de Laat
fa30453568 bpo-28911: Clarify the behaviour of assert_called_once_with. (#254)
(cherry picked from commit 9d56b34af2)
2017-02-23 17:16:56 +01:00
Serhiy Storchaka
5010a77a4d [3.5] bpo-29532: Altering a kwarg dictionary passed to functools.partial() no longer affects a partial object after creation. (#222) 2017-02-22 11:46:32 +02:00
Vinay Sajip
8fa7e22134 Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#221)
Fixed bpo-29565: Corrected ctypes passing of large structs by value.
(cherry picked from commit a86339b83f)
2017-02-22 06:19:55 +00:00
Berker Peksag
6336f0d156 bpo-29554: Improve docs for pstat module and profile. (#88) (#228)
Clarify that methods take a string which is interpreted as a regex,
not a regex object.

Also clarify what the old `-1`, `0`, `1` and `2` options were.

(cherry picked from commit 8fb1f6e039)
2017-02-22 04:55:03 +03:00
Mark Dickinson
0936a00fe0 bpo-29602: fix signed zero handling in complex constructor. (#203) (#205)
* Fix incorrect handling of signed zeros for complex-related classes.

* Add Misc/NEWS entry.

(cherry picked from commit 112ec38c15)
2017-02-20 21:50:49 +00:00
Senthil Kumaran
314a86bae2 Change some mercurial/ hg.python.org references. (#8) (#184)
(cherry picked from commit b2ee40ed9c)
2017-02-19 18:58:20 -08:00
Nick Coghlan
760f596b6a [3.5] bpo-29571: Use correct locale encoding in test_re (#149) (#154)
``local.getlocale(locale.LC_CTYPE)`` and
``locale.getpreferredencoding(False)`` may give different answers
in some cases (such as the ``en_IN`` locale).

``re.LOCALE`` uses the latter, so update the test case to match.
2017-02-19 10:03:50 +05:30
Mariatta
9c5684e0d3 bpo-28556: Various updates to typing (#28) (#78)
various updates from upstream python/typing repo:

- Added typing.Counter and typing.ChainMap generics
- More flexible typing.NamedTuple
- Improved generic ABC caching
- More tests
- Bugfixes
- Other updates

* Add Misc/NEWS entry

* Add issue number

Contributed by Ivan Levkivskyi @ilevkivskyi

(cherry picked from commit b692dc8475)
2017-02-13 14:28:58 -08:00
Berker Peksag
c6d2f49814 bpo-27122: Fix comment to point to correct issue number (#50)
It took me quite a bit to figure out what this was referring to,
since the given issue number is wrong, and the original commit
message I found through git blame lists a different, also wrong
issue number... see https://bugs.python.org/issue27122#msg279449

(cherry picked from commit af88e7eda4)
2017-02-12 19:18:00 +03:00
Łukasz Langa
9cd7e17640 Fix #29519: weakref spewing exceptions during interp finalization 2017-02-10 00:14:55 -08:00
Mariatta Wijaya
4e7ff8b1a3 Issue #29314: Set the stacklevel to two in asyncio.async() Deprecation Warning 2017-02-06 22:03:00 -08:00
Steve Dower
d3c4853b78 Issue #29416: Prevent infinite loop in pathlib.Path.mkdir 2017-02-04 14:54:56 -08:00
Serhiy Storchaka
7e10dbbd45 Issue #29444: Fixed out-of-bounds buffer access in the group() method of
the match object.  Based on patch by WGH.
2017-02-04 22:53:57 +02:00
Vinay Sajip
db38b6c9a9 Fixes #29213: regularised EOLs of venv scripts. 2017-02-02 19:25:24 +00:00
Vinay Sajip
db6322cb8a Fixes #24875: pip can now be installed in a venv with --system-site-packages. 2017-02-02 19:05:19 +00:00
Victor Stinner
a5917d1d15 Issue #29300: test_struct tests unpack_from() with keywords
Add an unit test on the _struct.Struct.unpack_from() method to test passing
arguments as keywords.
2017-02-02 14:18:18 +01:00
Vinay Sajip
3ac504289a Fixes #29308: Respect VIRTUAL_ENV_DISABLE_PROMPT in Activate.ps1. 2017-01-27 12:41:27 +00:00
Serhiy Storchaka
713640c4c9 Issue #29337: Fixed possible BytesWarning when compare the code objects.
Warnings could be emitted at compile time.
2017-01-24 20:49:26 +02:00
Martin Panter
b1b985da12 Issue #29273: Remove unneeded workaround to restore locale
The “readline” module already has a workaround using setlocale(LC_CTYPE,
NULL). The code in test___all__ calls getlocale(), which can subtly alter
the locale string and cause the test framework to complain.
2017-01-23 22:11:09 +00:00
Gregory P. Smith
1fa08bcbbb Skip the test requiring ctypes if ctypes is unavailable.
prevents http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/240/steps/test/logs/stdio
2017-01-22 22:19:38 -08:00
Gregory P. Smith
21d333b703 typo fix, extra '.' :) 2017-01-22 20:54:42 -08:00
Guido van Rossum
95919c096c Issue #28556: Allow defining methods in NamedTuple class syntax (#362) 2017-01-22 17:47:20 -08:00
Guido van Rossum
d7adfe129c Issue #28556: various style fixes for typing.py 2017-01-22 17:43:53 -08:00
Gregory P. Smith
50e16e33af Issue #29335: Fix subprocess.Popen.wait() when the child process has
exited to a stopped instead of terminated state (ex: when under ptrace).
2017-01-22 17:28:38 -08:00
Xiang Zhang
7fe28ad837 Issue #29290: argparse help messages won't wrap at non-breaking spaces. 2017-01-22 14:37:22 +08:00
Serhiy Storchaka
362f058a89 Issue #28735: Fixed the comparison of mock.MagickMock with mock.ANY. 2017-01-21 23:12:58 +02:00
Guido van Rossum
e9ed560fce Issue #29198: add AsyncGenerator (Jelle Zijlstra) 2017-01-18 13:10:31 -08:00
Guido van Rossum
3c268be885 Issue #28556: allow default values in class form of NamedTuple -- Jelle Zijlstra 2017-01-18 08:03:50 -08:00
Martin Panter
37f183d43d Issue #29274: tests cases → test cases 2017-01-18 12:06:38 +00:00
Guido van Rossum
83ec302e52 Issue #28556: merge 5 more typing changes from upstream (#340, #344, #348, #349, #350) 2017-01-17 20:43:28 -08:00
Raymond Hettinger
80490525e0 Issue #29011: Fix an important omission by adding Deque to the typing module. 2017-01-16 22:42:37 -08:00