Skip to content

build: fix the publish workflow checkout and the packaging warnings - #319

Merged
jaysonsantos merged 1 commit into
mainfrom
build/release-pipeline-warnings
Oct 12, 2026
Merged

jaysonsantos merged 1 commit into
mainfrom
build/release-pipeline-warnings

Conversation

@jaysonsantos

Copy link
Copy Markdown
Owner

Summary

The publish run for v0.33.0 passed, but its log showed three defects. This pull request fixes them. No package code changes.

Run: https://github.com/jaysonsantos/python-binary-memcached/actions/runs/38235766182

What changed

.github/workflows/publish.yml

The build job had two incorrect steps:

  • actions/checkout@master, which is a branch that can change.
  • A step Set up Python 3.10 that gave persist-credentials: false to actions/setup-python. That action does not have this input, and the step set no Python version.

#281 intended actions/checkout@v7 with persist-credentials: false. The job now has that step, and the incorrect setup-python step is gone. The step Set up Python with Python 3.14 stays.

This job builds the files that go to PyPI, so the checkout action must not come from a branch.

MANIFEST.in

  • recursive-include tests * matched nothing, because the directory is test. The line now names test.
  • The sdist of 0.33.0 does not contain test/conftest.py, so the tests in that sdist cannot run. The sdist from this branch contains the file.
  • The two exclude lines came before the include lines and had no effect on them. With the corrected test line, a local build after a test run put .pyc files into the sdist. One global-exclude *.py[cod] line after the include lines replaces the two lines and prevents this.

pyproject.toml

  • license = { text = "MIT" } is now license = "MIT", an SPDX expression.
  • The classifier License :: OSI Approved :: MIT License is gone. setuptools rejects a license classifier together with an SPDX expression.
  • The build requirement is now setuptools>=77.0.3, the first version that accepts the SPDX form.

The wheel metadata now has License-Expression: MIT. It had License: MIT and the classifier.

Tests

I built the package with the build steps of publish.yml, on a copy of main and on a copy of this branch:

pandoc -s --to rst -o /dev/stdout CHANGELOG.md   # appended to README.rst
python -m build --sdist --wheel --outdir dist/ .
python -m twine check --strict dist/*
Item main This branch
Warning for the tests directory 4 0
Warning for the project.license table 4 0
Warning for the license classifier 8 0
twine check --strict pass pass
Files in the sdist 71 72
.pyc files in the sdist, clean tree 0 0
  • The only difference between the sdist on PyPI and the sdist from this branch is test/conftest.py.
  • I built again from a copy that had 24 .pyc files in test/, docs/, and bmemcached/. The sdist had the same 72 files and no .pyc file.
  • The wheel has the same files as before.

Tests from an extracted sdist, python -m pytest -q test:

  • sdist of 0.33.0 from PyPI: 1 error during collection.
  • sdist from this branch: 296 passed, 3 skipped.

Repository checks:

pytest -q
ruff check .
ruff format --check .
nix build .#default --no-link
actionlint .github/workflows/publish.yml

Result: 296 passed, 3 skipped. The 3 skipped tests are the SASL tests, because the local memcached has no SASL support. The other commands pass.

Limits

  • publish.yml runs only on a v* tag and on workflow_dispatch, so no check on this pull request runs it. The next release is its first run.
  • The two changed steps are the same as the first two steps of dogpile-cache.yml, which run on this pull request.
  • actionlint does not report the incorrect persist-credentials input on main. The warning annotations of the run above are the evidence for that defect.
  • One warning stays in a build from a clean tree: no previously-included files matching '*.py[cod]' found anywhere in distribution. It is correct, because a clean tree has no compiled files.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WMdSnqGyEgaYYyfafF7648

The publish run for v0.33.0 passed, but it showed three defects.

publish.yml: the build job used `actions/checkout@master`, and a
`setup-python` step had the `persist-credentials` input of the checkout
action. #281 intended `actions/checkout@v7` with
`persist-credentials: false`. The job now has that step, and the
incorrect `setup-python` step is gone.

MANIFEST.in: `recursive-include tests *` matched nothing, because the
directory is `test`. The sdist did not contain `test/conftest.py`, so
its tests could not run. The line now names `test`. The two `exclude`
lines came before the include lines and had no effect on them. One
`global-exclude *.py[cod]` line after the include lines replaces them
and keeps compiled files out of the sdist.

pyproject.toml: `license` is now the SPDX expression `MIT`, and the
license classifier is gone. setuptools reported the two old forms as
deprecated. The SPDX form needs setuptools 77.0.3, so the build
requirement is now `setuptools>=77.0.3`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WMdSnqGyEgaYYyfafF7648
@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08103f17-e5ed-4131-9ba1-93c8f81c5db0

📥 Commits

Reviewing files that changed from the base of the PR and between 2f6095f and c191098.


📒 Files selected for processing (3)
  • .github/workflows/publish.yml
  • MANIFEST.in
  • pyproject.toml

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T10:31:36.271189Z c191098 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mergify

mergify Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again.

@jaysonsantos
jaysonsantos merged commit 6db3c3e into main Oct 12, 2026
11 checks passed
@jaysonsantos
jaysonsantos deleted the build/release-pipeline-warnings branch October 12, 2026 10:34
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.

1 participant