Debugger: hide pydev frozen module warnings; remove patching on Python 3.12+
Closes #695 (closed)
The origin is this line:
Here's the explanation
The solution depends on the Python version:
- for Python <= 3.11 we set at run-time os var "PYDEVD_DISABLE_FILE_VALIDATION" to True (if it is not set by user) and then import pydevd
- for Python >= 3.12 we not do anything (no patching), due to it works out of the box anyway using the new
sys.monitoringhooks. But user still can force pydevd patching by set os variable "PYTANGO_FORCE_DEBUG_TRACE_PATCHING" to True. Is that case it works as for old Pythons, with "PYDEVD_DISABLE_FILE_VALIDATION"
And in any case, now we give coverage preferences (since, actually, debugging does not really work with coverage anyway)
Edited by Anton Joubert