Skip to content

Commit cf07416

Browse files
committed
proposal for change of CPython supported versions
1 parent d18e107 commit cf07416

File tree

3 files changed

+102
-1
lines changed

3 files changed

+102
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RFCs are located in their own repository.
2222

2323
To create one:
2424

25-
1. For the https://github.com/pytorch/rfcs repository
25+
1. Fork the https://github.com/pytorch/rfcs repository
2626
2. Copy the template file `RFC-0000-template.md` to `RFC-00xx-your-feature.md` and fill it out with your proposal. The template is a guideline, feel free to add sections as appropriate
2727
3. You may also have the template simply link to another editor, like a Google Docs file, but please ensure that the document is publicly visible. This can make the template easier to add edit, but commenting doesn’t scale very well, so please use this option with caution.
2828

RFC-0038-assets/cpython_support.png

904 KB
Loading

RFC-0038-cpython-support.md

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
2+
# [CPython version support]
3+
4+
**Authors:**
5+
* @albanD
6+
7+
## **Motivation**
8+
9+
CPython release schedule is regularly cadenced every year. Given that the amount of work to enable and sunset versions yearly is fixed, we should be proactive in how we handle these tasks.
10+
This RFC suggests an updated policy we want for CPython version support, CI/CD requirements and the proposed yearly timeline for enablement/sunsetting.
11+
12+
The key requirements driving this proposal are:
13+
- Enable new versions as soon as possible
14+
- Sunset old versions in a timely manner
15+
- Set clear long-term expectations for our users
16+
- Mitigate the risk of a CPython change that would render PyTorch non-functional making it to the CPython final release
17+
- Minimize any work that would not have been needed if the enablement was done post-final release
18+
19+
20+
## **Proposed Implementation**
21+
22+
### Proposed timeline
23+
24+
![Summary timeline](./RFC-0038-assets/cpython_support.png)
25+
26+
### Which CPython version are supported
27+
28+
PyTorch supports all CPython versions that are fully released and have not reached end of life: https://devguide.python.org/versions/
29+
30+
Note: This is an update from the current policy at https://github.com/pytorch/pytorch/blob/main/RELEASE.md#python which is following NumPy’s approach. In practice, we are not following the rules stated in that .md and following the rule stated just above here. We are updating the rule (instead of enforcing the NEP above) as the cost of supporting more versions is minimal.
31+
32+
### What is tested in CI/CD
33+
34+
The goal here is for us to ensure coverage of testing while reducing the cost on CI.
35+
36+
At any given time, we should run:
37+
- General CI on PR and trunk should run on the oldest supported version.
38+
- Maintainers can ask for specific CI shard to run on specific versions:
39+
- Long term for testing features tightly bound to CPython versions (for example Dynamo).
40+
- Temporarily for enablement work (for example while a new CPython version is being enabled).
41+
- CD for docker and binaries should run for all supported versions.
42+
- Wheel/release smoke test should run on all supported versions.
43+
44+
45+
### Detailed CPython new version enablement
46+
47+
- Enable new version basic compilation
48+
- When: Once the first beta version is released (Usually in May)
49+
- Planned for 3.13: 5/07
50+
- ETA: 1-2 weeks. Before beta 2
51+
- Goal: Fix compilation issues allowing to compile PyTorch locally. Report any needed patch in CPython before beta 2.
52+
- Who: Core Maintainers for pytorch/pytorch + relevant maintainers for managed domains
53+
- Note: If a patch is needed in CPython, it will be made available easily until next beta release happens
54+
- Enable new version CI/CD Infrastructure
55+
- When: As soon as basic compilation is done
56+
- ETA: 2-3 weeks.
57+
- Goal: Generate nightly wheels and scaffolding for new version testing
58+
- Who: Core Infra
59+
- High risk enablement work for the new version for submodules
60+
- When: as soon as the CI/CD infrastructure is done
61+
- ETA: before CPython first RC
62+
- Planned for 3.13: 07/30
63+
- Goal: Verify high risk systems and report any needed patch in CPython such that they can be fixed before RC1
64+
- Who: High risk systems owners. As of today this is Dynamo C++ code and python binding subsystems.
65+
- Low risk enablement work for the new version for submodules
66+
- When: as soon as the CI/CD infrastructure is done
67+
- ETA: before CPython final RC
68+
- Planned for 3.13: 09/03
69+
- Goal: Enable all testing for the new CPython version
70+
- Who: Core Maintainers handle the long tail of issues. Specific submodule owner handle larger migration efforts (dynamo, TorchScript, etc)
71+
- Full new version wheel release
72+
- When: When the new cpython verion is officially released (Usually in October)
73+
- Planned for 3.13: 10/01
74+
- ETA: 2 week
75+
- Goal: Update nightlies to track the final release and advertise it as fully working
76+
- Who: Infra + Comms
77+
- Full new version conda release
78+
- When: When the new cpython version and our runtime dependencies are supported onconda
79+
- ETA: 2 week
80+
- Goal: Push binaries that are officially supported
81+
- Who: Infra + Comms
82+
83+
84+
### Detailed CPython old version Sunset
85+
86+
- Deprecate old version
87+
- When: During the release process of the last PyTorch release before the oldest version of python goes EOL
88+
- Planned for 3.8: October
89+
- Goal: announce deprecation of the oldest cpython version on dev-discuss + release
90+
- Who: Comms
91+
- Stop releasing nightly binaries for oldest version
92+
- When: Once the last supported release happened
93+
- ETA: 2 weeks
94+
- Goal: remove all wheel and conda binaries for the EOL version
95+
- Who: Infra
96+
- Upgrade oldest version CI
97+
- When: After nightlies are not published anymore
98+
- ETA: 2 weeks
99+
- Goal: migrate all the CI jobs running on the oldest version to the soon-to-be oldest version
100+
- Who: Infra
101+

0 commit comments

Comments
 (0)