summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos mostly in comments, docs and test names (GH-15209)Min ho Kim2019-08-301-1/+1
|
* bpo-37685: Use singletons ALWAYS_EQ and NEVER_EQ in more tests. (GH-15167)Serhiy Storchaka2019-08-081-4/+1
|
* Fix typos in comments, docs and test names (#15018)Min ho Kim2019-07-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Fix typos in comments, docs and test names * Update test_pyparse.py account for change in string length * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: splitable -> splittable Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Apply suggestion: Dealloccte -> Deallocate Co-Authored-By: Terry Jan Reedy <tjreedy@udel.edu> * Update posixmodule checksum. * Reverse idlelib changes.
* Remove unused imports in tests (GH-14518)Victor Stinner2019-07-011-1/+1
|
* bpo-27141: Fix collections.UserList and UserDict shallow copy. (GH-4094)Bar Harel2019-05-191-0/+24
|
* bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375)Raymond Hettinger2019-03-181-6/+6
|
* bpo-36068: Make _tuplegetter objects serializable (GH-11981)Joe Jevnik2019-02-211-1/+10
|
* bpo-36057 Update docs and tests for ordering in collections.Counter [no ↵Raymond Hettinger2019-02-211-0/+57
| | | | | | | | | | behavior change] (#11962) * Add tests for Counter order. No behavior change. * Update docs and tests * Fix doctest output and capitalization
* bpo-36060: Document how collections.ChainMap() determines iteration order ↵Raymond Hettinger2019-02-211-0/+14
| | | | (GH-11969)
* bpo-32492: Tweak _collections._tuplegetter. (GH-11367)Serhiy Storchaka2018-12-311-18/+55
| | | | | | * Replace the docstrings cache with sys.intern(). * Improve tests. * Unify names of tp_descr_get and tp_descr_set functions.
* bpo-32492: 1.6x speed up in namedtuple attribute access using C fast-path ↵Pablo Galindo2018-12-301-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#10495) * bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Add News entry * fixup! bpo-32492: 2.5x speed up in namedtuple attribute access using C fast path * Check for tuple in the __get__ of the new descriptor and don't cache the descriptor itself * Don't inherit from property. Implement GC methods to handle __doc__ * Add a test for the docstring substitution in descriptors * Update NEWS entry to reflect time against 3.7 branch * Simplify implementation with argument clinic, better error messages, only __new__ * Use positional-only parameters for the __new__ * Use PyTuple_GET_SIZE and PyTuple_GET_ITEM to tighter the implementation of tuplegetterdescr_get * Implement __set__ to make tuplegetter a data descriptor * Use Py_INCREF now that we inline PyTuple_GetItem * Apply the valid_index() function, saving one test * Move Py_None test out of the critical path.
* bpo-35202: Remove unused imports in Lib directory. (GH-10446)Srinivas Thatiparthy (శ్రీనివాస్ తాటిపర్తి)2018-11-101-2/+0
|
* bpo-33462: Add __reversed__ to dict and dict views (GH-6827)Rémi Lapeyre2018-11-061-13/+12
|
* bpo-34427: Fix infinite loop when calling MutableSequence.extend() on self ↵Naris R2018-08-301-0/+12
| | | | (GH-8813)
* bpo-32792: Preserve mapping order in ChainMap() (GH-5586)Raymond Hettinger2018-02-111-0/+17
|
* bpo-32467: Let collections.abc.ValuesView inherit from Collection (#5152)Raymond Hettinger2018-01-121-2/+2
|
* bpo-32320: Add default value support to collections.namedtuple() (#4859)Raymond Hettinger2018-01-111-0/+51
|
* bpo-32297: Few misspellings found in Python source code comments. (#4803)Mike2017-12-141-3/+3
| | | | | | | | * 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-31709: Drop support for asynchronous __aiter__. (#3903)Yury Selivanov2017-10-061-2/+2
|
* bpo-28638: Optimize namedtuple() creation time by minimizing use of exec() ↵Raymond Hettinger2017-09-101-22/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#3454) * Working draft without _source * Re-use itemgetter() instances * Speed-up calls to __new__() with a pre-bound tuple.__new__() * Add note regarding string interning * Remove unnecessary create function wrappers * Minor sync-ups with PR-2736. Mostly formatting and f-strings * Bring-in qualname/__module fix-ups from PR-2736 * Formally remove the verbose flag and _source attribute * Restore a test of potentially problematic field names * Restore kwonly_args test but without the verbose option * Adopt Inada's idea to reuse the docstrings for the itemgetters * Neaten-up a bit * Add news blurb * Serhiy pointed-out the need for interning * Jelle noticed as missing f on an f-string * Add whatsnew entry for feature removal * Accede to request for dict literals instead keyword arguments * Leave the method.__module__ attribute pointing the actual location of the code * Improve variable names and add a micro-optimization for an non-public helper function * Simplify by in-lining reuse_itemgetter() * Arrange steps in more logical order * Save docstring in local cache instead of interning
* bpo-29919: Remove unused imports found by pyflakes (#137)Victor Stinner2017-03-271-1/+0
| | | Make also minor PEP8 coding style fixes on modified imports.
* bpo-26915: Test identity first in membership operation in index() and ↵Xiang Zhang2017-03-081-4/+13
| | | | | | count() methods of collections.abc.Sequence (GH-503)
* Issue #18896: Python function can now have more than 255 parameters.Serhiy Storchaka2016-12-161-2/+1
| | | | collections.namedtuple() now supports tuples with more than 255 elements.
* Issue #28720: Add collections.abc.AsyncGenerator.Yury Selivanov2016-11-161-1/+83
|
* Issue #17941: Add a *module* parameter to collections.namedtuple()Raymond Hettinger2016-09-121-0/+4
|
* Issue 27598: Add Collections to collections.abc.Guido van Rossum2016-08-231-1/+89
| | | | Patch by Ivan Levkivskyi, docs by Neil Girdhar.
* Anti-registration of various ABC methods.Guido van Rossum2016-08-181-7/+53
| | | | | | | | | | - Issue #25958: Support "anti-registration" of special methods from various ABCs, like __hash__, __iter__ or __len__. All these (and several more) can be set to None in an implementation class and the behavior will be as if the method is not defined at all. (Previously, this mechanism existed only for __hash__, to make mutable classes unhashable.) Code contributed by Andrew Barnert and Ivan Levkivskyi.
* Issue #25628: Make namedtuple "rename" and "verbose" parameters keyword-only.Raymond Hettinger2016-08-161-0/+12
|
* Issue #27626: Merge spelling fixes from 3.5Martin Panter2016-07-281-1/+1
|\
| * Issue #27626: Spelling fixes in docs, comments and internal namesMartin Panter2016-07-281-1/+1
| | | | | | | | Based on patch by Ville Skyttä.
* | Issue 26915: Add identity checks to the collections ABC __contains__ methods.Raymond Hettinger2016-05-051-1/+21
| |
* | Add collections.Reversible. Patch by Ivan Levkivskyi. Fixes issue #25987.Guido van Rossum2016-04-041-3/+28
|/
* Issue #25616: Tests for OrderedDict are extracted from test_collectionsSerhiy Storchaka2015-11-251-691/+12
|\ | | | | | | into separate file test_ordered_dict.
| * Issue #25616: Tests for OrderedDict are extracted from test_collectionsSerhiy Storchaka2015-11-251-307/+13
| | | | | | | | into separate file test_ordered_dict.
* | Issue #25449: Fixed a crash and leaking NULL in repr() of OrderedDict thatSerhiy Storchaka2015-11-041-0/+54
| | | | | | | | was mutated by direct calls of dict methods.
* | Issue #25449: Iterating OrderedDict with keys with unstable hash now raisesSerhiy Storchaka2015-11-041-61/+83
| | | | | | | | | | | | KeyError in C implementations as well as in Python implementation. Added tests for OrderedDict subclasses.
* | Issue #25395: Fixed crash when highly nested OrderedDict structures wereSerhiy Storchaka2015-11-011-0/+24
| | | | | | | | garbage collected.
* | Issue #25406: Fixed a bug in C implementation of OrderedDict.move_to_end()Serhiy Storchaka2015-10-141-0/+14
| | | | | | | | | | that caused segmentation fault or hang in iterating after moving several items to the start of ordered dict.
* | mergeRaymond Hettinger2015-08-301-1/+11
|\ \ | |/
| * Issue #24931: Resolve __dict__ conflict in namedtuple subclasses.Raymond Hettinger2015-08-301-1/+11
| |
* | Issue #24667: Resize odict in all cases that the underlying dict resizes.Eric Snow2015-08-071-0/+23
| |
* | Issue #24400: Resurrect inspect.isawaitable()Yury Selivanov2015-07-031-4/+8
| | | | | | | | | | | | | | | | collections.abc.Awaitable and collections.abc.Coroutine no longer use __instancecheck__ hook to detect generator-based coroutines. inspect.isawaitable() can be used to detect generator-based coroutines and to distinguish them from regular generator objects.
* | Issue #24369: Defend against key-changes during iteration.Eric Snow2015-06-041-0/+17
| |
* | Issue #24368: Support keyword arguments in OrderedDict methods.Eric Snow2015-06-031-1/+15
| |
* | Issue #24359: Check for changed OrderedDict size during iteration.Eric Snow2015-06-021-4/+0
| |
* | Issue #24348: Drop superfluous increfs/decrefs.Eric Snow2015-06-021-0/+12
| |
* | Issue #24347: Set KeyError if PyDict_GetItemWithError returns NULL.Eric Snow2015-06-021-0/+18
| |
* | Issue #16991: Do not return None from OrderedDict.__reversed__.Eric Snow2015-05-301-1/+13
| |
* | Reverting my previous commit.Yury Selivanov2015-05-301-7/+0
| | | | | | | | Something went horribly wrong when I was doing `hg rebase`.
* | Issue #16991: Add a C implementation of collections.OrderedDict.Eric Snow2015-05-301-18/+184
| |