Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | This localization technique is no longer cost effective. (GH-30818) | Raymond Hettinger | 2022-01-23 | 1 | -12/+12 |
| | |||||
* | bpo-46032: Check types in singledispatch's register() at declaration time ↵ | Serhiy Storchaka | 2021-12-25 | 1 | -5/+16 |
| | | | | | | | | | (GH-30050) The registry() method of functools.singledispatch() functions checks now the first argument or the first parameter annotation and raises a TypeError if it is not supported. Previously unsupported "types" were ignored (e.g. typing.List[int]) or caused an error at calling time (e.g. list[int]). | ||||
* | bpo-46014: Add ability to use typing.Union with singledispatch (GH-30017) | Yurii Karabas | 2021-12-10 | 1 | -7/+28 |
| | |||||
* | bpo-44605: Teach @total_ordering() to work with metaclasses (GH-27633) | Raymond Hettinger | 2021-08-06 | 1 | -12/+12 |
| | |||||
* | Update URLs in comments and metadata to use HTTPS (GH-27458) | Noah Kantrowitz | 2021-07-30 | 1 | -2/+2 |
| | |||||
* | bpo-31082: Use "iterable" in the docstring for functools.reduce() (GH-20796) | Zackery Spytz | 2020-06-28 | 1 | -7/+8 |
| | |||||
* | bpo-17005: Move topological sort functionality to its own module (GH-20558) | Pablo Galindo | 2020-05-31 | 1 | -245/+0 |
| | | | | | | The topological sort functionality that was introduced initially in the functools module has been moved to a new graphlib module to better accommodate the new tools and keep the original scope of the functools module. | ||||
* | bpo-40571: Make lru_cache(maxsize=None) more discoverable (GH-20019) | Raymond Hettinger | 2020-05-12 | 1 | -1/+10 |
| | |||||
* | bpo-39481: Make functools.cached_property, partial, partialmethod generic ↵ | Ethan Smith | 2020-04-14 | 1 | -0/+6 |
| | | | | (#19427) | ||||
* | Updates functools.py with consistent quotes (GH-18825) | Nikita Sobolev | 2020-03-11 | 1 | -1/+1 |
| | | | | | | I have noticed that `'` quotes are used everywhere except this particular case, which was introduced in https://github.com/python/cpython/pull/18726 So, this is a trivial fix to enforce better consistency. | ||||
* | bpo-35712: Make using NotImplemented in a boolean context issue a ↵ | MojoVampire | 2020-03-03 | 1 | -0/+4 |
| | | | | deprecation warning (GH-13195) | ||||
* | bpo-39815: add cached_property to all (GH-18726) | Hakan Çelik | 2020-03-01 | 1 | -1/+2 |
| | | | Automerge-Triggered-By: @pablogsal | ||||
* | bpo-17005: Add a class to perform topological sorting to the standard ↵ | Pablo Galindo | 2020-01-23 | 1 | -2/+247 |
| | | | | | library (GH-11583) Co-Authored-By: Tim Peters <tim.peters@gmail.com> | ||||
* | bpo-38565: add new cache_parameters method for lru_cache (GH-16916) | Manjusaka | 2019-11-12 | 1 | -0/+2 |
| | |||||
* | Doc: Fix Wikipedia link for functools.lru_cache (GH-16183) | amist | 2019-09-16 | 1 | -1/+1 |
| | |||||
* | bpo-36743: __get__ is sometimes called without the owner argument (#12992) | Raymond Hettinger | 2019-08-29 | 1 | -3/+3 |
| | |||||
* | [3.9] bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-12620) | Serhiy Storchaka | 2019-06-05 | 1 | -18/+1 |
| | | | Turn deprecation warnings added in 3.8 into TypeError. | ||||
* | bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700) | Serhiy Storchaka | 2019-06-01 | 1 | -13/+3 |
| | |||||
* | bpo-36772 Allow lru_cache to be used as decorator without making a function ↵ | Raymond Hettinger | 2019-05-26 | 1 | -4/+8 |
| | | | | call (GH-13048) | ||||
* | bpo-35252: Remove FIXME from test_functools (GH-10551) | Lysandros Nikolaou | 2019-05-19 | 1 | -3/+5 |
| | |||||
* | bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705) | Serhiy Storchaka | 2019-05-06 | 1 | -0/+1 |
| | |||||
* | bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637) | Serhiy Storchaka | 2019-04-01 | 1 | -1/+17 |
| | | | | | | | | | | | | | | | | | | | | | | Deprecated passing the following arguments as keyword arguments: - "func" in functools.partialmethod(), weakref.finalize(), profile.Profile.runcall(), cProfile.Profile.runcall(), bdb.Bdb.runcall(), trace.Trace.runfunc() and curses.wrapper(). - "function" in unittest.addModuleCleanup() and unittest.TestCase.addCleanup(). - "fn" in the submit() method of concurrent.futures.ThreadPoolExecutor and concurrent.futures.ProcessPoolExecutor. - "callback" in contextlib.ExitStack.callback(), contextlib.AsyncExitStack.callback() and contextlib.AsyncExitStack.push_async_callback(). - "c" and "typeid" in the create() method of multiprocessing.managers.Server and multiprocessing.managers.SharedMemoryServer. - "obj" in weakref.finalize(). Also allowed to pass arbitrary keyword arguments (even "self" and "func") if the above arguments are passed as positional argument. | ||||
* | bpo-36431: Use PEP 448 dict unpacking for merging two dicts. (GH-12553) | Serhiy Storchaka | 2019-03-27 | 1 | -14/+7 |
| | |||||
* | Consistently move the misses update to just before the user function call ↵ | Raymond Hettinger | 2019-01-31 | 1 | -3/+3 |
| | | | | (GH-11715) | ||||
* | bpo-35780: Fix errors in lru_cache() C code (GH-11623) | Raymond Hettinger | 2019-01-26 | 1 | -4/+7 |
| | |||||
* | bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵ | Pablo Galindo | 2018-10-26 | 1 | -0/+6 |
| | | | | | | | | | | | isasyncgenfunction work with functools.partial (GH-9903) inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions. | ||||
* | bpo-32321: Add pure Python fallback for functools.reduce (GH-8548) | madman-bob | 2018-10-25 | 1 | -4/+39 |
| | |||||
* | bpo-21145: Add cached_property decorator in functools (#6982) | Carl Meyer | 2018-08-28 | 1 | -0/+55 |
| | | | | | | Robust caching of calculated properties is harder than it looks at first glance, so add a solid, well-tested implementation to the standard library. | ||||
* | bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184) | Dong-hee Na | 2018-07-10 | 1 | -0/+5 |
| | |||||
* | bpo-32380: Create functools.singledispatchmethod (#6306) | Ethan Smith | 2018-05-26 | 1 | -1/+38 |
| | |||||
* | bpo-32227: functools.singledispatch supports registering via type ↵ | Łukasz Langa | 2017-12-11 | 1 | -1/+17 |
| | | | | annotations (#4733) | ||||
* | bpo-31581: Reduce the number of imports for functools (GH-3757) | INADA Naoki | 2017-09-30 | 1 | -5/+8 |
| | |||||
* | bpo-31370: Remove support for threads-less builds (#3385) | Antoine Pitrou | 2017-09-07 | 1 | -7/+1 |
| | | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility. | ||||
* | Conceptually, roots is a set. Also searching it as a set is a tiny bit ↵ | Raymond Hettinger | 2017-09-05 | 1 | -1/+1 |
| | | | | faster (#3338) | ||||
* | Add comment to explain the implications of not sorting keywords (#3331) | Raymond Hettinger | 2017-09-05 | 1 | -0/+4 |
| | | | In Python 3.6, sorted() was removed from _make_key() for the lru_cache and instead rely on guaranteed keyword argument order preservation. This makes keyword argument handling faster but it also causes multiple callers with a different keyword argument order to be cached as separate items. Depending on your point of view, this is either a performance regression (increased number of cache misses) or a performance enhancement (faster computation of keys). | ||||
* | merge | Raymond Hettinger | 2017-01-09 | 1 | -4/+3 |
|\ | |||||
| * | Issue #29203: functools.lru_cache() now respects PEP 468 | Raymond Hettinger | 2017-01-09 | 1 | -4/+3 |
| | | |||||
* | | Issue #28991: Address comment that the __len__ call looked unattractive | Raymond Hettinger | 2016-12-16 | 1 | -3/+4 |
|/ | |||||
* | merge | Raymond Hettinger | 2016-12-16 | 1 | -2/+4 |
|\ | |||||
| * | Issue #28991: Fix obscure reentrancy bug in functools.lru_cache(). | Raymond Hettinger | 2016-12-16 | 1 | -2/+4 |
| | | |||||
* | | Issue #27137: align Python & C implementations of functools.partial | Nick Coghlan | 2016-09-10 | 1 | -17/+75 |
|/ | | | | | | | | The pure Python fallback implementation of functools.partial now matches the behaviour of its accelerated C counterpart for subclassing, pickling and text representation purposes. Patch by Emanuel Barry and Serhiy Storchaka. | ||||
* | Removed redundant call of update_wrapper(). | Serhiy Storchaka | 2015-10-24 | 1 | -1/+1 |
| | |||||
* | Issue #23572: Fixed functools.singledispatch on classes with falsy metaclasses. | Yury Selivanov | 2015-08-18 | 1 | -1/+1 |
| | | | | Patch by Ethan Furman. | ||||
* | Backed out changeset: b0a0b9b59012 | Serhiy Storchaka | 2015-05-24 | 1 | -99/+108 |
| | |||||
* | Backed out changeset 57776eee74f2 | Larry Hastings | 2015-05-23 | 1 | -108/+99 |
| | |||||
* | Issue #14373: Added C implementation of functools.lru_cache(). Based on | Serhiy Storchaka | 2015-05-23 | 1 | -99/+108 |
| | | | | patches by Matt Joiner and Alexey Kachayev. | ||||
* | Issue #16261: Converted some bare except statements to except statements | Serhiy Storchaka | 2015-05-20 | 1 | -1/+1 |
| | | | | with specified exception type. Original patch by Ramchandra Apte. | ||||
* | Reduce the overhead in functools.total_ordering by localizing NotImplemented. | Raymond Hettinger | 2015-05-13 | 1 | -12/+12 |
| | | | | (Sugguested by Serhiy Storchaka) | ||||
* | Issue #7830: Flatten nested functools.partial. | Alexander Belopolsky | 2015-03-01 | 1 | -0/+8 |
| | |||||
* | Issue #23326: Removed __ne__ implementations. Since fixing default __ne__ | Serhiy Storchaka | 2015-01-31 | 1 | -2/+0 |
| | | | | implementation in issue #21408 they are redundant. |