Skip to content

test(const): the lazy apptype dir() pin includes __cached__, which Python 3.15 does not set #1648

Closed

Description

@JarryShaw

tests/const/test_const_apptype_lazy_1538_unit.py pins dir() of the lazy pcapkit.const.reg.apptype package to a literal EAGER_DIR that includes __cached__. Python 3.15.0's import system does not leave __cached__ on that module, so test_dir_and_star_import_are_unchanged and PackageGetattrTests::test_hooks fail there. The defect is in the test, not the package: the interpreter sets those module attributes.

Repro: #1645's Python 3.15 leg (job 115150227791, run 38353246360): 2 failed, 4006 passed. Python 3.11-3.14 pass.

Expected: the test holds on every supported Python. It should compare the lazy package's dir() with an eager import's on the same interpreter, or ignore the dunders the interpreter sets. The 3.15 change will be confirmed against CPython's notes before the fix.

Activity

  1. added
    testPull requests that add or correct tests (test: subject prefix)
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 13, 2026
  2. JarryShaw commented on Oct 13, 2026

    @JarryShaw
    OwnerAuthor

    Fixed on main by 9df91d4, a test-only push. The pin now reads the import-set names off the running interpreter, via module_from_spec on the package's own spec. The 3.15 change is gh-97879: the import system no longer sets __cached__. 14 passed on 3.15.0, 3.14 and 3.11; I re-ran it myself.

  3. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testPull requests that add or correct tests (test: subject prefix)

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions