Pykka

Latest version: v4.1.1

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

Scan your dependencies

Page 4 of 5

1.0.1

- Name the threads of `pykka.ThreadingActor` after the actor class name instead of `PykkaThreadingActor-N` to ease debugging. (Fixes: 12)

1.0.0

- **Backwards incompatible:** Removed `pykka.VERSION` and `pykka.get_version()`, which have been deprecated since v0.14. Use `pykka.__version__` instead.

- **Backwards incompatible:** Removed `pykka.ActorRef.send_one_way()` and `pykka.ActorRef.send_request_reply()`, which have been deprecated since v0.14. Use `pykka.ActorRef.tell()` and `pykka.ActorRef.ask()` instead.

- **Backwards incompatible:** Actors no longer subclass `threading.Thread` or `gevent.Greenlet`. Instead, they *have* a thread or greenlet that executes the actor's main loop.

This is backward incompatible because you no longer have access to fields/methods of the thread/greenlet that runs the actor through fields/methods on the actor itself. This was never advertised in Pykka's docs or examples, but the fields/methods have always been available.

As a positive side effect, this fixes an issue on Python 3.x, that was introduced in Pykka 0.16, where `pykka.ThreadingActor` would
accidentally override the method `threading.Thread._stop()`.

- **Backwards incompatible:** Actors that override `pykka.Actor.__init__()` *must* call the method they override. If not, the actor will no longer be properly initialized. Valid ways to call the overridden `__init__()` method include::

python
super().__init__()
or
pykka.ThreadingActor.__init__()
or
pykka.gevent.GeventActor.__init__()


- Make `pykka.Actor.__init__()` accept any arguments and keyword arguments by default. This allows you to use `super()` in `__init__()` like this:

python
super().__init__(1, 2, 3, foo='bar')


Without this fix, the above use of `super()` would cause an exception because the default implementation of `__init__()` in `pykka.Actor` would not accept the arguments.

- Allow all public classes and functions to be imported directly from the `pykka` module. E.g. `from pykka.actor import ThreadingActor` can now be written as `from pykka import ThreadingActor`. The exception is `pykka.gevent`, which still needs to be imported from its own package due to its additional dependency on gevent.

0.16

- Let actors access themselves through a proxy. See the `pykka.ActorProxy` documentation for use cases and usage examples. (Fixes: 9)

- Give proxies direct access to the actor instances for inspecting available attributes. This access is only used for reading and works since both threading and gevent based actors share memory with other actors. This reduces the creation cost for proxies, which is mostly visible in test suites that are starting and stopping lots of actors. For the Mopidy test suite, the run time was reduced by about 33%. This change also makes self-proxying possible.

- Fix bug where `pykka.Actor.stop()` called by an actor on itself did not process the remaining messages in the inbox before the actor stopped. The behavior now matches the documentation.

0.15

- Change the argument of `pykka.Future.set_exception()` from an exception instance to an `exc_info` three-tuple. Passing just an exception instance to the method still works, but it is deprecated and may be unsupported in a future release.

- Due to the above change `pykka.Future.get()` will now reraise exceptions with complete traceback from the point when the exception was first raised and not just a traceback from when it was reraised by `get()`. (Fixes: 10)

0.14

- Add `pykka.__version__` to conform with PEP 396. This deprecates `pykka.VERSION` and `pykka.get_version()`.

- Add `pykka.ActorRef.tell()` method in favor of now deprecated `pykka.ActorRef.send_one_way()`.

- Add `pykka.ActorRef.ask()` method in favor of now deprecated `pykka.ActorRef.send_request_reply()`.

- `pykka.ThreadingFuture.set()` no longer makes a copy of the object set on the future. The setter is urged to either only pass immutable objects through futures or copy the object himself before setting it on the future. This is a less safe default, but it removes unnecessary overhead in speed and memory usage for users of immutable data structures. For example, the Mopidy test suite of about 1000 tests, many of which are using Pykka, is still passing after this change, but the test suite runs approximately 20% faster.

0.13

- 10x speedup of traversable attribute access by reusing proxies.

- 1.1x speedup of callable attribute access by reusing proxies.

Page 4 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.