refactor(exports): single-source __all__ from guard_core (O3)#96
Merged
Conversation
…ter (O3) Derive guard.__all__ from guard_core.__all__ plus the two fastapi-guard locals (SecurityMiddleware, __version__) instead of hand-duplicating the 22 re-exported names, so the lists can't silently drift. Re-exports use the explicit `X as X` form (typed re-export, no F401); combine-as-imports keeps the block tidy. A test asserts __all__ equals guard_core's surface plus the locals; the existing test already asserts every name is importable. Also filter guard-core 3.2.0's new ipinfo_* DeprecationWarning in the test suite (fixtures set ipinfo_db_path); the guard-core side documents the deprecation path.
rennf93
added a commit
that referenced
this pull request
Jun 23, 2026
…n docs (#98) Bump 7.1.1 -> 7.2.0 for the work already merged: agent-init clarity + [agent] extra + agent_strict + on_error(agent_init) (#92), export single-source-of-truth (#96), Passive-to-Active guide (#94), behavioral wiring docs (#95). CHANGELOG + release-notes filled. Requires guard-core 3.2.0+. Co-authored-by: Renn F <rennf93@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design-partner feedback O3 (fastapi-guard half). Supersedes #93, which GitHub auto-closed when its stacked base (
feat/agent-init-clarity, #92) was merged + deleted. Same change, rebased directly ontomaster.Derive
guard.__all__fromguard_core.__all__plus the two fastapi-guard locals instead of hand-duplicating the 22 re-exported names, so the lists can't silently drift. Re-exports use the explicitX as Xtyped form (no# noqa);combine-as-importskeeps the block tidy. A test asserts__all__equals guard_core's surface plus the locals; the existing test already asserts every name is importable.Also filters guard-core 3.2.0's new
ipinfo_*DeprecationWarningin the test suite (fixtures setipinfo_db_path).Full suite: 243 passed, 100% line + branch, zero warnings (validated pre-rebase).
Part of the coordinated guard-core 3.2.0 release.