Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | gh-126133: Only use start year in PSF copyright, remove end years (#126236) | Hugo van Kemenade | 2024-11-12 | 1 | -1/+1 |
| | |||||
* | gh-125916: Allow functools.reduce() 'initial' to be a keyword argument (#125917) | Sayandip Dutta | 2024-11-12 | 1 | -1/+1 |
| | |||||
* | Align functools.reduce() docstring with PEP-257 (#126045) | Sergey B Kirpichev | 2024-10-29 | 1 | -6/+8 |
| | | | Yak-shave in preparation for Argument Clinic adaption in gh-125999. | ||||
* | functools: Give up on lazy-importing types (#124736) | Jelle Zijlstra | 2024-09-29 | 1 | -8/+5 |
| | | | | | | | | | PR #121089 added an eager import for types.MethodType, but still left the existing hacks for lazily importing from types. We could also create MethodType internally in functools.py (e.g., by using `type(Placeholder.__repr__)`, but it feels not worth it at this point, so instead I unlazified all the usages of types in the module. | ||||
* | gh-119127: functools.partial placeholders (gh-119827) | dgpb | 2024-09-26 | 1 | -59/+133 |
| | |||||
* | gh-119180: Add `annotationlib` module to support PEP 649 (#119891) | Jelle Zijlstra | 2024-07-23 | 1 | -4/+10 |
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-121027: Make the functools.partial object a method descriptor (GH-121089) | Serhiy Storchaka | 2024-07-03 | 1 | -7/+3 |
| | | | Co-authored-by: d.grigonis <dgrigonis@users.noreply.github.com> | ||||
* | gh-121027: Add a future warning in functools.partial.__get__ (#121086) | Serhiy Storchaka | 2024-06-27 | 1 | -1/+11 |
| | |||||
* | gh-121025: Improve partialmethod.__repr__ (GH-121033) | Bénédikt Tran | 2024-06-26 | 1 | -9/+7 |
| | | | It no longer contains redundant commas and spaces. | ||||
* | GH-100242: bring functools.py partial implementation more in line with C ↵ | CF Bolz-Tereick | 2024-04-17 | 1 | -1/+1 |
| | | | | | | | code (GH-100244) in partial.__new__, before checking for the existence of the attribute 'func', first check whether the argument is an instance of partial. | ||||
* | Add 'The Python 2.3 Method Resolution Order' (#116435) | Hugo van Kemenade | 2024-04-15 | 1 | -1/+1 |
| | |||||
* | gh-72249: Include the module name in the repr of partial object (GH-101910) | Furkan Onder | 2024-02-25 | 1 | -4/+4 |
| | | | Co-authored-by: Anilyka Barry <vgr255@live.ca> | ||||
* | gh-85294: Handle missing arguments to @singledispatchmethod gracefully ↵ | Ammar Askar | 2024-02-16 | 1 | -1/+4 |
| | | | | | | (GH-21471) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | bpo-38364: unwrap partialmethods just like we unwrap partials (#16600) | Martijn Pieters | 2024-02-15 | 1 | -1/+12 |
| | | | | | | | | | | | | | * bpo-38364: unwrap partialmethods just like we unwrap partials The inspect.isgeneratorfunction, inspect.iscoroutinefunction and inspect.isasyncgenfunction already unwrap functools.partial objects, this patch adds support for partialmethod objects as well. Also: Rename _partialmethod to __partialmethod__. Since we're checking this attribute on arbitrary function-like objects, we should use the namespace reserved for core Python. --------- Co-authored-by: Petr Viktorin <encukou@gmail.com> | ||||
* | gh-109653: Avoid a top-level import of `types` in `functools` (#109804) | Alex Waygood | 2023-09-24 | 1 | -1/+2 |
| | |||||
* | gh-102757: fix function signature mismatch for `functools.reduce` between ↵ | Xuehai Pan | 2023-09-18 | 1 | -1/+1 |
| | | | | code and documentation (#102759) | ||||
* | gh-107995: Fix doctest collection of functools.cached_property objects (#107996) | Tyler Smart | 2023-08-18 | 1 | -0/+1 |
| | | | Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-85160: Reduce memory usage of `singledispatchmethod` (#107706) | Alex Waygood | 2023-08-07 | 1 | -5/+5 |
| | | | | | A small followup to #107148 Co-authored-by: Serhiy Storchaka <storchaka@gmail.com> | ||||
* | gh-85160: improve performance of `functools.singledispatchmethod` (#107148) | Pieter Eendebak | 2023-08-06 | 1 | -2/+19 |
| | | | | Co-authored-by: mental <m3nta1@yahoo.com> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> | ||||
* | gh-106292: restore checking __dict__ in cached_property.__get__ (#106380) | Carl Meyer | 2023-07-05 | 1 | -10/+13 |
| | | | | | * gh-106292: restore checking __dict__ in cached_property.__get__ Co-authored-by: Dong-hee Na <donghee.na92@gmail.com> | ||||
* | gh-105172: Fixed functools.lru_cache typed argument docstring. (GH-105173) | Bar Harel | 2023-05-31 | 1 | -2/+3 |
| | |||||
* | gh-104600: Make function.__type_params__ writable (#104601) | Jelle Zijlstra | 2023-05-18 | 1 | -1/+1 |
| | |||||
* | gh-87634: remove locking from functools.cached_property (GH-101890) | Carl Meyer | 2023-02-23 | 1 | -18/+9 |
| | | | Remove the undocumented locking capabilities of functools.cached_property. | ||||
* | gh-89828: Do not relay the __class__ attribute in GenericAlias (#93754) | Serhiy Storchaka | 2022-06-18 | 1 | -3/+2 |
| | | | | | list[int].__class__ returned type, and isinstance(list[int], type) returned True. It caused numerous problems in code that checks isinstance(x, type). | ||||
* | 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. |