Skip to content

refactor(asgi): drop ASGI bridge; OxyRoute 0.3.0 is RSGI-only - #89

Merged
ZhuchkaTriplesix merged 5 commits into
devfrom
issue-88-drop-asgi
Apr 27, 2026
Merged

refactor(asgi): drop ASGI bridge; OxyRoute 0.3.0 is RSGI-only#89
ZhuchkaTriplesix merged 5 commits into
devfrom
issue-88-drop-asgi

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Drop the optional ASGI 3.0 bridge (oxyroute/asgi.py), App.__call__, App._asgi3, and the ASGI-based @app.websocket(path) / _handle_asgi_websocket plumbing. RSGI is the only supported transport from v0.3.0.
  • Remove the ASGI test suites (tests/test_asgi*, tests/test_websocket_asgi.py) and migrate the rest of the suite to the new in-process shim tests/_rsgi_test_transport.asgi_test_app(app) so existing httpx-driven tests keep working without leaking ASGI back into the package.
  • Drop docs/asgi.md and docs/websocket.md; update README.md, docs/index.md, docs/rsgi.md, docs/feature.md, docs/sse.md, docs/dependencies.md, docs/development.md, docs/http2.md to remove ASGI references and reflect the new transport story.
  • Bump to 0.3.0 (pyproject.toml, Cargo.toml, oxyroute.__version__, src/state.rs OpenAPI) and add a CHANGELOG.md with a breaking-change entry plus migration notes.

Test plan

  • cargo check
  • make test

Closes #88.

OxyRoute v0.3.0 supports a single transport (RSGI). The runtime ASGI
compatibility bridge in oxyroute/asgi.py is removed:

- delete oxyroute/asgi.py
- drop App.__call__, App._asgi3 = build_asgi_caller(self), and the
  websocket / _handle_asgi_websocket plumbing from oxyroute/app.py
- delete the ASGI-only test suites (test_asgi*, test_websocket_asgi)

The unit/integration tests still drive the app in-process through
httpx.ASGITransport for speed and isolation, so the same bridge code
moves to tests/_rsgi_test_transport.py as a *test fixture only* and
each affected test now does
``httpx.ASGITransport(app=asgi_test_app(app))``.

Refs #88.
OxyRoute v0.3.0 only supports RSGI; the ASGI compatibility bridge and
the ASGI websocket spike were removed. Documentation is updated to
match:

- delete docs/asgi.md and docs/websocket.md
- remove the ASGI bridge entry from docs/index.md and the cross-link
  from docs/http2.md
- README: drop the optional ASGI bullet and the
  "ASGI and other servers are covered..." paragraph; project layout no
  longer mentions an "optional ASGI bridge"
- docs/rsgi.md: drop the "When to use ASGI instead" section
- docs/feature.md: mark ASGI compatibility as removed and reflect the
  new WebSocket status (native RSGI WS upcoming)
- docs/sse.md / docs/dependencies.md / docs/development.md: refer to
  the in-process httpx test transport instead of the removed bridge

Refs #88.
Reflect the breaking removal of the ASGI bridge:

- pyproject.toml / Cargo.toml / Cargo.lock / oxyroute.__version__ /
  src/state.rs OpenAPI version → 0.3.0.
- Add CHANGELOG.md with a 0.3.0 entry describing the dropped ASGI
  surface (App.__call__, oxyroute.asgi, ASGI-based @app.websocket) and
  the test-time migration to tests/_rsgi_test_transport.asgi_test_app.

Refs #88.

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

123

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 518af76 into dev Apr 27, 2026
15 of 16 checks passed
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