Repository navigation
test(tiers): make ALL a curated opt-in tier (#1958) - #1978
Conversation
- test, integration: a step on the latest leg alone installs the whole suite's extras (Scapy, PyShark, vendor, docs, cli on top of the base); every other leg keeps its install line and runs the ALL tier. - project-tests, gate: install the same set. - tests/_dependency_gates.py: read a latest-only install step as that leg's extras; drop the exclusions it closes (HAS_SCAPY, HAS_PYSHARK, HAS_RUNTIME, HAS_VENDOR_DEPS, HAS_SPHINX, HAS_DOCUTILS, HAS_FURO). - tests/project/test_whole_suite_on_latest_1958.py pins the lines, the leg, the gates closed and the docs; tier-guard, #1732 and #1954 pins follow the new reading. - workflows.rst describes it; unit-tests.yml line citations re-anchored. Selection steps and tests/_tiers.py are unchanged.
…1958) - test, integration: the install comments said cli, and crypto and NGAP, are not installed; the latest leg's whole-suite step installs them. - workflows.rst, releasing.rst: unit-tests.yml line citations re-anchored.
- tests/_tiers.py: module_tier() is the declared tier, else DEFAULT_TIER (LATEST); rule_tier() goes. all_tier_paths() lists ALL, and branches_on_interpreter() flags a module that compares the interpreter itself. The docstring states the curation criterion (#1963). - Curated modules opt in with `__tier__ = 'ALL'` and a reason: version gates, GC/weakref, int/struct limits, pickling and copying, metaclass and enum machinery, IO, threading and hooks, engines whose releases vary by interpreter, the hand-picked round trips, and a smoke slice per protocol family. Six vendor markers with no such reason are gone. - tests/test_tier_guard.py: ALL is opt-in, every ALL module declares it, and a module that branches on the interpreter must state its tier; the mixed-directory split test no longer assumes tests/integration is all ALL. test_sweeps_on_latest_only_1732 compares what the ALL fixture selection drops with the LATEST modules it reaches. - tests/project/test_curated_all_tier_1958.py pins the opt-in rule, the strict subset, the ruling-B round trips and the docs. - workflows.rst "Test Tiers" and the `test` job's `Run unit tests` comment describe it. Tier guard, #1732, #1954 and #1958 pins pass on CPython 3.14.
|
NEEDS CHANGES at
Non-blocking: say that the version/implementation guard is syntactic only. It misses aliases, |
…#1958) - Opt in the modules the review found on LATEST despite the criterion: pickling and copying, the warning machinery and exception hooks, struct and int boundary tests, and the modules #1974 gates on GraalPy: fallback cycle, MH timestamp and the two #1541 overrun tests that compare against sys.maxsize. - Opt Scapy's engine and toolkit modules into ALL like the other engines, and PyShark's toolkit and non-packet modules with them. - State each demoted vendor module's LATEST tier and reason. - branches_on_interpreter() also sees sys.flags, sys._is_gil_enabled, sys.maxsize comparisons, sysconfig.get_config_var() and hasattr/getattr probes of sys; its docstring and the guard's message say the check is syntactic and best-effort. - _tiers.py and workflows.rst "Test Tiers" give the Scapy and vendor reasons. Tier guard, #1732, #1954, #1958 pins and every touched module pass on CPython 3.14.
|
Pushed
A delta review is running. |
|
GOOD TO GO at
Non-blocking: the criterion names recursion limits, but the guard does not detect |
… and gate GraalPy's limits (#1963) (#1974) * fix(corekit): copy SeekableReader's octets and feed MultiDict a dict, and gate GraalPy's limits (#1963) - SeekableReader copies buffered octets out of its view: GraalPy's BytesIO read/read1/readline from an exported buffer's start can return bytes sharing its memory, which the next buffer slide overwrote - MultiDict hands dict.__init__ and dict.update a dict, not pairs: GraalPy stores pairs through the overridden __setitem__, nesting each value list - new test_graalpy_semantics_1963_unit reproduces both on CPython with stand-ins for GraalPy's behaviour - gate in the tests: pickle protocols 0/1 (typing.Generic is not a heap type), the >sys.maxsize PCAP claim, resource.setrlimit and _abc_impl; bound the huge BytesField length by sys.maxsize Refs #1963 * test(corekit): keep only the cases that fail without the GraalPy fixes (#1963) - drop the OrderedMultiDict copy and the plain-dict state cases, which passed without the fixes - say why the stand-in check stays: it guards the stand-in, not the fix - drop the count from the module docstring - correction to the first commit's review: werkzeug 2.3.8's MultiDict.__init__ and __setstate__ match pcapkit's apart from the annotations and the l -> v rename Refs #1963 * fix(corekit): upgrade the MultiDict port to werkzeug 3.1.9 (#1963) - port MultiDict, OrderedMultiDict and iter_multi_items from werkzeug 3.1.9 rather than 2.3.8: dict reached through super(), any Mapping and set values accepted, | and |= added, setdefault/setlistdefault simplified - keep the local adaptations: dict base without TypeConversionDict, MissingKeyError/UnsupportedCall, get() and getlist() without type=, OrderedMultiDict.deepcopy order fix, and no DeprecationWarning on OrderedMultiDict - werkzeug 3.1.9 still feeds pairs to dict.__init__ and update, which GraalPy routes through __setitem__; keep the two dict-building lines as the only behavioural divergence, noted in place - the GraalPy stand-in now sits in the MRO behind MultiDict, since super() no longer reads a module-global dict - test the new Mapping/set handling and the | operators tests/corekit and every test module importing the multidict pass on CPython; the #1963 and multidict tests pass on GraalPy 25.4.4. Refs #1963 * fix(corekit): keep the MultiDict port verbatim to werkzeug 3.1.9 (#1963) - drop the versionchanged notes and explanatory prose this PR added - restore werkzeug 3.1.9's docstrings, comments, overloads, annotations (as strings) and code layout for the ported classes - keep pcapkit's adaptations: dict + Generic base, MissingKeyError and UnsupportedCall, no type= on getlist, local get() and _missing, the #1295 OrderedMultiDict.deepcopy, poplist's [] default, and no OrderedMultiDict deprecation warning - keep the two GraalPy dict-building lines, with shorter comments tests/corekit passes on CPython; the multidict and #1963 modules pass on CPython and GraalPy 25.4.4. Refs #1963 * test(project): know the useless-parent-delegation pragma (#1963) - add useless-parent-delegation (W0246) to KNOWN_MESSAGES: the pragma on MultiDict.__iter__ keeps upstream's CPython 87412 fast-path workaround Refs #1963 * test(corekit): declare the GraalPy semantics module ALL-tier (#1963) - add __tier__ = 'ALL': the module pins GraalPy-only semantics, so it has to keep running on every interpreter leg once ALL becomes opt-in (#1978) Refs #1963
|
GOOD TO GO at |
|
Coverage: 91.52% (unit tier, Python 3.15,
Per-file detail: the |
make pylint,make mypy,make isort)make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
test— tests onlyDescription of your pull request and other information
Stacked on #1976. Implements the ruling on #1963 that
ALLshould be a tailored list. A module joinsALLonly through an explicit__tier__ = 'ALL'marker with a reason; everything else defaults toLATEST. The criterion is behaviour that can differ by interpreter or version (compat gates, GC/finalisation, int/struct limits, pickling, metaclass/ABC/enum, IO, threading, engines), plus the ruling-B round trips and a smoke slice per protocol family. The criterion is written in_tiers.pyandworkflows.rst. The guard also fails any module that comparessys.version_info/sys.implementationwithout stating a tier.ALLpcapkit/line coverageLatest CPython still runs everything. Judgement calls for review:
ALLlike the other engines; they skip ontestlegs that do not install Scapy.LATESTwith a reason: the vendor extra is installed only there, and the interpreter-sensitive vendor parts stayALL.sys.version_info,sys.implementation,sys.flags,sys.maxsize,sysconfigand probes ofsys.ALLhere; the two PRs merge cleanly.tests/project/test_curated_all_tier_1958.pyfails on #1976's head and passes here.Refs #1958, #1963