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

drop Python 3.8 support #10265

Merged
merged 3 commits into from
Jan 30, 2024
Merged

drop Python 3.8 support #10265

merged 3 commits into from
Jan 30, 2024

Conversation

skshetry
Copy link
Member

@skshetry skshetry commented Jan 30, 2024

Dropping Python 3.8 support since scmrepo dropped support in iterative/scmrepo#312 (which in turn was a result of pygit2 dropping support).

Many libraries have started dropping support for Python 3.8 now, so it makes sense for dvc to do the same here at this time. Even though 3.8 is 8 months away from getting EOL'd.


Note that this PR only makes typing related changes. Other changes can be done once this gets merged, they are relatively few in numbers.

Most of the changes are auto-upgraded via pyupgrade and ruff.

To reproduce, update requires_python to >=3.9. Then, run the following script:

pyupgrade {dvc,tests}/**/*.py --py39-plus
ruff . --fix
ruff format .

Then, a few manual typing changes related to typing.Type/typing.ContextManager which are deprecated, and added typing_extensions.Self in some places.

Also, Python versions in GitHub workflows were updated in relevant places.

Note that this PR only makes typing related changes.
Other changes can be done once this gets merged, they
are relatively few in numbers.
@skshetry skshetry requested a review from a team January 30, 2024 08:54
Copy link
Contributor

@efiop efiop left a comment

Choose a reason for hiding this comment

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

Thanks!

@skshetry skshetry changed the title drop Python 3.8 drop Python 3.8 support Jan 30, 2024
Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (966adec) 90.47% compared to head (79b1363) 90.44%.

Files Patch % Lines
dvc/repo/imports.py 0.00% 3 Missing ⚠️
dvc/commands/stage.py 60.00% 2 Missing ⚠️
dvc/repo/artifacts.py 71.42% 2 Missing ⚠️
dvc/repo/experiments/queue/base.py 83.33% 2 Missing ⚠️
dvc/repo/index.py 92.85% 2 Missing ⚠️
dvc/testing/benchmarks/fixtures.py 0.00% 2 Missing ⚠️
dvc/api/artifacts.py 50.00% 1 Missing ⚠️
dvc/repo/experiments/collect.py 85.71% 1 Missing ⚠️
dvc/repo/experiments/executor/base.py 80.00% 1 Missing ⚠️
dvc/repo/experiments/queue/celery.py 95.00% 1 Missing ⚠️
... and 3 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10265      +/-   ##
==========================================
- Coverage   90.47%   90.44%   -0.03%     
==========================================
  Files         493      493              
  Lines       37682    37723      +41     
  Branches     5457     5457              
==========================================
+ Hits        34092    34119      +27     
- Misses       2962     2973      +11     
- Partials      628      631       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@efiop efiop merged commit b647475 into iterative:main Jan 30, 2024
18 of 19 checks passed
@skshetry skshetry deleted the drop-3.8 branch January 30, 2024 09:33
BradyJ27 pushed a commit to BradyJ27/dvc that referenced this pull request Apr 22, 2024
* drop Python 3.8

Note that this PR only makes typing related changes.
Other changes can be done once this gets merged, they
are relatively few in numbers.

* bump build python version

* add typing_extensions to lint group
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.

2 participants