Add missing methods to collections classes#6388
Merged
Merged
Conversation
These were all discovered by running the `stubtest_stdlib` test without the `--ignore-missing-stub` option. `ChainMap.copy()` and `ChainMap.fromkeys()` appear to have been there since at least Python 3.6 (cpython source code for the class here: https://github.com/python/cpython/blob/2c56c97f015a7ea81719615ddcf3c745fba5b4f3/Lib/collections/__init__.py#L853). `Counter.total()` was added in 3.10: https://docs.python.org/3/library/collections.html#collections.Counter.total. `UserString.isascii()` appears to have been added in Python 3.7; it doesn't appear in the ChangeLog, but you can see it was added in this commit here: python/cpython#5342.
This comment has been minimized.
This comment has been minimized.
Akuli
reviewed
Nov 26, 2021
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
2 similar comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Akuli
reviewed
Nov 26, 2021
Co-authored-by: Akuli <akuviljanen17@gmail.com>
Co-authored-by: Akuli <akuviljanen17@gmail.com>
This comment has been minimized.
This comment has been minimized.
Contributor
|
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These were all discovered by running the
stubtest_stdlibtest without the--ignore-missing-stuboption.ChainMap.copy()andChainMap.fromkeys()appear to have been there since at least Python 3.6 (cpython source code for the class here).Counter.total()was added in 3.10.UserString.isascii()appears to have been added in Python 3.7; it doesn't appear in the ChangeLog, but you can see it was added in this commit here.