-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-29679: Implement @contextlib.asynccontextmanager #360
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
904e8a8
implement @asynccontextmanager
JelleZijlstra b3d59f1
add it to __all__
JelleZijlstra a1d5b3f
add tests (duplicating the @contextmanager ones)
JelleZijlstra c5b8b43
add docs
JelleZijlstra ca77cd2
back out ContextDecorator for asynccontextmanager (it doesn't work); …
JelleZijlstra 689f4a5
move asynccontextmanager tests into their own file
JelleZijlstra 299d968
fix when tests are run after test_asyncio
JelleZijlstra e974d48
add a few more tests
JelleZijlstra 5808a4c
combine duplicate tests
JelleZijlstra 9caa243
additional test for RuntimeError wrapping
JelleZijlstra 64e6908
address 1st1's comments
JelleZijlstra 178433b
clean up "except:" and explain why we can't do that for @contextmanager
JelleZijlstra 6d0dddb
old-style classes, not strings
JelleZijlstra ad65b4d
add to whatsnew (and alphabetize modules)
JelleZijlstra 737fd0f
add wraps decorator, add to docstring
JelleZijlstra 3fc20a7
unalphabetize whatsnew
JelleZijlstra 06697a8
Merge branch 'master' into asynccontextmanager
1st1 bb8de0d
Merge branch 'master' into asynccontextmanager
JelleZijlstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add tests (duplicating the @contextmanager ones)
- Loading branch information
commit a1d5b3f4e11f4842beaa1cd24084bf3e7e2df688
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer for other implementations to be able to readily test the rest of contextlib without requiring a working asyncio implementation, so it would be good to split these new tests out to a separate
Lib/test_contextlib_async.py
file.