From 8fdc548676624357db8579f63cb09c016882bdb7 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 1 Nov 2021 14:02:45 -0400 Subject: [PATCH 1/4] Alpha3 version bump and release notes --- NEWS.rst | 51 +++++++++++++++++++++++++++++++++++ newsfragments/166.feature.rst | 4 --- newsfragments/214.feature.rst | 9 ------- newsfragments/241.feature | 6 ----- newsfragments/245.feature.rst | 13 --------- newsfragments/248.feature | 1 - setup.py | 2 +- 7 files changed, 52 insertions(+), 34 deletions(-) delete mode 100644 newsfragments/166.feature.rst delete mode 100644 newsfragments/214.feature.rst delete mode 100644 newsfragments/241.feature delete mode 100644 newsfragments/245.feature.rst delete mode 100644 newsfragments/248.feature diff --git a/NEWS.rst b/NEWS.rst index 35e7980..cf56443 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -4,6 +4,57 @@ Changelog .. towncrier release notes start +tractor 0.1.0a3 (2021-11-01) +============================ + +Features +-------- + +- Switch to using the ``trio`` process spawner by default on windows. (#166) + + This gets windows users debugger support (manually tested) and in + general a more resilient (nested) actor tree implementation. + +- Add optional `msgspec `_ support + as an alernative, faster MessagePack codec. (#214) + + Provides us with a path toward supporting typed IPC message contracts. Further, + ``msgspec`` structs may be a valid tool to start for formalizing our + "SC dialog un-protocol" messages as described in `#36 + `_`. + +- Introduce a new ``tractor.trionics`` `sub-package`_ that exposes + a selection of our relevant high(er) level trio primitives and + goodies. (#241) + + At outset we offer a ``gather_contexts()`` context manager for + concurrently entering a sequence of async context managers (much like + a version of ``asyncio.gather()`` but for context managers) and use it + in a new ``tractor.open_actor_cluster()`` manager-helper that can be + entered to concurrently spawn a flat actor pool. We also now publicly + expose our "broadcast channel" APIs (``open_broadcast_receiver()``) + from here. + +.. _sub-package: ../tractor/trionics + +- Change the core message loop to handle task and actor-runtime cancel + requests immediately instead of scheduling them as is done for rpc-task + requests. (#245) + + In order to obtain more reliable teardown mechanics for (complex) actor + trees it's important that we specially treat cancel requests as having + higher priority. Previously, it was possible that task cancel requests + could actually also themselves be cancelled if a "actor-runtime" cancel + request was received (can happen during messy multi actor crashes that + propagate). Instead cancels now block the msg loop until serviced and + a response is relayed back to the requester. This also allows for + improved debugger support since we have determinism guarantees about + which processes must wait before hard killing their children. + +- Drop Python 3.8 support in favor of rolling with two latest releases + for the time being. (#248) + + tractor 0.1.0a2 (2021-09-07) ============================ diff --git a/newsfragments/166.feature.rst b/newsfragments/166.feature.rst deleted file mode 100644 index 6713873..0000000 --- a/newsfragments/166.feature.rst +++ /dev/null @@ -1,4 +0,0 @@ -Switch to using the ``trio`` process spawner by default on windows. - -This gets windows users debugger support (manually tested) and in -general a more resilient (nested) actor tree implementation. diff --git a/newsfragments/214.feature.rst b/newsfragments/214.feature.rst deleted file mode 100644 index 1247536..0000000 --- a/newsfragments/214.feature.rst +++ /dev/null @@ -1,9 +0,0 @@ -Add optional `msgspec `_ support over -TCP streams as an alernative, faster MessagePack codec. - -This get's us moving toward typed messaging/IPC protocols. Further, -``msgspec`` structs may be a valid tool to start for formalizing our "SC -dialog un-protocol" messages as described in `#36 -`_`. - - diff --git a/newsfragments/241.feature b/newsfragments/241.feature deleted file mode 100644 index e2b4297..0000000 --- a/newsfragments/241.feature +++ /dev/null @@ -1,6 +0,0 @@ -Introduce a new `sub-package`_ that exposes all our high(er) level trio primitives and goodies, most importantly: - -- A new ``open_actor_cluster`` procedure is available for concurrently spawning a number of actors. -- A new ``gather_contexts`` procedure is available for concurrently entering a sequence of async context managers. - -.. _sub-package: ../tractor/trionics diff --git a/newsfragments/245.feature.rst b/newsfragments/245.feature.rst deleted file mode 100644 index e2754c3..0000000 --- a/newsfragments/245.feature.rst +++ /dev/null @@ -1,13 +0,0 @@ -Change the core message loop to handle task and actor-runtime cancel -requests immediately instead of scheduling them as is done for rpc-task -requests. - -In order to obtain more reliable teardown mechanics for (complex) actor -trees it's important that we specially treat cancel requests as having -higher priority. Previously, it was possible that task cancel requests -could actually also themselves be cancelled if a "actor-runtime" cancel -request was received (can happen during messy multi actor crashes that -propagate). Instead cancels now block the msg loop until serviced and -a response is relayed back to the requester. This also allows for -improved debugger support since we have determinism guarantees about -which processes must wait before hard killing their children. diff --git a/newsfragments/248.feature b/newsfragments/248.feature deleted file mode 100644 index eac585c..0000000 --- a/newsfragments/248.feature +++ /dev/null @@ -1 +0,0 @@ -Drop Python 3.8 support in favor of rolling with two latest releases for the time being. \ No newline at end of file diff --git a/setup.py b/setup.py index 4f7431c..23becf3 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ with open('docs/README.rst', encoding='utf-8') as f: setup( name="tractor", - version='0.1.0a3.dev0', # alpha zone + version='0.1.0a3', # alpha zone description='structured concurrrent "actors"', long_description=readme, license='GPLv3', From 3452e18e6dd9864f517a99001077a981961a0d5a Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 1 Nov 2021 14:12:42 -0400 Subject: [PATCH 2/4] Toss 3.10 into CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5c9ce2..fb03081 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python: ['3.9'] + python: ['3.9', '3.10'] spawn_backend: ['trio', 'mp'] steps: From 9da1abeecd458160c0842d0884b05187ecd104ea Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 2 Nov 2021 12:19:58 -0400 Subject: [PATCH 3/4] Super naive attempt to skip 3.10 on windows --- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++------ 1 file changed, 43 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb03081..d1fe811 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,7 @@ jobs: - name: Run MyPy check run: mypy tractor/ --ignore-missing-imports - testing: - + testing-linux: name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }}' timeout-minutes: 9 runs-on: ${{ matrix.os }} @@ -32,7 +31,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest] python: ['3.9', '3.10'] spawn_backend: ['trio', 'mp'] @@ -52,8 +51,8 @@ jobs: - name: Run tests run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rs - testing-msgspec: - # runs py3.9 jobs on all OS's but with optional `msgspec` dep installed + testing-linux-msgspec: + # runs jobs on all OS's but with optional `msgspec` dep installed name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }} - msgspec' timeout-minutes: 10 runs-on: ${{ matrix.os }} @@ -61,8 +60,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest] - python: ['3.9'] + os: [ubuntu-latest] + python: ['3.9', '3.10'] spawn_backend: ['trio', 'mp'] steps: @@ -80,3 +79,40 @@ jobs: - name: Run tests run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rs + + # We skip 3.10 on windows for now due to + # https://github.com/pytest-dev/pytest/issues/8733 + # some kinda weird `pyreadline` issue.. + + # TODO: use job filtering to accomplish instead of repeated + # boilerplate as is above XD: + # - https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows + # - https://docs.github.com/en/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + # - https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#jobsjob_idif + testing-windows: + name: '${{ matrix.os }} Python ${{ matrix.python }} - ${{ matrix.spawn_backend }}' + timeout-minutes: 9 + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + os: [windows-latest] + python: ['3.9'] + spawn_backend: ['trio', 'mp'] + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: '${{ matrix.python }}' + + - name: Install dependencies + run: pip install -U . -r requirements-test.txt -r requirements-docs.txt --upgrade-strategy eager + + - name: Run tests + run: pytest tests/ --spawn-backend=${{ matrix.spawn_backend }} -rs From 6a063b3814c8c62f2c3ec4f5fc26399a6c232d9b Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 2 Nov 2021 12:59:26 -0400 Subject: [PATCH 4/4] Bump release date by a day --- NEWS.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS.rst b/NEWS.rst index cf56443..286525a 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -4,7 +4,7 @@ Changelog .. towncrier release notes start -tractor 0.1.0a3 (2021-11-01) +tractor 0.1.0a3 (2021-11-02) ============================ Features