You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are noticing an issue with running some of the embedded Boost python tests when building USD for Python 3.11 (pxr/external/boost/python/test). These tests utilize doctest which executes a documentation block and compares the script output directly. Unfortunately, the output is not consistent between Python versions, so some of the tests fail on Python 3.11 (presumably the expected output was generated with 3.10 where we are seeing the tests pass).
Here is an example test that is failing: https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/external/boost/python/test/properties.py
Failed example:
x1.value_r = 2
Expected:
Traceback (most recent call last):
File "properties.py", line 49, in ?
x1.value_r = 2
AttributeError: can't set attribute
Got:
Traceback (most recent call last):
File ".../doctest.py", line 1355, in __run
exec(compile(example.source, filename, "single",
File "<doctest __main__[16]>", line 1, in <module>
x1.value_r = 2
^^^^^^^^^^
AttributeError: property of 'X' object has no setter
The three tests we are seeing fail in Python 3.11 are:
python_properties
python_pickle1
python_pickle4
Python 3.11 had a lot of work done to make tracebacks more friendly to devs, so the tests don't apply to it the same way.
The text was updated successfully, but these errors were encountered:
Thanks @dgovil! It looks like there are two issues here:
python_properties is failing due to the traceback differences in 3.11. Thankfully doctest has facilities for ignoring these differences.
I think python_pickle1 and python_pickle4 are failing because of the change to __getstate__ in 3.11 (see docs). That's causing __reduce__ to include an extra None value in the returned tuple. Functionally, I don't think this matters since the docs for reduce say that None is an acceptable value.
Description of Issue
We are noticing an issue with running some of the embedded Boost python tests when building USD for Python 3.11 (pxr/external/boost/python/test). These tests utilize doctest which executes a documentation block and compares the script output directly. Unfortunately, the output is not consistent between Python versions, so some of the tests fail on Python 3.11 (presumably the expected output was generated with 3.10 where we are seeing the tests pass).
Here is an example test that is failing:
https://github.com/PixarAnimationStudios/OpenUSD/blob/release/pxr/external/boost/python/test/properties.py
The three tests we are seeing fail in Python 3.11 are:
Python 3.11 had a lot of work done to make tracebacks more friendly to devs, so the tests don't apply to it the same way.
The text was updated successfully, but these errors were encountered: