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

Python 3.14.0a4: TypeError: <class '…'> has no usable non-default attributes #626

Open
musicinmybrain opened this issue Feb 9, 2025 · 1 comment

Comments

@musicinmybrain
Copy link

In Fedora, we’re already testing Python packages with pre-releases of Python 3.14, which will be included in Fedora 43 in late 2025. This report is based on a downstream issue that was filed as part of that testing.

It seems like the regressions in the test suite are all associated with a single type of error, of the form TypeError: <class '…'> has no usable non-default attributes.

A “control” test, showing that everything is fine on Python 3.13:

$ uv venv _e
Using CPython 3.13.1 interpreter at: /usr/bin/python3
Creating virtual environment at: _e
Activate with: source _e/bin/activate
$ . _e/bin/activate
(_e) $ uv pip install tox pdm
[…]
(_e) $ tox -e py313
[…]
============================ 827 passed, 6 skipped, 15 xfailed in 23.58s =============================

Now, after commenting out the orjson extra since we won’t be able to uv pip install it successfully on Python 3.14 yet:

(_e) $ tox -e py314

Ignoring the failures and errors (No module named 'orjson') due to the now-missing orjson dependency:

====================================== short test summary info =======================================
FAILED tests/strategies/test_include_subclasses.py::test_structure_as_union - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
FAILED tests/strategies/test_include_subclasses.py::test_overrides[wo-union-strategy-grandchild-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
FAILED tests/strategies/test_include_subclasses.py::test_structuring_unstructuring_unknown_subclass - TypeError: <class 'tests.strategies.test_include_subclasses.test_structuring_unstructuring_unknow...
FAILED tests/strategies/test_include_subclasses.py::test_overrides[wo-union-strategy-parent-only] - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
FAILED tests/strategies/test_include_subclasses.py::test_overrides[wo-union-strategy-child1-only] - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
FAILED tests/strategies/test_include_subclasses.py::test_overrides[wo-union-strategy-child2-only] - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-parent-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-union-compose-grandchild] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-non-union-compose-child] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-child1-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-child1-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-non-union-compose-parent] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-non-union-compose-grandchild] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-child2-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_circular_reference[with-subclasses] - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-child2-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-union-container] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-non-union-compose-child] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-grandchild-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-grandchild-only] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-non-union-container] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-non-union-compose-grandchild] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-union-compose-parent] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-parent-only] - TypeError: <class 'tests.strategies.test_include_subclasses.GrandChild'> has no usable non-defaul...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-union-compose-parent] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-union-container] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-union-compose-child] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-union-compose-child] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_structuring_with_inheritance[with-subclasses-non-union-container] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-union-compose-grandchild] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
ERROR tests/strategies/test_include_subclasses.py::test_unstructuring_with_inheritance[with-subclasses-non-union-compose-parent] - TypeError: <class 'tests.strategies.test_include_subclasses.Child1'> has no usable non-default at...
@hroncok
Copy link

hroncok commented Feb 10, 2025

Could it perhaps be related to https://docs.python.org/3.14/whatsnew/3.14.html#whatsnew314-pep649 similarly to jcrist/msgspec#810 ?

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

2 participants