Skip to content

Add WebSocket connection domain - #115

Open
gryphon2411 wants to merge 1 commit into
sphinx-contrib:mainfrom
gryphon2411:feature/websocket-connection-domain
Open

Add WebSocket connection domain#115
gryphon2411 wants to merge 1 commit into
sphinx-contrib:mainfrom
gryphon2411:feature/websocket-connection-domain

Conversation

@gryphon2411

@gryphon2411 gryphon2411 commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • add an isolated websocket Sphinx domain with connection directives, roles, routing table, directional message fields, and stable anchors
  • document the MVP and add package-local French and Spanish catalogs
  • preserve HTTP behavior while sharing typed-path rendering, and add Sphinx 6.2 compatibility coverage

Verification

  • tox r
  • independent senior-engineer review; all findings were fixed and rechecked

Closes #25

@gryphon2411

Copy link
Copy Markdown
Author

@stevepiercy, this implements the small separate WebSocket-domain MVP discussed in #25. It passes the full tox r suite; I would appreciate your review when you have time.

@read-the-docs-community

read-the-docs-community Bot commented Aug 2, 2026

Copy link
Copy Markdown

Documentation build overview

📚 sphinxcontrib-httpdomain | 🛠️ Build #34008020 | 📁 Comparing fbb99f1 against latest (1d96b0f)

  🔍 Preview build  

2 files changed
+ websocket-routingtable.html
± index.html

@gryphon2411
gryphon2411 force-pushed the feature/websocket-connection-domain branch from 59073bf to 5b2f47e Compare August 2, 2026 12:12
@stevepiercy

Copy link
Copy Markdown
Collaborator

I'm going to close then reopen this PR to see if that will trigger a test build and allow me to update the branch with main. Please stand by.

@stevepiercy stevepiercy reopened this Aug 11, 2026
@stevepiercy

Copy link
Copy Markdown
Collaborator

@gryphon2411 Can you update your branch to main? I made a recent fix for the py314 environment for documentation links, but the usual button that allows me to update the branch on PRs doesn't show up, even though I'm an Admin on this repo. Then I can do a proper review. Thank you!

Add the websocket:connection directive, cross-reference role, routing table, directional message fields, stable anchors, and native no-index handling.

Extract shared typed-path rendering while preserving HTTP output. Move the message catalog into the extension package and add WebSocket translations.

Document the WebSocket MVP and add Sphinx integration, inventory, locale, wheel-content, and Sphinx 6.2 compatibility coverage.

Tests: tox r
@gryphon2411
gryphon2411 force-pushed the feature/websocket-connection-domain branch from 5b2f47e to fbb99f1 Compare August 11, 2026 06:18
@gryphon2411

Copy link
Copy Markdown
Author

@stevepiercy The branch is now rebased onto current main (738392e), and tox r passes locally. It should be ready for your review.

@stevepiercy

Copy link
Copy Markdown
Collaborator

@loelkes and @ilan-theodoro, since you liked this feature request, and I lack familiarity with WebSocket, I'd greatly appreciate your review on this PR.

If there is anyone else who wants this feature, please feel free to review and provide feedback. This is a community effort.

@stevepiercy stevepiercy left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is excellent work, and thank you for cleaning up my omission in the change log. I have a few suggestions for you to consider. Would you please take care?

I feel confident that everything in this PR is solid, including the translations and moving the locale directory, documentation, and project meta information. Because I'm not familiar with WebSocket usage and its testing, I'd like to get another review from someone who has that familiarity. Do you have a colleague who can pitch in? Please let me know. Thank you!

Comment thread test/websocket_test.py
"extensions = ['sphinxcontrib.httpdomain']\n"
"master_doc = 'index'\n"
"project = 'WebSocket test project'\n"
"html_theme = 'alabaster'\n"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this should be consistent with the theme used in sphinxcontrib.httpdomain's docs/conf.py.

Suggested change
"html_theme = 'alabaster'\n"
"html_theme = 'sphinxdoc'\n"

Comment thread docs/index.rst
@@ -27,7 +27,7 @@
:alt: GitHub Sponsors

This contrib extension, :mod:`sphinxcontrib.httpdomain`, provides a Sphinx

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This contrib extension, :mod:`sphinxcontrib.httpdomain`, provides a Sphinx
This contrib extension, :mod:`sphinxcontrib.httpdomain`, provides Sphinx

Comment thread CHANGELOG.rst
.............

- Added a ``websocket`` domain for documenting bidirectional WebSocket
connections.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's include all the pieces, link to the issue, and give you credit.

Suggested change
connections.
connections, including tests, usage documentation, project meta information,
and translations. [:pull:`115` by @gryphon2411]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also thank you for handling my oversight in the change log to add a release date and add an Unreleased section. I appreciate the care you put into your work.

Comment thread docs/index.rst
.. versionadded:: 1.8.0


.. _websocket-connections:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please move this excellent new section just before the Author and License section. I want all the HTTP sections grouped together. We'll also need to disambiguate some headings and targets.

Comment thread docs/index.rst
Comment on lines +272 to +273
Options
```````

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Let's create a target for future use, and disambiguate from HTTP options.

Suggested change
Options
```````
.. _websocket-options:
WebSocket options
`````````````````

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

TIL, in suggestions, there needs to be three more backticks than those in the underline for GitHub markdown to render them in the suggestion. The default three backticks is not adequate.

Comment thread docs/index.rst
Comment on lines 298 to 299
Directives
----------

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Add context.

Suggested change
HTTP directives
---------------

Comment thread docs/index.rst
Comment on lines 358 to 359
Options
```````

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Disambiguate from WebSocket options.

Suggested change
.. _http-options:
HTTP options
````````````

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.

Add WebSocket resource endpoint

2 participants