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

added _reuse_address and _reuse_port to web_runner.TCPSite.__slots__ #2792

Merged
merged 3 commits into from
Mar 4, 2018

Conversation

jancespivo
Copy link
Contributor

@jancespivo jancespivo commented Mar 3, 2018

Hi,
_reuse_address and _reuse_port are not included in TCPSite.__slots__

import aiohttp.web
app = aiohttp.web.Application()
aiohttp.web.run_app(app)

Invokes:
AttributeError: 'TCPSite' object has no attribute '_reuse_address'

Best regards

@jancespivo jancespivo changed the title added _reuse_address and _reuse_port to web_runner.TCPSite __slots__ added _reuse_address and _reuse_port to web_runner.TCPSite.__slots__ Mar 3, 2018
@codecov-io
Copy link

codecov-io commented Mar 3, 2018

Codecov Report

Merging #2792 into master will increase coverage by 0.16%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2792      +/-   ##
==========================================
+ Coverage   97.83%   97.99%   +0.16%     
==========================================
  Files          39       39              
  Lines        7379     7379              
  Branches     1296     1296              
==========================================
+ Hits         7219     7231      +12     
+ Misses         53       47       -6     
+ Partials      107      101       -6
Impacted Files Coverage Δ
aiohttp/web_runner.py 100% <100%> (ø) ⬆️
aiohttp/web_urldispatcher.py 99.19% <0%> (+0.32%) ⬆️
aiohttp/client_reqrep.py 97.44% <0%> (+0.36%) ⬆️
aiohttp/helpers.py 97.29% <0%> (+0.49%) ⬆️
aiohttp/connector.py 96.82% <0%> (+0.74%) ⬆️
aiohttp/payload.py 98.74% <0%> (+1.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 572aeb6...f0cb03f. Read the comment docs.

@asvetlov asvetlov changed the base branch from master to 3.0 March 4, 2018 17:57
@asvetlov asvetlov changed the base branch from 3.0 to master March 4, 2018 17:57
@asvetlov
Copy link
Member

asvetlov commented Mar 4, 2018

Hmm. This is a bug definitely but I wonder why tests are passed without slots.
Your code snipped didn't raise an error too.

@asvetlov asvetlov merged commit 3d4e5db into aio-libs:master Mar 4, 2018
@drpoggi
Copy link

drpoggi commented Mar 5, 2018

I believe this error only happens on 3.7 where now ABC defines a __slots__

@asvetlov
Copy link
Member

asvetlov commented Mar 5, 2018

You are right. This explains everything.

@jancespivo
Copy link
Contributor Author

jancespivo commented Mar 5, 2018

Yes, sorry. It was actually python 3.8.0a0 I forgot change the venv 🤦‍♂️
I am a little suprised the using of __slots__ is useless for class inherited from ABC in python < 3.7

@drpoggi
Copy link

drpoggi commented Mar 6, 2018

It's not useless, it just requires subclasses to be explicit.

@lock
Copy link

lock bot commented Oct 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a [new issue] for related bugs.
If you feel like there's important points made in this discussion, please include those exceprts into that [new issue].
[new issue]: https://github.com/aio-libs/aiohttp/issues/new

@lock lock bot added the outdated label Oct 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants