Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Sync-up with 3.4 to make maintenance easier. | Raymond Hettinger | 2013-03-09 | 1 | -9/+7 |
| | |||||
* | Improve comments and variable names. | Raymond Hettinger | 2013-03-09 | 1 | -14/+37 |
| | |||||
* | Another nit. | Raymond Hettinger | 2013-03-04 | 1 | -1/+1 |
| | |||||
* | Fix other re-entrancy nits for the lru_cache. | Raymond Hettinger | 2013-03-04 | 1 | -7/+11 |
| | | | | | | | | | | | | | | 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). | ||||
* | Remove dependency on dummy_threading (to solve a bootstrap problem). | Raymond Hettinger | 2013-03-02 | 1 | -1/+4 |
| | |||||
* | Don't deadlock on a reentrant call. | Raymond Hettinger | 2013-03-01 | 1 | -3/+3 |
| | |||||
* | Separate key creation logic from the sequence class that memoizes its hash ↵ | Raymond Hettinger | 2012-06-04 | 1 | -19/+24 |
| | | | | value. | ||||
* | Minor change to default lru size. Set default to a power of two. | Raymond Hettinger | 2012-05-20 | 1 | -1/+1 |
| | |||||
* | Move make_key() out of the decorator body. Make keys that only need to be ↵ | Raymond Hettinger | 2012-05-01 | 1 | -17/+27 |
| | | | | hashed once. | ||||
* | Use a flag to indicate when the circular queue is fully populated and stable. | Raymond Hettinger | 2012-05-01 | 1 | -9/+12 |
| | |||||
* | Handle a possible race condition | Raymond Hettinger | 2012-04-30 | 1 | -0/+6 |
| | |||||
* | Track the cache size directly. | Raymond Hettinger | 2012-04-30 | 1 | -10/+11 |
| | |||||
* | Factor out shared variables. | Raymond Hettinger | 2012-04-29 | 1 | -4/+6 |
| | |||||
* | Flatten the lru cache keyword args tuple for better memory utilization. | Raymond Hettinger | 2012-04-29 | 1 | -1/+3 |
| | |||||
* | Fix-up a comment | Raymond Hettinger | 2012-03-31 | 1 | -3/+2 |
| | |||||
* | Fix-up comments and add a sentinel variable for clarity. | Raymond Hettinger | 2012-03-31 | 1 | -16/+17 |
| | |||||
* | No need to create and destroy links when updating a fixed-sized circular queue. | Raymond Hettinger | 2012-03-31 | 1 | -11/+16 |
| | |||||
* | Minor cleanup: add whitespace, add comments, bring function attribute ↵ | Raymond Hettinger | 2012-03-30 | 1 | -5/+4 |
| | | | | updates together. | ||||
* | Fix whitespace | Raymond Hettinger | 2012-03-17 | 1 | -1/+1 |
| | |||||
* | Low overhead path for maxsize==0 | Raymond Hettinger | 2012-03-17 | 1 | -2/+13 |
| | |||||
* | Section-off the source for better readability. | Raymond Hettinger | 2012-03-17 | 1 | -0/+23 |
| | |||||
* | Minor beautification. | Raymond Hettinger | 2012-03-17 | 1 | -1/+1 |
| | |||||
* | Root variable is not changed. | Raymond Hettinger | 2012-03-17 | 1 | -1/+1 |
| | |||||
* | Fix whitespace | Raymond Hettinger | 2012-03-17 | 1 | -1/+1 |
| | |||||
* | Unique sentinel value for cache.get() | Raymond Hettinger | 2012-03-17 | 1 | -2/+2 |
| | |||||
* | Refactor calculation of the cache key. Minor code cleanups. | Raymond Hettinger | 2012-03-16 | 1 | -25/+21 |
| | |||||
* | merge heads | Benjamin Peterson | 2012-03-16 | 1 | -2/+1 |
|\ | |||||
| * | Minor code cleanup. | Raymond Hettinger | 2012-03-16 | 1 | -2/+1 |
| | | |||||
* | | clear the root with the cache | Benjamin Peterson | 2012-03-16 | 1 | -1/+3 |
|/ | |||||
* | Eliminate duplicate link lookup. Minor cleanup. | Raymond Hettinger | 2012-03-16 | 1 | -2/+2 |
| | |||||
* | Improve the memory utilization (and speed) of functools.lru_cache(). | Raymond Hettinger | 2012-03-16 | 1 | -21/+32 |
| | |||||
* | Issue #13544: Add __qualname__ to functools.WRAPPER_ASSIGNMENTS. | Meador Inge | 2011-12-12 | 1 | -1/+2 |
| | | | | Patch by Filip Gruszczyński. | ||||
* | Issue 13227: Option to make the lru_cache() type specific (suggested by ↵ | Raymond Hettinger | 2011-10-20 | 1 | -4/+18 |
| | | | | Andrew Koenig). | ||||
* | Merge | Raymond Hettinger | 2011-10-16 | 1 | -15/+19 |
|\ | |||||
| * | Issue 13177: Make tracebacks more readable by avoiding chained exceptions in ↵ | Raymond Hettinger | 2011-10-16 | 1 | -15/+19 |
| | | | | | | | | the lru_cache. | ||||
| * | Sync-up minor code edits with the default branch. | Raymond Hettinger | 2011-05-05 | 1 | -4/+4 |
| | | |||||
* | | Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable. | Raymond Hettinger | 2011-05-03 | 1 | -2/+1 |
|\ \ | |/ | |||||
| * | Fix __hash__ in functools.cmp_to_key() to work with collections.Hashable. | Raymond Hettinger | 2011-05-03 | 1 | -2/+1 |
| | | |||||
* | | Issue #11707: Fast C version of functools.cmp_to_key() | Raymond Hettinger | 2011-04-05 | 1 | -1/+6 |
| | | |||||
* | | Issue #11628: cmp_to_key should use __slots__. | Raymond Hettinger | 2011-03-22 | 1 | -0/+1 |
|\ \ | |/ | |||||
| * | Issue #11628: cmp_to_key should use __slots__. | Raymond Hettinger | 2011-03-22 | 1 | -0/+1 |
| | | |||||
* | | Minor optimization -- factor a constant expression out of the inner-loop. | Raymond Hettinger | 2011-03-18 | 1 | -3/+3 |
|/ | |||||
* | Add comment. | Raymond Hettinger | 2011-01-11 | 1 | -1/+1 |
| | |||||
* | Issue #10042: Fixed the total_ordering decorator to handle cross-type | Raymond Hettinger | 2011-01-08 | 1 | -8/+8 |
| | | | | comparisons that could lead to infinite recursion. | ||||
* | Issue 10593: Adopt Nick's suggestion for an lru_cache with maxsize=None. | Raymond Hettinger | 2010-12-01 | 1 | -19/+41 |
| | |||||
* | Doc and docstring nits. | Raymond Hettinger | 2010-12-01 | 1 | -2/+2 |
| | |||||
* | Add example, tighten text, and minor clean-ups. | Raymond Hettinger | 2010-11-30 | 1 | -2/+2 |
| | |||||
* | Neaten-up a bit. | Raymond Hettinger | 2010-11-30 | 1 | -7/+6 |
| | |||||
* | Issue 10586: change the new functools.lru_cache implementation to expose the ↵ | Nick Coghlan | 2010-11-30 | 1 | -7/+18 |
| | | | | maximum and current cache sizes through the public statistics API. This API is now a single function that returns a named tuple. | ||||
* | Clean-up docstring, comments, and whitespace. | Raymond Hettinger | 2010-11-25 | 1 | -5/+15 |
| |