Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 3.10 warning

warning: PYDEVD_USE_CYTHON environment variable is set to 'NO'. Frame evaluator will be also disabled because it requires Cython extensions to be enabled in order to operate correctly.
C:\Program Files\JetBrains\PyCharm Community Edition 2021.2.3\plugins\python-ce\helpers\pydev\pydevd.py:1844: DeprecationWarning: currentThread() is deprecated, use current_thread() instead
  dummy_thread = threading.currentThread()

I installed the newest version of python, deleted older one and this warning poped up. Python codes run as usual, but this message pops up after debugging. I use Pycharm as an IDE. How to resolve this issue?

like image 400
David Khutsishvili Avatar asked Oct 26 '21 18:10

David Khutsishvili


People also ask

How do you write a warning in Python?

showwarning(message, category, filename, lineno, file=None, line=None): This function Writes a warning to a file. simplefilter(action, category=Warning, lineno=0, append=False): This function adds a single entry into the warnings filter requirements list.

What are warning in Python?

Warning messages are typically issued in situations where it is useful to alert the user of some condition in a program, where that condition (normally) doesn't warrant raising an exception and terminating the program. For example, one might want to issue a warning when a program uses an obsolete module.

How do I stop deprecation warning in Python?

Use warnings. filterwarnings() to ignore deprecation warnings Call warnings. filterwarnings(action, category=DeprecationWarning) with action as "ignore" and category set to DeprecationWarning to ignore any deprecation warnings that may rise. Leave category unset to ignore all warnings.


2 Answers

This was fixed in Pycharm 2021.3. Upgrade and it will go away.

See 2021.3 release notes.

Bug     PY-44838    Build debugger binaries for Python 3.10
like image 124
Rob Avatar answered Oct 22 '22 21:10

Rob


I have the same notification after moving to python 3.10

The thing is disabled Cython speedups for Python 3.10 intentionally as they are breaking the debugger. JetBrains are working on the fix and will bundle the pre-compiled speedups for Python 3.10 on Windows (as they do for other versions)

Link to issue

like image 3
Kisuro Avatar answered Oct 22 '22 22:10

Kisuro