-
Notifications
You must be signed in to change notification settings - Fork 33
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
Test failure on Py3.11 #211
Comments
Just double-checked: all tests pass on py3.10:
|
Do you know why this fails in 3.11? |
Not sure yet, didn't see anything obvious in the py3.11 release notes that may explain it, so will require a little bit of digging. |
The reason was the behavior of Python dis module from the standard library has been changed in Python 3.11.
Which causes our source check failed stdout = sys.stdout
sys.stdout = io.StringIO()
dis.dis(getattr(cls, method))
dis_output = sys.stdout.getvalue()
sys.stdout = stdout
dis_output = re.split("\n|\s+", dis_output)
dis_output = [word for word in dis_output if word]
if (
"(NotImplementedError)" in dis_output
or "(unimplemented)" in dis_output
or "(CapabilityNotImplementedError)" in dis_output
or "(NotImplemented)" in dis_output
):
cap_source = inspect.getsource(getattr(cls, method))
model_source = inspect.getsource(getattr(model, method))
if cap_source == model_source:
source_capable = False
break Because it is now |
A test is failing on Py3.11 here:
Steps to reproduce:
pip install wheel pytest
pip install .
chmod +x test.sh
./test.sh
The text was updated successfully, but these errors were encountered: