build(deps): bump griffe to ~=2.1.0#242
Merged
Merged
Conversation
Add _symbol_info_for_dotted helper to resolve dotted names by walking the griffe tree. Teach snapshot_from_griffe to capture documented_names (nested symbols via dotted names) when provided; default (no documented_names) preserves existing top-level __all__ behavior for back-compat.
Drop the class-prefix heuristic in _is_valid_ref_name in favour of exact set membership: with deep snapshots, every valid page stem (including method stems like Class.method) is present as a snapshot key, so a two-argument name-in-set check is sufficient. Remove the now-unused valid_classes / snapshot_classes path throughout _prune_reference_index, _prune_quarto_sidebar, and _rebuild_api_from_snapshot.
Add test_resolver_matches_renderer_sections to assert documented_symbol_names output equals the flattened _create_api_sections_from_config contents, so the resolver and renderer can never silently diverge. Add test_deduplication_preserves_first_occurrence_order to exercise the dedup path: a config with the same symbol in two sections asserts the result has no duplicates and preserves first-occurrence order.
`documented_symbol_names` now calls `_create_api_sections_with_config` instead of `_create_api_sections_from_config`, so it consumes the same nodoc-filtered section set the dev renderer uses. Symbols marked with `%nodoc` are therefore excluded from the resolver output, eliminating the over-inclusion bug where a versioned snapshot could render pages the dev build hides. Also routes diagnostic warning prints that appear in the discovery pipeline to `sys.stderr` and suppresses all build-pipeline output inside `documented_symbol_names` (a programmatic query that owns no output stream), keeping the `api-diff --json` CLI path clean.
Raise the floor from <2.0.0 to ~=2.1.0 and drop the now-dead version-conditional code that supported older griffe: - Remove `_patch_griffe`; griffe 2.x always exports `CyclicAliasError` and `AliasResolutionError` at the top level, so it was a no-op. - Detect PEP 695 `type X = ...` aliases in `is_typealias` via the dedicated `TypeAlias` kind (resolves the standing TODO); old-style `X: TypeAlias = ...` attributes still use the annotation heuristic.
Fix incomplete API reference for versioned (tagged) docs (posit-dev#190)
Raise the floor from <2.0.0 to ~=2.1.0 and drop the now-dead version-conditional code that supported older griffe: - Remove `_patch_griffe`; griffe 2.x always exports `CyclicAliasError` and `AliasResolutionError` at the top level, so it was a no-op. - Detect PEP 695 `type X = ...` aliases in `is_typealias` via the dedicated `TypeAlias` kind (resolves the standing TODO); old-style `X: TypeAlias = ...` attributes still use the annotation heuristic.
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.
Raise the floor from <2.0.0 to ~=2.1.0 and drop the now-dead version-conditional code that supported older griffe:
_patch_griffe; griffe 2.x always exportsCyclicAliasErrorandAliasResolutionErrorat the top level, so it was a no-op.type X = ...aliases inis_typealiasvia the dedicatedTypeAliaskind (resolves the standing TODO); old-styleX: TypeAlias = ...attributes still use the annotation heuristic.