Skip to content

Make web.BaseRequest and web.Request slot-based#3942

Merged
asvetlov merged 5 commits intomasterfrom
slots-in-request
Jul 26, 2019
Merged

Make web.BaseRequest and web.Request slot-based#3942
asvetlov merged 5 commits intomasterfrom
slots-in-request

Conversation

@asvetlov
Copy link
Copy Markdown
Member

@asvetlov asvetlov commented Jul 25, 2019

Adding __slots__ prevents wild objects modification, e.g request.custom = 123.
Both request and response objects support dict-like interface already (request['custom'] = 123).

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3942 into master will decrease coverage by 2.93%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3942      +/-   ##
==========================================
- Coverage   97.67%   94.73%   -2.94%     
==========================================
  Files          43       43              
  Lines        8761     8759       -2     
  Branches     1377     1375       -2     
==========================================
- Hits         8557     8298     -259     
- Misses         89      349     +260     
+ Partials      115      112       -3
Impacted Files Coverage Δ
aiohttp/client_reqrep.py 96.99% <100%> (ø) ⬆️
aiohttp/helpers.py 96.55% <100%> (-0.98%) ⬇️
aiohttp/web_response.py 97.67% <100%> (ø) ⬆️
aiohttp/web_request.py 97.42% <100%> (+1.23%) ⬆️
aiohttp/worker.py 6.72% <0%> (-90.76%) ⬇️
aiohttp/resolver.py 45.61% <0%> (-54.39%) ⬇️
aiohttp/web_fileresponse.py 66.66% <0%> (-29.89%) ⬇️
aiohttp/tcp_helpers.py 66.66% <0%> (-26.67%) ⬇️
aiohttp/locks.py 92.85% <0%> (-7.15%) ⬇️
aiohttp/web_runner.py 92.47% <0%> (-5.31%) ⬇️
... and 8 more

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 b3b931a...2d510df. Read the comment docs.

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