Change error type for bad objects in "with" and "async with" by dalinaum · Pull Request #4656 · RustPython/RustPython
Conversation
This patch does not cover all cases of test_contextlib.py
bytecode::Instruction::SetupWith and BeforeAsyncWith raise a TypeError instead of an AttributeError.
It relates to #4650
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contextlib seemed to related to contextlib.py version.
so this patch is fully fixing the with changes in 3.11. right?
@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 <69878+youknowone@users.noreply.github.com>
@youknowone #4659 fixed 3 tests in text_conextlib.py and this patch fixed 2 tests.
However, there are still expectedFailures that were added during updating test_contextlib.py and contextlib.py.
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