summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_functools.py
Commit message (Collapse)AuthorAgeFilesLines
* bpo-36772 Allow lru_cache to be used as decorator without making a function ↵Raymond Hettinger2019-05-261-7/+12
| | | | call (GH-13048)
* bpo-35252: Remove FIXME from test_functools (GH-10551)Lysandros Nikolaou2019-05-191-6/+5
|
* bpo-36540: PEP 570 -- Implementation (GH-12701)Pablo Galindo2019-04-291-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains the implementation of PEP570: Python positional-only parameters. * Update Grammar/Grammar with new typedarglist and varargslist * Regenerate grammar files * Update and regenerate AST related files * Update code object * Update marshal.c * Update compiler and symtable * Regenerate importlib files * Update callable objects * Implement positional-only args logic in ceval.c * Regenerate frozen data * Update standard library to account for positional-only args * Add test file for positional-only args * Update other test files to account for positional-only args * Add News entry * Update inspect module and related tests
* bpo-36650: Fix handling of empty keyword args in C version of lru_cache. ↵Raymond Hettinger2019-04-201-0/+14
| | | | (GH-12881)
* bpo-36492: Deprecate passing some arguments as keyword arguments. (GH-12637)Serhiy Storchaka2019-04-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | 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-35780: Fix errors in lru_cache() C code (GH-11623)Raymond Hettinger2019-01-261-1/+28
|
* bpo-32321: Add pure Python fallback for functools.reduce (GH-8548)madman-bob2018-10-251-32/+39
|
* bpo-21145: Add cached_property decorator in functools (#6982)Carl Meyer2018-08-281-0/+166
| | | | | | 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 wrong use of assertRaises (GH-8306)INADA Naoki2018-07-171-1/+1
|
* bpo-33967: Remove use of deprecated assertRaisesRegexp() (GH-8261)Zackery Spytz2018-07-121-1/+1
| | | It was added in test_functools at 445f1b3.
* bpo-33967: Fix singledispatch raised IndexError when no args (GH-8184)Dong-hee Na2018-07-101-0/+7
|
* bpo-32380: Create functools.singledispatchmethod (#6306)Ethan Smith2018-05-261-0/+118
|
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-1/+1
| | | | | | | | * Fix multiple typos in code comments * Add spacing in comments (test_logging.py, test_math.py) * Fix spaces at the beginning of comments in test_logging.py
* bpo-32227: functools.singledispatch supports registering via type ↵Łukasz Langa2017-12-111-0/+68
| | | | annotations (#4733)
* bpo-31581: Reduce the number of imports for functools (GH-3757)INADA Naoki2017-09-301-83/+84
|
* bpo-31370: Remove support for threads-less builds (#3385)Antoine Pitrou2017-09-071-7/+1
| | | | | | * Remove Setup.config * Always define WITH_THREAD for compatibility.
* Spelling fixes (#2902)Ville Skyttä2017-08-031-1/+1
|
* bpo-30144: Import collections ABC from collections.abc rather than ↵Serhiy Storchaka2017-04-241-19/+20
| | | | collections. (#1263)
* bpo-29800: Fix crashes in partial.__repr__ if the keys of partial.keywords ↵Michael Seifert2017-03-151-0/+26
| | | | are not strings (#649)
* bpo-29532: Altering a kwarg dictionary passed to functools.partial() (#190)Serhiy Storchaka2017-02-201-0/+9
| | | no longer affects a partial object after creation.
* Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+15
|\ | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+15
| |\ | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| | * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-0/+15
| | | | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
* | | Add test for ea064ff3c10fRaymond Hettinger2017-01-091-0/+9
| | |
* | | mergeRaymond Hettinger2017-01-091-0/+10
|\ \ \ | |/ /
| * | Issue #29203: functools.lru_cache() now respects PEP 468Raymond Hettinger2017-01-091-0/+10
| | |
* | | Issue #29200: Fix test to use self.assertEqual instead of py.test style testsRaymond Hettinger2017-01-081-12/+12
| | |
* | | Issue #29200: Add test for lru cache only calling __hash__ onceRaymond Hettinger2017-01-081-0/+36
|/ /
* | mergeRaymond Hettinger2016-12-161-0/+13
|\ \ | |/
| * Issue #28991: Fix obscure reentrancy bug in functools.lru_cache().Raymond Hettinger2016-12-161-0/+13
| |
* | Issue #26939: Add the support.setswitchinterval() function to fixXavier de Gaye2016-12-081-1/+1
| | | | | | | | test_functools hanging on the Android armv7 qemu emulator.
* | Merge 3.6 (issue #28653)Yury Selivanov2016-11-091-0/+19
|\ \ | |/
| * Issue #28653: Fix a refleak in functools.lru_cache.Yury Selivanov2016-11-091-0/+19
| |
* | Extend the test to lower pickle protocols.Serhiy Storchaka2016-09-221-1/+1
|\ \ | |/
| * Extend the test to lower pickle protocols.Serhiy Storchaka2016-09-221-1/+1
| |
* | Issue #27137: align Python & C implementations of functools.partialNick Coghlan2016-09-101-74/+101
| | | | | | | | | | | | | | | | 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.
* | Issue 27598: Add Collections to collections.abc.Guido van Rossum2016-08-231-7/+10
| | | | | | | | Patch by Ivan Levkivskyi, docs by Neil Girdhar.
* | Backed out changeset af29d89083b3 (closes #25548) (closes #27498)Benjamin Peterson2016-07-141-12/+21
| |
* | Issue #25455: Clean up reference loops created in tests for recursiveSerhiy Storchaka2016-06-121-12/+36
|\ \ | |/ | | | | functools.partial objects.
| * Issue #25455: Clean up reference loops created in tests for recursiveSerhiy Storchaka2016-06-121-12/+36
| | | | | | | | functools.partial objects.
* | Issue #25455: Fixed a crash in repr of recursive functools.partial objects.Serhiy Storchaka2016-06-121-0/+37
|\ \ | |/
| * Issue #25455: Fixed a crash in repr of recursive functools.partial objects.Serhiy Storchaka2016-06-121-0/+37
| |
* | Issue #25548: Showing memory address of class objects in replKushal Das2016-06-041-21/+12
| |
* | Issue #27076: Merge spelling from 3.5Martin Panter2016-05-261-1/+1
|\ \ | |/
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-261-1/+1
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | Add collections.Reversible. Patch by Ivan Levkivskyi. Fixes issue #25987.Guido van Rossum2016-04-041-1/+1
|/
* Issue #25945: Fixed bugs in functools.partial.Serhiy Storchaka2016-02-021-6/+87
| | | | | | | Fixed a crash when unpickle the functools.partial object with wrong state. Fixed a leak in failed functools.partial constructor. "args" and "keywords" attributes of functools.partial have now always types tuple and dict correspondingly.
* Issue #25447: Copying the lru_cache() wrapper object now always works,Serhiy Storchaka2015-12-281-2/+12
| | | | | independedly from the type of the wrapped object (by returning the original object unchanged).
* Issue #25447: The lru_cache() wrapper objects now can be copied and pickledSerhiy Storchaka2015-10-241-2/+56
| | | | (by returning the original object unchanged).
* Issue #25137: Add a note to whatsnew/3.5.rst for nested functools.partial callsBerker Peksag2015-09-221-3/+15
| | | | | Also, properly skip the test_nested_optimization test for partial subclasses and add a test for the suggested usage.