Compare commits

..

2 Commits

Author SHA1 Message Date
DJ Gillespie
42473ad7ff bump to 4.3.7 since 4.3.6 was tagged but not released 2025-02-19 14:58:30 -07:00
DJ Gillespie
eeda3385eb add additonal python versions 2025-02-19 14:53:17 -07:00
5 changed files with 8 additions and 19 deletions

View File

@ -1,5 +1,5 @@
''' '''
Copyright (c) 2016, 2017, 2019, 2023 Timothy Savannah All Rights Reserved. Copyright (c) 2016, 2017, 2019 Timothy Savannah All Rights Reserved.
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
@ -32,7 +32,6 @@ class StoppableThread(threading.Thread):
The exception is raised over and over, with a specifed delay (default 2.0 seconds) The exception is raised over and over, with a specifed delay (default 2.0 seconds)
''' '''
isNestedStoppableThread = None
def _stopThread(self, exception, raiseEvery=2.0): def _stopThread(self, exception, raiseEvery=2.0):
@ -42,12 +41,6 @@ class StoppableThread(threading.Thread):
if self.is_alive() is False: if self.is_alive() is False:
return True return True
currentThread = threading.current_thread()
if issubclass(currentThread.__class__, StoppableThread):
currentThread.isNestedStoppableThread = True
else:
currentThread.isNestedStoppableThread = False
self._stderr = open(os.devnull, 'w') self._stderr = open(os.devnull, 'w')
# Create "joining" thread which will raise the provided exception # Create "joining" thread which will raise the provided exception

View File

@ -1,13 +1,13 @@
''' '''
Copyright (c) 2016, 2017, 2019, 2023 Tim Savannah All Rights Reserved. Copyright (c) 2016, 2017, 2019 Tim Savannah All Rights Reserved.
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
''' '''
__version__ = '4.4.0' __version__ = '4.3.5'
__version_tuple__ = (4, 4, 0) __version_tuple__ = (4, 3, 5)
__all__ = ('func_timeout', 'func_set_timeout', 'FunctionTimedOut', 'StoppableThread') __all__ = ('func_timeout', 'func_set_timeout', 'FunctionTimedOut', 'StoppableThread')

View File

@ -2,7 +2,7 @@
# vim: set ts=4 sw=4 expandtab : # vim: set ts=4 sw=4 expandtab :
''' '''
Copyright (c) 2016, 2017, 2023 Tim Savannah All Rights Reserved. Copyright (c) 2016, 2017 Tim Savannah All Rights Reserved.
Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as Licensed under the Lesser GNU Public License Version 3, LGPLv3. You should have recieved a copy of this with the source distribution as
LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE LICENSE, otherwise it is available at https://github.com/kata198/func_timeout/LICENSE
@ -68,9 +68,6 @@ def func_timeout(timeout, func, args=(), kwargs=None):
ret.append( func(*args2, **kwargs2) ) ret.append( func(*args2, **kwargs2) )
except FunctionTimedOut: except FunctionTimedOut:
# Don't print traceback to stderr if we time out # Don't print traceback to stderr if we time out
currentThread = threading.current_thread()
if getattr(currentThread, 'isNestedStoppableThread', False) is True:
raise
pass pass
except Exception as e: except Exception as e:
exc_info = sys.exc_info() exc_info = sys.exc_info()

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python #!/usr/bin/env python
''' '''
Copyright (c) 2016, 2017, 2023 Tim Savannah All Rights Reserved. Copyright (c) 2016, 2017 Tim Savannah All Rights Reserved.
This software is licensed under the terms of the Lesser GNU General Public License Version 2.1 (LGPLv2.1) This software is licensed under the terms of the Lesser GNU General Public License Version 2.1 (LGPLv2.1)
You should have received a copy of this with the source distribution as LICENSE, You should have received a copy of this with the source distribution as LICENSE,
@ -30,7 +30,7 @@ if __name__ == '__main__':
log_description = summary log_description = summary
setup(name='func_timeout', setup(name='func_timeout',
version='4.4.0', version='4.3.7',
packages=['func_timeout'], packages=['func_timeout'],
author='Tim Savannah', author='Tim Savannah',
author_email='kata198@gmail.com', author_email='kata198@gmail.com',
@ -52,6 +52,7 @@ if __name__ == '__main__':
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Software Development :: Libraries :: Python Modules' 'Topic :: Software Development :: Libraries :: Python Modules'
] ]
) )

2
tests/.gitignore vendored
View File

@ -1,2 +0,0 @@
*.pyc
GoodTests.py