Use Thread.name instead of deprecated getName

This commit is contained in:
Ram Rachum 2023-07-15 15:54:51 +01:00
parent 4224cf9694
commit 9008efa5cb
2 changed files with 7 additions and 4 deletions

View File

@ -5,9 +5,12 @@
################################################################## ##################################################################
[project attributes] [project attributes]
proj.directory-list = [{'dirloc': loc('../..'), proj.directory-list = [{'dirloc': loc('../..'),
'excludes': ['PySnooper.egg-info', 'excludes': ['dist',
'dist', '.tox',
'build'], 'htmlcov',
'build',
'.ipynb_checkpoints',
'PySnooper.egg-info'],
'filter': '*', 'filter': '*',
'include_hidden': False, 'include_hidden': False,
'recursive': True, 'recursive': True,

View File

@ -472,7 +472,7 @@ class Tracer:
"thread_info") "thread_info")
current_thread = threading.current_thread() current_thread = threading.current_thread()
thread_info = "{ident}-{name} ".format( 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) thread_info = self.set_thread_info_padding(thread_info)
### Reporting newish and modified variables: ########################## ### Reporting newish and modified variables: ##########################