Convert to Python 3.9: convert most mappings to dicts#1166
Open
Convert to Python 3.9: convert most mappings to dicts#1166
Conversation
Signed-off-by: Sergey Vasilyev <[email protected]>
… filters Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
…ults Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
…r classes Signed-off-by: Sergey Vasilyev <[email protected]>
…red) Signed-off-by: Sergey Vasilyev <[email protected]>
…t (initial & updated) Signed-off-by: Sergey Vasilyev <[email protected]>
…ssion) Signed-off-by: Sergey Vasilyev <[email protected]>
…ing) Signed-off-by: Sergey Vasilyev <[email protected]>
…abels & annotations) Signed-off-by: Sergey Vasilyev <[email protected]>
…rogression) Signed-off-by: Sergey Vasilyev <[email protected]>
… tests) Signed-off-by: Sergey Vasilyev <[email protected]>
…x the signatures) Signed-off-by: Sergey Vasilyev <[email protected]>
…dy, or the essence Signed-off-by: Sergey Vasilyev <[email protected]>
Signed-off-by: Sergey Vasilyev <[email protected]>
… ever Signed-off-by: Sergey Vasilyev <[email protected]>
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.
An extended follow-up for:
Here, minimize the usage of
Mapping&MutableMappingand reduce them to the built-in genericdict.Excluded from the conversion:
The
Iterable/Iterator/Container/Collection/Sequencegenerics are NOT converted or narrowed down to their concrete types, even internally. While the conversion of mappings to dicts simplifies the codebase, the conversion of these generics would do the opposite — it will complicate the codebase. We need to know the bare minimum behaviour that we can use in a routine, and allow the callers of this routine to inject any possible containers they prefer on their side.Such distinction is of little significance for the only two types of mappings: readonly vs. mutable — we can ignore it, we use dicts in all cases anyway. (Except for the "live views" on bodies for a bit of syntax sugar.)