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

Import ABC from collections.abc for Python 3.10 compatibility. #1851

Merged
merged 3 commits into from
Mar 23, 2022
Merged

Import ABC from collections.abc for Python 3.10 compatibility. #1851

merged 3 commits into from
Mar 23, 2022

Conversation

tirkarthi
Copy link
Contributor

Import ABC directly from collections was deprecated and removed in Python 3.10. Import from collections.abc for Python 3.10 compatibility.

@tjruwase
Copy link
Contributor

@tirkarthi, thanks for this PR. Can you clarify that this is compatible with python-3.* < 3.10?

Copy link
Collaborator

@jeffra jeffra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see a deprecation warning in python 3.8.8 saying: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.9 it will stop working.

Good catch @tirkarthi, thank you.

@jeffra
Copy link
Collaborator

jeffra commented Mar 22, 2022

@tirkarthi, if you want feel free to add python 3.10 to our setup.py here as well. I think it's good for us to start understanding places where we might break with 3.10.

DeepSpeed/setup.py

Lines 285 to 290 in b61d719

classifiers=[
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9'
],

@jeffra jeffra merged commit c7af747 into microsoft:master Mar 23, 2022
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

Successfully merging this pull request may close these issues.

3 participants