Description
This issue is to discuss the technical aspects of pytest dropping Python 2 and 3.4 in pytest 5.0 and long term support of the 4.6 series.
For a more user-centric point of view, please see Python 2.7 and 3.4 support plan in the docs.
(This post has since then edited from the original version after the discussion that took place here).
Unless decided otherwise, the last pytest version to support Python 2.7 and 3.4 will be the 4.5 series, which is the last minor release on PyPI.
This issue contains the agreed process on how we will proceed with the pytest 5.0 release and long term support plans for the 4.5 series.
What goes into 4.6.X releases
New 4.6.X releases will contain bug fixes only:
- A bug will be fixed/ported if, in a normal release, we would merge it in the
master
branch: often we apply bug fixes to thefeatures
branch because even though we are fixing a bug, it may break test suites, so we often take the safest route. Those bugs are often not critical, and won't be ported to the maintenance branch. - No new features will be added on this branch, however small.
Who will handle porting bugs
After a PR for a bug fix is merged, and the bug is applicable to the 4.6.X series according to the rules stated previously:
We expect core maintainers who provided the initial bug fix to also create a new PR porting the bug.
From other contributors we expect core maintainers to step up to create a new PR porting the bug if the original contributor is not interested in doing so. @nicoddemus and @asottile applied to be the forefront here, but will gladly accept help from other core maintainers.
When will 4.6.X releases happen
New 4.6.X releases will happen after we have a few bugs in place to release, or if a few weeks have passed (say a single bug has been fixed a month after the latest 4.5.X release). No hard rules here (as with any other pytest release really), just a ballpark.
Backporting changes into the 4.6 release
-
git fetch --all --prune
-
git checkout origin/4.6-maintenance -b backport-XXXX
# use the PR number here -
Locate the merge commit on the PR, in the "merged" message, for example:
nicoddemus merged commit 0f8b462 into pytest-dev:features
-
git cherry-pick -m1 REVISION
# use the revision you found in 3. -
open a PR targeting
4.6-maintenance
: prefix the message with[4.6]
so it is an obvious backport, delete the PR body (it usually contains a duplicated commit message)
Note for backport PRs a review is not necessary -- though if it it falls into one of these categories a review is strongly suggested:
- The cherry-pick did not apply cleanly
- This is a bugfix for only the 4.6.x series
Steps for the first 5.0 release
- The absolute first step is to mark
features
as Python 3 only: ✔️- Update
setup.py
classifiers andpython_requires
to declare pytest only supports Python 3.5+. - Drop Python<3.5 from CI.
- Update the "Python 2.7 and 3.4 support plan".
- Update
- After
4.6
is released, we push apytest4-maintenance
branch pointing to4.6.0
initially. ✔️ - The next step is to run
pyupgrade --py3-plus
(I guess @asottile plans to volunteer here 😉); ✔️ - Turn warnings into errors. ✔️
- Release 5.0. 🎉
When will we start the 5.0 release process
It is my opinion that we can proceed with the steps above right away, as we are quickly approaching end of May.
If nobody opposes, I plan to start with the first step this week or early next week.