Commit graph

96965 commits

Author SHA1 Message Date
Serhiy Storchaka
d3ff784f2d Issue #28469: timeit now uses the sequence 1, 2, 5, 10, 20, 50,... instead
of 1, 10, 100,... for autoranging.
2016-10-23 15:17:05 +03:00
Serhiy Storchaka
f8d7d41507 Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*. 2016-10-23 15:12:25 +03:00
Serhiy Storchaka
8c9331057d Issue #28115: Command-line interface of the zipfile module now uses argparse.
Added support of long options.
2016-10-23 13:32:12 +03:00
Serhiy Storchaka
e4bdf4fce5 Issue #28115: Added tests for CLI of the zipfile module. 2016-10-23 13:14:27 +03:00
Serhiy Storchaka
89ecb4ac10 Issue #28115: Added tests for CLI of the zipfile module. 2016-10-23 13:12:39 +03:00
Serhiy Storchaka
61c4c44b2a Issue #28115: Added tests for CLI of the zipfile module. 2016-10-23 13:07:59 +03:00
Serhiy Storchaka
ee8337a99d Issue #25953: re.sub() now raises an error for invalid numerical group
reference in replacement template even if the pattern is not found in
the string.  Error message for invalid group reference now includes the
group index and the position of the reference.
Based on patch by SilentGhost.
2016-10-23 12:12:05 +03:00
Serhiy Storchaka
662cef66d7 Issue #25953: re.sub() now raises an error for invalid numerical group
reference in replacement template even if the pattern is not found in
the string.  Error message for invalid group reference now includes the
group index and the position of the reference.
Based on patch by SilentGhost.
2016-10-23 12:11:19 +03:00
Serhiy Storchaka
cb33a01bbc Issue #28510: Clean up decoding error handlers.
Since PyUnicodeDecodeError_GetObject() always returns bytes, following
PyBytes_AsString() can be replaced with PyBytes_AS_STRING().
2016-10-23 09:44:50 +03:00
Serhiy Storchaka
523c449ca0 Issue #28504: Cleanup unicode_decode_call_errorhandler_wchar/writer.
Patch by Xiang Zhang.
2016-10-22 23:18:31 +03:00
Raymond Hettinger
b12785d456 Reference the original compact-and-ordered proposal 2016-10-22 09:58:14 -07:00
Guido van Rossum
f25bf43d16 Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. (3.6->3.7) 2016-10-22 07:57:24 -07:00
Guido van Rossum
265dce6cbb Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. (3.5->3.6) 2016-10-22 07:56:58 -07:00
Guido van Rossum
52e5004b59 Issue #27989: Tweak inspect.formatannotation() to improve pydoc rendering of function annotations. Ivan L. 2016-10-22 07:55:18 -07:00
Martin Panter
f1f9b633ac Issue #28435: Merge urllib test fixes from 3.6 2016-10-22 03:21:55 +00:00
Martin Panter
85e81cfe9b Issue #28435: Merge urllib test fixes from 3.5 into 3.6 2016-10-22 03:21:36 +00:00
Martin Panter
1002a621c1 Issue #28435: Avoid no_proxy environment variable interfering with tests
Patch by Piotr Szczepaniak.
2016-10-22 01:42:06 +00:00
Martin Panter
d60ea5ff00 Issue #26620: Fix ResourceWarning in test_urllib2_localnet
* Use context manager on urllib objects to ensure that they are closed on error
* Use self.addCleanup() to cleanup resources even if a test is interrupted
  with CTRL+c

This backports a patch by Victor Stinner.
2016-10-22 01:28:21 +00:00
Guido van Rossum
e86c1d1091 Two minor typing.py fixes (upstream #305) (3.6->3.7) 2016-10-21 17:30:31 -07:00
Guido van Rossum
7e0062fca8 Two minor typing.py fixes (upstream #305) (3.5->3.6) 2016-10-21 17:30:30 -07:00
Guido van Rossum
3b557991d4 Two minor typing.py fixes (upstream #305) 2016-10-21 17:30:29 -07:00
Guido van Rossum
fb76519110 Issue #28482: Skip a few test_typing tests if asyncio unavailable (3.6->3.7) 2016-10-21 16:13:17 -07:00
Guido van Rossum
e238ab5c81 Issue #28482: Skip a few test_typing tests if asyncio unavailable (3.5->3.6) 2016-10-21 16:12:50 -07:00
Guido van Rossum
ac353dfa14 Issue #28482: Skip a few test_typing tests if asyncio unavailable 2016-10-21 16:12:17 -07:00
Martin Panter
4e946792d7 Issue #23214: Fix formatting of -1 2016-10-21 23:00:10 +00:00
Yury Selivanov
c69d952109 Merge 3.6 (issue #26796) 2016-10-21 17:42:00 -04:00
Yury Selivanov
6330f2a5ce Merge 3.5 (issue #26796) 2016-10-21 17:41:23 -04:00
Yury Selivanov
e8a6045fea Issue #26796: Don't configure the number of workers for default threadpool executor.
Initial patch by Hans Lawrenz.
2016-10-21 17:40:42 -04:00
Guido van Rossum
ce2fa599ab Fix indent (merge) 2016-10-21 14:31:37 -07:00
Guido van Rossum
2ae0d64471 Fix indent (merge) 2016-10-21 14:31:18 -07:00
Guido van Rossum
9f91e858ce Fix indent 2016-10-21 14:30:50 -07:00
Guido van Rossum
7a4088fac3 Sync typing.py from upstream (3.6->3.7) 2016-10-21 14:29:02 -07:00
Guido van Rossum
6c950ce4e8 Sync typing.py from upstream (3.5->3.6) 2016-10-21 14:28:29 -07:00
Guido van Rossum
7ef22d6b96 Sync typing.py from upstream 2016-10-21 14:27:58 -07:00
Yury Selivanov
384ec37081 Merge 3.6 (issue #26923) 2016-10-21 17:25:02 -04:00
Yury Selivanov
e145efcd7a Merge 3.5 (issue #26923) 2016-10-21 17:23:35 -04:00
Yury Selivanov
3d67615a48 Issue #26923: Fix asyncio.Gather to refuse being cancelled once all children are done.
Patch by Johannes Ebke.
2016-10-21 17:22:17 -04:00
Yury Selivanov
f5cd8a29f3 Merge 3.6 (issue #28500) 2016-10-21 17:14:17 -04:00
Yury Selivanov
ed0540698e Issue #28500: Fix asyncio to handle async gens GC from another thread. 2016-10-21 17:13:40 -04:00
Brett Cannon
1f489a3a33 Merge (issue #25152) 2016-10-21 12:54:31 -07:00
Brett Cannon
68adfa3b3e Merge (issue #25152) 2016-10-21 12:54:02 -07:00
Brett Cannon
f8c1505736 Issue #25152: Mention the deprecation of pyvenv 2016-10-21 12:53:40 -07:00
Brett Cannon
ee406e9167 Merge (issue #28396) 2016-10-21 12:16:14 -07:00
Brett Cannon
eb7ebd3d34 Merge (issue #28396) 2016-10-21 12:15:48 -07:00
Brett Cannon
10a7dbdd5d Issue #28396: Remove any mention of .pyo files from the man page.
Thanks to Ville Skyttä for the patch.
2016-10-21 12:15:14 -07:00
Serhiy Storchaka
c4b4d4e2d8 Issue #28214: Improved exception reporting for problematic __set_name__
attributes.
2016-10-21 17:15:20 +03:00
Serhiy Storchaka
d5d32d2127 Issue #28214: Improved exception reporting for problematic __set_name__
attributes.
2016-10-21 17:13:31 +03:00
Serhiy Storchaka
14ab277632 Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.

_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python

    raise exception(format % args) from sys.exc_info()[1]
2016-10-21 17:10:42 +03:00
Serhiy Storchaka
467ab194fc Issue #28410: Added _PyErr_FormatFromCause() -- the helper for raising
new exception with setting current exception as __cause__.

_PyErr_FormatFromCause(exception, format, args...) is equivalent to Python

    raise exception(format % args) from sys.exc_info()[1]
2016-10-21 17:09:17 +03:00
Serhiy Storchaka
c4189a04a8 Issue #28410: Keep the traceback of original exception in _PyErr_ChainExceptions(). 2016-10-21 16:21:02 +03:00