|
1 |
| -Python 2.7 and 3.4 support plan |
2 |
| -=============================== |
| 1 | +Python 2.7 and 3.4 support |
| 2 | +========================== |
3 | 3 |
|
4 |
| -Python 2.7 EOL is fast approaching, with |
5 |
| -upstream support `ending in 2020 <https://legacy.python.org/dev/peps/pep-0373/#id4>`__. |
6 |
| -Python 3.4's last release is scheduled for |
7 |
| -`March 2019 <https://www.python.org/dev/peps/pep-0429/#release-schedule>`__. pytest is one of |
8 |
| -the participating projects of the https://python3statement.org. |
| 4 | +It is demanding on the maintainers of an open source project to support many Python versions, as |
| 5 | +there's extra cost of keeping code compatible between all versions, while holding back on |
| 6 | +features only made possible on newer Python versions. |
9 | 7 |
|
10 |
| -The **pytest 4.6** series is the last to support Python 2.7 and 3.4, and was released in |
11 |
| -**June 2019**. **pytest 5.0** and onwards will support only Python 3.5+. |
| 8 | +In case of the Python 2 and 3, the difference between the languages makes it even more prominent, |
| 9 | +because many new Python 3 features cannot be used in a Python 2/3 compatible code base. |
| 10 | + |
| 11 | +Python 2.7 EOL has been reached `in 2020 <https://legacy.python.org/dev/peps/pep-0373/#id4>`__, with |
| 12 | +the last release planned for mid-April, 2020. |
| 13 | + |
| 14 | +Python 3.4 EOL has been reached `in 2019 <https://www.python.org/dev/peps/pep-0429/#release-schedule>`__, with the last release made in March, 2019 . |
| 15 | + |
| 16 | +For those reasons, in Jun 2019, it was decided that **pytest 4.6** series will be the last to support Python 2.7 and 3.4. |
| 17 | + |
| 18 | +What this means for general users |
| 19 | +--------------------------------- |
12 | 20 |
|
13 | 21 | Thanks to the `python_requires`_ ``setuptools`` option,
|
14 | 22 | Python 2.7 and Python 3.4 users using a modern ``pip`` version
|
15 |
| -will install the last pytest ``4.6`` version automatically even if ``5.0`` or later |
| 23 | +will install the last pytest ``4.6`` version automatically even if ``5.0`` or later versions |
16 | 24 | are available on PyPI.
|
17 | 25 |
|
18 |
| -While pytest ``5.0`` will be the new mainstream and development version, until **January 2020** |
19 |
| -the pytest core team plans to make bug-fix releases of the pytest ``4.6`` series by |
20 |
| -back-porting patches to the ``4.6-maintenance`` branch that affect Python 2 users. |
| 26 | +Users should ensure they are using the latest ``pip`` and ``setuptool`` versions for this to work. |
| 27 | + |
| 28 | +Maintenance of 4.6.X versions |
| 29 | +----------------------------- |
| 30 | + |
| 31 | +Until Jan 2020, the pytest core team ported many bug-fixes from the main release into the |
| 32 | +``4.6-maintenance`` branch, with several ``4.6.X`` releases being made along the year. |
| 33 | + |
| 34 | +From now on, the core team will **no longer actively backport patches**, but the ``4.6-maintenance`` |
| 35 | +branch will continue to exist so the community itself can contribute patches. |
21 | 36 |
|
22 |
| -**After 2020**, the core team will no longer actively backport patches, but the ``4.6-maintenance`` |
23 |
| -branch will continue to exist so the community itself can contribute patches. The core team will |
24 |
| -be happy to accept those patches and make new ``4.6`` releases **until mid-2020**. |
| 37 | +The core team will be happy to accept those patches and make new ``4.6.X`` releases **until mid-2020**; |
| 38 | +consider that date as a ballpark, after that date the team might still decide to make new releases |
| 39 | +for critical bugs. |
25 | 40 |
|
26 | 41 | .. _`python_requires`: https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
|
27 | 42 |
|
28 |
| -Technical Aspects |
29 |
| ------------------ |
| 43 | +Technical aspects |
| 44 | +~~~~~~~~~~~~~~~~~ |
| 45 | + |
| 46 | +(This section is a transcript from `#5275 <https://github.com/pytest-dev/pytest/issues/5275>`__). |
| 47 | + |
| 48 | +In this section we describe the technical aspects of the Python 2.7 and 3.4 support plan. |
| 49 | + |
| 50 | +What goes into 4.6.X releases |
| 51 | ++++++++++++++++++++++++++++++ |
| 52 | + |
| 53 | +New 4.6.X releases will contain bug fixes only. |
| 54 | + |
| 55 | +When will 4.6.X releases happen |
| 56 | ++++++++++++++++++++++++++++++++ |
| 57 | + |
| 58 | +New 4.6.X releases will happen after we have a few bugs in place to release, or if a few weeks have |
| 59 | +passed (say a single bug has been fixed a month after the latest 4.6.X release). |
| 60 | +No hard rules here, just a ballpark. |
| 61 | + |
| 62 | +Who will handle applying bug fixes |
| 63 | +++++++++++++++++++++++++++++++++++ |
| 64 | + |
| 65 | +We core maintainers expect that people still using Python 2.7/3.4 and being affected by |
| 66 | +bugs to step up and provide patches and/or port bug fixes from the active branches. |
| 67 | + |
| 68 | +We will be happy to guide users interested in doing so, so please don't hesitate on asking. |
| 69 | + |
| 70 | +**Backporting changes into 4.6** |
| 71 | + |
| 72 | +Please follow these instructions: |
| 73 | + |
| 74 | +#. ``git fetch --all --prune`` |
| 75 | + |
| 76 | +#. ``git checkout origin/4.6-maintenance -b backport-XXXX`` # use the PR number here |
| 77 | + |
| 78 | +#. Locate the merge commit on the PR, in the "merged" message, for example: |
| 79 | + |
| 80 | + nicoddemus merged commit 0f8b462 into pytest-dev:features |
| 81 | + |
| 82 | +#. ``git cherry-pick -m1 REVISION`` # use the revision you found above (``0f8b462``). |
| 83 | + |
| 84 | +#. Open a PR targeting ``4.6-maintenance``: |
| 85 | + |
| 86 | + * Prefix the message with ``[4.6]`` so it is an obvious backport |
| 87 | + * Delete the PR body, it usually contains a duplicated commit message. |
| 88 | + |
| 89 | +**Providing new PRs to 4.6** |
| 90 | + |
| 91 | +Fresh pull requests to the ``4.6-maintenance`` will be accepted provided that |
| 92 | +the similar code in the active branches does not contain that bug (for example, is a bug specific |
| 93 | +to Python 2 only). |
30 | 94 |
|
31 |
| -The technical aspects of the Python 2.7 and 3.4 support plan (such as when releases will occur, how to backport fixes, etc) is described in issue `#5275 <https://github.com/pytest-dev/pytest/issues/5275>`__. |
| 95 | +Bug fixes that also happen in the main stream version should be first fixed |
| 96 | +there, and then backported as per-instructions above. |
0 commit comments