-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
⚠️ Time to say goodbye to py37 #24091
Conversation
@@ -413,7 +413,6 @@ def run(self): | |||
|
|||
# when modifying the following list, make sure to update src/transformers/dependency_versions_check.py | |||
install_requires = [ | |||
deps["importlib_metadata"] + ";python_version<'3.8'", # importlib_metadata for Python versions that don't have it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
# The package importlib_metadata is in a different place, depending on the python version. | ||
if sys.version_info < (3, 8): | ||
import importlib_metadata | ||
else: | ||
import importlib.metadata as importlib_metadata | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only find this one in versions.py
The documentation is not available anymore as the PR was closed or merged. |
src/transformers/utils/versions.py
Outdated
@@ -15,6 +15,7 @@ | |||
Utilities for working with package versions | |||
""" | |||
|
|||
import importlib.metadata as importlib_metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be cleaner to replace everywhere the import from this file to importlib.metadata
and use importlib.metadata
instead of importlib_metadata
(I don't see that many uses so should be quick)
Also getting something in the meta.yaml
file used for the conda job btw.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, you are very good!
@@ -16,7 +16,6 @@ requirements: | |||
- pip | |||
- numpy >=1.17 | |||
- dataclasses | |||
- importlib_metadata |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not very sure what this file is for. It's under .github/conda ..(?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it automates the releases on conda, but basically it doesn't need dataclasses anymore (was for Python 3.7) and won't need importlib_metadata
after python 3.8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for iterating!
What does this PR do?
[Sorry for the spams, GitHub had some issues]
Same as #24075, but that PR got freezed after I force pushed (after rebase), and my changes to address the comments were not able to appear)
(amy have already approved #24075)
Byebye!
EOL of python 3.7 is
2023/06/27
.https://endoflife.date/python