Remoteobj

Latest version: v0.4.0

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

Scan your dependencies

Page 1 of 3

0.4.0

- Fixed (hopefully) garbage collection bug for Except's queue objects
- added utility to create segfaults - used for tests so we can be sure of how it will behave
- fixed deadlock where large items in queue would cause `util.process.join()` to hang
- this included adding a `mp.Event` that will wait for the process to return before joining.
- Proxy objects now identify the current process using the process ID (`.ident`) and set it using a mp.Value object.
- the reason for this is that storing strings in `mp.Value` was being such a hassle
- If `tblib` is installed, then it will be used to pickle exceptions passed by Except objects (which is used for exception handling and return values of `util.process` objects)
- also decided last minute to just add `tblib` as a dependency (it's small)
- add param: `Proxy.wait_until_listening(timeout=None)`
- added tests for large return values to `util.process`
- added segfault return test for `util.process`

0.3.1

- fix another race condition when closing a remote listener (wasn't preventing requesting processes from acquiring the lock if the process is no longer listening) god this is exhausting

0.3.0

- fix race condition when closing a remote listener (wasn't checking if a requesting process had locked, but not sent yet)

0.2.9

- add `close_` argument which takes a function that will be called before joining. Useful for passing a function that sets a flag.

0.2.8

- switched from mp.Pipe to mp.Queue - more reliable. sometimes with pipes the data (especially function return), wouldn't go thru
- can set per-context logger/tog_tb flag - e.g. `with exc(log=logger, log_tb=True):`

0.2.7

- add `LocalExcept.log_tracebacks()` which calls `log.exception` for all exceptions
- add `exc.logline()` which does `log.error(f'({e.__class__.__name__}) {e}')`
- add `util.raise_thread()` which raises an exception in the thread
- similarly, added `util.thread().throw(ValueError)` as a convenience method
- add `Proxy().get_(default_local=True)` which will resolve the view locally if no remote instance is found.
- added `LocalExcept.__iter__` method to iterate over exceptions
- added `LocalExcept.clear_result()`
- added `LocalExcept.pop_result()` which gets the result and then clears it

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.