Commit Graph

41150 Commits

Author SHA1 Message Date
Victor Stinner 4dc3b9cf2a bpo-30175: Skip client cert tests of test_imaplib (#1320) (#1323)
* bpo-30175: Skip client cert tests of test_imaplib

The IMAP server cyrus.andrew.cmu.edu doesn't accept our randomly
generated client x509 certificate anymore.

* bpo-30188: Catch EOFError in NetworkedNNTPTests

test_nntplib fails randomly with EOFError in
NetworkedNNTPTests.setUpClass(). Catch EOFError to skip tests in that
case.

(cherry picked from commit 5bccca58b9)
2017-04-27 18:25:03 +02:00
Mariatta a3d8dda7d8 bpo-30098: Clarify that run_coroutine_threadsafe expects asyncio.Future (GH-1170) (#1247)
(cherry picked from commit ae5b3260dd)
2017-04-21 19:58:28 -07:00
Victor Stinner 3a8f8ea2ac bpo-30125: Fix faulthandler.disable() on Windows (#1243)
On Windows, faulthandler.disable() now removes the exception handler
installed by faulthandler.enable().
2017-04-21 23:17:33 +02:00
Victor Stinner b984a05d55 bpo-30107: don't dump core on expected test_io crash (#1235) (#1241)
test_io has two unit tests which trigger a deadlock:

* test_daemon_threads_shutdown_stdout_deadlock()
* test_daemon_threads_shutdown_stderr_deadlock()

These tests call Py_FatalError() if the expected bug is triggered
which calls abort(). Use test.support.SuppressCrashReport to prevent
the creation on a core dump, to fix the warning:

Warning -- files was modified by test_io
  Before: []
  After:  ['python.core']
(cherry picked from commit 2a1aed04b0)
2017-04-21 18:27:29 +02:00
Mariatta 430020500c [3.6] bpo-30109: Fix reindent.py (GH-1207) (GH-1208)
Skip the file if it has bad encoding.
(cherry picked from commit 58f3c9dc8f)
2017-04-20 07:12:37 -07:00
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
Berker Peksag 596e714d79 bpo-30078: Add an example of passing a path to unittest (GH-1178)
(cherry picked from commit f7e62cf8ad)
2017-04-20 07:36:57 +03:00
Serhiy Storchaka e254617262 [3.6] bpo-30065: Fixed arguments validation in _posixsubprocess.fork_exec(). (GH-1110) (#1186)
(cherry picked from commit 66bffd1)
2017-04-19 23:59:02 +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
Jack McCracken 7ac96ec60e Fix misplaced positional argument in OS X support library (#1137) 2017-04-14 17:44:34 +03:00
Antoine Pitrou 413a8913ae Relax test timing (bpo-29861) to avoid sporadic failures (#1120) (#1132)
(cherry picked from commit 685cdb9acc)
2017-04-14 13:37:46 +02: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 2cdf087d1f [3.6] bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-1119) (GH-1122)
* Allow underscores in numeric literals in lib2to3.
* Stricter literal parsing for Python 3.6 in lib2to3.pgen2.tokenize.
* Add test case for underscores in literals in Python 3.
(cherry picked from commit a6e395dffa)
2017-04-13 16:54:49 -07:00
Mariatta 84c2d75489 Revert "bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752)" (GH-1109)
This reverts commit 97a40b7a5b.
The commit is supposed to go to the master branch first.
2017-04-13 04:03:16 -07:00
Nevada Sanchez 97a40b7a5b bpo-29869: Allow underscores in numeric literals in lib2to3. (GH-752) 2017-04-13 03:21:05 -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
Mariatta bd1173f202 [3.6] Clarify exception handler scope in contextlib (GH-1103)
Moved explicit raise from inside try to try...else.
(cherry picked from commit 680e20beee)
2017-04-12 20:52:39 -07:00
Mariatta bc9025012f [3.6] Remove superfluous comment in urllib.error. (GH-1076) (GH-1101)
(cherry picked from commit 6fab78e902)
2017-04-12 20:45:54 -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
Senthil Kumaran 03066a05f5 Remove OSError related comment in urllib.request. (#1072)
(cherry picked from commit 6dfcc81f6b)
2017-04-09 20:37:44 -07:00
Senthil Kumaran 854ca174a9 Remove invalid comment in urllib.request. (#1055)
(cherry picked from commit a2a9ddd923)
2017-04-09 10:15:06 -07: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
Senthil Kumaran 19d61b265f Remove Invalid comment in test_urllib2.py. (#1022)
(cherry picked from commit fd0cd07a5a)
2017-04-07 00:56:59 -07:00
Senthil Kumaran ed278448da correct parse_qs and parse_qsl test case descriptions. (#968) (#997)
(cherry picked from commit 257b980b31)
2017-04-06 08:38:38 -07:00
Senthil Kumaran c4e557ed99 Minor spell fix and formatting fixes in urllib tests. (#959) (#961)
(cherry picked from commit efbd4ea65d)
2017-04-02 01:36:58 -07:00
Senthil Kumaran 4415b823a0 Add helpful explaination to test_password_manager tests. (#936) (#941)
Also uncomment and fix a path test.
(cherry picked from commit 1f5425ff69)
2017-04-01 19:57:04 -07: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
Senthil Kumaran 8d1f935945 Remove catching OSError in ftphandler test. Only URLError is raised in urllib.request module. (#918) (#920)
(cherry picked from commit ed3dd1c02a)
2017-03-30 23:15:51 -07: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 a6b4e19022 bpo-27863: Fixed multiple crashes in ElementTree. (#765) (#903)
(cherry picked from commit 576def096e)
2017-03-30 18:08:21 +03:00
Senthil Kumaran 1b43a959fb Remove an unrequired TODO in test_urllib2. (#897) (#900)
(cherry picked from commit e6911a44f6)
2017-03-29 23:56:52 -07: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
Zachary Ware bc2031470e Minor test cleanup (GH-837) (GH-838)
* Remove unused test file

* Remove duplicated text in sndhdrdata README

(cherry picked from commit b8a7daf077)
2017-03-27 00:35:56 -05:00
Mariatta d2fc782410 import sys before we use it on line 9 (GH-828) (GH-833)
(cherry picked from commit 0579e81f30)
2017-03-26 19:53:37 -07:00
Mariatta 8b82236952 bpo-29862: Fix grammar in importlib.reload() exception (GH-809) (GH-811)
(cherry picked from commit 9f0aa4843f)
2017-03-25 03:41:59 -07: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
Xiang Zhang 72c51136c6 fix function name in tabnanny documentation (GH-762) 2017-03-22 15:26:53 +08: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 da88596a19 bpo-29845: Mark tests that use _testcapi as CPython-only (#711) (#725)
(cherry picked from commit 24c738a9e9)
2017-03-19 20:53:42 +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
Vinay Sajip 46e81d3345 bpo-29808: Do not fail in SysLogHandler constructor if syslog isn't available. (#696)
bpo-29808: SysLogHandler: Do not fail if initial connect to syslog failed.

(cherry picked from commit 1b038e0738)
2017-03-17 19:52:56 +00:00
Berker Peksag 948171bf99 bpo-16355: Clarify when inspect.getcomments() returns None (#428) (#690)
Initial patch by Vajrasky Kok.

(cherry picked from commit 3f2155ffe6)
2017-03-17 14:59:16 +03:00
Mariatta 4ac01f0ff3 update test_socket AEAD test for kernel 4.9 and up (GH-133) (GH-548)
(cherry picked from commit 9764c151c5)
2017-03-16 20:58:42 -07:00
Berker Peksag 0dfd18a1e1 Fix stderr bug in json.tool test (#346) (#676)
See https://github.com/python/cpython/pull/201#discussion_r103229425.(cherry picked from commit b4e9087e7b)
2017-03-16 16:22:35 +03:00
Berker Peksag 78add3309b Change assertRaises to assertRaisesRegex in test_xmlrpc (#481) (#674)
(cherry picked from commit c6b448b36d)
2017-03-15 14:12:53 +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