You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
design: write down what belongs in the all extra, and why #910
Is your feature request related to a problem? Please describe.
The all extra has no written inclusion criterion. It began, in the maintainer's words on #899, as "originally for all deps (when we only had 3 3p engines and crawler deps)", and the library has since grown past that. Today it is a curated list of eight requirements whose three exclusions each rest on a different ad-hoc justification, so a contributor adding a new extra has nothing to check their decision against.
Measured on origin/main:
ALL DPKT ['dpkt']
ALL PyPCAPFile ['pypcapfile']
ALL PyShark ['pyshark']
ALL Scapy ['scapy']
ALL cli ['emoji']
ALL crypto ['cryptography>=3.4']
ALL vendor ['requests', 'beautifulsoup4']
EXCLUDED NGAP ['pycrate'] -- size (~238 MB) + LGPL-2.1+ vs BSD-3-Clause
EXCLUDED PCAP_CT ['pcap-ct', 'libpcap'] -- published only as pre-releases
EXCLUDED PyPCAP ['pypcap'] -- sdist-only C extension, needs a compiler
EXCLUDED docs [Sphinx, furo, ...] -- not a runtime feature
partial test [pytest, pytest-xdist, isort, ...] -- only requests/beautifulsoup4 reach `all`
Three different reasons for three exclusions, and no rule that predicts them. Size, licence, release maturity and build-toolchain requirements are all cited somewhere in pyproject.toml's comments, each argued locally and at length. Nothing says which of those disqualify an extra in general.
Describe the solution you'd like
Decide and write down the criterion — not merely a revised list. The list follows from the rule; a list without one drifts again the next time an extra is added. Candidate axes the current comments already appeal to:
Licence — should all ever pull something less permissive than this package's BSD-3-Clause? pycrate is excluded partly for being LGPL-2.1+.
Size — is there a threshold? pycrate lands ~238 MB for one 4.9 MB module, a 50x multiplier over the useful part.
Release maturity — pcap-ct and libpcap are excluded for being pre-release only.
Build requirements — pypcap needs a compiler and libpcap headers, and fails where only the header is present.
Audience — is all "every runtime feature an end user might want", or "everything"? vendor (crawler deps) is in, test tooling is mostly out, docs is out. That boundary is real but unstated.
Then reconcile two specific things the audit will surface:
all duplicates other extras' contents inline rather than referencing them.requests[socks]/beautifulsoup4[html5lib] appear in both vendor and all as literals, so the two drift independently — exactly what happened on fix(ngap): source ProcedureCode/ProtocolIE from pycrate, stop the shared -1 mint (#880) #899, where adding pycrate to vendor did not put it in all and the workflow had to ask for both.
test is partial, which is almost certainly right but is currently an accident of which names happen to overlap rather than a decision.
Describe alternatives you've considered
Leaving it and deciding case by case. That is the status quo and it is what produced three incompatible justifications; it also means each new extra costs a fresh argument.
Additional context
Raised by the maintainer on #899: "I think that extra might need some revisit to determine what should fit in and what not … Now that the library grew, a new audit on it should be done."
Answering the narrower question he asked there:cryptography>=3.4 is already fully in all via the crypto extra, so crypto needs no change. pycrate is the live question, and its documented exclusion reasons still hold — adding it would make pip install pypcapkit[all] pull an LGPL-2.1+ dependency silently, which is the specific hazard pyproject.toml's own comment names.
#899 itself is unaffected and needs no change for this: it only touched vendor, and all still excludes pycrate as intended.
Is your feature request related to a problem? Please describe.
The
allextra has no written inclusion criterion. It began, in the maintainer's words on #899, as "originally for all deps (when we only had 3 3p engines and crawler deps)", and the library has since grown past that. Today it is a curated list of eight requirements whose three exclusions each rest on a different ad-hoc justification, so a contributor adding a new extra has nothing to check their decision against.Measured on
origin/main:Three different reasons for three exclusions, and no rule that predicts them. Size, licence, release maturity and build-toolchain requirements are all cited somewhere in
pyproject.toml's comments, each argued locally and at length. Nothing says which of those disqualify an extra in general.Describe the solution you'd like
Decide and write down the criterion — not merely a revised list. The list follows from the rule; a list without one drifts again the next time an extra is added. Candidate axes the current comments already appeal to:
allever pull something less permissive than this package's BSD-3-Clause?pycrateis excluded partly for being LGPL-2.1+.pycratelands ~238 MB for one 4.9 MB module, a 50x multiplier over the useful part.pcap-ctandlibpcapare excluded for being pre-release only.pypcapneeds a compiler and libpcap headers, and fails where only the header is present.all"every runtime feature an end user might want", or "everything"?vendor(crawler deps) is in,testtooling is mostly out,docsis out. That boundary is real but unstated.Then reconcile two specific things the audit will surface:
allduplicates other extras' contents inline rather than referencing them.requests[socks]/beautifulsoup4[html5lib]appear in bothvendorandallas literals, so the two drift independently — exactly what happened on fix(ngap): source ProcedureCode/ProtocolIE from pycrate, stop the shared -1 mint (#880) #899, where addingpycratetovendordid not put it inalland the workflow had to ask for both.testis partial, which is almost certainly right but is currently an accident of which names happen to overlap rather than a decision.Describe alternatives you've considered
Leaving it and deciding case by case. That is the status quo and it is what produced three incompatible justifications; it also means each new extra costs a fresh argument.
Additional context
Raised by the maintainer on #899: "I think that extra might need some revisit to determine what should fit in and what not … Now that the library grew, a new audit on it should be done."
Answering the narrower question he asked there:
cryptography>=3.4is already fully inallvia thecryptoextra, so crypto needs no change.pycrateis the live question, and its documented exclusion reasons still hold — adding it would makepip install pypcapkit[all]pull an LGPL-2.1+ dependency silently, which is the specific hazardpyproject.toml's own comment names.#899 itself is unaffected and needs no change for this: it only touched
vendor, andallstill excludespycrateas intended.