diff --git a/305.misc.rst b/305.misc.rst deleted file mode 100644 index 1d5df5b..0000000 --- a/305.misc.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/NEWS.rst b/NEWS.rst index 95c3bdb..8ba852c 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -4,6 +4,148 @@ Changelog .. towncrier release notes start +tractor 0.1.0a5 (2022-08-03) +============================ + +This is our final release supporting Python 3.9 since we will be moving +internals to the new `match:` syntax from 3.10 going forward and +further, we have officially dropped usage of the `msgpack` library and +happily adopted `msgspec`. + +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.misc.rst b/nooz/248.misc.rst deleted file mode 100644 index 453c829..0000000 --- a/nooz/248.misc.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.misc.rst b/nooz/295.misc.rst deleted file mode 100644 index 74a0f23..0000000 --- a/nooz/295.misc.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.misc.rst b/nooz/298.misc.rst deleted file mode 100644 index 77a2acc..0000000 --- a/nooz/298.misc.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.misc.rst b/nooz/300.misc.rst deleted file mode 100644 index 4953a68..0000000 --- a/nooz/300.misc.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.misc.rst b/nooz/303.misc.rst deleted file mode 100644 index 9464fd5..0000000 --- a/nooz/303.misc.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/316.misc.rst b/nooz/316.misc.rst deleted file mode 100644 index bcae2fd..0000000 --- a/nooz/316.misc.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.misc.rst b/nooz/317.misc.rst deleted file mode 100644 index 724eb93..0000000 --- a/nooz/317.misc.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.bug.rst b/nooz/318.bug.rst deleted file mode 100644 index 5bbf4f0..0000000 --- a/nooz/318.bug.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 new file mode 100644 index 0000000..bbb9697 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,28 @@ +[tool.towncrier] +package = "tractor" +filename = "NEWS.rst" +directory = "nooz/" +version = "0.1.0a5" +title_format = "tractor {version} ({project_date})" +template = "nooz/_template.rst" +all_bullets = true + + [[tool.towncrier.type]] + directory = "feature" + name = "Features" + showcontent = true + + [[tool.towncrier.type]] + directory = "bugfix" + name = "Bug Fixes" + showcontent = true + + [[tool.towncrier.type]] + directory = "doc" + name = "Improved Documentation" + showcontent = true + + [[tool.towncrier.type]] + directory = "trivial" + name = "Trivial/Internal Changes" + showcontent = true diff --git a/setup.py b/setup.py index 90f84c5..0ecbbb4 100755 --- a/setup.py +++ b/setup.py @@ -25,7 +25,7 @@ with open('docs/README.rst', encoding='utf-8') as f: setup( name="tractor", - version='0.1.0a5.dev', # alpha zone + version='0.1.0a5', # alpha zone description='structured concurrrent "actors"', long_description=readme, license='AGPLv3', diff --git a/towncrier.toml b/towncrier.toml deleted file mode 100644 index e97b0a0..0000000 --- a/towncrier.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tool.towncrier] -package = "tractor" -filename = "NEWS.rst" -directory = "nooz/" -title_format = "tractor {version} ({project_date})" -version = "0.1.0a4" -template = "nooz/_template.rst"