Skip to content

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

Merged
Dreamsorcerer merged 7 commits into3.8from
patchback/backports/3.8/974323f63ba03bf720658cd738fc8722182322ae/pr-7180
Feb 11, 2023
Merged

Fix ConnectionResetError not being raised when the transport is close…#7199
Dreamsorcerer merged 7 commits into3.8from
patchback/backports/3.8/974323f63ba03bf720658cd738fc8722182322ae/pr-7180

Conversation

@Dreamsorcerer
Copy link
Copy Markdown
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 <wk.cvs.github@sydorenko.org.ua>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sam Bull <aa6bs0@sambull.org>
(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
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 11, 2023

Codecov Report

Merging #7199 (344557c) into 3.8 (ba573e2) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              3.8    #7199      +/-   ##
==========================================
- Coverage   97.41%   97.40%   -0.01%     
==========================================
  Files         107      107              
  Lines       30984    30996      +12     
  Branches     3922     3924       +2     
==========================================
+ Hits        30182    30191       +9     
- Misses        600      601       +1     
- Partials      202      204       +2     
Flag Coverage Δ
CI-GHA 97.26% <100.00%> (-0.01%) ⬇️
OS-Linux 96.92% <100.00%> (-0.01%) ⬇️
OS-Windows 95.17% <100.00%> (-0.06%) ⬇️
OS-macOS 96.64% <100.00%> (-0.01%) ⬇️
Py-3.10.9 96.79% <100.00%> (-0.06%) ⬇️
Py-3.11.0 95.18% <100.00%> (+<0.01%) ⬆️
Py-3.6.15 96.37% <100.00%> (-0.01%) ⬇️
Py-3.6.8 94.76% <100.00%> (+<0.01%) ⬆️
Py-3.7.15 96.53% <100.00%> (+<0.01%) ⬆️
Py-3.7.9 94.89% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 94.82% <100.00%> (+<0.01%) ⬆️
Py-3.8.16 96.44% <100.00%> (+<0.01%) ⬆️
Py-3.9.13 ?
Py-3.9.16 96.46% <100.00%> (-0.05%) ⬇️
Py-pypy7.3.11 93.94% <95.83%> (-0.01%) ⬇️
VM-macos-latest 96.64% <100.00%> (-0.01%) ⬇️
VM-ubuntu-20.04 96.84% <100.00%> (-0.05%) ⬇️
VM-ubuntu-latest 96.45% <100.00%> (+<0.01%) ⬆️
VM-windows-latest 95.17% <100.00%> (-0.06%) ⬇️

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%> (ø)
tests/autobahn/test_autobahn.py 98.33% <0.00%> (-1.67%) ⬇️
aiohttp/web_protocol.py 89.25% <0.00%> (-0.60%) ⬇️

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

@Dreamsorcerer Dreamsorcerer enabled auto-merge (squash) February 11, 2023 00:22
@Dreamsorcerer Dreamsorcerer merged commit 28854a4 into 3.8 Feb 11, 2023
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.8/974323f63ba03bf720658cd738fc8722182322ae/pr-7180 branch February 11, 2023 00:53
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