Skip to content

Remove redundant assignment in asyncio.streams.StreamReaderProtocol.connection_lost() - #137524

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
maurycy:asyncio-streams-unused-stream-writer
Aug 7, 2025
Merged

serhiy-storchaka merged 1 commit into
python:mainfrom
maurycy:asyncio-streams-unused-stream-writer

Conversation

@maurycy

@maurycy maurycy commented Aug 7, 2025 •

Copy link
Copy Markdown
Contributor

Nothing fancy.

The variable is never used. The only other occurences of the string are completely not related:

% rg _stream_writer
Modules/_testcapi/codec.c
115:codec_stream_writer(PyObject *Py_UNUSED(module), PyObject *args)
200:    {"codec_stream_writer", codec_stream_writer, METH_VARARGS},

Lib/test/test_capi/test_codecs.py
734:    def test_codec_stream_writer(self):
735:        codec_stream_writer = _testcapi.codec_stream_writer
741:                    writer = codec_stream_writer(encoding, stream, errors)
745:                codec_stream_writer(NULL, stream, 'strict')
%

I don't think this requires a NEWS entry. It has no user-visible effects.

@python-cla-bot

python-cla-bot Bot commented Aug 7, 2025 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Aug 7, 2025

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.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. 👍

The _stream_writer attribute was removed in a355f60 (#114914).

@serhiy-storchaka
serhiy-storchaka merged commit db8742e into python:main Aug 7, 2025
@maurycy
maurycy deleted the asyncio-streams-unused-stream-writer branch August 7, 2025 15:42
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
…onnection_lost() (pythonGH-137524)

The _stream_writer attribute was removed in a355f60 (pythongh-114914).
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.

3 participants