Skip to content

General policy for supported Python version #74203

@albanD

Description

@albanD

Context

Following yet another discussion on which Python version we support (#74087) we would like to open a broader discussion on this.

For historical context on how we dealt with 3.6.X versions, we dropped <3.6.2 early on to be able to use features from it #47314. We then moved to 3.7.0 as minimum version when 3.6 reached EOL #71494.

The naming for versions below will be "major.minor.patch".

Related policies are:

Based on this here are two proposals to move forward:

In both cases we will have pip install torch still works just fine. For older versions of Python you will only get the most recent PyTorch version that is available. The difference between the options below is how recent will the version of PyTorch be.

1) Adopt NEP 29

  • This NEP is very successful for numpy and related libaries (for example jax follows this as well).
  • It simplifies and reduces cost of maintenance/CI. It is more important to support newer versions quickly than keep supporting old versions for newer releases.
  • It allows us to use newer Python features much faster.
  • We will drop support for Python versions much faster than we've been doing up to know (more or less until EOL).
Deprecation dates under this proposal
Dropping Python 3.4 at Sep 15, 2017
Dropping Python 3.5 at Mar 14, 2019
Dropping Python 3.6 at Jun 23, 2020
Dropping Python 3.7 at Dec 26, 2021
Dropping Python 3.8 at Apr 14, 2023
Dropping Python 3.9 at Apr 05, 2024
Dropping Python 3.10 at Apr 04, 2025

2) Use NEP 29 for patch versions and EOL for minor versions

  • We would "reserve the right to drop support" to avoid having to change supported patch all the time. But we have a clear answer if asked if a patch feature can be used.
  • Very similar to what we are doing right now
  • Will change quite often as patch versions are released relatively often
  • Can be confusing that 3.8.0 will not be supported while 3.7.6 still is
  • Support quite old version. For the issue above, we would have to wait until end of April this year to move to 3.7.2
Deprecation dates under this proposal
Dropping Python 3.4 at Mar 17, 2019
Dropping Python 3.5 at Sep 12, 2020
Dropping Python 3.6 at Dec 23, 2021
Dropping Python 3.7.0 at Dec 26, 2021
Dropping Python 3.7.1 at Apr 20, 2022
Dropping Python 3.7.2 at Jun 24, 2022
Dropping Python 3.7.3 at Sep 23, 2022
Dropping Python 3.7.4 at Jan 06, 2023
Dropping Python 3.8.0 at Apr 14, 2023
Dropping Python 3.7.5 at Apr 15, 2023
Dropping Python 3.8.1 at Jun 18, 2023
Dropping Python 3.7.6 at Jun 18, 2023
Dropping Python 3.7 at Jun 27, 2023
Dropping Python 3.8.2 at Aug 25, 2023
Dropping Python 3.8.3 at Nov 12, 2023
Dropping Python 3.8.4 at Jan 12, 2024
Dropping Python 3.8.5 at Jan 19, 2024
Dropping Python 3.8.6 at Mar 25, 2024
Dropping Python 3.9.0 at Apr 05, 2024
Dropping Python 3.9.1 at Jun 07, 2024
Dropping Python 3.8.7 at Jun 21, 2024
Dropping Python 3.9.2 at Aug 20, 2024
Dropping Python 3.8.8 at Aug 20, 2024
Dropping Python 3.8.9 at Oct 01, 2024
Dropping Python 3.9.4 at Oct 03, 2024
Dropping Python 3.8 at Oct 13, 2024
Dropping Python 3.9.5 at Nov 01, 2024
Dropping Python 3.9.6 at Dec 27, 2024
Dropping Python 3.9.7 at Feb 28, 2025
Dropping Python 3.10.0 at Apr 04, 2025
Dropping Python 3.9.8 at May 06, 2025
Dropping Python 3.9.9 at May 16, 2025
Dropping Python 3.10.1 at Jun 06, 2025
Dropping Python 3.9.10 at Jul 15, 2025
Dropping Python 3.10.2 at Jul 15, 2025
Dropping Python 3.9 at Oct 05, 2025
Dropping Python 3.10 at Oct 04, 2026

WDYT ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: python frontendFor issues relating to PyTorch's Python frontendoncall: relengIn support of CI and Release EngineeringtriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions