Repository navigation
ci(deps): narrow the all extra to core addons, add a dev extra (#910) - #914
Conversation
b1535e7 to
a91c706
Compare
|
GOOD TO GO on The claim that mattered most — does narrowing Independently reproduced: One comment was wrong and this PR was duplicating it, so I fixed both copies. They said installing Sequencing, and my own brief was wrong here. I told the reviewer #912's Unverified, stated as such: the base-tree Sphinx count (the PR tree measures 42 on a fresh build with and without |
|
Resolve conflicts. |
The owner's ruling on #910: `all` should carry only the core addons that make the library work at full functionality (`cli`, `crypto`, `pycrate` for NGAP), not every 3rd-party capture engine an end user might want. Drops dpkt, scapy, pyshark, pypcapfile, requests and beautifulsoup4 from `all` (8 requirements to 3); each moves to its own on-demand extra, same as PyPCAP/PCAP_CT always were. `pypcap`/`pcap-ct` stay out of everything, unchanged. Adds a `dev` extra carrying what `all` used to, for CI's different need: pylint/mypy/Sphinx resolve imports against what is installed, so narrowing `all` would otherwise have grown lint.yml's tracked 8 `import-error` messages. Measured with a real editable install before and after: pylint's import-error count holds at 8 (identical messages), and the docs build holds at 42 warnings (identical text). lint.yml, deploy-pages.yml and cron-conda.yml's conda-update job move to `.[all,dev]`. cron-vendor.yml's `.[all,vendor]` already covers what left `all`, verified with a real resolve. create-release.yml's and cron-conda.yml's conda-dist job's bare `.[all]` are untouched -- neither has a downstream consumer of the removed engines (`conda/requirements.txt` is a separately pinned list). Updates the three test modules and two docs pages (plus README) that described the old `all`, and adds two tests proving the new shape against a real pyproject.toml parse. Build: 109 tests in tests/test_tier_guard.py and 178 in tests/project/ pass. Corrected two comments that asserted `engine='pypcapfile'` raises ModuleNotFoundError on Python 3.12+. It does not: `Extractor.run` consults `PyPCAPFile.unsupported_reason()` *before* the import test (`pcapkit/foundation/extraction.py:545-551`) and degrades to the default engine with a warning. That guard exists because a bare `import pcapfile` succeeds on 3.12+, so an import-only check would let the error escape -- which is what the comments were describing, but as current behaviour rather than as the reason the guard is there. One copy was pre-existing on the `PyPCAPFile` extra; the other this change had duplicated into `dev`. Comments only: extras resolve byte-identically and `tests/test_tier_guard.py` still passes 109 tests.
a91c706 to
23d2c13
Compare
|
Rebased onto The clash was the paragraph in Kept this PR's prose and main's leading slash. The prose because main's version is now factually wrong — Verified the resolution introduced nothing else. Comparing Extras confirmed unchanged after the rebase:
|
Please follow the guide below
You will be asked some questions, please read them carefully and answer honestly
Put an
xinto all the boxes [ ] relevant to your pull request (like that [x])Use Preview tab to see how your pull request will actually look like
Searched for similar pull requests
Followed the coding style (
make isortverified clean;pcapkit/itself is untouched, somake pylint/make mypyare unaffected)make testpasses, and a test case covers the change — rantests/test_tier_guard.py(109) andtests/project/(178) directly per instruction, not the full suite; two new tests cover the newall/devshape and were shown to fail without this changeAdded a changelog entry — N/A, changelog centralised in docs(changelog): shared 1.5.0 changelog — long-lived, merges last (#610, #616, #617, #618, #620) #657
What is the purpose of your pull request?
ci— workflows or build toolingDescription of your pull request and other information
Implements the owner's ruling on #910:
allnarrows from 8 requirements to3 core addons (
cli,crypto,pycrate/NGAP); the four 3rd-party captureengines it used to bundle (dpkt, scapy, pyshark, pypcapfile) become on-demand
extras, same as
PyPCAP/PCAP_CTalways were.pypcap/pcap-ctstay outof everything.
A new
devextra carries whatallused to for CI's own need: pylint,mypy and Sphinx's autodoc resolve imports against what is installed, and
lint.yml's comment tracks exactly 8import-errormessages from the twoengines already absent by version marker. Measured with a real editable
install: that count holds at 8 (identical messages) with
.[all,dev], andthe docs build holds at 42 warnings (byte-identical text) either side.
lint.yml,deploy-pages.ymlandcron-conda.yml'sconda-updatejob moveto
.[all,dev].cron-vendor.yml's existing.[all,vendor]already coverswhat left
all(verified).create-release.yml's andcron-conda.yml'sconda-distjob's bare.[all]installs are untouched — traced through toconfirm neither has a downstream consumer of the removed engines.
Updates the three test modules and two docs pages (+README) that described
the old
all, and adds two new tests intests/test_tier_guard.pyprovingthe new shape against a real
pyproject.tomlparse.