Skip to content

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

Merged
kumaraditya303 merged 3 commits into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport
Jul 11, 2026
Merged

gh-152431: update StreamReader transport after StreamWriter.start_tls#152432
kumaraditya303 merged 3 commits into
python:mainfrom
kn1g78:asyncio-start-tls-reader-transport

Conversation

@kn1g78

@kn1g78 kn1g78 commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

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
Contributor Author

I think we can skip the news here :)

@kn1g78 kn1g78 marked this pull request as ready for review June 27, 2026 16:18
@kumaraditya303

Copy link
Copy Markdown
Contributor

This fixes a bug so it needs a news entry

@kn1g78

kn1g78 commented Jun 28, 2026

Copy link
Copy Markdown
Contributor Author

This fixes a bug so it needs a news entry

i added it . thank u!

@kumaraditya303 kumaraditya303 enabled auto-merge (squash) July 11, 2026 12:38
@kumaraditya303 kumaraditya303 merged commit 7671ee1 into python:main Jul 11, 2026
51 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.

2 participants