Drop the sillo.wire alias; sillo_wire is the import path - #1
Merged
Merged
Conversation
The package shipped under two names. `sillo_wire` is where the code lives; `sillo.wire` was an alias that read as part of the framework, built from a meta-path finder in `_sillo_wire_bootstrap.py`, a `sillo_wire.pth` to register it at interpreter startup, and PEP 561 stubs in `sillo-stubs/` because static analysis never runs import hooks. That is three mechanisms, a `.pth` executing on every interpreter start in every environment the package is installed in, and a second set of type declarations to keep in step with the real ones — all so an import could read `sillo.wire`. A plain top-level package needs none of it, and inline annotations become the single source of truth for type checkers. Removed `_sillo_wire_bootstrap.py`, `sillo_wire.pth`, `sillo-stubs/`, both `force-include` blocks that shipped them, and `tests/test_alias.py`. `sillo-stubs` also leaves `packages`. CI keeps checking a built wheel rather than the editable checkout — an editable install can import what the wheel does not ship — but now asserts `sillo_wire` imports, that `sillo.wire` no longer resolves, and that nothing lands in the framework's `sillo/` directory. Type-checking the wheel now exercises the package's own annotations instead of stubs. Also drops `sillo_wire/__pycache__/*.pyc`, which was tracked. Verified: 124 passed, ruff clean, and the built wheel installs into a clean venv beside sillo-framework 1.0.0a1 where `sillo_wire` imports, `sillo.wire` raises ImportError, and no .pth is installed.
This was referenced Sep 12, 2026
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.
sillo-wireshipped under two names.sillo_wireis where the code lives;sillo.wirewas an alias so an import could read as part of the framework.That alias took three pieces of machinery:
_sillo_wire_bootstrap.py— a meta-path finder mappingsillo.wire→sillo_wiresillo_wire.pth— to register it at interpreter startup, the only hook that runs beforeimport sillo.wirecould failsillo-stubs/— PEP 561 partial stubs, because static analysis never runs import hooksThe cost is a
.pthexecuting on every interpreter start in every environment the package is installed in, plus a second set of type declarations to keep in step with the real ones. A plain top-level package needs none of that, and the package's own inline annotations become the single source of truth for type checkers.Breaking
Cheap here:
sillo-wireis at0.1.0.dev1, a development pre-release.Changed
_sillo_wire_bootstrap.py,sillo_wire.pth,sillo-stubs/, bothforce-includeblocks, andtests/test_alias.py.sillo-stubsleavespackages.sillo_wireimports,sillo.wireno longer resolves, and nothing lands insillo/. The mypy step now exercises the package's real annotations instead of stubs.release.ymlneeded no structural change: it already matches core's standard (three-way version agreement, tests before publish,uv build/uv publish, OIDC withPYPI_TOKENfallback). Only the comment on the "stay out ofsillo/" step, which described the now-deleted.pth, was updated.sillo_wire/__pycache__/*.pyc, which was tracked.Verification
ruffclean.pth, no stubs, no bootstrapsillo-framework 1.0.0a1:sillo_wireimports,sillo.wireraisesImportError, no.pthinstalled,sillo/untoucheddocs/,benchmarks/and virtualenvs)🤖 Generated with Claude Code