-
Notifications
You must be signed in to change notification settings - Fork 395
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.11: cannot import name '_TextTestResult' from 'unittest.runner' #1116
Comments
This Python 3.11 change was reverted python/cpython#30935 (though there are other challenges running nose on Python 3.11 ) |
And has been removed again for Python 3.12 (due October 2023):
$ python3.12 --version
Python 3.12.0a2
$ python3.12 -m nose
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nose/result.py", line 14, in <module>
from unittest.runner import _TextTestResult
ImportError: cannot import name '_TextTestResult' from 'unittest.runner' (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/runner.py). Did you mean: 'TextTestResult'?
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<frozen runpy>", line 189, in _run_module_as_main
File "<frozen runpy>", line 148, in _get_module_details
File "<frozen runpy>", line 112, in _get_module_details
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nose/__init__.py", line 1, in <module>
from nose.core import collector, main, run, run_exit, runmodule
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nose/core.py", line 15, in <module>
from nose.result import TextTestResult
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/nose/result.py", line 16, in <module>
from unittest import _TextTestResult
ImportError: cannot import name '_TextTestResult' from 'unittest' (/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/unittest/__init__.py). Did you mean: 'TextTestResult'? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nose doesn't work with Python 3.11:
This seems to be caused by python/cpython@b0a6ede,
which removes the
_TextTestResult = TextTestResult
alias.The text was updated successfully, but these errors were encountered: