PySnooper/a.py
Elijah Qi 24a83765dd Title: Replace deprecated getName() method with name attribute
Body:
This commit resolves a DeprecationWarning in the tracer.py file. The deprecated getName() method, which is used to get the name of the current_thread object, has been replaced with the recommended name attribute.

Changes:
- Updated line 473 in tracer.py to use current_thread.name instead of current_thread.getName()

With this change, the deprecation warning will no longer appear when running tests, and the code will be compatible with future releases of Python that may remove the deprecated method.
2023-04-15 22:22:08 -04:00

9 lines
No EOL
124 B
Python

import pysnooper
@pysnooper.snoop(depth = float('inf'))
def func(x):
if x == 0:
return
func(x - 1)
func(3)