Release checklist for maintainers


For demonstration’s sake, we assume that the next version is $VERSION and the package name is $PACKAGE.

  • Ensure tests pass locally and on CI:

  • Update version in $PACKAGE/

  • Compile changelog from news fragments and verify the output, for example:

    towncrier build --version $VERSION --draft
  • Apply the changelog to CHANGES.rst and edit the links as required:

    towncrier build --version $VERSION
  • Compile documentation:

    cd docs/
    make html
  • Commit changes and tag a release:

    hg commit
    hg tag $VERSION
  • Prepare source distribution package and wheel:

    make clean
    python sdist bdist_wheel
  • Verify the package with twine:

    twine check dist/*
  • Upload to TestPyPI and verify:

    twine upload --repository testpypi dist/*
    cd /tmp
    python -m venv testpypi
    source testpypi/bin/activate
    pip install \
        --index-url \
        --extra-index-url \
  • Upload to PyPI:

    twine upload dist/*