Some general guidelines regarding development in pytest for maintainers and contributors. Nothing here is set in stone and can’t be changed, feel free to suggest improvements or changes in the workflow.
We have two long term branches:
master: contains the code for the next bugfix release.
features: contains the code with new features for the next minor release.
The official repository usually does not contain topic branches, developers and contributors should create topic branches in their own forks.
Exceptions can be made for cases where more than one contributor is working on the same topic or where it makes sense to use some automatic capability of the main repository, such as automatic docs from readthedocs for a branch dealing with documentation refactoring.
Any question, feature, bug or proposal is welcome as an issue. Users are encouraged to use them whenever they need.
GitHub issues should use labels to categorize them. Labels should be created sporadically, to fill a niche; we should avoid creating labels just for the sake of creating them.
Each label should include a description in the GitHub’s interface stating its purpose.
Labels are managed using labels. All the labels in the repository
are kept in
.github/labels.toml, so any changes should be via PRs to that file.
After a PR is accepted and merged, one of the maintainers must manually synchronize the labels file with the
To classify issues for a special event it is encouraged to create a temporary label. This helps those involved to find the relevant issues to work on. Examples of that are sprints in Python events or global hacking events.
temporary: EP2017 sprint: candidate issues or PRs tackled during the EuroPython 2017
Issues created at those events should have other relevant labels added as well.
Those labels should be removed after they are no longer relevant.
Our current policy for releasing is to aim for a bugfix every few weeks and a minor release every 2-3 months. The idea is to get fixes and new features out instead of trying to cram a ton of features into a release and by consequence taking a lot of time to make a new one.
pytest releases must be prepared on Linux because the docs and examples expect to be executed in that platform.
Create a branch
release-X.Y.Zwith the version for the release.
- maintenance releases: from
- patch releases: from the latest
- minor releases: from the latest
features; then merge with the latest
Ensure your are in a clean work tree.
- maintenance releases: from
tox, generate docs, changelog, announcements:
$ tox -e release -- <VERSION>
This will generate a commit with all the changes ready for pushing.
Open a PR for this branch targeting
4.6-maintenancefor maintenance releases).
After all tests pass and the PR has been approved, publish to PyPI by pushing the tag:
git tag <VERSION> git push email@example.com:pytest-dev/pytest.git <VERSION>
Wait for the deploy to complete, then make sure it is available on PyPI.
Merge the PR.
If this is a maintenance release, cherry-pick the CHANGELOG / announce files to the
git fetch --all --prune git checkout origin/master -b cherry-pick-maintenance-release git cherry-pick --no-commit -m1 origin/4.6-maintenance git checkout origin/master -- changelog git commit # no arguments
Send an email announcement with the contents from:
To the following mailing lists:
- firstname.lastname@example.org (all releases)
- email@example.com (all releases)
- firstname.lastname@example.org (only major/minor releases)
And announce it on Twitter with the