-
Notifications
You must be signed in to change notification settings - Fork 347
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 #1246
Drop Python 3.8 support #1246
Conversation
Discovered a bug in Sphinx in the process of upgrading: sphinx-doc/sphinx#11327 |
@@ -3,6 +3,9 @@ | |||
|
|||
"""Common dataset utilities.""" | |||
|
|||
# https://github.com/sphinx-doc/sphinx/issues/11327 | |||
from __future__ import annotations |
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.
Had to use this hack to get our docs to build properly. This file gives a preview of what type hints will look like in Python 3.10 when Optional
and Union
become obsolete.
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.
Looks cool!
rootdir: ~/torchgeo, configfile: pyproject.toml | ||
plugins: mock-1.11.1, anyio-3.2.1, cov-2.8.1, nbmake-0.5 | ||
collected 7 items | ||
|
||
tests/datasets/test_foo.py ....... [100%] | ||
|
||
---------- coverage: platform darwin, python 3.8.11-final-0 ----------- | ||
---------- coverage: platform darwin, python 3.10.11-final-0 ----------- |
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.
Is this a find and replace artifact?
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.
Nah, just noticed it while grepping around and figured we should pretend it was run on a supported version of Python.
@@ -3,6 +3,9 @@ | |||
|
|||
"""Common dataset utilities.""" | |||
|
|||
# https://github.com/sphinx-doc/sphinx/issues/11327 | |||
from __future__ import annotations |
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.
Looks cool!
Lol 130 files! I didn't check to see if you missed any "Tuple" --> "tuple", etc. |
pyupgrade did, this was mostly auto-generated. The only thing I had to do manually was non-Python files and removing imports we no longer use. |
65f391f
to
e69d669
Compare
e69d669
to
252e385
Compare
NEP 29 has officially deprecated Python 3.8 support as of today. In the past we've been hesitant to follow NEP 29 because Google Colab was still running Python 3.7, but they've since upgraded to 3.9 already, so that isn't an issue anymore. PyTorch ostensibly follows NEP 29, and many of our other dependencies will soon drop support for 3.8 in their next release, complicating testing. Also, 3.9 and 3.10 introduce native support for type hints, meaning most of our
from typing import *
lines will be removed.