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

⚠️ Time to say goodbye to py37 #24091

Merged
merged 10 commits into from
Jun 28, 2023
Merged

⚠️ Time to say goodbye to py37 #24091

merged 10 commits into from
Jun 28, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 7, 2023

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

@@ -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
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

Comment on lines -26 to -32
# 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


Copy link
Collaborator Author

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

@ydshieh ydshieh requested a review from sgugger June 7, 2023 19:04
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 7, 2023

The documentation is not available anymore as the PR was closed or merged.

@ydshieh ydshieh requested review from sgugger and removed request for sgugger June 14, 2023 15:10
@@ -15,6 +15,7 @@
Utilities for working with package versions
"""

import importlib.metadata as importlib_metadata
Copy link
Collaborator

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.

Copy link
Collaborator Author

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
Copy link
Collaborator Author

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 ..(?)

Copy link
Collaborator

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

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks for iterating!

@ydshieh ydshieh changed the title [Not to merge before 2023/06/28] Time to say goodbye to py37 ⚠️ [Not to merge before 2023/06/28] Time to say goodbye to py37 Jun 26, 2023
@ydshieh ydshieh changed the title ⚠️ [Not to merge before 2023/06/28] Time to say goodbye to py37 ⚠️ Time to say goodbye to py37 Jun 28, 2023
@ydshieh ydshieh merged commit e84bf1f into main Jun 28, 2023
@ydshieh ydshieh deleted the bye_py_37 branch June 28, 2023 05:22
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