Commit Graph

110 Commits

Author SHA1 Message Date
Alexander Belopolsky e49af34151 Issue #7830: Flatten nested functools.partial. 2015-03-01 15:08:17 -05:00
Serhiy Storchaka 08448a1f4d Issue #23326: Removed __ne__ implementations. Since fixing default __ne__
implementation in issue #21408 they are redundant.
2015-01-31 12:05:05 +02:00
Raymond Hettinger 1a8ada89f9 No need to rebuild a constant dictionary on every call. Move convert mapping to module level. 2015-01-13 22:57:35 -08:00
Raymond Hettinger e5db863c22 Minor speed-up. Use local variable instead of a global lookup. 2015-01-06 22:16:10 -08:00
Raymond Hettinger 57a3786a62 merge 2015-01-05 22:00:08 -08:00
Raymond Hettinger 0603d3049e Issue #23132: Mitigate regression in speed and clarity in functools.total_ordering. 2015-01-05 21:52:10 -08:00
Serhiy Storchaka 697a526fa1 Issue #23132: Improve performance and introspection support of comparison
methods created by functool.total_ordering.
2015-01-01 15:23:12 +02:00
Raymond Hettinger 92c7b90148 merge 2014-08-12 12:45:28 -07:00
Raymond Hettinger 4d58897fdb Issue 22184: Early detection and reporting of missing lru_cache parameters 2014-08-12 12:44:52 -07:00
Serhiy Storchaka 521e5860a5 Issue #22032: __qualname__ instead of __name__ is now always used to format
fully qualified class names of Python implemented classes.
2014-07-22 15:00:37 +03:00
Victor Stinner 7fa767e517 Issue #20976: pyflakes: Remove unused imports 2014-03-20 09:16:38 +01:00
Yury Selivanov da5fe4f2da inspect.signature: Add support for 'functools.partialmethod' #20223 2014-01-27 17:28:37 -05:00
Nick Coghlan 3daaf5f89d Fix functools.partialmethod docs and __all__ 2013-11-04 23:32:16 +10:00
Nick Coghlan f4cb48a72b Issue #4331: Added functools.partialmethod
Initial patch by Alon Horev
2013-11-03 16:41:46 +10:00
Nick Coghlan f05d981f58 Close #10042: functools.total_ordering now handles NotImplemented
(Patch by Katie Miller)
2013-10-02 00:02:03 +10:00
Nick Coghlan 24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Brett Cannon cd171c8e92 Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a) 2013-07-04 17:43:24 -04:00
Łukasz Langa 3720c77e30 Issue #18244: Adopt C3-based linearization in functools.singledispatch for improved ABC support 2013-07-01 16:00:38 +02:00
Brett Cannon 0a140668fa Issue #18200: Update the stdlib (except tests) to use
ModuleNotFoundError.
2013-06-13 20:57:26 -04:00
Łukasz Langa 6f69251980 Add reference implementation for PEP 443
PEP accepted: http://mail.python.org/pipermail/python-dev/2013-June/126734.html
2013-06-05 12:20:24 +02:00
Raymond Hettinger 36fe22806c merge 2013-03-08 23:04:47 -08:00
Raymond Hettinger d8d6010df3 Sync-up with 3.4 to make maintenance easier. 2013-03-08 23:01:07 -08:00
Raymond Hettinger a28c55a2e4 merge 2013-03-08 21:14:46 -07:00
Raymond Hettinger f96b2b03bb Improve comments and variable names. 2013-03-08 21:11:55 -07:00
Raymond Hettinger bb5f48008d Merge 2013-03-04 04:20:46 -05:00
Raymond Hettinger 352cc8cfc3 Another nit. 2013-03-04 04:19:09 -05:00
Raymond Hettinger 32e2ff5dc5 merge 2013-03-04 03:54:45 -05:00
Raymond Hettinger f2c17a9276 Fix other re-entrancy nits for the lru_cache.
Keep references for oldkey and oldvalue so they can't
trigger a __del__ method to reenter our thread.

Move the cache[key]=link step to the end, after the link
data is in a consistent state.

Under exotic circumstances, the cache[key]=link step could
trigger reentrancy (i.e. the key would have to have a hash
exactly equal to that for another key in the cache and the
key would need a __eq__ method that makes a reentrant call
our cached function).
2013-03-04 03:34:09 -05:00
Raymond Hettinger 794568f0ad Merge 2013-03-01 23:21:00 -08:00
Raymond Hettinger 409f663091 Remove dependency on dummy_threading (to solve a bootstrap problem). 2013-03-01 23:20:13 -08:00
Raymond Hettinger dacb6858e8 Merge 2013-03-01 03:48:30 -08:00
Raymond Hettinger fd54117a68 Don't deadlock on a reentrant call. 2013-03-01 03:47:57 -08:00
Raymond Hettinger 832eddeafb Eliminate unnecessary variable. 2013-02-17 00:08:45 -08:00
Antoine Pitrou b5b3714168 Issue #12428: Add a pure Python implementation of functools.partial().
Patch by Brian Thorne.
2012-11-13 21:35:40 +01:00
Raymond Hettinger 0c9050c25d Separate key creation logic from the sequence class that memoizes its hash value. 2012-06-04 00:21:14 -07:00
Raymond Hettinger 010ce3283a Minor change to default lru size. Set default to a power of two. 2012-05-19 21:20:48 -07:00
Raymond Hettinger 9acbb6074f Move make_key() out of the decorator body. Make keys that only need to be hashed once. 2012-04-30 22:32:16 -07:00
Raymond Hettinger 018b4fbb9b Use a flag to indicate when the circular queue is fully populated and stable. 2012-04-30 20:48:55 -07:00
Raymond Hettinger 34d94a2101 Handle a possible race condition 2012-04-30 14:14:28 -07:00
Raymond Hettinger b6b98c093e Track the cache size directly. 2012-04-29 18:09:02 -07:00
Raymond Hettinger 9f0ab9f564 Factor out shared variables. 2012-04-29 14:55:27 -07:00
Raymond Hettinger 678e7f3be6 Flatten the lru cache keyword args tuple for better memory utilization. 2012-04-29 12:28:02 -07:00
Raymond Hettinger c6897854f8 Fix-up a comment 2012-03-31 02:19:06 -07:00
Raymond Hettinger 7f7a5a7b87 Fix-up comments and add a sentinel variable for clarity. 2012-03-30 21:50:40 -07:00
Raymond Hettinger 41eb79a016 No need to create and destroy links when updating a fixed-sized circular queue. 2012-03-30 19:15:18 -07:00
Raymond Hettinger 1ff50df8bc Minor cleanup: add whitespace, add comments, bring function attribute updates together. 2012-03-30 13:15:48 -07:00
Raymond Hettinger 7dabfede34 Fix whitespace 2012-03-17 15:11:09 -07:00
Raymond Hettinger 7e0c581c49 Low overhead path for maxsize==0 2012-03-17 15:10:24 -07:00
Raymond Hettinger bc8e81dcc3 Section-off the source for better readability. 2012-03-17 00:24:09 -07:00
Raymond Hettinger dce583e0bd Minor beautification. 2012-03-16 22:12:20 -07:00