Skip to content

build: remove setup.py now that the floor is Python 3.8 (#2061) - #2066

Merged
JarryShaw merged 1 commit into
mainfrom
build/2061-remove-setup-py
Oct 23, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
build/2061-remove-setup-py

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner
  • Searched for similar pull requests
  • Followed the coding style (make pylint, make mypy, make isort)
  • make test passes, and a test case covers the change
  • Added a changelog entry — 1.5.0 → Project infrastructure → Changed

What is the purpose of your pull request?

  • build — changes that affect the build system or external dependencies

Description of your pull request and other information

Closes #2061. Since #2053, setup.py held nothing but a Python 2 guard and a bare setup(); everything else is declared in pyproject.toml.

  • Removed: setup.py and tests/project/test_setup.py. examples/benchmark/Dockerfile no longer copies setup.py.
  • Build unchanged: the 3.14 wheel's unpacked files match main's exactly under diff -r. The sdist loses only the two deleted files. pip install -e . works (PEP 660), and pip wheel on 3.8 succeeds.
  • Dependabot: the reason for the static readme changes. Dependabot's file fetcher (fetch_project_file) now builds the Pipfile's editable from pyproject.toml alone, instead of from its stub setup.py. The comment and test_actions_pinned_1968 are reworded to match.
  • Guard test: test_no_setup_py_2061 fails if setup.py comes back, or if a Dockerfile COPY names an untracked path. A self-check stops the parser passing vacuously by finding nothing. I confirmed it fails before the fix in both of those ways.
  • Tests: the project leg ran 1946 tests with 0 failures. The packaging, changelog and docs readers give 265 passed.

@JarryShaw JarryShaw added python Pull requests that update Python code chore Maintenance work: tooling, repo hygiene, no library behaviour change review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 22, 2026
@JarryShaw
JarryShaw force-pushed the build/2061-remove-setup-py branch from ef7387b to 15db89c Compare October 22, 2026 23:30
@JarryShaw JarryShaw added review: running A cross-review is in flight against the current head - no verdict yet and removed review: pending No verdict for the current head - never reviewed, or the head moved since the last one labels Oct 22, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at 15db89cee (Sonnet cross-review). The wheels from main and from this branch unpack identically under diff -r. The sdist loses only the removed files. pip install -e works and imports from the tree. No workflow, Makefile, MANIFEST.in, conda recipe or README step runs or copies setup.py. The guard test fails with setup.py restored and with it re-added to the Dockerfile COPY, and the readers give 368 passed.

Two non-blocking fixes are coming in one amend:

  • Stale comment: the one in unit-tests.yml still uses setup.py as its example code file.
  • Dependabot wording: dependabot-core's source does fetch pyproject.toml when setup.py is missing and passes it through unstubbed. It does not show that a dynamic readme would fail, so the wording will claim only what the source shows.

@JarryShaw JarryShaw added review: good-to-go Cross-review at the current head says ready; CI state is separate and removed review: running A cross-review is in flight against the current head - no verdict yet labels Oct 22, 2026
After #2053 setup.py was a Python 2 guard and a bare setup(); pyproject.toml
declares everything, and the wheel builds the same files without it.

- Delete setup.py and tests/project/test_setup.py.
- Add tests/project/test_no_setup_py_2061.py: fails if setup.py returns, or if
  a COPY in examples/benchmark/Dockerfile names an untracked path.
- examples/benchmark/Dockerfile: stop copying setup.py.
- pyproject.toml, test_actions_pinned_1968: the static readme is now explained
  by Dependabot fetching pyproject.toml in setup.py's place
  (fetch_project_file) and passing it through unstubbed, not by its stub
  setup.py.
- util/classify_changes.py, tests/_tiers.py: examples no longer name the
  removed files.
- Changelog entry in 1.5.0.rst; CHANGELOG.md regenerated.
@JarryShaw
JarryShaw force-pushed the build/2061-remove-setup-py branch from 15db89c to e80e32c Compare October 22, 2026 23:41
@JarryShaw

Copy link
Copy Markdown
Owner Author

Pushed e80e32ca1, which changes wording only.

  • Dependabot: the pyproject.toml comment, the test_actions_pinned_1968 docstrings, the changelog entry and the commit message now claim only what dependabot-core's source shows. With no setup.py, fetch_project_file fetches pyproject.toml in its place, and the Pipfile updater writes it unstubbed. The static readme stays, because it doesn't depend on what a stub would supply.
  • unit-tests.yml: nothing to change. No comment there names setup.py; the only hits are setup-python.
  • Checks: changelog --check is in step, and the six readers give 166 passed. The GOOD TO GO carries to e80e32ca1.

@github-actions

Copy link
Copy Markdown
Contributor

Coverage: 91.52% (unit tier, Python 3.15, e80e32ca1, Unit Tests run success)

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19599 881 2618 867 92.11%
pcapkit/corekit 2565 71 812 37 96.56%
pcapkit/dumpkit 282 3 102 3 98.44%
pcapkit/foundation 2930 23 1022 25 98.79%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17414 219 4574 185 98.14%
pcapkit/toolkit 869 36 298 10 95.20%
pcapkit/utilities 473 7 136 5 98.03%
pcapkit/vendor 4431 1995 1018 167 51.73%

Per-file detail: the coverage-html artifact of this run.

@JarryShaw

Copy link
Copy Markdown
Owner Author

Ready to merge at e80e32ca1: the review is GOOD TO GO and CI is complete (56 passed, 0 failed). The ordering leg ran 1946 tests with 0 failures. The 3.8–3.10 KTLO legs show 0 failing tests, and the PR is based on current main (c98541f84). #2064 edits the same pyproject.toml and changelog, so whichever merges second will get a conflict, and I'll rebase it.

@JarryShaw
JarryShaw merged commit 96f2c40 into main Oct 23, 2026
59 checks passed
@JarryShaw
JarryShaw deleted the build/2061-remove-setup-py branch October 23, 2026 01:53
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 23, 2026
@JarryShaw

Copy link
Copy Markdown
Owner Author

Still ready after #2064 merged. The branch is only BEHIND: it merges cleanly into main (d7581ebb1), so I haven't pushed a rebase. On the merged tree, CHANGELOG.md is still in step, and the setup.py guard, the setuptools-floor test, the Dependabot-pin test and the changelog and docs readers all pass.

@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 23, 2026
@JarryShaw JarryShaw added this to the PyPCAPKit v1.5 milestone Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance work: tooling, repo hygiene, no library behaviour change python Pull requests that update Python code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Remove setup.py now that the floor is Python 3.8

1 participant