Dear yt dev team,
As was previously mentioned in yt 4.0.0's release notes, we're currently
planning to drop support for Python 3.6 in our next feature release (4.1.0)
I propose that this change be performed on the dev branch of yt by late
October this year, but not earlier than October the 20th.
As was discussed on Slack, I would like to send an official announcement
to yt-users(a)python.org, but I’ll leave open to discussion for a week first, or
as long as necessary for the discussion to resolve happily.
—
Here's the PR to drop Python 3.6 https://github.com/yt-project/yt/pull/2917
Please take minute to either request changes, discuss and/or approve it.
—
Nice implications
This means we'll soon be able to use Python 3.7+ only syntax and features.
Here are the two key highlights that I personally think are most impactful for yt:
- `from __future__ import annotations` can be used to leverage modern Python annotations features from more recent versions (as late as 3.11 !) This will be extremely useful to improve typing in yt, and in support to YTEP 0038 https://github.com/yt-project/ytep/pull/17 Here's a gist with some showcase examples of how this __future__ import helps simplifying typed code https://gist.github.com/neutrinoceros/0eaa046a00689254dee0738c65c9bdfc
- the `dataclasses` module becomes available https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep557
See the detailed "what's new" note from Python 3.7.0 for more https://docs.python.org/3/whatsnew/3.7.html
Additional notes
- Python 3.6 is 5 years old and will be EOL (end of life) by December https://www.python.org/dev/peps/pep-0494/
- Numpy dropped support for Python 3.6 in numpy 1.20.0, released in January 2021 https://github.com/numpy/numpy/releases/tag/v1.20.0
- Matplotlib dropped support fot Python 3.6 in matplotlib 3.4.0, released in March 2021 https://github.com/matplotlib/matplotlib/commit/f9907b49f9d00c03cf014a25d05…
- Python 3.10 will be officially released early October https://www.python.org/dev/peps/pep-0619/
- Adding support for 3.10 should be a breeze^{TM}: we've been running a subset of our test suite against it (+ future versions of matplotlib and numpy) for a couple months, so the expected most important bottleneck for us will depend on when numpy and matplotlib are able to publish wheels for 3.10
- The plan is to first add support to 3.10 and *then* drop 3.6.
- This is in agreement with NEP 29, which was coauthored by our own release manager, Madicken Munk https://numpy.org/neps/nep-0029-deprecation_policy.html
- Various 3.7+ idioms will now be continuously enforced with pyupgrade https://github.com/asottile/pyupgrade which is already part of our pre-commit toolbelt.
Cheers, and have a great week
Clément
Dear yt users,
As was previously mentionned in yt 4.0.0's release notes, we're planning to drop
support for Python 3.6 in our next feature release (4.1.0). The change is set to
happen on the dev branch of yt not earlier than October the 20th, this year.
This means that if you wish to use our most recent features and bugfixes past this date, you'll
need to make sure you're running Python 3.7 or newer. Note that the
4.0.x series will retain compatibility with Python 3.6.
The exact method to upgrade your Python runtime depends on what tool(s) you used to
install Python or to manage your environments. In general, please lookup the
method that applies to your tools. Here is the documentation for some common
methods:
- using venv (see "--upgrade" flag) https://docs.python.org/3/library/venv.html
- using conda https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-pyth…
In general, yt is primarily tested with the latest Python versions available, so
we recommend upgrading Python to the latest version available to you.
There will be a reminder in two weeks from now.
Note that we're also planning to officially support Python 3.10 as soon as possible,
but likely not earlier than mid-October.
Have a great day,
Clément Robert, on behalf of the yt dev team