Skip to content

fix(utilities): leave GraalPy's bootstrap frames out of the importer's level, and gate its remaining limits (#1963) - #1996

Merged
JarryShaw merged 1 commit into
mainfrom
test/1963-graalpy-remaining
Oct 20, 2026
Merged

JarryShaw merged 1 commit into
mainfrom
test/1963-graalpy-remaining

Conversation

@JarryShaw

Copy link
Copy Markdown
Owner

What is the purpose of your pull request?

  • fix — corrects a defect

Description of your pull request and other information

The remaining GraalPy-only failures from #1963, each reproduced on GraalPy 25.4.4 locally.

Not done:

  • Sharding the leg in two. The matrix comes from util/python_versions.py, and a shard would rename the check.
  • Junit timings put the curated tier at about 54% of the old test time. That projects to well under the leg's timeout, so re-measure after merge first.
  • Found and filed separately: GraalPy never calls __del__, so Extractor.__del__ cannot close an abandoned extraction's file there.

Part of #1963.

@JarryShaw JarryShaw added fix Pull requests that fix a defect (fix: subject prefix) test Pull requests that add or correct tests (test: subject prefix) labels Oct 20, 2026
@JarryShaw JarryShaw added the review: running A cross-review is in flight against the current head - no verdict yet label Oct 20, 2026
…s level, and gate its remaining limits (#1963)

- _importer_stacklevel skips <frozen _frozen_importlib> and
  <frozen _frozen_importlib_external>, GraalPy's names for importlib's
  bootstrap frames, which its warnings.warn already leaves out; the
  import-time ConfigWarnings named <sys>:0 there
- new ImporterStacklevelTests pins both interpreters' names on CPython
- test_sentinel_py_abc_1960_unit: GraalPy takes the _py_abc fallback
  unaided, and its _py_abc imports from _abc, so the child blocks _abc
  only off GraalPy
- test_compat: GraalPy words a UnicodeDecodeError's reason its own way,
  so there only the octet and position are compared; this is what failed
  UnmaskedOrderTests' unittest child
- test_tier_guard_xdist: skip XdistSubprocessTests and
  ProbeWorkerCrashTests on GraalPy, whose nested xdist sessions idled
  the leg's other workers

Touched modules pass on CPython 3.14 and GraalPy 25.4.4; the tier guard
passes.

Refs #1963
@JarryShaw

Copy link
Copy Markdown
Owner Author

GOOD TO GO at f2944a2f7. A Sonnet review of 30a584e3e confirmed the stacklevel fix on GraalPy 25.4.4 and CPython 3.14.8:

  • GraalPy's import stack is <frozen _frozen_importlib_external> then <frozen _frozen_importlib>, and its warnings.warn skips both.
  • The new predicate never matches a CPython frame.
  • test_config_unit passes on both (38 passed), and ImporterStacklevelTests fails with the fix reverted.
  • Every gate keys on sys.implementation.name, and the tier guards pass.
  • The CPython path still blocks _abc, and still compares the full decode message.

f2944a2f7 rewords one garbled docstring sentence and drops a count ("both rows").

The review also asked for :issue: in place of #1963 in the test docstrings and #: comments. I kept #1963, because tests/ is not rendered by Sphinx and plain #NNN is the prevailing form there.

@JarryShaw
JarryShaw force-pushed the test/1963-graalpy-remaining branch from 30a584e to f2944a2 Compare October 20, 2026 18:46
@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 20, 2026
@JarryShaw JarryShaw moved this to In review in PyPCAPKit Oct 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

Package Statements Missed Branches Partial Cover
pcapkit (top level) 104 4 20 2 95.16%
pcapkit/const 19597 881 2618 867 92.11%
pcapkit/corekit 2540 71 808 37 96.54%
pcapkit/dumpkit 276 3 100 3 98.40%
pcapkit/foundation 2918 23 1016 25 98.78%
pcapkit/interface 138 4 52 3 96.32%
pcapkit/protocols 17450 226 4598 191 98.09%
pcapkit/toolkit 872 36 298 10 95.21%
pcapkit/utilities 523 2 158 4 99.12%
pcapkit/vendor 4431 1995 1018 167 51.73%

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

@JarryShaw
JarryShaw merged commit 50b772d into main Oct 20, 2026
57 checks passed
@JarryShaw
JarryShaw deleted the test/1963-graalpy-remaining branch October 20, 2026 21:59
@github-project-automation github-project-automation Bot moved this from In review to Done in PyPCAPKit Oct 20, 2026
@JarryShaw JarryShaw removed the review: good-to-go Cross-review at the current head says ready; CI state is separate label Oct 20, 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

fix Pull requests that fix a defect (fix: subject prefix) test Pull requests that add or correct tests (test: subject prefix)

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant