42 Commits

Author SHA1 Message Date
Michael Seifert
0641ada9b7 bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords are not strings (#649) (#672) 2017-03-15 09:42:30 +02:00
Serhiy Storchaka
5010a77a4d [3.5] bpo-29532: Altering a kwarg dictionary passed to functools.partial() no longer affects a partial object after creation. (#222) 2017-02-22 11:46:32 +02:00
Serhiy Storchaka
67796521dd Issue #28969: Fixed race condition in C implementation of functools.lru_cache.
KeyError could be raised when cached function with full cache was
simultaneously called from differen threads with the same uncached arguments.
2017-01-12 18:34:33 +02:00
Yury Selivanov
46a02db90b Issue #28653: Fix a refleak in functools.lru_cache. 2016-11-09 18:55:45 -05:00
Serhiy Storchaka
179f960d47 Issue #25455: Fixed a crash in repr of recursive functools.partial objects. 2016-06-12 11:44:06 +03:00
Serhiy Storchaka
864b63c33f Issue #26200: Restored more safe usages of Py_SETREF. 2016-04-11 09:53:37 +03:00
Serhiy Storchaka
48842714b9 Issue #22570: Renamed Py_SETREF to Py_XSETREF. 2016-04-06 09:45:48 +03:00
Serhiy Storchaka
3874128519 Issue #25945: Fixed bugs in functools.partial.
Fixed a crash when unpickle the functools.partial object with wrong state.
Fixed a leak in failed functools.partial constructor.
"args" and "keywords" attributes of functools.partial have now always types
tuple and dict correspondingly.
2016-02-02 18:45:17 +02:00
Serhiy Storchaka
e4d65e3aab Issue #25447: Copying the lru_cache() wrapper object now always works,
independedly from the type of the wrapped object (by returning the original
object unchanged).
2015-12-28 23:58:07 +02:00
Serhiy Storchaka
45120f272b Issue #25447: The lru_cache() wrapper objects now can be copied and pickled
(by returning the original object unchanged).
2015-10-24 09:49:56 +03:00
Serhiy Storchaka
b9d98d532c Issue #24483: C implementation of functools.lru_cache() now calculates key's
hash only once.
2015-10-02 12:47:11 +03:00
Serhiy Storchaka
374164c2f5 Issue #14373: Fixed segmentation fault when gc.collect() is called during
constructing lru_cache (C implementation).
2015-07-25 12:10:21 +03:00
Serhiy Storchaka
e7070f09bc Issue #14373: C implementation of functools.lru_cache() now can be used with
methods.
2015-06-08 11:19:24 +03:00
Serhiy Storchaka
46c5611948 Backed out changeset: b0a0b9b59012 2015-05-24 21:53:49 +03:00
Larry Hastings
8252cc9832 Backed out changeset 57776eee74f2 2015-05-23 14:56:23 -07: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
Benjamin Peterson
dae2ef1cfa merge 3.4 2015-05-09 00:29:08 -04:00
Benjamin Peterson
65bcdd7195 ensure .keywords is always a dict 2015-05-09 00:25:18 -04:00
Alexander Belopolsky
e49af34151 Issue #7830: Flatten nested functools.partial. 2015-03-01 15:08:17 -05:00
Serhiy Storchaka
1d0bb9c8f9 Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple
parses nested mutating sequence.
2013-02-04 12:54:04 +02:00
Serhiy Storchaka
19c4e0df29 Issue #6083: Fix multiple segmentation faults occured when PyArg_ParseTuple
parses nested mutating sequence.
2013-02-04 12:47:24 +02:00
Benjamin Peterson
23d7f12ffb use new generic __dict__ descriptor implementations 2012-02-19 20:02:57 -05:00
Raymond Hettinger
a56328680d Fix nit (make spelling consistent in prototype) 2011-04-09 12:57:00 -07:00
Benjamin Peterson
3bd9729dc9 implement tp_clear 2011-04-05 17:25:14 -05:00
Victor Stinner
446c8d59c5 Issue #11707: Fix compilation errors with Visual Studio
Fix also a compiler (gcc) warning.
2011-04-05 12:21:35 +02:00