Commit Graph

37297 Commits

Author SHA1 Message Date
Eric Snow 96c6af9b20 Issue #16991: Add a C implementation of collections.OrderedDict. 2015-05-29 22:21:39 -06:00
Eric Snow 47db71756d Issue #16991: Add a C implementation of collections.OrderedDict. 2015-05-29 22:21:39 -06:00
Benjamin Peterson 3979323ca3 merge 3.5 2015-05-29 18:44:50 -05:00
Benjamin Peterson 0a3297d7d4 use assert method (#24328) 2015-05-29 18:44:45 -05:00
Benjamin Peterson 0c70ca9aac merge 3.5 (#24328) 2015-05-29 17:11:36 -05:00
Benjamin Peterson e20056c8f7 fix importing one char extension modules (closes #24328) 2015-05-29 17:10:30 -05:00
Serhiy Storchaka 07739f3555 Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
2015-05-30 00:58:09 +03:00
Serhiy Storchaka a663121e10 Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
2015-05-30 00:57:21 +03:00
Serhiy Storchaka 50451eb912 Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
2015-05-30 00:53:26 +03:00
Yury Selivanov 38bc0a7f97 Issue 24316: Wrap gen objects returned from callables in types.coroutine
(Merge 3.5)
2015-05-29 16:19:34 -04:00
Yury Selivanov 13f7723d81 Issue 24316: Wrap gen objects returned from callables in types.coroutine 2015-05-29 16:19:18 -04:00
Yury Selivanov 7ad0419c4d Issue 24316: Fix types.coroutine() to accept objects from Cython
(Merge 3.5)
2015-05-29 09:06:24 -04:00
Yury Selivanov c565cd5d1b Issue 24316: Fix types.coroutine() to accept objects from Cython 2015-05-29 09:06:05 -04:00
Yury Selivanov a24fcfdf23 Issue 24315: Make collections.abc.Coroutine derived from Awaitable
(Merge 3.5)
2015-05-29 09:01:47 -04:00
Yury Selivanov 56fc614025 Issue 24315: Make collections.abc.Coroutine derived from Awaitable 2015-05-29 09:01:29 -04:00
Benjamin Peterson 0938d98bcc merge 3.5 2015-05-28 14:40:15 -05:00
Benjamin Peterson 264be6f48f remove STORE_MAP, since it's unused 2015-05-28 14:40:08 -05:00
Benjamin Peterson 2ec8f9bffc merge 3.5 (#11205) 2015-05-28 14:31:14 -05:00
Benjamin Peterson ee85339cc6 in dict displays, evaluate the key before the value (closes #11205)
Patch partially by Steve Dougherty.
2015-05-28 14:30:26 -05:00
Yury Selivanov 26f7057b36 Issue 24297: Add a unittest that Lib/symbol.py is in sync with Grammar 2015-05-28 14:06:12 -04:00
Serhiy Storchaka 6e6883f11a Issue #24309: Removed Python 2 idioms. 2015-05-28 20:45:29 +03:00
Yury Selivanov ee941b0278 asyncio: Drop some useless code from tasks.py.
See also issue 24017.
2015-05-28 10:53:04 -04:00
Yury Selivanov 6076a385e3 asyncio: Drop some useless code from tasks.py.
See also issue 24017.
2015-05-28 10:52:46 -04:00
Yury Selivanov 1ad08a5555 asyncio: Drop some useless code from tasks.py.
See also issue 24017.
2015-05-28 10:52:19 -04:00
Yury Selivanov 72f389fed0 Issue 24298: Fix signature() to properly unwrap wrappers around bound methods 2015-05-27 21:59:27 -04:00
Yury Selivanov 507cd3cf91 Issue 24298: Fix signature() to properly unwrap wrappers around bound methods 2015-05-27 21:59:03 -04:00
Yury Selivanov 46c759d76d Issue 24298: Fix signature() to properly unwrap wrappers around bound methods 2015-05-27 21:56:53 -04:00
Yury Selivanov 8544e2584d Issue 24297: Update symbol.py. See also issue 24017. 2015-05-27 11:08:46 -04:00
Yury Selivanov 0109812040 Issue 24297: Update symbol.py. See also issue 24017. 2015-05-27 11:08:19 -04:00
Lars Gustäbel 572183eaab Merge with 3.5: tarfile.open() with mode 'x' created files without an end of archive marker. 2015-05-27 13:05:30 +02:00
Lars Gustäbel 20703c6969 tarfile.open() with mode 'x' created files without an end of archive marker. 2015-05-27 12:53:44 +02:00
Raymond Hettinger 944db38cb7 Issue #23509: Speed up Counter operators
(Based on patch by Serhiy Storchaka.)
2015-05-26 10:35:15 -07:00
Nick Coghlan 06f155f488 Merge fix for issue #24285 from 3.5 2015-05-26 21:57:16 +10:00
Nick Coghlan 55871f04bf Issue #24285: fix importing extensions from packages 2015-05-26 21:48:17 +10:00
Raymond Hettinger c074e9d765 Issue #24286: Forward port dict view abstract base class tests. 2015-05-26 01:47:58 -07:00
Benjamin Peterson 09479d0b94 merge 3.4 2015-05-25 21:25:09 -05:00
Benjamin Peterson 82d8f06fcd merge 3.3 2015-05-25 21:24:48 -05:00
Benjamin Peterson 86c3a3b0b7 merge 3.2 2015-05-25 21:24:26 -05:00
Benjamin Peterson b03856ab66 keep distutils version in sync with python version automatically 2015-05-25 21:24:00 -05:00
Victor Stinner 24d262af0b (Merge 3.5) Issue #23840: tokenize.open() now closes the temporary binary file
on error to fix a resource warning.
2015-05-26 00:46:44 +02:00
Victor Stinner 387729e183 Issue #23840: tokenize.open() now closes the temporary binary file on error to
fix a resource warning.
2015-05-26 00:43:58 +02:00
Larry Hastings aca575cb25 Merge. 2015-05-24 16:41:42 -07:00
Serhiy Storchaka 46c5611948 Backed out changeset: b0a0b9b59012 2015-05-24 21:53:49 +03:00
Larry Hastings 205acde55e Version bump for 3.5.0b1. 2015-05-23 17:43:05 -07:00
Larry Hastings 0482af4269 Updated topics (and susp-ignored) for Python 3.5.0b1. 2015-05-23 17:39:42 -07:00
Larry Hastings d68ec172d1 Merge backout of 57776eee74f2. 2015-05-23 14:57:12 -07:00
Larry Hastings 8252cc9832 Backed out changeset 57776eee74f2 2015-05-23 14:56:23 -07:00
Terry Jan Reedy b888d61320 Update idlelib/NEWS.txt 2015-05-23 17:24:22 -04:00
Terry Jan Reedy c4dc43eaf4 Update idlelib/NEWS.txt. 2015-05-23 17:23:30 -04:00
Serhiy Storchaka 1c858c352b Issue #14373: Added C implementation of functools.lru_cache(). Based on
patches by Matt Joiner and Alexey Kachayev.
2015-05-23 22:42:49 +03:00
Steve Dower c70908558d Issue #23970: Fixes bdist_wininst not working on non-Windows platform. 2015-05-23 12:15:57 -07:00
Steve Dower fd3664be00 Issue #23970: Adds distutils._msvccompiler for new Visual Studio versions. 2015-05-23 09:02:50 -07:00
Benjamin Peterson 5a69420062 merge 3.4 (#22931) 2015-05-23 10:41:30 -05:00
Benjamin Peterson c4ae86e477 merge 3.3 (#22931) 2015-05-23 10:40:47 -05:00
Benjamin Peterson d504f20e1c merge 3.2 (#22931) 2015-05-23 10:38:48 -05:00
Benjamin Peterson 9bd476ea57 allow square brackets in cookie values (closes #22931) 2015-05-23 10:36:48 -05:00
Nick Coghlan d5cacbb1d9 PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
2015-05-23 22:24:10 +10:00
Raymond Hettinger ec219ba1c0 Issue #23086: Add start and stop arguments to the Sequence.index() mixin method. 2015-05-22 19:29:22 -07:00
Donald Stufft 256613c605 Merge 3.4 into default, upgrading pip to 7.0.1 2015-05-22 20:30:57 -04:00
Donald Stufft 7bf0d5a759 Upgrade pip to 7.0.1 2015-05-22 20:30:16 -04:00
Raymond Hettinger f070f1cbbc Issue #21448: Improve performance of the email feedparser 2015-05-22 17:23:28 -07:00
Raymond Hettinger 573b44c18f Issue 22189: Add missing methods to UserString 2015-05-22 16:56:32 -07:00
Gregory P. Smith ad577b938b Issue 24230: The tempfile module now accepts bytes for prefix, suffix and dir
parameters and returns bytes in such situations (matching the os module APIs).
2015-05-22 16:18:14 -07:00
Yury Selivanov c8386f78fd Issue 20438: Adjust stacklevel of inspect.getargspec() warning. 2015-05-22 16:09:44 -04:00
Guido van Rossum 46dbb7d103 Preliminary typing.py, anticipating provisional acceptance of PEP 484.
There area bunch of TODOs here, but the biggest (not mentioned in the
file) is that I'm going to take out __instancecheck__ and
__subclasscheck__.  However my personal schedule is such that I
probably won't have time for these before Larry tags beta 1.  But I
will try -- this commit is mostly to make sure that typing.py doesn't
completely miss the train.

PS. I'm tracking issues at https://github.com/ambv/typehinting/issues.
2015-05-22 10:14:11 -07:00
Zachary Ware 7dc9dea778 Issue #20035: Reimplement tkinter._fix module as a C function.
The new private C function makes no permanent changes to the environment
and is #ifdef'd out on non-Windows platforms.
2015-05-22 11:36:53 -05:00
Yury Selivanov 3cfec2e2fc Issue 20438: Deprecate inspect.getargspec() and friends. 2015-05-22 11:38:38 -04:00
Yury Selivanov 683333955a Issue 24237: Raise PendingDeprecationWarning per PEP 479
Raise PendingDeprecationWarning when generator raises StopIteration
and no __future__ import is used.  Fix offenders in the stdlib
and tests.

See also issue 22906.
Thanks to Nick Coghlan and Berker Peksag for reviews.
2015-05-22 11:16:47 -04:00
Serhiy Storchaka e79ec70801 Issue #24257: Fixed incorrect uses of PyObject_IsInstance().
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type.
Fixed system error in the comparison of faked types.SimpleNamespace.
2015-05-22 11:13:20 +03:00
Serhiy Storchaka 08d230a540 Issue #24257: Fixed incorrect uses of PyObject_IsInstance().
Fixed segmentation fault in sqlite3.Row constructor with faked cursor type.
Fixed system error in the comparison of faked types.SimpleNamespace.
2015-05-22 11:02:49 +03:00
Donald Stufft 35e24a50c5 merge: Upgrade pip to 7.0 and setuptools to 16.0 2015-05-22 00:39:57 -04:00
Donald Stufft df9ba3623a Upgrade pip to 7.0 and setuptools to 16.0 2015-05-22 00:39:22 -04:00
Berker Peksag b560158622 Set stacklevel to 2 to get more accurate warning messages from deprecated functions. 2015-05-21 23:40:54 +03:00
Yury Selivanov 095fb84fc2 Issue 23898: Fix inspect.classify_class_attrs() to work with __eq__
Patch by Mike Bayer.
2015-05-21 15:45:08 -04:00
Yury Selivanov bf341fb5f6 Issue 23898: Fix inspect.classify_class_attrs() to work with __eq__ 2015-05-21 15:41:57 -04:00
Serhiy Storchaka b2f3c2357c Issue #23985: Fixed integer overflow in iterator object. Patch by
Clement Rouault.
2015-05-21 20:51:53 +03:00
Serhiy Storchaka 4faf5c5655 Issue #23985: Fixed integer overflow in iterator object. Patch by
Clement Rouault.
2015-05-21 20:50:25 +03:00
Serhiy Storchaka 041dd8eef1 Issue #15836: assertRaises(), assertRaisesRegex(), assertWarns() and
assertWarnsRegex() assertments now check the type of the first argument
to prevent possible user error.  Based on patch by Daniel Wagner-Hall.
2015-05-21 20:15:40 +03:00
Yury Selivanov ff54223606 Issue 24017: Use abc.Coroutine in inspect.iscoroutine() function 2015-05-21 12:03:21 -04:00
Yury Selivanov 57c74fca02 Issue 24248: Deprecate inspect.Signature.from_function and .from_builtin 2015-05-20 23:07:02 -04:00
Antoine Pitrou 45d6156154 Issue #9858: Add missing method stubs to _io.RawIOBase. Patch by Laura Rupprecht. 2015-05-20 21:50:59 +02:00
Serhiy Storchaka 60335855f0 Issue #22955: Fixed test_operator. It left Python implementation in
sys.modules and broke test_ipaddress.
2015-05-20 22:02:43 +03:00
Yury Selivanov cf45f022b7 inspect.Signature: Factor out Signature.from_function to a private helper 2015-05-20 14:38:50 -04:00
Yury Selivanov bcd4fc161a Issue 20691: Add follow_wrapped arg to inspect.signature/from_callable. 2015-05-20 14:30:08 -04:00
Serhiy Storchaka 1f507a8140 Issue 24215: Added tests for more builtin types in test_pprint.
Made test_pprint and test_trace discoverable.
2015-05-20 19:38:05 +03:00
Serhiy Storchaka cbfe07e06c Issue 24215: Added tests for more builtin types in test_pprint.
Made test_pprint and test_trace discoverable.
2015-05-20 19:37:10 +03:00
Serhiy Storchaka 3ddcfb119d Issue #24134: Use assertRaises() in context manager form in test_slice to
avoid passing the test accidently because slice.__hash__ is None.
2015-05-20 18:38:39 +03:00
Serhiy Storchaka c0e0022f07 Issue #24134: Use assertRaises() in context manager form in test_slice to
avoid passing the test accidently because slice.__hash__ is None.
2015-05-20 18:37:37 +03:00
Serhiy Storchaka 35ac5f8280 Issue #22955: attrgetter, itemgetter and methodcaller objects in the operator
module now support pickling.  Added readable and evaluable repr for these
objects.  Based on patch by Josh Rosenberg.
2015-05-20 18:29:18 +03:00
Serhiy Storchaka 5418d0bfc4 Issue #24245: Eliminated senseless expect clauses that have no any effect in
IDLE.  Patch by Martin Panter.
2015-05-20 16:15:20 +03:00
Serhiy Storchaka ef94869f4f Issue #24245: Eliminated senseless expect clauses that have no any effect in
IDLE.  Patch by Martin Panter.
2015-05-20 16:15:02 +03:00
Serhiy Storchaka e98209c2b4 Issue #24245: Eliminated senseless expect clauses that have no any effect.
Patch by Martin Panter.
2015-05-20 16:10:04 +03:00
Serhiy Storchaka ba9ac5b5c4 Issue #16261: Converted some bare except statements to except statements
with specified exception type.  Original patch by Ramchandra Apte.
2015-05-20 10:33:40 +03:00
Serhiy Storchaka 492f027793 Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix.  tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
2015-05-20 00:14:00 +03:00
Serhiy Storchaka 5d6b7b1cb7 Issue #22107: tempfile.gettempdir() and tempfile.mkdtemp() now try again
when a directory with the chosen name already exists on Windows as well as
on Unix.  tempfile.mkstemp() now fails early if parent directory is not
valid (not exists or is a file) on Windows.
2015-05-20 00:11:48 +03:00
Antoine Pitrou ef64847f71 Issue #23985: Fix a possible buffer overrun when deleting a slice from the front of a bytearray and then appending some other bytes data.
Patch by Martin Panter.
2015-05-19 20:55:42 +02:00
Antoine Pitrou 2545411e28 Issue #23985: Fix a possible buffer overrun when deleting a slice from the front of a bytearray and then appending some other bytes data.
Patch by Martin Panter.
2015-05-19 20:52:27 +02:00
R David Murray 6371446036 #24215: also back out changeset that broke test_trace in 3.4.
I missed that this change was applied to both branches.
2015-05-19 08:24:59 -04:00
R David Murray 7bc452d604 Back out changeset 955dffec3d94 since it broke the buildbots.
and the situation has not been addressed in several days.
2015-05-19 08:16:04 -04:00
Serhiy Storchaka 5bfc03f430 Issue #23780: Improved error message in os.path.join() with single argument.
Idea by R. David Murray.
2015-05-19 11:00:07 +03:00