wrapt_timeout_decorator

Python Powerful Timeout Decorator that can be used safely on classes, methods, class methods

MIT License

Downloads
192K
Stars
149
Committers
3
wrapt_timeout_decorator - PyPi initial release

Published by bitranox over 5 years ago

PyPi initial release

wrapt_timeout_decorator - added pickle_analyzer convenience function

Published by bitranox over 5 years ago

added pickle_analyzer convenience function

wrapt_timeout_decorator - 100% Code Coverage, Windows and OSX Test, dec_hard_timeout for Windows

Published by bitranox over 5 years ago

100% Code Coverage
Windows and OSX Test
new parameter "dec_hard_timeout" for windows

wrapt_timeout_decorator - Refractored and Cleaned

Published by bitranox over 5 years ago

Refractored and Cleaned

wrapt_timeout_decorator - Fix Pickle detection again, more Tests, CodeCov combining

Published by bitranox over 5 years ago

Final New Version 1.0.7

  • pickle detection fixed
  • added some tests
  • codecov now correctly combining the coverage of all tests
wrapt_timeout_decorator - Fix Pickle detection

Published by bitranox over 5 years ago

  • fix error on detection if the wrapped object is pickable
  • drop python 2.6 support, since wrapt dropped it
wrapt_timeout_decorator - use multiprocessing.pipe instead of queue

Published by bitranox about 6 years ago

If we are not able to use signals, we need to spawn a new process.
This was done in the past by pickling the target function and put it on a queue -
now this is done with a half-duplex pipe.

  • it is faster
  • it probably can work on Amazon AWS, since there You must not use queues
wrapt_timeout_decorator - automatic detection if we are in the mainthread

Published by bitranox almost 7 years ago

Signals can only be used in the main thread. If the decorator is running in a subthread,
we automatically disable signals.

wrapt_timeout_decorator - Using multiprocess and dill

Published by bitranox almost 7 years ago

Now using multiprocess and dill instead of multiprocessing and pickle -
this makes the decorator more useful under windows, since dill can pickle much more objects then pickle itself.

dill can pickle the following standard types:

none, type, bool, int, long, float, complex, str, unicode,
tuple, list, dict, file, buffer, builtin,
both old and new style classes,
instances of old and new style classes,
set, frozenset, array, functions, exceptions

dill can also pickle more 'exotic' standard types:
functions with yields, nested functions, lambdas
cell, method, unboundmethod, module, code, methodwrapper,
dictproxy, methoddescriptor, getsetdescriptor, memberdescriptor,
wrapperdescriptor, xrange, slice,
notimplemented, ellipsis, quit

wrapt_timeout_decorator - 100% Code Coverage

Published by bitranox almost 7 years ago

100% Code Coverage

wrapt_timeout_decorator - Minor Changes

Published by bitranox almost 7 years ago

Cosmetic Changes to V1.0.0

wrapt_timeout_decorator - public release

Published by bitranox almost 7 years ago

derived from many sources my first (public) project - well tested, new and shiny.
please contribute !

Package Rankings
Top 3.89% on Pypi.org
Related Projects