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]
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,

View File

@ -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: ##########################