Withrestart

Latest version: v0.2.7

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.2.7

* correctly report traceback info when re-raising an exception.

0.2.6

* make find_restart() search by function object as well as by name.
* make add_handler() automatically determine exc_type for functions
named "handle_<ERRNM>" as well as those named "<ERRNM>".

0.2.5

* make raise_error() inject the new error back into the error-handling
machinery; to get the old behaviour, just raise the error directly.

0.2.4

* speed up invocation of functions within a restart context, by replacing
the _cur_calls CallStack with a custom control-flow exception.
* compatability with psyco's simulated stack frames; just make sure you
import psyco first or call withrestart.callstack.enable_psyco_support().

0.2.3

* speed up establishment of handlers and restarts, by using _getframe(n)
instead of explicitly walking up the call stack.
* invoke default handlers only if no other handler has been established.
Previously they were invoked if no other handler invoked a restart.
This required some significant changes to how handlers are invoked,
but none of that should leak into the public API.

0.2.2

* implement logic for the "skip" restart by raising an ExitRestart
exception rather than by returning NoValue; this makes the non-local
control flow more explicit.
* add a "default_handlers" attribute to RestartSuite. Setting this to a
Handler or HandlerSuite instance will cause those handlers to be invoked
if control passes cleanly through all other handlers.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.