Supported Python versions #656
Replies: 4 comments 2 replies
-
@calebrob6 what version of Python does the Planetary Computer use? |
Beta Was this translation helpful? Give feedback.
-
I just looked into Colab a bit and it seems that you can update the Python version in your runtime via Generally, I'm for whatever makes our lives simpler. You are already spending a ton of your part-time effort on fixing broken CI and reducing that burden such that we have time to focus on useful features, benchmarking, etc. seems like a good move. |
Beta Was this translation helpful? Give feedback.
-
Also relevant: googlecolab/colabtools#2165 |
Beta Was this translation helpful? Give feedback.
-
PyTorch just dropped Python 3.7 support: pytorch/pytorch#93155 |
Beta Was this translation helpful? Give feedback.
-
This discussion is about the versions of Python that TorchGeo should support. There are two commonly used support timelines:
To illustrate the difference, the latest version of CPython that is still supported is 3.7, and will continue to be supported for another 11 months. However, projects that have adopted NEP 29 have already dropped Python 3.7 and will drop 3.8 in another 9 months.
NEP 29 has achieved a high rate of adoption in the scientific Python ecosystem, with many projects dropping support for Python versions long before CPython does. I just noticed that PyTorch also recently adopted NEP 29 (pytorch/pytorch#74203, pytorch/pytorch#77304, pytorch/pytorch#80513). In the past, we've been following the CPython support cycle because PyTorch did as well, but if PyTorch plans on following NEP 29 we may want to reconsider.
Pros of NEP 29
The obvious pro of NEP 29 is the ability to adopt language features added in newer versions of Python. Of particular interest are much simpler type hints added in Python 3.9. I don't see much of interest in 3.8 but I've been counting down the days until we can switch to 3.9+.
Another advantage is that our CI would be significantly simpler. We could remove all the
requirements/*.old
files that were added to avoid dependabot headaches. It would also mean 3 fewer CI runs (better for the environment), although I've honestly been thinking about only testing the newest and oldest versions of Python (currently 3.7 and 3.10), I don't see why testing 3.8 and 3.9 would be needed.Cons of NEP 29
Google Colab still uses Python 3.7. This is a big one for us. For libraries like numpy or PyTorch, it isn't hard to tell users to use an older release. But for TorchGeo, we're still very much in beta with new features and bug fixes being added every week. I'm not sure if we can afford to say "use an old release" to all Colab users.
Related to #413, @weiji14 may be interested in this discussion.
Beta Was this translation helpful? Give feedback.
All reactions