summaryrefslogtreecommitdiffstats
path: root/Lib/functools.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-37116: Use PEP 570 syntax for positional-only parameters. (GH-13700)Serhiy Storchaka2019-06-011-13/+3
|
* bpo-36772 Allow lru_cache to be used as decorator without making a function ↵Raymond Hettinger2019-05-261-4/+8
| | | | call (GH-13048)
* bpo-35252: Remove FIXME from test_functools (GH-10551)Lysandros Nikolaou2019-05-191-3/+5
|
* bpo-36542: Allow to overwrite the signature for Python functions. (GH-12705)Serhiy Storchaka2019-05-061-0/+1
|
* bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)Serhiy Storchaka2019-04-011-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 Storchaka2019-03-271-14/+7
|
* Consistently move the misses update to just before the user function call ↵Raymond Hettinger2019-01-311-3/+3
| | | | (GH-11715)
* bpo-35780: Fix errors in lru_cache() C code (GH-11623)Raymond Hettinger2019-01-261-4/+7
|
* bpo-34890: Make iscoroutinefunction, isgeneratorfunction and ↵Pablo Galindo2018-10-261-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-bob2018-10-251-4/+39
|
* bpo-21145: Add cached_property decorator in functools (#6982)Carl Meyer2018-08-281-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 Na2018-07-101-0/+5
|
* bpo-32380: Create functools.singledispatchmethod (#6306)Ethan Smith2018-05-261-1/+38
|
* bpo-32227: functools.singledispatch supports registering via type ↵Łukasz Langa2017-12-111-1/+17
| | | | annotations (#4733)
* bpo-31581: Reduce the number of imports for functools (GH-3757)INADA Naoki2017-09-301-5/+8
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-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 Hettinger2017-09-051-1/+1
| | | | faster (#3338)
* Add comment to explain the implications of not sorting keywords (#3331)Raymond Hettinger2017-09-051-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).
* mergeRaymond Hettinger2017-01-091-4/+3
|\
| * Issue #29203: functools.lru_cache() now respects PEP 468Raymond Hettinger2017-01-091-4/+3
| |
* | Issue #28991: Address comment that the __len__ call looked unattractiveRaymond Hettinger2016-12-161-3/+4
|/
* mergeRaymond Hettinger2016-12-161-2/+4
|\
| * Issue #28991: Fix obscure reentrancy bug in functools.lru_cache().Raymond Hettinger2016-12-161-2/+4
| |
* | Issue #27137: align Python & C implementations of functools.partialNick Coghlan2016-09-101-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 Storchaka2015-10-241-1/+1
|
* Issue #23572: Fixed functools.singledispatch on classes with falsy metaclasses.Yury Selivanov2015-08-181-1/+1
| | | | Patch by Ethan Furman.
* Backed out changeset: b0a0b9b59012Serhiy Storchaka2015-05-241-99/+108
|
* Backed out changeset 57776eee74f2Larry Hastings2015-05-231-108/+99
|
* Issue #14373: Added C implementation of functools.lru_cache(). Based onSerhiy Storchaka2015-05-231-99/+108
| | | | patches by Matt Joiner and Alexey Kachayev.
* Issue #16261: Converted some bare except statements to except statementsSerhiy Storchaka2015-05-201-1/+1
| | | | with specified exception type. Original patch by Ramchandra Apte.
* Reduce the overhead in functools.total_ordering by localizing NotImplemented.Raymond Hettinger2015-05-131-12/+12
| | | | (Sugguested by Serhiy Storchaka)
* Issue #7830: Flatten nested functools.partial.Alexander Belopolsky2015-03-011-0/+8
|
* Issue #23326: Removed __ne__ implementations. Since fixing default __ne__Serhiy Storchaka2015-01-311-2/+0
| | | | implementation in issue #21408 they are redundant.
* No need to rebuild a constant dictionary on every call. Move convert ↵Raymond Hettinger2015-01-141-16/+17
| | | | mapping to module level.
* Minor speed-up. Use local variable instead of a global lookup.Raymond Hettinger2015-01-071-10/+10
|
* mergeRaymond Hettinger2015-01-061-76/+81
|\
| * Issue #23132: Mitigate regression in speed and clarity in ↵Raymond Hettinger2015-01-061-64/+78
| | | | | | | | functools.total_ordering.
* | Issue #23132: Improve performance and introspection support of comparisonSerhiy Storchaka2015-01-011-41/+50
| | | | | | | | methods created by functool.total_ordering.
* | mergeRaymond Hettinger2014-08-121-0/+6
|\ \ | |/
| * Issue 22184: Early detection and reporting of missing lru_cache parametersRaymond Hettinger2014-08-121-0/+6
| |
* | Issue #22032: __qualname__ instead of __name__ is now always used to formatSerhiy Storchaka2014-07-221-1/+1
|/ | | | fully qualified class names of Python implemented classes.
* Issue #20976: pyflakes: Remove unused importsVictor Stinner2014-03-201-1/+1
|
* inspect.signature: Add support for 'functools.partialmethod' #20223Yury Selivanov2014-01-271-0/+1
|
* Fix functools.partialmethod docs and __all__Nick Coghlan2013-11-041-1/+1
|
* Issue #4331: Added functools.partialmethodNick Coghlan2013-11-031-2/+76
| | | | Initial patch by Alon Horev
* Close #10042: functools.total_ordering now handles NotImplementedNick Coghlan2013-10-011-12/+82
| | | | (Patch by Katie Miller)
* Close issue 17482: don't overwrite __wrapped__Nick Coghlan2013-07-151-1/+3
|
* Issue #18200: Back out usage of ModuleNotFoundError (8d28d44f3a9a)Brett Cannon2013-07-041-3/+3
|
* Issue #18244: Adopt C3-based linearization in functools.singledispatch for ↵Łukasz Langa2013-07-011-43/+135
| | | | improved ABC support
* Issue #18200: Update the stdlib (except tests) to useBrett Cannon2013-06-141-3/+3
| | | | ModuleNotFoundError.