Skip to content

Fix flaky hnswlib stubtest allowlist - #16102

Open
nightcityblade wants to merge 2 commits into
python:mainfrom
nightcityblade:fix/issue-16100
Open

Fix flaky hnswlib stubtest allowlist#16102
nightcityblade wants to merge 2 commits into
python:mainfrom
nightcityblade:fix/issue-16100

Conversation

@nightcityblade

@nightcityblade nightcityblade commented Jul 28, 2026

Copy link
Copy Markdown

Fixes #16100

The daily Linux job did not report the hnswlib.Index metaclass mismatch and therefore rejected the existing allowlist entry as unused, while the PR's fresh Linux job reproduced the mismatch. Keep the exception cross-platform, but make the regular-expression entry optional so stubtest accepts both runtime variants.

Tests:

  • PYTHONPATH=lib python3 tests/stubtest_third_party.py hnswlib -v
  • PYTHONPATH=lib python3 tests/check_typeshed_structure.py
  • uvx pre-commit run --files stubs/hnswlib/@tests/stubtest_allowlist.txt

@nightcityblade nightcityblade changed the title Make hnswlib stubtest allowlist macOS-specific Fix flaky hnswlib stubtest allowlist Jul 28, 2026
@nightcityblade

Copy link
Copy Markdown
Author

Addressed the Linux stubtest failure in 8e76d4e.

The PR job reproduced the pybind11_type mismatch on Linux even though the daily Linux run did not, so a Darwin-only allowlist was insufficient. stubs/hnswlib/@tests/stubtest_allowlist.txt now uses the optional regex (hnswlib.Index)?, which accepts either runtime result without an unused-entry failure.

Validation:

  • PYTHONPATH=lib python3 tests/stubtest_third_party.py hnswlib -v — passed
  • PYTHONPATH=lib python3 tests/check_typeshed_structure.py — passed
  • pre-commit on the allowlist — passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Daily tests failed on Tue Jul 28 2026

1 participant