Skip to content

gh-152431: update StreamReader transport after StreamWriter.start_tls#152432

Open
kn1g78 wants to merge 1 commit into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport
Open

gh-152431: update StreamReader transport after StreamWriter.start_tls#152432
kn1g78 wants to merge 1 commit into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport

Conversation

@kn1g78

@kn1g78 kn1g78 commented Jun 27, 2026

Copy link
Copy Markdown

Summary

After StreamWriter.start_tls() upgrades a stream transport to TLS, the
StreamWriter and StreamReaderProtocol are updated to use the new transport,
but the linked StreamReader still keeps the old transport.

This change keeps the StreamReader transport in sync with the upgraded
transport.

Changes

  • update StreamReaderProtocol._replace_transport() to also replace the linked
    StreamReader transport
  • add a regression test covering the transport replacement after
    StreamWriter.start_tls()

Issue

Testing

  • add test_streamwriter_start_tls_updates_reader_transport

Keep StreamReader in sync with the upgraded transport after StreamWriter.start_tls(), and add a regression test for the transport replacement.
@bedevere-app

bedevere-app Bot commented Jun 27, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Jun 27, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@kn1g78

kn1g78 commented Jun 27, 2026

Copy link
Copy Markdown
Author

I think we can skip the news here :)

@kn1g78 kn1g78 marked this pull request as ready for review June 27, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant