Skip to content

Test issue with 3.11 #1551

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

Closed
cdce8p opened this issue May 11, 2022 · 3 comments · Fixed by #1558
Closed

Test issue with 3.11 #1551

cdce8p opened this issue May 11, 2022 · 3 comments · Fixed by #1558
Milestone

Comments

@cdce8p
Copy link
Member

cdce8p commented May 11, 2022

Managed to track down the test issue we are seeing with 3.11.0b1 a bit. Seems like it's partially caused by another test case which is why I wasn't able to reproduce it locally at first. The following command can be used to recreate the issue

pytest \
    tests/unittest_brain.py::ModuleExtenderTest::test_extension_modules \
    tests/unittest_object_model.py::ExceptionModelTest::test_valueerror_py3

In particular it seems like the unittest module extender is partially responsible. Not sure though if it's a false positive or a real issue.
https://github.com/PyCQA/astroid/blob/0bf711f84d2de55bf777b45cec2449ce776a669a/astroid/brain/brain_unittest.py#L28-L31

So far I haven't figured out what exactly is going on here. It must have been a change in 3.11.0b1 though since 3.11.0a7 was ok. Maybe you two have an idea @DanielNoord @jacobtylerwalls?

/CC: @Pierre-Sassoulas

https://docs.python.org/3.11/whatsnew/changelog.html#python-3-11-0-beta-1

@DanielNoord
Copy link
Collaborator

Haven't looked at this myself, but one user also reports this on the latest 3.8:

78a486d#commitcomment-73321532

Not sure if that is the same bug or if it is actually valid, but that might help narrow this down?

@jacobtylerwalls
Copy link
Member

see python/cpython#28045

@cdce8p
Copy link
Member Author

cdce8p commented May 11, 2022

see python/cpython#28045

That looked promising. However, I did bisect it to python/cpython#92202
Need to take a closer look tomorrow.

cdce8p added a commit to cdce8p/astroid that referenced this issue May 13, 2022
Issue with reassigned __traceback__ attribute.
In some cases it can be uninferable now.

Ref: pylint-dev#1551
@cdce8p cdce8p mentioned this issue May 13, 2022
@cdce8p cdce8p added this to the 2.12.0 milestone May 13, 2022
cdce8p added a commit that referenced this issue May 13, 2022
Issue with reassigned __traceback__ attribute.
In some cases it can be uninferable now.

Ref: #1551
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants