-
Notifications
You must be signed in to change notification settings - Fork 31.3k
⚠️ Time to say goodbye to py37 #24091
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
Conversation
|
|
||
| # 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
| 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!
| - 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
sgugger
left a comment
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