Skip to content

warn_at_caller: separator-terminated package prefixes; single module skips only its file (#131) - #132

Merged
thorwhalen merged 1 commit into
masterfrom
fix-warn-at-caller-prefixes
Nov 23, 2026
Merged

thorwhalen merged 1 commit into
masterfrom
fix-warn-at-caller-prefixes

Conversation

@thorwhalen

Copy link
Copy Markdown
Member

Fixes two defects in the default plumbing of warn_at_caller (#124), found in a post-merge review:

  • a package's prefix now ends with a path separator, so wacpkg2_user/ is no longer skipped as plumbing of wacpkg2/;
  • a single top-level module's plumbing is its own file, not its folder, so a caller module next to it gets the warning.

Namespace packages are covered too: the prefixes are the package's __path__ directories. _package_dir becomes _package_prefixes (private, single caller). No caller of warn_at_caller exists in the fleet yet, so nothing downstream changes.

Tests: one per defect (both failed before), plus the existing helper/contextmanager test. Full suite: 914 passed, 2 xfailed (912 before, + the 2 new).

Closes #131

@thorwhalen
thorwhalen merged commit 0cb61b7 into master Nov 23, 2026
12 checks passed
@thorwhalen
thorwhalen deleted the fix-warn-at-caller-prefixes branch November 23, 2026 10:02
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.

warn_at_caller: default plumbing prefix matches sibling packages and a single module's whole folder

1 participant