forked from goodboy/tractor
1
0
Fork 0
Commit Graph

1474 Commits (proper_breakpoint_hooking)

Author SHA1 Message Date
Tyler Goodlet 71b44b997e Drop sillyness in intro 2018-09-20 20:30:57 -04:00
Tyler Goodlet 7dd91d0684 Wait longer for arbiter-daemon to spawn on py3.6 2018-09-17 09:17:11 -04:00
Tyler Goodlet 65beb2d84e Top level actor must have a `main()` now 2018-09-14 16:34:13 -04:00
Tyler Goodlet 716a44b6b8 Better document `run_daemon()` 2018-09-14 16:33:45 -04:00
goodboy 85a5d1f849
Merge pull request #38 from tgoodlet/multi_program_tests
Multi program tests
2018-09-10 22:43:39 -04:00
Tyler Goodlet 827a6c6014 Make `rpc_modules` a positional arg to `tractor.run_daemon()` 2018-09-10 22:31:23 -04:00
Tyler Goodlet 037c4c3797 Comment tweak 2018-09-10 15:28:19 -04:00
Tyler Goodlet d808ffd8f3 `Logger.warn()` is deprecated 2018-09-10 15:19:49 -04:00
Tyler Goodlet d12136d44d Add some mult-program tests
Run the arbiter-actor in a separate program and do some basic tests to
make sure everything works - particularly, registration and
cancellation.
2018-09-08 09:44:29 -04:00
Tyler Goodlet ee7959cb55 Fix same named actor race
When an actor has already been registered with the arbiter it should
exist in the registry and thus the wait event should have been removed.
Check that the registry indeed holds an event before clearing it.
2018-09-08 09:40:35 -04:00
Tyler Goodlet 6b8393a4d6 Add `tractor.run_daemon()` for running a main rpc daemon 2018-09-08 09:39:53 -04:00
Tyler Goodlet 0ca668453c Running without a main func is a type error 2018-09-05 18:13:23 -04:00
Tyler Goodlet 914d1b67d8 Fix typo 2018-09-04 22:17:12 -04:00
Tyler Goodlet a998a5e415 Forgot to remove spawn tests from test_local.py 2018-09-04 22:17:02 -04:00
goodboy 6dfbdd33a1
Merge pull request #37 from tgoodlet/tests_reorg
Tests reorg
2018-09-03 16:22:44 -04:00
Tyler Goodlet c2457f7cce Move basic spawning tests to separate module 2018-09-02 22:07:32 -04:00
Tyler Goodlet 18e101d38e Move streaming tests into separate module 2018-09-02 21:58:42 -04:00
Tyler Goodlet 51076ebb5c Break cancellation tests into new module 2018-09-02 11:51:58 -04:00
Tyler Goodlet 438a79707f Couple more type tweaks 2018-09-01 14:43:48 -04:00
Tyler Goodlet 3dcf16c43d Min cancel delay >= 0 2018-08-31 20:38:34 -04:00
goodboy 22ac567230
Merge pull request #35 from tgoodlet/type_annotations
Add type annotations to most functions
2018-08-31 20:04:39 -04:00
Tyler Goodlet 4d63125a3c Add mypy checking to CI! 2018-08-31 18:06:16 -04:00
Tyler Goodlet 086df43b59 Woot! mypy run is clean! 2018-08-31 17:16:24 -04:00
Tyler Goodlet 18c55e2b5f Type igore `colorlog` 2018-08-26 13:12:59 -04:00
Tyler Goodlet 11cbf9ea55 Use proper `typing` annotations 2018-08-26 13:12:29 -04:00
Tyler Goodlet c3eee1f228 Move "treat_as_gen" detection into `_invoke()` 2018-08-22 11:51:22 -04:00
Tyler Goodlet b0ceb308ba Add type annotations to most functions
This is purely for documentation purposes for now as it should be
obvious a bunch of the signatures aren't using the correct "generics"
syntax (i.e. the use of `(str, int)` instead of `typing.Tuple[str, int])`)
in a bunch of places. We're also not using a type checker yet and besides,
`trio` doesn't really expose a lot of its internal types very well.

2SQASH
2018-08-22 11:50:45 -04:00
goodboy d65cdc0153
Merge pull request #29 from tgoodlet/py3.7_tweaks
Python 3.7!
2018-08-20 08:50:01 -04:00
Tyler Goodlet 81c284272b Run py3.7 in CI 2018-08-20 08:28:14 -04:00
goodboy 5e23ed20e5
Merge pull request #34 from tgoodlet/reliable_cancel_tests
Reliable cancel tests
2018-08-20 08:27:38 -04:00
Tyler Goodlet 996ad891f4 py3.6 is missing this attr 2018-08-19 16:11:57 -04:00
Tyler Goodlet a64c2a70bd Base cancel delays on speed of a non-cancelled run 2018-08-19 16:08:02 -04:00
Tyler Goodlet 328e5bd597 Import our `forkserver.main()` in server cmd
Something changed in 3.7 (likely to do with changes to the core
import system) that requires explicitly importing our version
of `forkserver.main()` in order to guarantee the server runs our
module code. Override `forkserver.ensure_running()`; specifically,
modify the python launch command.
2018-08-19 15:37:01 -04:00
goodboy 1264cae218
Merge pull request #33 from tgoodlet/wait_for_actor
Add wait_for_actor() helper
2018-08-17 23:31:57 -04:00
Tyler Goodlet 8c110c79fb A teensy more lax on the speed test 2018-08-17 16:55:00 -04:00
Tyler Goodlet 3202462cd5 Attach remote internal errors to channels
This ensures that internal errors received from a remote actor are
indeed raised even in the `MainProcess` **before** comms tasks are
cancelled. Internal error in this case means any error packet received
on a channel that doesn't have a `cid` header. RPC errors (which **do**
have a `cid` header) are still forwarded to the consuming caller as usual.
2018-08-17 14:49:17 -04:00
Tyler Goodlet 901f99bbec Throw internal errors into the main coroutine
If an internal error is bubbled up from some sub-actor throw that error
into the `MainProcess` "main" async function / coro in order to trigger
nursery teardowns (i.e. cancellations) that need to be done.

I'll likely change this shortly back to where we run a "main task"
inside `actor._async_main()`...
2018-08-16 00:22:16 -04:00
Tyler Goodlet f8111e51cd Maybe wait for actor result(s) after proc join 2018-08-16 00:21:49 -04:00
Tyler Goodlet d4da80c558 Store remote errors on each portal 2018-08-16 00:21:00 -04:00
Tyler Goodlet 73e8aac36c Always allow and enable rpc prior to task start 2018-08-15 01:24:06 -04:00
Tyler Goodlet 09e3a94060 Cancel result waiter once proc terminates 2018-08-15 01:24:06 -04:00
Tyler Goodlet b1f17dea1f Update readme and upgrade all packages on travis 2018-08-13 12:08:26 -04:00
Tyler Goodlet ea60a3dff9 Test the `wait_for_actor()` api 2018-08-13 00:06:22 -04:00
Tyler Goodlet 3f0c644768 Add `tractor.wait_for_actor()` helper
Allows for waiting on another actor (by name) to register with the
arbiter. This makes synchronized actor spawning and consecutive task
coordination easier to accomplish from within sub-actors.

Resolves #31
2018-08-12 23:59:19 -04:00
Tyler Goodlet 8e027ff571 Be honest about the event loop
Thanks to @pquentin for calling this one out.
2018-08-08 13:25:04 -04:00
goodboy 199b9030a5
Merge pull request #11 from tgoodlet/draft_readme
Initial readme documenting most features
2018-08-07 18:16:10 -04:00
Tyler Goodlet 99e2cf9a13 Draft v2 after new `run_in_actor()` API
Revamp the docs after some feedback from @vodik.
See #24 #25 for additional details.
2018-08-07 18:05:35 -04:00
Tyler Goodlet d4a6cbbc34 Add CI badge 2018-08-07 17:59:27 -04:00
Tyler Goodlet a7315f91ee Document per-func actors for clarity 2018-08-07 17:59:27 -04:00
Tyler Goodlet 8f342ad0dd Add simpler intro
As per a suggestion from @njsmith I've added a little less verbose intro
which mentions *actors* up front.

More,
- add install cmd
- reorg spawning and portal sections a wee bit
2018-08-07 17:59:27 -04:00