From 9008efa5cb680b80228732a6d914454971b27e6e Mon Sep 17 00:00:00 2001 From: Ram Rachum Date: Sat, 15 Jul 2023 15:54:51 +0100 Subject: [PATCH] Use Thread.name instead of deprecated getName --- misc/IDE files/PySnooper.wpr | 9 ++++++--- pysnooper/tracer.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/misc/IDE files/PySnooper.wpr b/misc/IDE files/PySnooper.wpr index 8fd5606..a9ae5fe 100644 --- a/misc/IDE files/PySnooper.wpr +++ b/misc/IDE files/PySnooper.wpr @@ -5,9 +5,12 @@ ################################################################## [project attributes] proj.directory-list = [{'dirloc': loc('../..'), - 'excludes': ['PySnooper.egg-info', - 'dist', - 'build'], + 'excludes': ['dist', + '.tox', + 'htmlcov', + 'build', + '.ipynb_checkpoints', + 'PySnooper.egg-info'], 'filter': '*', 'include_hidden': False, 'recursive': True, diff --git a/pysnooper/tracer.py b/pysnooper/tracer.py index badefdd..00b7a68 100644 --- a/pysnooper/tracer.py +++ b/pysnooper/tracer.py @@ -472,7 +472,7 @@ class Tracer: "thread_info") current_thread = threading.current_thread() thread_info = "{ident}-{name} ".format( - ident=current_thread.ident, name=current_thread.getName()) + ident=current_thread.ident, name=current_thread.name) thread_info = self.set_thread_info_padding(thread_info) ### Reporting newish and modified variables: ##########################