Require Python 3.9+, SPDX license metadata, psycodict.__version__ - #121
Merged
Conversation
Three packaging changes for 1.0, taken together because they interlock:
- requires-python >= 3.9 (3.8 has been end-of-life since October 2024).
The unit matrix drops 3.8 and the "oldest supported pair" database row
becomes py3.9/PG13; ruff's target-version moves to py39.
- license = "GPL-2.0-or-later" (PEP 639 SPDX expression), replacing the
free-text {text = "GPL v2+"}. The wheel now carries a proper
License-Expression field. This needs setuptools >= 77, which is what
previously kept it out: on py3.8, pip resolves setuptools 75.x, which
rejects the string form. With the 3.9 floor the workaround disappears;
build-system pins setuptools>=77 (wheel is no longer needed there).
- psycodict.__version__, the single source of truth: pyproject declares
version dynamic and reads the literal via [tool.setuptools.dynamic], so
the attribute also works from an uninstalled checkout (which is how
LMFDB runs psycodict today).
Verified: build + twine check --strict pass; wheel METADATA shows
Metadata-Version 2.4, License-Expression GPL-2.0-or-later,
Requires-Python >=3.9; installed psycodict.__version__ matches
importlib.metadata.version; database-free suite 326 passed; ruff clean.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Python 3.14 joins the unit matrix, and {py3.14, PG18} becomes the
matrix's newest-pair corner, per the comment asking for a new row when
a PostgreSQL major is released.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
roed-math
pushed a commit
to roed-math/psycodict
that referenced
this pull request
Jul 22, 2026
Rebased onto main, which absorbed everything this PR used to anticipate; the reconciliation: - Version: 1.0.0 is now set in psycodict.__init__.__version__, the single source of truth roed314#121 established -- pyproject keeps main's dynamic version, SPDX license string and >=3.9 floor, and this PR's classifiers drop the License:: entry (setuptools >= 77 rejects it next to an SPDX string) and the 3.8 entry. - README: the rewrite now carries the Versioning.md pointer (roed314#123) in its Documentation list, which switches to relative links -- on the Sphinx site (roed314#122) those resolve to the copied guide pages, and they still render on GitHub; CHANGELOG and LICENSE stay absolute since neither is on the site. Supported Python is 3.9+; blob/master URLs become blob/main. - CHANGELOG: entries for the late wave -- sum/random honoring saving (roed314#118) and the 3.9 floor (roed314#121) under breaking changes; the docs site (roed314#122), Versioning.md/CONTRIBUTING/SECURITY and __version__ (roed314#121) under added; reload metafile+resort (roed314#114), update_from_file stats publication (roed314#115), copy_dumps delimiter escaping (roed314#116) under fixed; config.ini untracking (roed314#120), this release workflow and CITATION.cff (roed314#124) under infrastructure. - release.yml: the flow notes now say bump __init__.__version__ and merge to main. - Fixes the docs build on main, broken by the roed314#119 x roed314#122 crossing (roed314#119 merged after roed314#122's last CI run): the Configuration docstring's nested defaults list needed blank lines to be valid RST under autodoc, and the README's relative LICENSE link had no target on the site. Suite 857 passed / 36 skipped; ruff clean; sphinx -W clean; python -m build + twine check --strict pass with Version 1.0.0, License-Expression GPL-2.0-or-later, Requires-Python >=3.9 and no License classifier in the wheel metadata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three packaging changes for 1.0, in one PR because they interlock (the 3.9 floor is what unlocks the license fix):
Python >= 3.9
3.8 has been EOL since October 2024, and 1.0 is the natural moment to set the floor — raising it later is a compatibility break. CI: the unit matrix drops 3.8; the database matrix's "oldest supported pair" row becomes
{py3.9, PG13}.[tool.ruff] target-versionmoves topy39.SPDX license expression
license = "GPL-2.0-or-later"(PEP 639), replacing free-text{text = "GPL v2+"}. The wheel now carries a realLicense-Expressionfield (Metadata-Version 2.4). This form needs setuptools >= 77, which is exactly what kept it out before: py3.8's pip resolves setuptools 75.x, which rejects it. With the floor at 3.9 the workaround disappears;build-systemnow pinssetuptools>=77(and dropswheel, unneeded with modern setuptools).Note for #113: with the string form, setuptools >= 77 errors if a
License ::trove classifier is also present — the release branch should not add one, and can drop its{text = "GPL-2.0-or-later"}table-form workaround; this supersedes it.psycodict.__version__Single source of truth in
psycodict/__init__.py; pyproject declaresdynamic = ["version"]and reads the literal via[tool.setuptools.dynamic](AST extraction — no import, so no psycopg needed at build time). Works from an uninstalled checkout too, which is how LMFDB runs psycodict today.Note for #113: the release becomes "bump
__version__in__init__.pyto1.0.0" — the staticversion =line in pyproject is gone.Verification
python -m build+twine check --strict: PASSEDMetadata-Version: 2.4,License-Expression: GPL-2.0-or-later,Requires-Python: >=3.9,Version: 0.1.13psycodict.__version__==importlib.metadata.version("psycodict")== 0.1.13psycodictpackage (no test leakage); sdist unchanged🤖 Generated with Claude Code