Change error type for bad objects in "with" and "async with"#4656
Merged
youknowone merged 1 commit intoRustPython:mainfrom Mar 7, 2023
dalinaum:with-type-error
Merged
Change error type for bad objects in "with" and "async with"#4656youknowone merged 1 commit intoRustPython:mainfrom dalinaum:with-type-error
youknowone merged 1 commit intoRustPython:mainfrom
dalinaum:with-type-error
Conversation
dalinaum
commented
Mar 7, 2023
youknowone
approved these changes
Mar 7, 2023
Member
youknowone
left a comment
There was a problem hiding this comment.
contextlib seemed to related to contextlib.py version.
so this patch is fully fixing the with changes in 3.11. right?
Contributor
Author
|
@youknowone I'm going to replace contextlib.py and test again. |
This patch does not cover all cases of `test_contextlib.py` `bytecode::Instruction::SetupWith` and `BeforeAsyncWith` raise a TypeError instead of an AttributeError. Co-authored-by: Jeong YunWon <[email protected]>
Contributor
Author
|
@youknowone #4659 fixed 3 tests in text_conextlib.py and this patch fixed 2 tests. However, there are still |
Member
|
at least, they are not regressions ;) |
Member
|
Thank you for contributing! |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch does not cover all cases of
test_contextlib.pybytecode::Instruction::SetupWithandBeforeAsyncWithraise a TypeError instead of an AttributeError.It relates to #4650