Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the import source of OrderedDict #499

Closed
WH-2099 opened this issue Jul 9, 2023 · 1 comment
Closed

Correct the import source of OrderedDict #499

WH-2099 opened this issue Jul 9, 2023 · 1 comment

Comments

@WH-2099
Copy link

WH-2099 commented Jul 9, 2023

OrderedDict should be imported from collections rather than typing.
The OrderedDict in typing is only used for type annotations and has been marked as deprecated since version 3.9.

https://docs.python.org/3/library/typing.html#typing.OrderedDict

https://docs.python.org/3/library/collections.html#ordereddict-objects

@Dreamsorcerer
Copy link
Member

It's not only for type annotations, it's more of an alias with typing support.

We still support Python 3.8. We'll update all these imports (likely automatically with pyupgrade or similar) once we drop Python 3.8.

@Dreamsorcerer Dreamsorcerer closed this as not planned Won't fix, can't repro, duplicate, stale Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants