Commit Graph

79 Commits

Author SHA1 Message Date
Tim Savannah
cdd2d6d34f Regen docs for 4.3.1 2019-05-13 11:28:39 -04:00
Tim Savannah
5ab59fd709 Mark as 4.3.1 2019-05-13 11:28:26 -04:00
Tim Savannah
c52d7181d6 Strip trailing whitespace 2019-05-13 11:27:47 -04:00
Tim Savannah
874bc9b576 changelog 2019-05-13 11:27:13 -04:00
Tim Savannah
92dc986332 Regen pydocs 2019-05-13 11:25:41 -04:00
Tim Savannah
dc5fcfe507 Update READMEs, be more clear with sections, add more documentation on StoppableThread 2019-05-13 11:25:21 -04:00
Tim Savannah
f7f761789c Note it works with python 3.7 2019-05-13 11:24:40 -04:00
Tim Savannah
f793e36dc6 StoppableThread - Add more documentation to StoppableThread 2019-05-13 11:24:17 -04:00
Tim Savannah
089172fe0c Be explicit that StoppableThread.stop #exception argument needs to be a class/type, not an instance. 2019-05-13 11:07:33 -04:00
Tim Savannah
b427da2517 4.3.0 2017-08-10 18:50:20 -04:00
Tim Savannah
00685ec546 Issue #2 (Resolve) - Ensure we do not lose function information when using the func_set_timeout wrapper.
This includes things like like name, docstring, etc) when using the func_set_timeout wrapper.

This resolves using functools.wrap standard library function.

Includes unit test (failing before this commit, passing after)

Thanks to belongwqz for noting the issue and suggesting functools.wrap as resolution.
2017-08-10 18:48:50 -04:00
Tim Savannah
2bd33c12fd Tag 4.2.0 For Real and Update setup.py 2017-06-04 04:47:21 -04:00
Tim Savannah
5e15db92b6 Changelog 2017-06-04 04:47:10 -04:00
Tim Savannah
e99d1d8957 Add StoppableThread to the root module (so from 'func_timeout import StoppableThread' now works, instead of needing to do 'from func_timeout.StoppableThread import StoppableThread') 2017-06-04 04:46:47 -04:00
Tim Savannah
0e43f0b161 pydoc 2017-06-04 04:44:20 -04:00
Tim Savannah
f21d4b4b49 Update READMEs to note StoppableThread 2017-06-04 04:43:56 -04:00
Tim Savannah
6bee825db7 Add a bunch of comments to StoppableThread 2017-06-04 04:41:44 -04:00
Tim Savannah
19497ca229 4.2.0 2017-06-04 04:30:58 -04:00
Tim Savannah
4190710ec4 Update pydoc 2017-06-04 04:30:22 -04:00
Tim Savannah
57aed88c7a Add 'stop' method (rather than _stopThread) to StoppableThread 2017-05-28 01:11:42 -04:00
Tim Savannah
3f6d300aa0 4.1.0 2017-05-24 02:14:27 -04:00
Tim Savannah
0e2b0e9c3e doc 2017-05-24 02:14:11 -04:00
Tim Savannah
5e44de7210 Changelog 2017-05-24 02:12:07 -04:00
Tim Savannah
9e1ac2fb8c Change to using clever import strategy such that we dont have to use exec/eval 2017-05-24 02:08:15 -04:00
Tim Savannah
76cf4f6456 Much better exception handling - Have them make more sense. Get rid of the multiple traceback prints, one for each level of catchs on python3. Also improve traceback on both python3 and python2 to exclude the function wrapper, and instead follow the execution frame. Downside is that neither form compiles on the other python, so have to use exec... 2017-05-24 02:01:58 -04:00
Tim Savannah
fd0260fc05 For python >= 3.3, raise with the chained exception context disabled, since the funcwrap wrapper is within the context where the exception would be thrown (on python3+) 2017-05-24 01:32:55 -04:00
Tim Savannah
3275780482 Changelog 2017-05-24 01:23:34 -04:00
Tim Savannah
5a6187122d Force cleanup of thread if function completes in time. On python2 this forces the thread to be cleaned up right-away, on python3 it would get cleaned up during the next garbage-collect cycle. In python2 it may take several rounds. 2017-05-24 01:22:17 -04:00
Tim Savannah
3dcf6f921e pydoc update 2017-05-20 21:43:07 -04:00
Tim Savannah
38ec3de098 Fix date 2017-05-20 21:40:54 -04:00
Tim Savannah
0c1f6a7de6 README list pydocs 2017-05-20 21:40:34 -04:00
Tim Savannah
b6c02653b8 4.0.0 2017-05-20 21:38:02 -04:00
Tim Savannah
cfa466a302 Changelog 2017-05-20 21:30:36 -04:00
Tim Savannah
ca8a3a3534 Short README update 2017-05-20 21:30:13 -04:00
Tim Savannah
8af967169d Make python2 work as well as python3 2017-05-20 21:23:37 -04:00
Tim Savannah
f20e8e727c Fix so instantiation works in async exception. Also, dont need to worry about the exception comment, as we use BaseException and have for a while to prevent such. 2017-05-20 21:14:58 -04:00
Tim Savannah
525c291aef Regen html 2017-05-20 17:20:47 -04:00
Tim Savannah
d6ff5e1932 Make StoppableThread.JoinThread have a configurable retry interval (still default 2 seconds). Will attempt to retry stopping thread every this-many seconds 2017-05-20 17:20:23 -04:00
Tim Savannah
e554cd0252 Update docstring text 2017-05-20 17:18:06 -04:00
Tim Savannah
d10476b734 Update pydoc 2017-05-20 17:11:59 -04:00
Tim Savannah
63454c7178 Add mkdoc.sh script 2017-05-20 17:11:54 -04:00
Tim Savannah
9d3eec0475 Add README for tests dir, and add tests to MANIFEST.in 2017-05-20 17:10:16 -04:00
Tim Savannah
e4cf7fa765 Add TODO 2017-05-20 17:07:26 -04:00
Tim Savannah
ad944d3c2c Add tests 2017-05-20 17:06:51 -04:00
Tim Savannah
b729265855 Add msg property to FunctionTimedOut exception (also can get by str( exception ) 2017-05-20 17:04:22 -04:00
Tim Savannah
75d90251f6 Add missing import 2017-05-20 16:51:07 -04:00
Tim Savannah
2079932b4e Changelog 2017-05-20 16:24:24 -04:00
Tim Savannah
0ccca87e2c Some tests 2017-05-20 16:22:14 -04:00
Tim Savannah
36b7d6f266 Decrease thread join time. Because it is a daemon thread it will get closed automatically on garbage collect, just need to initate a join at all. 2017-05-20 16:21:43 -04:00
Tim Savannah
5b93fe5d7c Expand FunctionTimedOut exception to have attributes of the timeout, function that failed, args and kwargs. Also add a standard getMsg function for generating consistant message, and add a retry function to retry the function again with either same timeout, different timeout, or no timeout. 2017-05-20 16:04:39 -04:00