Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConnectionResetError not being raised when the transport is close… #7198

Conversation

Dreamsorcerer
Copy link
Member

No description provided.

#7180)

<!-- Thank you for your contribution! -->

`ConnectionResetError` will always be raised when `StreamWriter.write`
is called after `connection_lost` has been called on the `BaseProtocol`

<!-- Please give a short brief about these changes. -->

Restores pre 3.8.3 behavior

fixes #7172

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [x] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
  * The format is &lt;Name&gt; &lt;Surname&gt;.
  * Please keep alphabetical order, the file is sorted by names.
- [x] Add a new news fragment into the `CHANGES` folder
  * name it `<issue_id>.<type>` for example (588.bugfix)
* if you don't have an `issue_id` change it to the pr id after creating
the pr
  * ensure type is one of the following:
    * `.feature`: Signifying a new feature.
    * `.bugfix`: Signifying a bug fix.
    * `.doc`: Signifying a documentation improvement.
    * `.removal`: Signifying a deprecation or removal of public API.
* `.misc`: A ticket has been closed, but it is not of interest to users.
* Make sure to use full sentences with correct case and punctuation, for
example: "Fix issue with non-ascii contents in doctest text files."

---------

Co-authored-by: Sviatoslav Sydorenko <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <[email protected]>
(cherry picked from commit 974323f)
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Feb 10, 2023
@Dreamsorcerer Dreamsorcerer enabled auto-merge (squash) February 10, 2023 20:21
@codecov
Copy link

codecov bot commented Feb 10, 2023

Codecov Report

Merging #7198 (f2d34fe) into 3.9 (e0a7865) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              3.9    #7198   +/-   ##
=======================================
  Coverage   97.35%   97.35%           
=======================================
  Files         107      107           
  Lines       31264    31276   +12     
  Branches     3961     3963    +2     
=======================================
+ Hits        30437    30449   +12     
  Misses        621      621           
  Partials      206      206           
Flag Coverage Δ
CI-GHA 97.25% <100.00%> (+<0.01%) ⬆️
OS-Linux 96.93% <100.00%> (-0.01%) ⬇️
OS-Windows 94.51% <100.00%> (+<0.01%) ⬆️
OS-macOS 96.48% <100.00%> (+<0.01%) ⬆️
Py-3.10.9 96.97% <100.00%> (+<0.01%) ⬆️
Py-3.11.0 95.37% <100.00%> (+<0.01%) ⬆️
Py-3.7.15 96.72% <100.00%> (+<0.01%) ⬆️
Py-3.7.9 94.36% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 94.28% <100.00%> (-0.01%) ⬇️
Py-3.8.16 96.62% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 94.28% <100.00%> (+<0.01%) ⬆️
Py-3.9.16 96.64% <100.00%> (+<0.01%) ⬆️
Py-pypy7.3.11 94.06% <95.83%> (-0.01%) ⬇️
VM-macos 96.48% <100.00%> (+<0.01%) ⬆️
VM-ubuntu 96.93% <100.00%> (-0.01%) ⬇️
VM-windows 94.51% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiohttp/base_protocol.py 86.36% <100.00%> (+0.20%) ⬆️
aiohttp/http_writer.py 99.15% <100.00%> (-0.01%) ⬇️
tests/test_base_protocol.py 100.00% <100.00%> (ø)
tests/test_client_proto.py 100.00% <100.00%> (ø)
tests/test_http_writer.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit 9cffef0 into 3.9 Feb 10, 2023
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/974323f63ba03bf720658cd738fc8722182322ae/pr-7180 branch February 10, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot:chronographer:provided There is a change note present in this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants