Repository navigation
chore: remove dead native bindings, stub entries, Rust items and test helpers - #1217
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 22, 2026 12:26
kvlonge
force-pushed
the
chore/remove-dead-surface
branch
2 times, most recently
from
October 22, 2026 13:26
b84e5fe to
a2a7d4b
Compare
… helpers Remove 33 native functions that no Python or Rust code calls besides their registration, the stub entries no Python code names (keeping every class a kept entry annotates), public Rust constants, methods and wrappers nothing uses, unused test helpers and a dead test helper package, nine workflow path filters that match deleted directories, and the unused `rich` runtime dependency. Add `make check-native-stub`, part of `make check-ci`: the stub may declare only functions, classes and constants the extension registers; protocols, typed dicts, type aliases and private stub-only classes are typing-only and exempt.
kvlonge
force-pushed
the
chore/remove-dead-surface
branch
from
October 22, 2026 14:32
a2a7d4b to
e92f46e
Compare
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.
Why
The native extension, its type stub, several crates and the test helpers carried surface that nothing uses. It costs build and review time and hides real drift: the stub declared names the extension no longer registers.
Changes
#[pyfunction]s with no caller besides registration. Python uses were checked across all tracked files, including string-name uses. Callback andatexithooks are kept._native.pyientries that no Python code names, keeping classes that kept entries annotate (18,051 → 15,940 lines).make check-native-stubtomake check-ci. Every stub function, class and constant must be registered by the built extension; protocols, typed dicts, aliases and private stub-only classes are exempt.mainwrappers (tests now call the owned helpers), and a test-only text span API.verify.ymlpath filters, and the unusedrichdependency.No behaviour, output or diagnostics change.
Verification
plan --jsonbyte-identical on two large synthetic projects, except Rules cache keys that embed the extension build identity.-D warnings, fensu andmake check-cipass.