Skip to content

Drop the sillo.wire alias; sillo_wire is the import path - #1

Merged
TechWithDunamix merged 1 commit into
mainfrom
drop-sillo-namespace-alias
Sep 12, 2026
Merged

TechWithDunamix merged 1 commit into
mainfrom
drop-sillo-namespace-alias

Conversation

@TechWithDunamix

Copy link
Copy Markdown
Member

sillo-wire shipped under two names. sillo_wire is where the code lives; sillo.wire was 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 mapping sillo.wiresillo_wire
  • sillo_wire.pth — to register it at interpreter startup, the only hook that runs before import sillo.wire could fail
  • sillo-stubs/ — PEP 561 partial stubs, because static analysis never runs import hooks

The cost is a .pth executing 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

from sillo.wire import Hub, Peer     # before
from sillo_wire import Hub, Peer     # now the only way

Cheap here: sillo-wire is at 0.1.0.dev1, a development pre-release.

Changed

  • Removed _sillo_wire_bootstrap.py, sillo_wire.pth, sillo-stubs/, both force-include blocks, and tests/test_alias.py. sillo-stubs leaves packages.
  • CI still checks 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, sillo.wire no longer resolves, and nothing lands in sillo/. The mypy step now exercises the package's real annotations instead of stubs.
  • release.yml needed no structural change: it already matches core's standard (three-way version agreement, tests before publish, uv build/uv publish, OIDC with PYPI_TOKEN fallback). Only the comment on the "stay out of sillo/" step, which described the now-deleted .pth, was updated.
  • Dropped sillo_wire/__pycache__/*.pyc, which was tracked.

Verification

  • 124 passed, ruff clean
  • Built wheel ships no .pth, no stubs, no bootstrap
  • Installed that wheel into a clean venv beside sillo-framework 1.0.0a1: sillo_wire imports, sillo.wire raises ImportError, no .pth installed, sillo/ untouched
  • sdist is 27 KB and contains only source (checked after finding core's sdist was shipping ~1.3 GB of docs/, benchmarks/ and virtualenvs)

🤖 Generated with Claude Code

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.
@TechWithDunamix
TechWithDunamix merged commit 8f2df5f into main Sep 12, 2026
6 checks passed
@TechWithDunamix
TechWithDunamix deleted the drop-sillo-namespace-alias branch September 12, 2026 23:26
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.

1 participant