From 3393bc23e4601ff91010b854fda2d9650ac7a5da Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Wed, 3 Aug 2022 11:41:23 -0400 Subject: [PATCH] Generate release news --- NEWS.rst | 137 +++++++++++++++++++++++++++++++++++++++++++ nooz/165.feature.rst | 36 ------------ nooz/248.trivial.rst | 8 --- nooz/295.trivial.rst | 3 - nooz/298.trivial.rst | 2 - nooz/300.trivial.rst | 3 - nooz/303.trivial.rst | 4 -- nooz/304.feature.rst | 12 ---- nooz/305.trivial.rst | 7 --- nooz/316.trivial.rst | 5 -- nooz/317.trivial.rst | 8 --- nooz/318.bugfix.rst | 13 ---- pyproject.toml | 2 +- 13 files changed, 138 insertions(+), 102 deletions(-) delete mode 100644 nooz/165.feature.rst delete mode 100644 nooz/248.trivial.rst delete mode 100644 nooz/295.trivial.rst delete mode 100644 nooz/298.trivial.rst delete mode 100644 nooz/300.trivial.rst delete mode 100644 nooz/303.trivial.rst delete mode 100644 nooz/304.feature.rst delete mode 100644 nooz/305.trivial.rst delete mode 100644 nooz/316.trivial.rst delete mode 100644 nooz/317.trivial.rst delete mode 100644 nooz/318.bugfix.rst diff --git a/NEWS.rst b/NEWS.rst index 95c3bdb..61ee206 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -4,6 +4,143 @@ Changelog .. towncrier release notes start +tractor 0.1.0a5 (2022-08-03) +============================ + +Features +-------- + +- `#165 `_: Add SIGINT + protection to our `pdbpp` based debugger subystem such that for + (single-depth) actor trees in debug mode we ignore interrupts in any + actor currently holding the TTY lock thus avoiding clobbering IPC + connections and/or task and process state when working in the REPL. + + As a big note currently so called "nested" actor trees (trees with + actors having more then one parent/ancestor) are not fully supported + since we don't yet have a mechanism to relay the debug mode knowledge + "up" the actor tree (for eg. when handling a crash in a leaf actor). + As such currently there is a set of tests and known scenarios which will + result in process cloberring by the zombie repaing machinery and these + have been documented in https://github.com/goodboy/tractor/issues/320. + + The implementation details include: + + - utilizing a custom SIGINT handler which we apply whenever an actor's + runtime enters the debug machinery, which we also make sure the + stdlib's `pdb` configuration doesn't override (which it does by + default without special instance config). + - litter the runtime with `maybe_wait_for_debugger()` mostly in spots + where the root actor should block before doing embedded nursery + teardown ops which both cancel potential-children-in-deubg as well + as eventually trigger zombie reaping machinery. + - hardening of the TTY locking semantics/API both in terms of IPC + terminations and cancellation and lock release determinism from + sync debugger instance methods. + - factoring of locking infrastructure into a new `._debug.Lock` global + which encapsulates all details of the ``trio`` sync primitives and + task/actor uid management and tracking. + + We also add `ctrl-c` cases throughout the test suite though these are + disabled for py3.9 (`pdbpp` UX differences that don't seem worth + compensating for, especially since this will be our last 3.9 supported + release) and there are a slew of marked cases that aren't expected to + work in CI more generally (as mentioned in the "nested" tree note + above) despite seemingly working when run manually on linux. + +- `#304 `_: Add a new + ``to_asyncio.LinkedTaskChannel.subscribe()`` which gives task-oriented + broadcast functionality semantically equivalent to + ``tractor.MsgStream.subscribe()`` this makes it possible for multiple + ``trio``-side tasks to consume ``asyncio``-side task msgs in tandem. + + Further Improvements to the test suite were added in this patch set + including a new scenario test for a sub-actor managed "service nursery" + (implementing the basics of a "service manager") including use of + *infected asyncio* mode. Further we added a lower level + ``test_trioisms.py`` to start to track issues we need to work around in + ``trio`` itself which in this case included a bug we were trying to + solve related to https://github.com/python-trio/trio/issues/2258. + + +Bug Fixes +--------- + +- `#318 `_: Fix + a previously undetected ``trio``-``asyncio`` task lifetime linking + issue with the ``to_asyncio.open_channel_from()`` api where both sides + where not properly waiting/signalling termination and it was possible + for ``asyncio``-side errors to not propagate due to a race condition. + + The implementation fix summary is: + - add state to signal the end of the ``trio`` side task to be + read by the ``asyncio`` side and always cancel any ongoing + task in such cases. + - always wait on the ``asyncio`` task termination from the ``trio`` + side on error before maybe raising said error. + - always close the ``trio`` mem chan on exit to ensure the other + side can detect it and follow. + + +Trivial/Internal Changes +------------------------ + +- `#248 `_: Adjust the + `tractor._spawn.soft_wait()` strategy to avoid sending an actor cancel + request (via `Portal.cancel_actor()`) if either the child process is + detected as having terminated or the IPC channel is detected to be + closed. + + This ensures (even) more deterministic inter-actor cancellation by + avoiding the timeout condition where possible when a whild never + sucessfully spawned, crashed, or became un-contactable over IPC. + +- `#295 `_: Add an + experimental ``tractor.msg.NamespacePath`` type for passing Python + objects by "reference" through a ``str``-subtype message and using the + new ``pkgutil.resolve_name()`` for reference loading. + +- `#298 `_: Add a new + `tractor.experimental` subpackage for staging new high level APIs and + subystems that we might eventually make built-ins. + +- `#300 `_: Update to and + pin latest ``msgpack`` (1.0.3) and ``msgspec`` (0.4.0) both of which + required adjustments for backwards imcompatible API tweaks. + +- `#303 `_: Fence off + ``multiprocessing`` imports until absolutely necessary in an effort to + avoid "resource tracker" spawning side effects that seem to have + varying degrees of unreliability per Python release. Port to new + ``msgspec.DecodeError``. + +- `#305 `_: Add + ``tractor.query_actor()`` an addr looker-upper which doesn't deliver + a ``Portal`` instance and instead just a socket address ``tuple``. + + Sometimes it's handy to just have a simple way to figure out if + a "service" actor is up, so add this discovery helper for that. We'll + prolly just leave it undocumented for now until we figure out + a longer-term/better discovery system. + +- `#316 `_: Run windows + CI jobs on python 3.10 after some hacks for ``pdbpp`` dependency + issues. + + Issue was to do with the now deprecated `pyreadline` project which + should be changed over to `pyreadline3`. + +- `#317 `_: Drop use of + the ``msgpack`` package and instead move fully to the ``msgspec`` + codec library. + + We've now used ``msgspec`` extensively in production and there's no + reason to not use it as default. Further this change preps us for the up + and coming typed messaging semantics (#196), dialog-unprotocol system + (#297), and caps-based messaging-protocols (#299) planned before our + first beta. + + tractor 0.1.0a4 (2021-12-18) ============================ diff --git a/nooz/165.feature.rst b/nooz/165.feature.rst deleted file mode 100644 index 8eb6a52..0000000 --- a/nooz/165.feature.rst +++ /dev/null @@ -1,36 +0,0 @@ -Add SIGINT protection to our `pdbpp` based debugger subystem such that -for (single-depth) actor trees in debug mode we ignore interrupts in any -actor currently holding the TTY lock thus avoiding clobbering IPC -connections and/or task and process state when working in the REPL. - -As a big note currently so called "nested" actor trees (trees with -actors having more then one parent/ancestor) are not fully supported -since we don't yet have a mechanism to relay the debug mode knowledge -"up" the actor tree (for eg. when handling a crash in a leaf actor). -As such currently there is a set of tests and known scenarios which will -result in process cloberring by the zombie repaing machinery and these -have been documented in https://github.com/goodboy/tractor/issues/320. - -The implementation details include: - -- utilizing a custom SIGINT handler which we apply whenever an actor's - runtime enters the debug machinery, which we also make sure the - stdlib's `pdb` configuration doesn't override (which it does by - default without special instance config). -- litter the runtime with `maybe_wait_for_debugger()` mostly in spots - where the root actor should block before doing embedded nursery - teardown ops which both cancel potential-children-in-deubg as well - as eventually trigger zombie reaping machinery. -- hardening of the TTY locking semantics/API both in terms of IPC - terminations and cancellation and lock release determinism from - sync debugger instance methods. -- factoring of locking infrastructure into a new `._debug.Lock` global - which encapsulates all details of the ``trio`` sync primitives and - task/actor uid management and tracking. - -We also add `ctrl-c` cases throughout the test suite though these are -disabled for py3.9 (`pdbpp` UX differences that don't seem worth -compensating for, especially since this will be our last 3.9 supported -release) and there are a slew of marked cases that aren't expected to -work in CI more generally (as mentioned in the "nested" tree note -above) despite seemingly working when run manually on linux. diff --git a/nooz/248.trivial.rst b/nooz/248.trivial.rst deleted file mode 100644 index 453c829..0000000 --- a/nooz/248.trivial.rst +++ /dev/null @@ -1,8 +0,0 @@ -Adjust the `tractor._spawn.soft_wait()` strategy to avoid sending an -actor cancel request (via `Portal.cancel_actor()`) if either the child -process is detected as having terminated or the IPC channel is detected -to be closed. - -This ensures (even) more deterministic inter-actor cancellation by -avoiding the timeout condition where possible when a whild never -sucessfully spawned, crashed, or became un-contactable over IPC. diff --git a/nooz/295.trivial.rst b/nooz/295.trivial.rst deleted file mode 100644 index 74a0f23..0000000 --- a/nooz/295.trivial.rst +++ /dev/null @@ -1,3 +0,0 @@ -Add an experimental ``tractor.msg.NamespacePath`` type for passing Python -objects by "reference" through a ``str``-subtype message and using the -new ``pkgutil.resolve_name()`` for reference loading. diff --git a/nooz/298.trivial.rst b/nooz/298.trivial.rst deleted file mode 100644 index 77a2acc..0000000 --- a/nooz/298.trivial.rst +++ /dev/null @@ -1,2 +0,0 @@ -Add a new `tractor.experimental` subpackage for staging new high level -APIs and subystems that we might eventually make built-ins. diff --git a/nooz/300.trivial.rst b/nooz/300.trivial.rst deleted file mode 100644 index 4953a68..0000000 --- a/nooz/300.trivial.rst +++ /dev/null @@ -1,3 +0,0 @@ -Update to and pin latest ``msgpack`` (1.0.3) and ``msgspec`` (0.4.0) -both of which required adjustments for backwards imcompatible API -tweaks. diff --git a/nooz/303.trivial.rst b/nooz/303.trivial.rst deleted file mode 100644 index 9464fd5..0000000 --- a/nooz/303.trivial.rst +++ /dev/null @@ -1,4 +0,0 @@ -Fence off ``multiprocessing`` imports until absolutely necessary in an -effort to avoid "resource tracker" spawning side effects that seem to -have varying degrees of unreliability per Python release. Port to new -``msgspec.DecodeError``. diff --git a/nooz/304.feature.rst b/nooz/304.feature.rst deleted file mode 100644 index 820ecf7..0000000 --- a/nooz/304.feature.rst +++ /dev/null @@ -1,12 +0,0 @@ -Add a new ``to_asyncio.LinkedTaskChannel.subscribe()`` which gives -task-oriented broadcast functionality semantically equivalent to -``tractor.MsgStream.subscribe()`` this makes it possible for multiple -``trio``-side tasks to consume ``asyncio``-side task msgs in tandem. - -Further Improvements to the test suite were added in this patch set -including a new scenario test for a sub-actor managed "service nursery" -(implementing the basics of a "service manager") including use of -*infected asyncio* mode. Further we added a lower level -``test_trioisms.py`` to start to track issues we need to work around in -``trio`` itself which in this case included a bug we were trying to -solve related to https://github.com/python-trio/trio/issues/2258. diff --git a/nooz/305.trivial.rst b/nooz/305.trivial.rst deleted file mode 100644 index 1d5df5b..0000000 --- a/nooz/305.trivial.rst +++ /dev/null @@ -1,7 +0,0 @@ -Add ``tractor.query_actor()`` an addr looker-upper which doesn't deliver -a ``Portal`` instance and instead just a socket address ``tuple``. - -Sometimes it's handy to just have a simple way to figure out if -a "service" actor is up, so add this discovery helper for that. We'll -prolly just leave it undocumented for now until we figure out -a longer-term/better discovery system. diff --git a/nooz/316.trivial.rst b/nooz/316.trivial.rst deleted file mode 100644 index bcae2fd..0000000 --- a/nooz/316.trivial.rst +++ /dev/null @@ -1,5 +0,0 @@ -Run windows CI jobs on python 3.10 after some -hacks for ``pdbpp`` dependency issues. - -Issue was to do with the now deprecated `pyreadline` project which -should be changed over to `pyreadline3`. diff --git a/nooz/317.trivial.rst b/nooz/317.trivial.rst deleted file mode 100644 index 724eb93..0000000 --- a/nooz/317.trivial.rst +++ /dev/null @@ -1,8 +0,0 @@ -Drop use of the ``msgpack`` package and instead move fully to the -``msgspec`` codec library. - -We've now used ``msgspec`` extensively in production and there's no -reason to not use it as default. Further this change preps us for the up -and coming typed messaging semantics (#196), dialog-unprotocol system -(#297), and caps-based messaging-protocols (#299) planned before our -first beta. diff --git a/nooz/318.bugfix.rst b/nooz/318.bugfix.rst deleted file mode 100644 index 5bbf4f0..0000000 --- a/nooz/318.bugfix.rst +++ /dev/null @@ -1,13 +0,0 @@ -Fix a previously undetected ``trio``-``asyncio`` task lifetime linking -issue with the ``to_asyncio.open_channel_from()`` api where both sides -where not properly waiting/signalling termination and it was possible -for ``asyncio``-side errors to not propagate due to a race condition. - -The implementation fix summary is: -- add state to signal the end of the ``trio`` side task to be - read by the ``asyncio`` side and always cancel any ongoing - task in such cases. -- always wait on the ``asyncio`` task termination from the ``trio`` - side on error before maybe raising said error. -- always close the ``trio`` mem chan on exit to ensure the other - side can detect it and follow. diff --git a/pyproject.toml b/pyproject.toml index 43038b7..bbb9697 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,8 +2,8 @@ package = "tractor" filename = "NEWS.rst" directory = "nooz/" -title_format = "tractor {version} ({project_date})" version = "0.1.0a5" +title_format = "tractor {version} ({project_date})" template = "nooz/_template.rst" all_bullets = true