Commit Graph

19641 Commits

Author SHA1 Message Date
Dong-hee Na df5df13fdc [3.6] bpo-12414: Update code_sizeof() to take in account co_extra memory. (#1168) (#1198) 2017-04-20 11:26:25 +03:00
Serhiy Storchaka 39dedb6e1a [3.6] bpo-30070: Fixed leaks and crashes in errors handling in the parser module. (GH-1131). (#1184)
(cherry picked from commit a79f4c2195)
2017-04-19 23:22:19 +03:00
Serhiy Storchaka 680fea4067 bpo-30061: Check if PyObject_Size()/PySequence_Size()/PyMapping_Size() (#1096) (#1180)
raised an error.

(cherry picked from commit bf623ae884)
2017-04-19 21:22:49 +03:00
Serhiy Storchaka 8e5b52a8da bpo-30017: Allowed calling the close() method of the zip entry writer object (#1041) (#1092)
multiple times.  Writing to closed zip entry writer object now always produce
a ValueError.
(cherry picked from commit 4c0d9ea995)
2017-04-16 12:04:45 +03:00
Xiang Zhang d5fa5f3ce7 bpo-30068: add missing iter(self) in _io._IOBase.readlines when hint is present (#1130) (#1150) 2017-04-15 13:25:15 +08:00
Mariatta cbc46afa59 [3.6] bpo-29694: race condition in pathlib mkdir with flags parents=True (GH-1089). (GH-1126)
(cherry picked from commit 22a594a004)
2017-04-13 19:26:16 -07:00
Mariatta 9b409ff41c [3.6] bpo-29692: contextlib.contextmanager may incorrectly unchain RuntimeError (GH-949) (#1105)
contextlib._GeneratorContextManager.__exit__ includes a special case to deal with
PEP 479 RuntimeErrors created when `StopIteration` is thrown into the context
manager body.

Previously this check was too permissive, and undid one level of chaining on *all*
RuntimeError instances, not just those that wrapped a StopIteration instance.
(cherry picked from commit 00c75e9a45)
2017-04-13 02:50:21 -07:00
Xiang Zhang 14944c6230 bpo-26985: Add missing info of code object in inspect documentation (GH-1090) (GH-1099) 2017-04-13 11:14:17 +08:00
Nick Coghlan a524d63072 bpo-29506: Clarify deep copy note in copy module
The reference to administrative data was confusing to readers,
so this simplifies the note to explain that deep copying may copy
more then you intended, such as data that you expected to be
shared between copies.
(cherry picked from commit 19e0494256)
2017-04-09 20:57:04 +10:00
Serhiy Storchaka af685f9050 bpo-29998: Pickling and copying ImportError now preserves name and path (#1010) (#1042)
attributes.
(cherry picked from commit b785396ab4)
2017-04-08 11:25:47 +03:00
Serhiy Storchaka ba980e8ef0 Miscellaneous minor fixes of Misc/NEWS formatting. (#1002) (#1003)
(cherry picked from commit a0157b5f11)
2017-04-05 13:18:18 +03:00
cocoatomo d184c20e35 Keep the c-api exception doc up-to-date (#966)
cherry-pick'ed from ec1f5df..e3d6db3
2017-04-03 19:26:32 +03:00
INADA Naoki efde51ad54 bpo-29949: Fix set memory usage regression (GH-945)
Revert "Minor factoring:  move redundant resize scaling logic into the resize function."

This reverts commit 4897300276.
(cherry picked from commit e82cf8675b)
2017-04-01 23:29:31 +09:00
Serhiy Storchaka 7d5d13d8d0 bpo-29953: Fix memory leaks in the replace() method of datetime and t… (#933)
objects when pass out of bound fold argument.
(cherry picked from commit 314d6fca36)
2017-03-31 23:23:49 +03:00
T. Wouters 599bb18103 bpo-29942: Fix the use of recursion in itertools.chain.from_iterable. (#911)
* bpo-29942: Fix the use of recursion in itertools.chain.from_iterable.

Fix the use of recursion in itertools.chain.from_iterable. Using recursion
is unnecessary, and can easily cause stack overflows, especially when
building in low optimization modes or with Py_DEBUG enabled.
(cherry picked from commit 5466d4af5f)
2017-03-30 12:48:23 -07:00
Serhiy Storchaka bf4bb2e430 bpo-29935: Fixed error messages in the index() method of tuple, list and deque (#887) (#907)
when pass indices of wrong type.
(cherry picked from commit d4edfc9abf)
2017-03-30 19:46:59 +03:00
Serhiy Storchaka a6b4e19022 bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903)
(cherry picked from commit 576def096e)
2017-03-30 18:08:21 +03:00
Xiang Zhang 346dcd65e6 bpo-28699: fix abnormal behaviour of pools in multiprocessing.pool (GH-882)
an exception raised at the very first of an iterable would cause pools behave abnormally
(swallow the exception or hang)
2017-03-29 12:50:28 +08:00
INADA Naoki f01de61a8e bpo-29643: Fix check for --enable-optimizations (GH-869)
The presence of the ``--enable-optimizations`` flag is indicated by the
value of ``$enableval``, but the configure script was checking ``$withval``,
resulting in the ``--enable-optimizations`` flag being effectively ignored.
(cherry picked from commit 8cea5929f5)
2017-03-29 00:25:26 +09:00
Serhiy Storchaka 8c8785b2f8 bpo-25803: Avoid incorrect errors raised by Path.mkdir(exist_ok=True)… (#806)
when the OS gives priority to errors such as EACCES over EEXIST.

(cherry picked from commit af7b9ec5c8)
2017-03-24 21:46:25 +02:00
Antoine Pitrou cc3331fec8 bpo-29861: release references to multiprocessing Pool tasks (#743) (#800)
* bpo-29861: release references to multiprocessing Pool tasks (#743)

* bpo-29861: release references to multiprocessing Pool tasks

Release references to tasks, their arguments and their results as soon
as they are finished, instead of keeping them alive until another task
arrives.

* Comments in test

(cherry picked from commit 8988945cdc)

* Fix Misc/NEWS (hopefully)
2017-03-24 14:45:34 +01:00
Christophe Zeitouny 90eafdb154 faulthandler: Restore the old sigaltstack during teardown (GH-777) (GH-797)
(cherry picked from commit 20fbf8accd)
2017-03-24 04:20:40 -07:00
Ned Deily f93b994892 Merge branch '3.6.1' of github.com:ned-deily/cpython into 3.6 2017-03-21 21:03:20 -04:00
Ned Deily 1688e64925 Bump to 3.6.2rc1 development. 2017-03-21 20:39:58 -04:00
Ned Deily 677df6ecad Revert and fix Misc/NEWS after merge error in fca705d533. (#755) 2017-03-21 20:21:49 -04:00
INADA Naoki fe30339534 bpo-29859: Fix error messages from return codes for pthread_* calls (GH-753)
(cherry picked from commit d7fa6b259e)
2017-03-22 03:46:26 +09:00
Ned Deily 69c0db5050 Update docs and patchlevel for 3.6.1 final 2017-03-21 02:32:38 -04:00
Nick Coghlan 75345c552d [3.6] bpo-29723: Consistently configure sys.path[0] (#636)
Directory and zipfile execution previously added
the parent directory of the directory or zipfile
as sys.path[0] and then subsequently overwrote
it with the directory or zipfile itself.

This caused problems in isolated mode, as it
overwrote the "stdlib as a zip archive" entry
in sys.path, as the parent directory was
never added.

The attempted fix to that issue in bpo-29319
created the opposite problem in *non*-isolated
mode, by potentially leaving the parent
directory on sys.path instead of overwriting it.

This change fixes the root cause of the problem
by removing the whole "add-and-overwrite" dance
for sys.path[0], and instead simply never adds
the parent directory to sys.path in the first
place.
(cherry picked from commit d2977a3ae2)

(cherry picked from commit c60948464f)
2017-03-21 01:55:11 -04:00
Serhiy Storchaka 6fad4090ec bpo-28876: bool of large range raises OverflowError (#699) (#734)
(cherry picked from commit e46fb86118)
2017-03-20 09:13:47 +02:00
Serhiy Storchaka fca705d533 bpo-25455: Fixed crashes in repr of recursive buffered file-like objects. (#514) (#722)
(cherry picked from commit a5af6e1af7)
2017-03-19 20:27:16 +02:00
Berker Peksag 02c6fa573a Delete duplicate entry in Misc/NEWS (#673)
It has already been added in the build section.
2017-03-15 14:12:22 +03:00
Michael Seifert 53b2667dcf bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) (#671) 2017-03-15 09:42:02 +02:00
Xiang Zhang faa2cc63e4 bpo-28856: Let %b format for bytes support objects that follow the buffer protocol (GH-664) 2017-03-14 15:27:01 +08:00
Yury Selivanov 99f8d33a94 bpo-29742: asyncio get_extra_info() throws exception (#525) (#645) 2017-03-12 17:06:16 -04:00
Yury Selivanov fa448de97d Fix wrapping into StopIteration of return values in generators and coroutines (#644) (#647) 2017-03-12 17:04:06 -04:00
Serhiy Storchaka aac875fa2f [3.6] bpo-8256: Fixed possible failing or crashing input() (#641)
if attributes "encoding" or "errors" of sys.stdin or sys.stdout are not set or are not strings.
2017-03-12 21:52:17 +02:00
Nick Coghlan c60948464f [3.6] bpo-29723: Consistently configure sys.path[0] (#636)
Directory and zipfile execution previously added
the parent directory of the directory or zipfile
as sys.path[0] and then subsequently overwrote
it with the directory or zipfile itself.

This caused problems in isolated mode, as it
overwrote the "stdlib as a zip archive" entry
in sys.path, as the parent directory was
never added.

The attempted fix to that issue in bpo-29319
created the opposite problem in *non*-isolated
mode, by potentially leaving the parent
directory on sys.path instead of overwriting it.

This change fixes the root cause of the problem
by removing the whole "add-and-overwrite" dance
for sys.path[0], and instead simply never adds
the parent directory to sys.path in the first
place.
(cherry picked from commit d2977a3ae2)
2017-03-12 21:34:22 +10:00
orenmn 26d013e00f [3.6] bpo-28298: make array 'Q', 'L' and 'I' accept big intables as elements (#579) 2017-03-09 16:06:47 +02:00
Serhiy Storchaka eb65edd102 [3.6] bpo-28231: The zipfile module now accepts path-like objects for external paths. (#561)
(cherry picked from commit 8606e9524a)
2017-03-08 15:45:43 +02:00
Benjamin Peterson 6a4b04cd33 Revert "bpo-29571: Use correct locale encoding in test_re (#149)" (#554) (#555)
This reverts commit ace5c0fdd9.
2017-03-07 23:56:59 -08:00
Xiang Zhang 78ad039bcf bpo-26915: Test identity first in index() and count() of collections.abc.Sequence (GH-553) 2017-03-08 11:43:35 +08:00
Xiang Zhang df6d7b406f [3.6] bpo-29714: Fix a regression that bytes format may fail when containing zero bytes inside. (GH-504) 2017-03-06 18:17:10 +08:00
Petr Motejlek 3405792b02 bpo-29615: backport to 3.6 (#478) 2017-03-05 18:14:06 +02:00
Ned Deily 38136e2a58 Bump to v3.6.1rc1+. 2017-03-05 05:33:38 -05:00
Ned Deily e0fbe5feee Update docs and patchlevel for 3.6.1rc1. 2017-03-04 12:25:04 -05:00
Ned Deily 1d391f926b [3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463)
Skip some tests of select.poll when running on macOS due to unresolved
issues with the underlying system poll function on some macOS versions.

(cherry picked from commit de04644627)
2017-03-04 06:19:05 -05:00
Ned Deily 95c50e5aed [3.6] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454)
* 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)
2017-03-04 01:05:06 -05:00
Zachary Ware 03f7cb0604 bpo-29572: Update Windows build to OpenSSL 1.0.2k (GH-442) 2017-03-03 16:07:25 -06:00
Berker Peksag 21ce65aa67 [3.6] bpo-29623: Make PathLike objects work with ConfigParser.read() (#242) (#432)
(cherry picked from commit 85b8d01c91)

Conflicts:

	Lib/test/test_configparser.py
2017-03-03 20:48:37 +03:00
Yury Selivanov 2adc668481 Restore NEWS file after incorrect git automerge 2017-03-03 01:08:10 -05:00