Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

fix(python): derive runtime version from metadata#332

Draft
NikolayS wants to merge 3 commits into
mainNikolayS/PgQue:mainfrom
agent/fix-python-versionNikolayS/PgQue:agent/fix-python-versionCopy head branch name to clipboard
Draft

fix(python): derive runtime version from metadata#332
NikolayS wants to merge 3 commits into
mainNikolayS/PgQue:mainfrom
agent/fix-python-versionNikolayS/PgQue:agent/fix-python-versionCopy head branch name to clipboard

Conversation

@NikolayS

Copy link
Copy Markdown
Owner

Summary

  • make installed pgque-py metadata authoritative for pgque.__version__
  • fall back to the source pyproject.toml for direct checkout imports
  • verify source, editable, wheel metadata, and isolated installed-wheel versions in the release workflow
  • document the single-source version contract

Fixes #326.

Validation

  • red-first version regression
  • Python 3.9 tests: 10 passed, 70 skipped (DB-gated)
  • clean Python 3.12 source/editable/build/wheel validation
  • twine check passed for wheel and sdist
  • isolated installed-wheel runtime matched wheel metadata
  • actionlint, YAML parsing, and git diff --check passed

@NikolayS

Copy link
Copy Markdown
Owner Author

Real-user verification evidence

The original RED is retrospective because implementation and tests were committed together. Loading the final version tests with the base package failed collection with ModuleNotFoundError: pgque._version; head version tests now pass 5/5, including the branch dry-run contract.

Supported-runtime package path:

docker run --rm -v "$PWD/clients/python:/src:ro" -w /tmp python:3.13-slim sh -c '
  set -eu
  cp -R /src /tmp/pkg && cd /tmp/pkg
  python -m pip install ".[dev]" build
  PGQUE_TEST_DSN=postgresql://nik@host.docker.internal/pgque_pr_rules_audit python -m pytest -q
  python -m build
  python -m pip install --force-reinstall dist/*.whl
  cd /tmp && python -c "import pgque; assert pgque.__version__ == \"0.2.0\""
'

Result: 80 passed; sdist and wheel built; installed-wheel runtime metadata was 0.2.0.

The branch dry_run=true executed source, editable, build, Twine, wheel-metadata, and isolated-install validation: https://github.com/NikolayS/PgQue/actions/runs/29156149467. Both PyPI publishing jobs were skipped, and no tag or release path ran. Final head CI: 17/17 checks passed.

@NikolayS NikolayS left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REV rubric review

Automated ultrareview quota was unavailable, so I executed the five official
REV rubric prompts manually. SOC2 findings were omitted as instructed. This is
a comment-only review, not an approval.

Blocking findings

None. I found no unresolved functional, security, documentation, or test
blocker on head 423a76e157e45e35a92aeda32f010c2e83e467f2.

Rubric results

  • Bug hunter: installed distribution metadata is authoritative; an unpackaged
    source tree falls back to the [project] version and has an explicit unknown
    result when source metadata is absent.
  • Security reviewer: the parser does not evaluate project content, and publish
    jobs remain gated by dry_run, repository choice, environments, and OIDC.
  • Docs reviewer: the single-source version contract and dry-run validation
    path are documented accurately.
  • Guidelines checker: all current commits use allowed types, subjects are
    under 50 characters, the test-first dry-run correction is chronological,
    and all 17 CI checks pass.
  • Test analyzer: source, editable, wheel metadata, isolated wheel install, and
    branch dry-run/publish exclusions are covered. Exact-head workflow dispatch
    run 29156149467 passed; both PyPI publishers were correctly skipped.

Nonblocking findings

The original version fix has retrospective RED evidence because implementation
and tests share a commit; this is disclosed in the evidence comment and cannot
be reordered without rewriting history. No current change is requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

release(python): make runtime version follow package metadata

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.