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

[PR #6916/abafcdac backport][3.9] Add missing __repr__ to streams.EmptyStreamReader #7106

Conversation

patchback[bot]
Copy link
Contributor

@patchback patchback bot commented Nov 28, 2022

This is a backport of PR #6916 as merged into master (abafcda).

EmptyStreamReader currently inherits __repr__ from StreamReader , which then tries to access non-existing fields, causing AttributeErrors. The bug causes issues like this in upstream code: miguelgrinberg/python-socketio#1032

This PR adds a custom __repr__ to EmptyStreamReader to fix the problem.

**EmptyStreamReader** currently inherits `__repr__` from
**StreamReader** , which then tries to access non-existing fields,
causing AttributeErrors. The bug causes issues like this in upstream
code: miguelgrinberg/python-socketio#1032

This PR adds a custom `__repr__` to EmptyStreamReader to fix the
problem.

(cherry picked from commit abafcda)
@codecov
Copy link

codecov bot commented Nov 28, 2022

Codecov Report

Merging #7106 (efca06a) into 3.9 (f81cd7f) will increase coverage by 0.37%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              3.9    #7106      +/-   ##
==========================================
+ Coverage   96.89%   97.26%   +0.37%     
==========================================
  Files         103      103              
  Lines       30258    30261       +3     
  Branches     3767     3767              
==========================================
+ Hits        29317    29433     +116     
+ Misses        733      632     -101     
+ Partials      208      196      -12     
Flag Coverage Δ
CI-GHA 97.15% <100.00%> (+0.35%) ⬆️
OS-Linux 96.80% <100.00%> (+<0.01%) ⬆️
OS-Windows 94.33% <100.00%> (?)
OS-macOS 96.33% <100.00%> (?)
Py-3.10.8 96.91% <100.00%> (+0.40%) ⬆️
Py-3.11.0 96.33% <100.00%> (+<0.01%) ⬆️
Py-3.7.15 96.67% <100.00%> (+0.12%) ⬆️
Py-3.7.9 94.18% <100.00%> (?)
Py-3.8.10 94.10% <100.00%> (?)
Py-3.8.14 96.58% <100.00%> (+0.11%) ⬆️
Py-3.9.13 94.10% <100.00%> (?)
Py-3.9.15 96.57% <100.00%> (+<0.01%) ⬆️
VM-macos 96.33% <100.00%> (?)
VM-ubuntu 96.80% <100.00%> (+<0.01%) ⬆️
VM-windows 94.33% <100.00%> (?)

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

Impacted Files Coverage Δ
aiohttp/streams.py 97.73% <100.00%> (+0.01%) ⬆️
tests/test_streams.py 100.00% <100.00%> (ø)
tests/test_web_functional.py 98.09% <0.00%> (+0.13%) ⬆️
tests/test_proxy_functional.py 63.86% <0.00%> (+0.20%) ⬆️
aiohttp/web_request.py 97.70% <0.00%> (+0.45%) ⬆️
aiohttp/test_utils.py 98.79% <0.00%> (+0.60%) ⬆️
aiohttp/web_protocol.py 89.41% <0.00%> (+0.88%) ⬆️
aiohttp/web.py 99.15% <0.00%> (+1.68%) ⬆️
aiohttp/connector.py 92.40% <0.00%> (+1.68%) ⬆️
tests/test_resolver.py 94.88% <0.00%> (+1.70%) ⬆️
... and 8 more

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

@Dreamsorcerer Dreamsorcerer merged commit f7e4246 into 3.9 Nov 28, 2022
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/abafcdac6cbef06bc555cb77b1ebe724d2a098ec/pr-6916 branch November 28, 2022 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants