DeprecationWarning about typing.no_type_check_decorator in Python 3.13
musicinmybrain opened this issue · comments
Ben Beasley commented
Things to check first
-
I have searched the existing issues and didn't find my bug already reported there
-
I have checked that my bug is still present in the latest release
Typeguard version
current master
, 066b943
Python version
Python 3.13.0a1
What happened?
There were a huge number of test errors because filterwarnings = ["error"]
is set in pyproject.toml
and there is a new DeprecationWarning
in Python 3.13.
_____________________________ ERROR at setup of test_type_checked_func_error[importhook] _____________________________
tests/test_instrumentation.py:53: in dummymodule
module = import_module("dummymodule")
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1381: in _gcd_import
???
<frozen importlib._bootstrap>:1354: in _find_and_load
???
<frozen importlib._bootstrap>:1325: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:929: in _load_unlocked
???
src/typeguard/_importhook.py:98: in exec_module
super().exec_module(module)
<frozen importlib._bootstrap_external>:1008: in exec_module
???
<frozen importlib._bootstrap>:488: in _call_with_frames_removed
???
tests/dummymodule.py:42: in <module>
@no_type_check_decorator
/usr/lib64/python3.13/typing.py:2379: in no_type_check_decorator
warnings._deprecated("typing.no_type_check_decorator", remove=(3, 15))
/usr/lib64/python3.13/warnings.py:529: in _deprecated
warn(msg, DeprecationWarning, stacklevel=3)
E DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
[…]
How can we reproduce the bug?
python3.13 -m venv _e
. _e/bin/activate
pip install -e .[test]
python -m pytest