FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Change error type for bad objects in "with" and "async with" by dalinaum · Pull Request #4656 · RustPython/RustPython · GitHub

Change error type for bad objects in "with" and "async with" - #4656

Merged
youknowone merged 1 commit into
RustPython:mainfrom
dalinaum:with-type-error
Mar 7, 2023
Merged

Change error type for bad objects in "with" and "async with"#4656
youknowone merged 1 commit into
RustPython:mainfrom
dalinaum:with-type-error

Conversation

dalinaum commented Mar 7, 2023

Copy link
Copy Markdown
Contributor

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

Comment thread vm/src/frame.rs Outdated

youknowone left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

contextlib seemed to related to contextlib.py version.
so this patch is fully fixing the with changes in 3.11. right?

Comment thread vm/src/frame.rs

dalinaum commented Mar 7, 2023

Copy link
Copy Markdown
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 <69878+youknowone@users.noreply.github.com>

dalinaum commented Mar 7, 2023

Copy link
Copy Markdown
Contributor Author

@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.

Copy link
Copy Markdown
Member

at least, they are not regressions ;)

youknowone merged commit bdce56d into RustPython:main Mar 7, 2023

Copy link
Copy Markdown
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL