Raymond Hettinger
6ee588f14e
Restore quick exit (no freeslot check) for common case (found null on first probe).
2015-06-20 21:39:51 -07:00
Serhiy Storchaka
ec466a15d9
Fixed indentation of Python examples in C comments.
2015-06-11 00:09:32 +03:00
Serhiy Storchaka
553e156921
Fixed indentation of Python examples in C comments.
2015-06-11 00:07:47 +03:00
Serhiy Storchaka
d741a88049
Fixed indentation of Python examples in C comments.
2015-06-11 00:06:39 +03:00
Benjamin Peterson
239e90196e
Merge 3.5
2015-06-07 00:00:48 -05:00
Benjamin Peterson
0718de9770
repair my irrational excuberance
2015-06-07 00:00:42 -05:00
Benjamin Peterson
4a931adef3
merge 3.5
2015-06-06 23:20:40 -05:00
Benjamin Peterson
99e96f2bb0
remove unnecessary braces and indentation
2015-06-06 23:20:32 -05:00
Benjamin Peterson
9c474172cb
merge 3.5
2015-06-04 14:34:43 -05:00
Benjamin Peterson
2ad80f53c1
fix refleak when keys() fails
2015-06-04 14:34:20 -05:00
Eric Snow
f02dcc8803
Merge from 3.5.
2015-06-04 00:12:14 -06:00
Eric Snow
4fabf02633
Issue #24369 : Defend against key-changes during iteration.
2015-06-04 00:09:56 -06:00
Eric Snow
d8e5d6c4a5
Merge from 3.5.
2015-06-03 11:11:22 -06:00
Eric Snow
db4061cb9d
Issue #24377 : Fix a ref leak in OrderedDict.__repr__.
2015-06-03 11:09:48 -06:00
Eric Snow
cbdb17f681
Merge from 3.5.
2015-06-03 10:54:05 -06:00
Eric Snow
4c72918a59
Issue #24362 : Simplify the C OrderedDict fast nodes resize logic.
2015-06-03 10:50:37 -06:00
Eric Snow
d14de5e22d
Merge from 3.5.
2015-06-02 20:43:37 -06:00
Eric Snow
ac02ef373f
Issue #24368 : Support keyword arguments in OrderedDict methods.
2015-06-02 20:42:14 -06:00
Eric Snow
ec6cd162de
Merge from 3.5.
2015-06-01 23:35:40 -06:00
Eric Snow
b952ab43f2
Issue #24359 : Check for changed OrderedDict size during iteration.
2015-06-01 23:35:13 -06:00
Eric Snow
e9dd08d08c
Merge from 3.5.
2015-06-01 23:14:26 -06:00
Eric Snow
d171975609
Issue #24348 : Drop superfluous increfs/decrefs.
2015-06-01 23:12:13 -06:00
Eric Snow
c976b73002
Merge from 3.5.
2015-06-01 23:06:20 -06:00
Eric Snow
a762af74b2
Issue #24347 : Set KeyError if PyDict_GetItemWithError returns NULL.
2015-06-01 22:59:08 -06:00
Benjamin Peterson
cae0658f09
merge 3.5 ( #24345 )
2015-06-01 10:14:35 -05:00
Benjamin Peterson
0969a9f8ab
add Py_tp_finalize slot ( closes #24345 )
...
Patch from Petr Viktorin.
2015-06-01 10:12:48 -05:00
Serhiy Storchaka
442a894d1e
Issue #24284 : The startswith and endswith methods of the str class no longer
...
return True when finding the empty string and the indexes are completely out
of range.
2015-05-31 09:16:13 +03:00
Serhiy Storchaka
d4ea03c785
Issue #24284 : The startswith and endswith methods of the str class no longer
...
return True when finding the empty string and the indexes are completely out
of range.
2015-05-31 09:15:51 +03:00
Eric Snow
7a3414c201
Merge from 3.5.
2015-05-30 12:55:22 -06:00
Eric Snow
e3dfa9e5ce
Issue #16991 : Fix a few leaks and other memory-related concerns in OrderedDict.
2015-05-30 12:51:15 -06:00
Eric Snow
3ef8958e40
Merge from 3.5.
2015-05-30 12:00:05 -06:00
Eric Snow
67fb92e8c6
Issue #16991 : Do not return None from OrderedDict.__reversed__.
2015-05-30 11:43:36 -06:00
Eric Snow
c5e59609ac
Issue #16991 : Properly handle return values in several places.
2015-05-30 11:28:56 -06:00
Yury Selivanov
7aa5341164
Reverting my previous commit.
...
Something went horribly wrong when I was doing `hg rebase`.
2015-05-30 10:57:56 -04:00
Serhiy Storchaka
e90982111a
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
...
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:48:54 +03:00
Serhiy Storchaka
ac5569b1fa
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
...
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:48:19 +03:00
Serhiy Storchaka
fa494fd883
Issue #24115 : Update uses of PyObject_IsTrue(), PyObject_Not(),
...
PyObject_IsInstance(), PyObject_RichCompareBool() and _PyDict_Contains()
to check for and handle errors correctly.
2015-05-30 17:45:22 +03:00
Serhiy Storchaka
2806518e0c
Specify default values of semantic booleans in Argument Clinic generated signatures as booleans.
2015-05-30 11:32:58 +03:00
Serhiy Storchaka
8b2e8b6cce
Specify default values of semantic booleans in Argument Clinic generated signatures as booleans.
2015-05-30 11:30:39 +03:00
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
Yury Selivanov
ac0bffb962
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
2015-05-28 11:22:41 -04:00
Yury Selivanov
6ef059097c
Issue 24017: Drop getawaitablefunc and friends in favor of unaryfunc.
2015-05-28 11:21:31 -04:00
Raymond Hettinger
8651a50475
Issue #23359 : Specialize set_lookkey intoa lookup function and an insert function.
2015-05-27 10:37:20 -07:00
Serhiy Storchaka
a7a0ad6f73
Issue #24276 : Fixed optimization of property descriptor getter.
2015-05-24 21:38:06 +03:00
Nick Coghlan
a48db2bc8b
Issue #24268 : Address some PEP 489 refleaks
...
- missing DECREF in PyModule_FromDefAndSpec2
- missing DECREF in PyType_FromSpecAndBases2
- missing DECREF in _testmultiphase module
Patch by Petr Viktorin
2015-05-24 01:03:46 +10: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
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