diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1c74a791..3869d72e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,9 @@ jobs: - if: ${{ !endsWith(matrix.os, '-arm') }} uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python }} + # Due to a yet-uninvestigated change in 3.11.6 that breaks the Rust + # linker on Windows, we are pinning 3.11 to 3.11.5 here + python-version: ${{ matrix.python == '3.11' && '3.11.5' || matrix.python }} - if: ${{ matrix.os == 'ubuntu-arm' }} uses: deadsnakes/action@v2.1.1 with: diff --git a/README.md b/README.md index 83b99532..bc311e34 100644 --- a/README.md +++ b/README.md @@ -282,7 +282,7 @@ Some things to note about the above code: does the same thing * Clients can have many more options not shown here (e.g. data converters and interceptors) * A string can be used instead of the method reference to call a workflow by name (e.g. if defined in another language) -* Clients to not work across forks +* Clients do not work across forks Clients also provide a shallow copy of their config for use in making slightly different clients backed by the same connection. For instance, given the `client` above, this is how to have a client in another namespace: @@ -732,6 +732,9 @@ The time-skipping `temporalio.testing.WorkflowEnvironment` can be created via th This internally downloads the Temporal time-skipping test server to a temporary directory if it doesn't already exist, then starts the test server which has special APIs for skipping time. +**NOTE:** The time-skipping test environment does not work on ARM. The SDK will try to download the x64 binary on macOS +for use with the Intel emulator, but for Linux or Windows ARM there is no proper time-skipping test server at this time. + ##### Automatic Time Skipping Anytime a workflow result is waited on, the time-skipping server automatically advances to the next event it can. To @@ -1272,8 +1275,9 @@ Below are known compatibility issues with the Python SDK. #### gevent Patching When using `gevent.monkey.patch_all()`, asyncio event loops can get messed up, especially those using custom event loops -like Temporal. See [this gevent issue](https://github.com/gevent/gevent/issues/982) and -[this Python SDK issue](https://github.com/temporalio/sdk-python/issues/59) for more details. +like Temporal. See [this gevent issue](https://github.com/gevent/gevent/issues/982). This is a known incompatibility and +users are encouraged to not use gevent in asyncio applications (including Temporal). But if you must, there is +[a sample](https://github.com/temporalio/samples-python/tree/main/gevent_async) showing how it is possible. # Development diff --git a/tests/test_client.py b/tests/test_client.py index 913f3aef..7ce9d307 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -910,10 +910,7 @@ async def test_schedule_backfill( pytest.skip("Java test server doesn't support schedules") await assert_no_schedules(client) - # Just in case it's on the minute boundary, move it off - now = datetime.utcnow() - if now.second == 0: - now += timedelta(seconds=1) + begin = datetime(year=2020, month=1, day=20, hour=5) # Create paused schedule that runs every minute and has two backfills handle = await client.create_schedule( @@ -934,8 +931,8 @@ async def test_schedule_backfill( ), backfill=[ ScheduleBackfill( - start_at=now - timedelta(minutes=30), - end_at=now - timedelta(minutes=29), + start_at=begin - timedelta(minutes=30), + end_at=begin - timedelta(minutes=29), overlap=ScheduleOverlapPolicy.ALLOW_ALL, ) ], @@ -945,13 +942,13 @@ async def test_schedule_backfill( # Add two more backfills and and -2m will be deduped await handle.backfill( ScheduleBackfill( - start_at=now - timedelta(minutes=4), - end_at=now - timedelta(minutes=2), + start_at=begin - timedelta(minutes=4), + end_at=begin - timedelta(minutes=2), overlap=ScheduleOverlapPolicy.ALLOW_ALL, ), ScheduleBackfill( - start_at=now - timedelta(minutes=2), - end_at=now, + start_at=begin - timedelta(minutes=2), + end_at=begin, overlap=ScheduleOverlapPolicy.ALLOW_ALL, ), ) diff --git a/tests/testing/test_workflow.py b/tests/testing/test_workflow.py index e0c1117b..22bdd818 100644 --- a/tests/testing/test_workflow.py +++ b/tests/testing/test_workflow.py @@ -132,8 +132,7 @@ async def test_workflow_env_time_skipping_heartbeat_timeout(): # Check the causes until heartbeat timeout assert isinstance(err.value.cause, ActivityError) assert isinstance(err.value.cause.cause, TimeoutError) - assert isinstance(err.value.cause.cause.cause, TimeoutError) - assert err.value.cause.cause.cause.type == TimeoutType.HEARTBEAT + assert err.value.cause.cause.type == TimeoutType.HEARTBEAT @workflow.defn