Open jwilk opened 3 years ago
This Python 3.11 change was reverted https://github.com/python/cpython/pull/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'?
nose doesn't work with Python 3.11:
This seems to be caused by https://github.com/python/cpython/commit/b0a6ede3d0bd6fa4ffe413ab4dfc1059201df25b, which removes the
_TextTestResult = TextTestResult
alias.