Skip to content

Rename BaseSocketStream attributes on connections. - #601

Merged
lovelydinosaur merged 1 commit into
masterfrom
refactor-socket-stream-naming
Dec 5, 2019
Merged

lovelydinosaur merged 1 commit into
masterfrom
refactor-socket-stream-naming

Conversation

@lovelydinosaur

Copy link
Copy Markdown
Member

Renamed the BaseSocketStream attribtues on H11Connection and H2Connection instances from connection.stream to connection.socket.

I think self.socket.write(...) is more clearly a "we're really about to do some I/O operation" than self.stream.write(...), so I'm happy with how this looks.

More importantly tho' we really really ought to have a clearer HTTP/2 implementation with an HTTP2Stream instance for each HTTP/2 stream. We'll want the connection class to hold a .streams dictionary, mapping stream IDs onto HTTP2Stream instances.

Making this isolated change here & now, because it's a tiny step in that direction.

Not a user facing change, so won't make the CHANGELOG.

@lovelydinosaur lovelydinosaur added the refactor Issues and PRs related to code refactoring label Dec 5, 2019

@florimondmanca florimondmanca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nice. I like the idea of an encapsulated HTTP2Stream class as well - looking forward to see how it looks.

@lovelydinosaur
lovelydinosaur merged commit bb6e52f into master Dec 5, 2019
@lovelydinosaur
lovelydinosaur deleted the refactor-socket-stream-naming branch December 5, 2019 19:54
Kludex referenced this pull request in pydantic/httpx2 May 11, 2026
Bumps [anyio](https://github.com/agronholm/anyio) from 3.6.1 to 3.6.2.
- [Release notes](https://github.com/agronholm/anyio/releases)
- [Changelog](https://github.com/agronholm/anyio/blob/3.6.2/docs/versionhistory.rst)
- [Commits](agronholm/anyio@3.6.1...3.6.2)

---
updated-dependencies:
- dependency-name: anyio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Issues and PRs related to code refactoring

Development

Successfully merging this pull request may close these issues.

2 participants