GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove redundant assignment in `asyncio.streams.StreamReaderProtocol.connection_lost()` by maurycy · Pull Request #137524 · python/cpython

Conversation

@maurycy

@maurycy maurycy commented Aug 7, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@maurycy
remove unused variable
479379d
@maurycy
maurycy requested review from 1st1, asvetlov, kumaraditya303 and willingc as code owners August 7, 2025 15:03
@python-cla-bot

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

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Aug 7, 2025
@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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland StanFromIreland added skip issue skip news labels Aug 7, 2025
serhiy-storchaka
serhiy-storchaka approved these changes Aug 7, 2025
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

maurycy reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels Aug 7, 2025
@serhiy-storchaka
serhiy-storchaka merged commit db8742e into python:main Aug 7, 2025
@bedevere-app bedevere-app Bot removed the awaiting merge label Aug 7, 2025
@maurycy
maurycy deleted the asyncio-streams-unused-stream-writer branch August 7, 2025 15:42
@maurycy maurycy mentioned this pull request Aug 9, 2025
gzip._GzipReader.read() with sometimes uninitialized variable #137571
Closed
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
@maurycy @Agent-Hellboy
Remove redundant assignment in asyncio.streams.StreamReaderProtocol.c…
554f7bb
…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

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner
@willingc willingc Awaiting requested review from willingc willingc is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@maurycy @serhiy-storchaka @StanFromIreland
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.