Commit Graph

20858 Commits

Author SHA1 Message Date
Steve Dower f35bd306ff Merge from 3.5.0 branch. 2015-09-06 22:27:42 -07:00
Martin Panter 1b8be1fbe5 Issue #25004: Merge 3.5 into 3.6 2015-09-07 04:07:06 +00:00
Martin Panter da19767b86 Issue #25004: Merge 3.4 into 3.5 2015-09-07 04:04:40 +00:00
Martin Panter e8d58d1f02 Issue #25004: Handle out-of-disk-space error in LargeMmapTests
Patch from John Beck.
2015-09-07 02:57:47 +00:00
Steve Dower e5b5895b5b Issue #24917: time_strftime() buffer over-read. 2015-09-06 19:20:51 -07:00
Ezio Melotti 564cf7b62c #23144: merge with 3.5. 2015-09-06 21:49:48 +03:00
Ezio Melotti 20a2c6482e #23144: merge with 3.4. 2015-09-06 21:44:45 +03:00
Ezio Melotti 6f2bb98966 #23144: Make sure that HTMLParser.feed() returns all the data, even when convert_charrefs is True. 2015-09-06 21:38:06 +03:00
Alexander Belopolsky 7827a5b7c2 Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'. 2015-09-06 13:07:21 -04:00
Serhiy Storchaka 40dc328cc2 Fix, refactor and extend tests for shutil.make_archive(). 2015-09-06 18:34:22 +03:00
Serhiy Storchaka 2ba39800e5 Fix, refactor and extend tests for shutil.make_archive(). 2015-09-06 18:33:52 +03:00
Serhiy Storchaka 527ef0792f Fix, refactor and extend tests for shutil.make_archive(). 2015-09-06 18:33:19 +03:00
Serhiy Storchaka 8fecd42d26 Use support.change_cwd() in tests. 2015-09-06 14:15:40 +03:00
Serhiy Storchaka 5fbadb63ef Use support.change_cwd() in tests. 2015-09-06 14:14:49 +03:00
Serhiy Storchaka 2a23adf440 Use support.change_cwd() in tests. 2015-09-06 14:13:25 +03:00
Larry Hastings 714e49371b Issue #24305: Prevent import subsystem stack frames from being counted
by the warnings.warn(stacklevel=) parameter.
2015-09-06 00:39:37 -07:00
Larry Hastings 62b24624dd Backing out 09b62202d9b7; the tests fail on Linux, and it needs a re-think. 2015-09-06 00:31:02 -07:00
Steve Dower 643d6d3135 Issue #24917: Backed out changeset 09b62202d9b7 2015-09-05 23:12:18 -07:00
Steve Dower dcaf4ccf3f Issue #24917: Backed out changeset 09b62202d9b7 2015-09-05 23:11:53 -07:00
Steve Dower 74a7b8f027 Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch. 2015-09-05 21:00:33 -07:00
Steve Dower 237060abb4 Merge from 3.5.0 release branch 2015-09-05 20:59:20 -07:00
Larry Hastings 055a9e0bc8 Merged in ncoghlan/cpython350 (pull request #17) 2015-09-05 20:53:04 -07:00
Terry Jan Reedy 5f9525b115 Merge with 3.5 2015-09-05 19:17:49 -04:00
Terry Jan Reedy e989bf587c merge from 3.4 2015-09-05 19:17:24 -04:00
Terry Jan Reedy ca3f435fe6 Issue #16180: Exit pdb if file has syntax error, instead of trapping user
in an infinite loop.  Patch by Xavier de Gaye.
2015-09-05 19:13:26 -04:00
Guido van Rossum ba5f59089a Issue #24912: Prevent __class__ assignment to immutable built-in objects. (Merge 3.5 -> 3.6) 2015-09-05 15:20:57 -07:00
Guido van Rossum 37fdcbc4c3 Issue #24912: Prevent __class__ assignment to immutable built-in objects. (Merge 3.5.0 -> 3.5) 2015-09-05 15:20:08 -07:00
Steve Dower 373602fa3f Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch. 2015-09-05 12:16:06 -07:00
Nick Coghlan 9d3c61c86a Close #24748: Restore imp.load_dynamic compatibility
To resolve a compatibility problem found with py2exe and
pywin32, imp.load_dynamic() once again ignores previously loaded modules
to support Python modules replacing themselves with extension modules.

Patch by Petr Viktorin.
2015-09-05 21:05:05 +10:00
Victor Stinner 8820a350d7 Issue #23517: Skip a datetime test on Windows
The test calls gmtime(-1)/localtime(-1) which is not supported on Windows.
2015-09-05 10:50:20 +02:00
Guido van Rossum 7d293ee97d Issue #24912: Prevent __class__ assignment to immutable built-in objects. 2015-09-04 20:54:07 -07:00
Victor Stinner adfefa527a Issue #23517: Fix implementation of the ROUND_HALF_UP rounding mode in
datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp().
microseconds sign should be kept before rounding.
2015-09-04 23:57:25 +02:00
Guido van Rossum 1b66910537 Fix issue #24635. 2015-09-04 12:15:54 -07:00
Guido van Rossum 82b63fadd2 Issue #24635: Fixed flakiness in test_typing.py. (Merge from 3.5.) 2015-09-04 12:05:03 -07:00
Guido van Rossum 647bae6c52 Issue #24635: Fixed flakiness in test_typing.py. 2015-09-04 12:00:06 -07:00
Victor Stinner 110f9e3538 test_time: add tests on HALF_UP rounding mode for _PyTime_ObjectToTime_t() and
_PyTime_ObjectToTimespec()
2015-09-04 10:31:16 +02:00
Serhiy Storchaka 4e63f7a2b4 Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
set beyond size.  Based on patch by John Leitch.
2015-09-04 07:48:19 +03:00
Serhiy Storchaka fb397790d2 Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
set beyond size.  Based on patch by John Leitch.
2015-09-04 01:08:54 +03:00
Serhiy Storchaka 594e54c765 Issue #24989: Fixed buffer overread in BytesIO.readline() if a position is
set beyond size.  Based on patch by John Leitch.
2015-09-04 01:08:03 +03:00
Brett Cannon df6b544ff6 Issue #24913: Fix overrun error in deque.index().
Reported by John Leitch and Bryce Darling, patch by Raymond Hettinger.
2015-09-03 10:15:03 -07:00
Victor Stinner 304d528715 Merge 3.5 (test_gdb) 2015-09-03 15:43:06 +02:00
Victor Stinner aba2466d09 Merge 3.4 (test_gdb) 2015-09-03 15:42:45 +02:00
Victor Stinner 479fea63e1 test_gdb: oops, the regex to parse the gdb version was still too strict 2015-09-03 15:42:26 +02:00
Victor Stinner a7b76e0cbe test_wsgiref: add missing import (support) 2015-09-03 12:14:25 +02:00
Senthil Kumaran d5da634dfc Merge with 3.6. Fix test_wsgiref execution from the test module. 2015-09-03 02:28:03 -07:00
Senthil Kumaran b541e58b7a Merge with 3.5. Fix test_wsgiref execution from the test module. 2015-09-03 02:27:18 -07:00
Senthil Kumaran 22f2c0e215 Fix test_wsgiref execution from the test module. 2015-09-03 02:26:31 -07:00
Victor Stinner 5b4674db1d Merge 3.5 (test_gdb) 2015-09-03 09:46:24 +02:00
Victor Stinner ccc546c658 Merge 3.4 (test_gdb) 2015-09-03 09:46:11 +02:00
Victor Stinner 26afae4019 test_gdb: fix regex to parse GDB version for 'GNU gdb 6.1.1 [FreeBSD]\n' 2015-09-03 09:45:53 +02:00
Victor Stinner 2ec5bd6fb2 Issue #23517: fromtimestamp() and utcfromtimestamp() methods of
datetime.datetime now round microseconds to nearest with ties going away from
zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of
rounding towards -Infinity (ROUND_FLOOR).
2015-09-03 09:06:44 +02:00
Victor Stinner be923ac948 Rewrite eintr_tester.py to avoid os.fork()
eintr_tester.py calls signal.setitimer() to send signals to the current process
every 100 ms. The test sometimes hangs on FreeBSD. Maybe there is a race
condition in the child process after fork(). It's unsafe to run arbitrary code
after fork().

This change replace os.fork() with a regular call to subprocess.Popen(). This
change avoids the risk of having a child process which continue to execute
eintr_tester.py instead of exiting. It also ensures that the child process
doesn't inherit unexpected file descriptors by mistake.

Since I'm unable to reproduce the issue on FreeBSD, I will have to watch
FreeBSD buildbots to check if the issue is fixed or not.

Remove previous attempt to debug: remove call to
faulthandler.dump_traceback_later().
2015-09-03 01:38:44 +02:00
Victor Stinner 40e47f69b7 Merge 3.5 (test_warnings) 2015-09-03 00:09:37 +02:00
Victor Stinner 4912e7a3fd Merge 3.4 (test_warnings) 2015-09-03 00:09:26 +02:00
Victor Stinner 1c40552087 Fix test_warnings: don't modify warnings.filters
BaseTest now ensures that unittest.TestCase.assertWarns() uses the same
warnings module than warnings.catch_warnings(). Otherwise,
warnings.catch_warnings() will be unable to remove the added filter.
2015-09-03 00:07:47 +02:00
Victor Stinner ede14ae368 Merge 3.5 (test_gdb) 2015-09-02 23:22:31 +02:00
Victor Stinner 329ca7118f Merge 3.4 (test_gdb) 2015-09-02 23:21:03 +02:00
Victor Stinner 5b6b4a8c34 test_gdb: use subprocess.Popen context manager to fix ResourceWarning warnings
when the test is interrupted (or fail).
2015-09-02 23:19:55 +02:00
Victor Stinner 2f3ac1ea76 test_gdb: fix regex to parse gdb version for SUSE Linux Entreprise
Mention also the detected GDB version on verbose mode and on error (if the
major version is smaller than 7).
2015-09-02 23:12:14 +02:00
Yury Selivanov 2051b84f44 Merge 3.5 heads (issue #24975) 2015-09-02 15:49:30 -04:00
Victor Stinner 2ec558739e Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest
with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older
than 3.3, instead of rounding to nearest with ties going to nearest even
integer (ROUND_HALF_EVEN).
2015-09-02 19:16:07 +02:00
Yury Selivanov 1fa3652e59 Merge 3.5 (issue #24975) 2015-09-02 15:50:04 -04:00
Victor Stinner 177b8eb34f test_eintr: try to debug hang on FreeBSD 2015-09-02 17:19:04 +02:00
Victor Stinner e801c36037 test_gdb: fix ResourceWarning if the test is interrupted 2015-09-02 15:46:00 +02:00
Victor Stinner 6dad8f8962 test_gdb: add debug info to investigate failure on "s390x SLES 3.x" buildbot 2015-09-02 15:44:22 +02:00
Victor Stinner f08fea9ee8 Issue 24297: Fix test_symbol on Windows
Don't rely on end of line. Open files in text mode, not in binary mode.
2015-09-02 14:23:40 +02:00
Victor Stinner 8aad8d6ad3 Issue #23517: test_time, skip a test checking a corner case on floating point
rounding
2015-09-02 13:54:28 +02:00
Victor Stinner ead144c19b test_time: add more tests on HALF_UP rounding mode 2015-09-02 11:05:32 +02:00
Victor Stinner acea9f6208 Issue #23517: Reintroduce unit tests for the old PyTime API since it's still
used.
2015-09-02 10:39:40 +02:00
Victor Stinner 744742320f Issue #23517: Add "half up" rounding mode to the _PyTime API 2015-09-02 01:43:56 +02:00
Yury Selivanov b3d531348c Issue #24975: Fix AST compilation for PEP 448 syntax. 2015-09-01 16:10:49 -04:00
Raymond Hettinger 7f9f27d767 merge 2015-08-30 09:17:02 -07:00
Raymond Hettinger 9157545c11 merge 2015-08-30 09:15:36 -07:00
Raymond Hettinger 7a3602e7cf Issue #24931: Resolve __dict__ conflict in namedtuple subclasses. 2015-08-30 09:13:48 -07:00
Raymond Hettinger 7a1a0bbbf1 merge 2015-08-26 08:09:50 -07:00
Raymond Hettinger 87674ec7d5 Issue #24913: Fix overrun error in deque.index(). 2015-08-26 08:08:38 -07:00
Robert Collins e4d35dc8b6 Fix test_linecache change.
In non-UTF8 locales open() will have the wrong encoding for the test
data. We need to open the file via tokenize, to get a detected
encoding instead.
2015-08-20 10:48:46 +12:00
Raymond Hettinger 95801bbe4e Issue #24879: Teach pydoc to display named tuple fields in the order they were defined. 2015-08-18 22:25:16 -07:00
Robert Collins 631a35c71a Issue #24054: decouple linecache tests from inspect tests
Patch from David D. Riddle
2015-08-19 12:20:37 +12:00
Yury Selivanov ab7cc7598a Issue #23572: Fixed functools.singledispatch on classes with falsy metaclasses.
Patch by Ethan Furman.
2015-08-18 14:30:15 -04:00
Yury Selivanov aae9a1d789 Merge 3.5 (issue #23572) 2015-08-18 14:23:02 -04:00
Yury Selivanov 77a8cd65be Issue #23572: Fixed functools.singledispatch on classes with falsy metaclasses.
Patch by Ethan Furman.
2015-08-18 14:20:00 -04:00
Victor Stinner 7a0eadc6d5 (Merge 3.5) cgi.FieldStorage.read_multi ignores Content-Length
Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
header in part headers. Patch written by Peter Landry and reviewed by Pierre
Quentel.
2015-08-18 10:23:48 -07:00
Victor Stinner 1e26dc7ef6 (Merge 3.4) cgi.FieldStorage.read_multi ignores Content-Length
Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
header in part headers. Patch written by Peter Landry and reviewed by Pierre
Quentel.
2015-08-18 10:23:16 -07:00
Victor Stinner 6579459d4b cgi.FieldStorage.read_multi ignores Content-Length
Issue #24764: cgi.FieldStorage.read_multi() now ignores the Content-Length
header in part headers. Patch written by Peter Landry and reviewed by Pierre
Quentel.
2015-08-18 10:21:10 -07:00
Yury Selivanov 7ca6c55a4e Issue #24867: Fix asyncio.Task.get_stack() for 'async def' coroutines 2015-08-17 14:46:51 -04:00
Raymond Hettinger 47d159f522 Issue #24379: Add operator.subscript() as a convenience for building slices. 2015-08-16 19:43:34 -07:00
Raymond Hettinger bb562a9a56 Add error information to a failing test to help diagnose a buildbot failure. 2015-08-16 17:08:48 -07:00
Raymond Hettinger 1cadf769b3 Improve comment 2015-08-15 14:47:27 -07:00
Raymond Hettinger a166ce561c Add more tests for pickling itertools.cycle 2015-08-15 14:45:49 -07:00
Raymond Hettinger 79c878d5f2 Fix crash in itertools.cycle.__setstate__() caused by lack of type checking.
Will backport after the 3.6 release is done.
2015-08-15 13:51:59 -07:00
Yury Selivanov 14f7b8bfb2 Merge 3.5 (issue #24867) 2015-08-14 15:35:14 -04:00
Yury Selivanov bb78adeece Merge 3.4 (Issue #24867) 2015-08-14 15:32:37 -04:00
Yury Selivanov 233983380d Issue #24867: Fix Task.get_stack() for 'async def' coroutines 2015-08-14 15:30:59 -04:00
Brett Cannon d868376288 Merge from 3.5 for issue #24492 2015-08-14 11:09:56 -07:00
Brett Cannon 7c97a05618 Merge from 3.5.0 for issue #24492 2015-08-14 11:06:43 -07:00
Robert Collins 6908265812 Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
Patch from Łukasz Langa.
2015-08-14 20:16:14 +12:00
Robert Collins f7a92673ab Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
Patch from Łukasz Langa.
2015-08-14 11:47:41 +12:00
Robert Collins ac37ba0742 Issue #21159: Improve message in configparser.InterpolationMissingOptionError.
Patch from Łukasz Langa.
2015-08-14 11:11:35 +12:00
Brett Cannon 3008bc0f4a Issue #24492: make sure that ``from ... import ...` raises an
ImportError if __name__ is not defined on a package.

Thanks to Armin Rigo for the bug report and diagnosing the cause.
2015-08-11 18:01:31 -07:00
Robert Collins df395991f6 Issue #9232: Support trailing commas in function declarations.
For example, "def f(*, a = 3,): pass" is now legal.

Patch from Mark Dickinson.
2015-08-12 08:00:06 +12:00
Yury Selivanov 31978d9ff4 Merge 3.5 (issues #24835, #24763) 2015-08-09 18:22:11 -04:00
Yury Selivanov 131426ebe3 Merge 3.4 (issues #24835, #24763) 2015-08-09 18:21:58 -04:00
Yury Selivanov 9632ea2f26 Issue #24763: Fix asyncio test on Windows (fix reverted change)
See also issue #24835
2015-08-09 18:21:25 -04:00
Robert Collins dfa95c9a8f Issue #20059: urllib.parse raises ValueError on all invalid ports.
Patch by Martin Panter.
2015-08-10 09:53:30 +12:00
Raymond Hettinger 455b5092a1 Add more tests of hash effectiveness. 2015-08-09 00:35:00 -07:00
Zachary Ware 7c4a6f8bd0 Merge 3.5 2015-08-08 22:05:05 -05:00
Zachary Ware 83ee5a315f Merge 3.4 2015-08-08 22:03:43 -05:00
Zachary Ware 9a47ed8839 regrtest: the 'bad' and 'environment_changed' sets of tests don't intersect anymore 2015-08-08 22:03:27 -05:00
Stefan Krah 5f35725fb8 Merge #15944. 2015-08-08 13:38:59 +02:00
Stefan Krah 0c51595a78 Issue #15944: memoryview: Allow arbitrary formats when casting to bytes.
Original patch by Martin Panter.
2015-08-08 13:38:10 +02:00
Eric Snow 5060bc51ca Merge from 3.5 (issue #24667). 2015-08-07 17:47:35 -06:00
Eric Snow 8c7f9558eb Issue #24667: Resize odict in all cases that the underlying dict resizes. 2015-08-07 17:45:12 -06:00
Robert Collins 8e9f9852be Issue #4395: Better testing and documentation of binary operators.
Patch by Martin Panter.
2015-08-07 10:34:23 +12:00
Robert Collins 00cf3c394a Issue #4395: Better testing and documentation of binary operators.
Patch by Martin Panter.
2015-08-07 10:32:15 +12:00
Robert Collins d84b29f805 Issue #4395: Better testing and documentation of binary operators.
Patch by Martin Panter.
2015-08-07 10:22:54 +12:00
Yury Selivanov 1720e1fc0b Merge 3.5 (issue #23812) 2015-08-06 14:04:30 -04:00
Yury Selivanov e03f42717c Merge 3.4 (issue #23812) 2015-08-06 14:04:12 -04:00
Yury Selivanov 159fbdd805 Issue #23812: Fix getter-cancellation with many pending getters code path 2015-08-06 14:03:38 -04:00
Yury Selivanov 6f8bcec616 Merge 3.5 (issue #24791; more tests in test_parser) 2015-08-05 18:00:11 -04:00
Yury Selivanov 50a2614786 Issue #24791: More tests in test_parser 2015-08-05 17:59:45 -04:00
Yury Selivanov dca249b17c Merge 3.5 (issue #24791) 2015-08-05 17:55:12 -04:00
Yury Selivanov 14acf5f41d Issue #24791: Fix grammar regression for call syntax: 'g(*a or b)'. 2015-08-05 17:54:10 -04:00
Yury Selivanov c28f3ae7ff Merge 3.5 (asyncio) 2015-08-05 14:47:47 -04:00
Yury Selivanov 6d0c4c38d1 asyncio.test_pep492: Add a test for asyncio.iscoroutinefunction 2015-08-05 14:47:33 -04:00
Yury Selivanov b3c019ca63 Issue #23812: Fix asyncio.Queue.get() to avoid loosing items on cancellation.
Patch by Gustavo J. A. M. Carneiro.
2015-08-05 13:58:43 -04:00
Yury Selivanov 22506d24ee Issue #23812: Fix asyncio.Queue.get() to avoid loosing items on cancellation.
Patch by Gustavo J. A. M. Carneiro.
2015-08-05 13:55:54 -04:00
Yury Selivanov 3fc0f2d288 Issue #23812: Fix asyncio.Queue.get() to avoid loosing items on cancellation.
Patch by Gustavo J. A. M. Carneiro.
2015-08-05 13:52:33 -04:00
Guido van Rossum a9d77fad34 Issue #23973: Update typing.py from GitHub repo. (Merge from 3.5.) 2015-08-05 12:13:11 +02:00
Guido van Rossum d70fe639c1 Issue #23973: Update typing.py from GitHub repo. 2015-08-05 12:11:06 +02:00
Zachary Ware 36948d7875 Issue #24791: Add tests for things that regressed with PEP 448 2015-08-04 22:49:55 -05:00
Zachary Ware 6e435e2d11 Closes #24751: Merge with 3.5 2015-08-04 21:59:09 -05:00
Zachary Ware 40648838b2 Issue #24751: Merge with 3.4 2015-08-04 21:58:00 -05:00
Zachary Ware 920a335e97 Issue #24751: When running regrtest with '-w', don't fail if re-run succeeds. 2015-08-04 21:54:54 -05:00
Yury Selivanov 4451cbed22 Merge 3.5 2015-08-04 15:57:05 -04:00
Yury Selivanov 78c89eb0ac Merge 3.4 2015-08-04 15:56:53 -04:00
Yury Selivanov 2a8911c0b7 asyncio: Sync with upstream (compat module) 2015-08-04 15:56:33 -04:00
Robert Collins 55b88700d2 Issue #23888: Handle fractional time in cookie expiry. Patch by ssh. 2015-08-04 10:07:21 +12:00
Robert Collins f3d9c315b6 Issue #23888: Handle fractional time in cookie expiry. Patch by ssh. 2015-08-04 10:07:06 +12:00
Robert Collins a0e5d981cd Issue #23888: Handle fractional time in cookie expiry. Patch by ssh. 2015-08-04 10:06:29 +12:00
Robert Collins 9ea5199fe9 Issue #22397: Skip failing tests on AIX
Patch from David Edelsohn.
2015-08-03 10:39:09 +12:00
Robert Collins 6f8a0586a9 Issue #22397: Skip failing tests on AIX
Patch from David Edelsohn.
2015-08-03 10:38:39 +12:00
Robert Collins 43cbbe21a7 Issue #22397: Skip failing tests on AIX
Patch from David Edelsohn.
2015-08-03 10:36:04 +12:00
Serhiy Storchaka 44427added Issue #20557: Use specific asserts in io tests. 2015-08-02 15:18:53 +03:00
Serhiy Storchaka b064f1e94f Issue #20557: Use specific asserts in io tests. 2015-08-02 15:18:28 +03:00
Serhiy Storchaka 0dcd80a6c0 Issue #20557: Use specific asserts in io tests. 2015-08-02 15:17:49 +03:00
Zachary Ware 9dd6ddc787 Closes #23182: Merge with 3.5 2015-08-01 22:00:17 -05:00
Zachary Ware 13db76a974 Issue #23182: Merge with 3.4 2015-08-01 21:57:22 -05:00
Zachary Ware ce17f76475 Issue #23182: PEP8-ify the annotation grammar tests. Patch by Ian Lee. 2015-08-01 21:55:36 -05:00
Victor Stinner d27d938675 Merge 3.5 (asyncio tests) 2015-07-31 23:36:28 +02:00