Skip to content

gh-155896: Allow overriding TLS roles in StreamWriter.start_tls - #159834

Open
limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-155896-stream-start-tls-role
Open

limadog9 wants to merge 1 commit into
python:mainfrom
limadog9:gh-155896-stream-start-tls-role

Conversation

@limadog9

@limadog9 limadog9 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Allow StreamWriter.start_tls() to accept an optional server_side keyword argument. The default keeps the existing role inference; an explicit value lets the TCP client act as the TLS server, or vice versa.

Add a regression test that upgrades both ends of a real connection with reversed TLS roles and exchanges data in both directions. Document the new argument.

Fixes #155896.

Validation:

  • Asyncio stream, SSL protocol, selector event loop, and proactor event loop tests: 338 tests, 19 skipped.
  • Full HTML documentation build with warnings treated as errors.
  • Ruff, Sphinx lint, and patchcheck.

@read-the-docs-community

read-the-docs-community Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36253823 | 📁 Comparing 3b624b6 against main (0fba211)

  🔍 Preview build  

233 files changed · + 2 added · ± 231 modified

+ Added

± Modified

@limadog9
limadog9 force-pushed the gh-155896-stream-start-tls-role branch from 8fd0b71 to 3b624b6 Compare November 30, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

StreamWriter.start_tls should allow overriding server_side

1 participant