Commit Graph

1428 Commits (c8efcdd0d3f4513c6c7537bfd3bd481b42ddc56d)

Author SHA1 Message Date
Tyler Goodlet d2a01e8b81 Drop use of `trio.Event.clear()`
Just spin up new events instead; because apparently they're
so cheap (rolls eyes).

Resolves #78
2019-11-23 11:29:23 -05:00
goodboy 4d43f2564c
Merge pull request #91 from goodboy/more_thorough_super_tests
More thorough basic supervision tests
2019-11-23 11:24:18 -05:00
Tyler Goodlet 2d4b6de4f4 Spawn even less suba-actors in Windows CI
Seems like we've probably got some greater limitations
with Windows and "nested" spawned sub-processes...
2019-11-22 21:23:25 -05:00
Tyler Goodlet f977d37cee Add nursery self-destruct logic on cancel failure
If a nursery fails to cancel (some sub-actors presumably) then hard kill
the whole process tree to avoid hangs during a catastrophic failure.
This logic may get factored out (and changed) as we introduce custom
supervisor strategies.
2019-11-22 17:11:48 -05:00
Tyler Goodlet 42978bf9ac Readme description bump after talks with multiple would-be users 2019-11-22 16:43:49 -05:00
Tyler Goodlet f8adbd73df Add windows and py3.8 support to setup script 2019-11-16 09:58:06 -05:00
Tyler Goodlet 5e056bae71 Expose trio exceptions to `RemoteActorError` 2019-10-30 00:32:10 -04:00
Tyler Goodlet 97df927714 Run first example test under both start methods 2019-10-30 00:31:28 -04:00
Tyler Goodlet 6d9ac53bd5 Add nested multierror testing
Add a test to verify that `trio.MultiError`s are properly propagated up
a simple actor nursery tree. We don't have any exception marshalling
between processes (yet) so we can't validate much more then a simple
2-depth tree. This satisfies the final bullet in #43.

Note I've limited the number of subactors per layer to around 5 since
any more then this seems to break the `multiprocessing` forkserver;
zombie subprocesses seem to be blocking teardown somehow...

Also add a single depth fast fail test just to verify that it's the
nested spawning that triggers this forkserver bug.
2019-10-30 00:30:40 -04:00
Tyler Goodlet 95e8f3d306 Propagate `trio.MultiError`s up the actor tree
`trio.MultiError` isn't an `Exception` (derived instead from
`BaseException`) so we have to specially catch it in the task
invocation machinery and ship it upwards (like regular errors)
since nurseries running in sub-actors can raise them.
2019-10-28 00:47:06 -04:00
Tyler Goodlet d406383cd3 Add a preliminary nested subactor `MultiError` test
This exemplifies the undefined behaviour in #88 and begins to test for
the last bullet in #43.
2019-10-26 15:04:13 -04:00
Tyler Goodlet 6dbb3f7ae6 Extend cancellation tests
In an effort towards #43. This completes the first major bullet's worth of tests
described in that issue.
2019-10-26 09:55:07 -04:00
goodboy ab349cdb8d
Merge pull request #86 from goodboy/pip_ci_fix
Make pip a keener
2019-10-20 16:42:42 -04:00
Tyler Goodlet 1127e3b579 Make pip a keener 2019-10-20 16:24:01 -04:00
Tyler Goodlet c5074f5a60 Always upgrade pip before CI run 2019-10-20 14:06:28 -04:00
goodboy 07d54110c0
Merge pull request #82 from goodboy/windows_support
Windows and Python 3.8 support
2019-10-17 09:11:40 -04:00
Tyler Goodlet e0072f925d Add back a py3.7 run on windows 2019-10-16 21:31:09 -04:00
Tyler Goodlet 6ec9752f46 Slight slowdown on windows / py3.8? 2019-10-16 11:02:18 -04:00
Tyler Goodlet 5f11072442 Add more detailed Windows gotchas section
Fill out with the solution from #79 and move the section further down.
This should hopefully suffice what's left to fulfil for #59

Resolves #79
2019-10-16 09:47:58 -04:00
Tyler Goodlet 7e8b7091cb Check for proper SIGINT return code
They finally got https://bugs.python.org/issue1054041 in Python 3.8
2019-10-15 23:22:48 -04:00
Tyler Goodlet da4796749f Continue hacking the forkserver in Python 3.8
They got all fancy and added shared memory segment tracking and then
had to "generalize" the tracker name...hooray

Fixes #81
2019-10-15 22:37:47 -04:00
Tyler Goodlet 6ff32347bf Don't hardcode python version in path for Windows
Also add Python 3.8 testing on Linux.
2019-10-15 21:18:48 -04:00
goodboy 22b5c1c207
Merge pull request #75 from goodboy/rename_forkserver_mod
Rename override module
2019-10-15 01:05:45 -04:00
Tyler Goodlet 7da95a806d Rename override module 2019-10-14 12:58:10 -04:00
goodboy ee9a71f4bf
Merge pull request #76 from goodboy/user_update
User name and email bump
2019-04-28 11:28:38 -04:00
Tyler Goodlet 24a4d6df4b User name and email bump 2019-04-28 10:42:39 -04:00
goodboy f2b08b5565
Merge pull request #74 from goodboy/win_ci
Add windows CI using choco
2019-04-07 22:27:16 -04:00
Tyler Goodlet 5760bb1b7c Adjust test timeout/sync handling for windows 2019-03-31 15:34:44 -04:00
Tyler Goodlet 3af58d129d Add windows CI using choco
Resolves #62
2019-03-30 20:47:17 -04:00
goodboy e0f4894071
Merge pull request #73 from goodboy/stream_functions
Stream functions
2019-03-29 19:41:50 -04:00
Tyler Goodlet b965d20cba Add stream func tests 2019-03-29 19:10:56 -04:00
Tyler Goodlet f885b02c73 Validate stream functions at decorate time 2019-03-29 19:10:32 -04:00
Tyler Goodlet 5c0ae47cf5 Fix type annotation 2019-03-26 08:03:12 -04:00
Tyler Goodlet 096d211ed2 Document `@tractor.stream` 2019-03-25 22:11:42 -04:00
Tyler Goodlet e51f84af90 Require explicit marking of non async gen streaming funcs
Add `@tractor.stream` which must be used to denote non async generator
streaming functions which use the `tractor.Context` API to push values.
This enforces a more explicit denotation as well as allows enforcing the
declaration of the `ctx` argument in definitions.
2019-03-25 21:36:13 -04:00
Tyler Goodlet 2f773fc883 Reorg streaming section 2019-03-24 15:08:34 -04:00
Tyler Goodlet 4ee35038fb Move discovery functions to their own module 2019-03-24 11:37:11 -04:00
Tyler Goodlet 2aa6ffce60 Provide each task's cancel scope to every `Context`
This begins moving toward explicitly decorated "streaming functions"
instead of checking for a `ctx` arg in the signature.

- provide each context with its task's top level `trio.CancelScope`
  such that tasks can cancel themselves explictly if needed via calling
  `Context.cancel_scope()`
- make `Actor.cancel_task()` a private method (`_cancel_task()`) and
  handle remote rpc calls specially such that the caller does not need
  to provide the `chan` argument; non-primitive types can't be passed on
  the wire and we don't want the client actor be require knowledge of
  the channel instance the request is associated with. This also ties into
  how we're tracking tasks right now (`Actor._rpc_tasks` is keyed by the
  call id, a UUID, *plus* the channel).
- make `_do_handshake` a private actor method
- use UUID version 4
2019-03-23 23:31:26 -04:00
goodboy ac4a025aa5
Merge pull request #71 from goodboy/propagate_loglevel
Propagate `tractor.run()` logging level to subactors
2019-03-23 23:30:45 -04:00
Tyler Goodlet faa1f373b5 Add subactor loglevel propagation test
Can't seem to get the `capfd` fixture to capture subprocess logging to
stderr even though the console report shows the log message as being
captured? Skipping the test on the forkserver method for now.
2019-03-23 23:27:32 -04:00
Tyler Goodlet 4e078368fc Propagate `tractor.run()` logging level to subactors 2019-03-18 21:32:08 -04:00
Tyler Goodlet 4b825778dd Flip travis badge to new username 2019-03-17 15:18:44 -04:00
Tyler Goodlet de8d69c58b Expose `Context` at top level 2019-03-15 19:40:34 -04:00
goodboy 29ffbfe6ca
Merge pull request #63 from chrizzFTD/update_tests_for_windows
Update tests for windows
2019-03-14 21:06:37 -04:00
goodboy d042a99ecf
Merge pull request #70 from goodboy/ipc_iternals_renaming
Rename `StreamQueue` to `MsgpackStream`
2019-03-13 20:52:49 -04:00
Christian López Barrón 5fc51fd745 multi_program signal for windows missing SIGKILL, SIGINT 2019-03-13 21:32:45 +11:00
Christian López Barrón 2138d55a60 increased trio.sleep time for other actors to spawn 2019-03-13 21:32:45 +11:00
Christian López Barrón b992dc19e3 moved assert statement for name on try_set_start_method after its autoset 2019-03-13 21:32:45 +11:00
Christian López Barrón efffca371a pytest_generate_tests remove `fork` only if it's in list 2019-03-13 21:32:45 +11:00
Tyler Goodlet 63d067792c Rename `StreamQueue` to `MsgpackStream`
Prepares for other possible interchange formats plus it wasn't really
a queue, just a TCP stream wrapper + `msgpack` interchange.
2019-03-12 01:22:46 -04:00