How to make a psycopg release¶
Check if there is a new version or libpq or OpenSSL; in such case update
LIBPQ_VERSIONand/orOPENSSL_VERSIONin.github/workflows/packages-bin.yml.Check if there is a new cibuildwheel release; if so, upgrade it in
.github/workflows/packages-bin.yml.Use
tools/bump_version.pyto upgrade package version numbers.Push to GitHub to run the tests workflow.
Build the packages by triggering manually the ones requested among:
Delete the
wheelhousedirectory there is one.Build m1 packages by running
./tools/build/run_build_macos_arm64.sh BRANCH. On successful completion it will save built packages inwheelhouseIf all packages were built ok, push the new tag created by
bump_version.py:git push --tags
Download the
artifacts.zippackage from the last Packages workflow run.Unpack the packages in the wheelhouse dir:
mkdir -p wheelhouse cd wheelhouse unzip ~/Downloads/artifact.zip
If the package is a testing one, upload it on TestPyPI with:
$ twine upload -r testpypi *
If the package is stable, omit
-r testpypi:$ twine upload *
Run
tools/bump_version.py -l devto bump to the next dev version.
When a new PostgreSQL major version is released¶
Add the new version to
tools/update_errors.pyand run the script to add new error classes.If the script above found any change, document the version added at the bottom of
docs/api/errors.rst.Run the script
tools/update_oids.pyto add new oids. Use-hto get an example docker command line to run a server locally.Check if there are new enum values to include in:
psycopg_c/psycopg_c/pq/libpq.pxd;psycopg/psycopg/pq/_enums.py.
Include the new version in GitHub Actions test and package grids.
Bump
PG_VERSIONin themacosjob of.github/workflows/packages-bin.yml..github/workflows/tests.yml.
Bump
pg_versionintools/build/build_macos_arm64.sh.Bump the version in
tools/build/wheel_win32_before_build.bat.Update the documented versions in:
docs/basic/install.rst;content/features/contents.lrin the psycopg-website repository.
When a new Python major version is released¶
Add the new version to the relevant test matrices in
.github/workflows/tests.ymland.github/workflows/packages-bin.yml.Update
docs/basic/install.rstwith the correct range of supported Python versions.Add the
Programming Language :: Python :: 3.<X>classifier topsycopg/setup.cfg,psycopg_c/setup.cfgandpsycopg_pool/setup.cfg.Update the list of versions in
tools/build/build_macos_arm64.shto include the new version. Look for both thepython_versionsvariable and theCIBW_BUILDenvironment variable.