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

Forbid synchronous context managers #2543

Merged
merged 2 commits into from
Nov 20, 2017
Merged

Conversation

asvetlov
Copy link
Member

for ClientSession and test client/server.

Fixes #2540

@pfreixes
Copy link
Contributor

LGTM

@asvetlov
Copy link
Member Author

asvetlov commented Nov 20, 2017

Implementation note: I use raise RuntimeError instead of just removing __enter__ methods for better exception text.
Figured out that TypeError is even better exception type.

@codecov-io
Copy link

codecov-io commented Nov 20, 2017

Codecov Report

Merging #2543 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2543      +/-   ##
==========================================
- Coverage   97.18%   97.16%   -0.02%     
==========================================
  Files          40       40              
  Lines        8199     8193       -6     
  Branches     1441     1441              
==========================================
- Hits         7968     7961       -7     
- Misses         99      100       +1     
  Partials      132      132
Impacted Files Coverage Δ
aiohttp/test_utils.py 98.21% <100%> (-0.03%) ⬇️
aiohttp/helpers.py 97.78% <0%> (-0.25%) ⬇️
tests/autobahn/client.py 95.06% <0%> (-0.03%) ⬇️

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 8e7985a...ecf9f0a. Read the comment docs.

@asvetlov asvetlov merged commit 757ff26 into master Nov 20, 2017
@asvetlov asvetlov deleted the forbid-sync-context-managers branch November 20, 2017 16:57
@asvetlov
Copy link
Member Author

@pfreixes please next time approve by github UI, not onlt by LGTM comment.
Sure, I have administrator privilege for skipping the check but very appreciate the following formal procedure.

@asvetlov asvetlov added this to the 3.0 milestone Nov 20, 2017
@pfreixes
Copy link
Contributor

Oki doki, one question can I click merge button but taking into account that must pass the CI pipeline to finally do it? Something like "Merge if CI passes"

@asvetlov
Copy link
Member Author

IMHO Merge button becomes enabled only if CI passed.
There is no "delayed merge".

@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
@psf-chronographer psf-chronographer bot added the bot:chronographer:provided There is a change note present in this PR label Oct 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bot:chronographer:provided There is a change note present in this PR client outdated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop await aiohttp.request(...)
3 participants