Skip to content
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

"properties" unit test fails with Python 3.11 #460

Open
sunyab opened this issue Dec 9, 2024 · 0 comments
Open

"properties" unit test fails with Python 3.11 #460

sunyab opened this issue Dec 9, 2024 · 0 comments

Comments

@sunyab
Copy link

sunyab commented Dec 9, 2024

The "properties" unit test fails when boost::python is built against Python 3.11 or later. I've pasted in the test output below (note: the output mentions 3.12, but I've tested this against 3.11 as well).

I believe this failure is due to Python now including more detail in tracebacks -- see https://docs.python.org/3/whatsnew/3.11.html#whatsnew311-pep657

====== BEGIN OUTPUT ======
running...
**********************************************************************
File "/root/boost_1_86_0/libs/python/test/properties.py", line 56, in __main__
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 "/usr/lib/python3.12/doctest.py", line 1361, 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
**********************************************************************
1 items had failures:
   1 of  28 in __main__
***Test Failed*** 1 failures.

EXIT STATUS: 1
====== END OUTPUT ======

This was originally reported here: PixarAnimationStudios/OpenUSD#3384

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

No branches or pull requests

1 participant