Release Checklist
This page outlines the steps to prepare and publish a new pynetbox release. The package version is derived from the git tag at release time by setuptools_scm, so the source tree does not carry a hardcoded version in setup.py.
Pre-Release Tasks
-
Ensure all tests pass:
ruff check pynetbox/ tests/ pytest -
Update
__version__inpynetbox/__init__.pyto the new version. -
Update
CHANGELOG.mdanddocs/release-notes.mdwith a summary of changes, referencing the relevant issue and PR numbers. -
Check supported NetBox versions:
- Review the latest netbox-docker releases.
- Update
DEFAULT_NETBOX_VERSIONSand theget_netbox_docker_version_tagfunction intests/integration/conftest.pyif there are new NetBox versions or new netbox-docker tag mappings. - Widen the
netboxmatrix in.github/workflows/py3.ymlto cover the supported range.
Release Tasks
-
Create a release branch from
master:git checkout master git pull git checkout -b release/vX.Y.Z -
Commit the version bump and changelog updates:
git commit -m "Prepare release vX.Y.Z" -
Open a pull request to merge the release branch into
master. -
Once the PR is merged, publish a GitHub release:
- Go to the Releases page on GitHub.
- Click Draft a new release.
- Create a new tag named
vX.Y.Zagainstmaster. - Paste the relevant changelog section into the release notes.
- Publish the release.
Publishing triggers the publish.yml workflow, which builds the sdist and wheel and uploads them to PyPI.
Supported NetBox Versions
pynetbox aims to support the current and previous two minor versions of NetBox. The supported versions are defined in tests/integration/conftest.py and should be reviewed and updated each release cycle.