Skip to content

Commit 6de4916

Browse files
authored
Update Python SDK to 1.20.0 (#264)
* v1.20.0 * Use new mac runners, run CI against 3.14 instead of 3.13 * update uv.lock * upgrade uv.lock for pyarrow for 3.14 support * upgrade uv.lock for orjson for 3.14 support * pydantic should be the last package to upgrade * tiktoken * loosen ver for gevent * grpcio * Skip test for trio-async for Python 3.14 and newer, add to README * Didn't place the skip high enough * Put it too high * black to ruff * Add to readme for 3.14 for Sentry * format
1 parent 74fdf50 commit 6de4916

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+501
-429
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ jobs:
1515
strategy:
1616
fail-fast: true
1717
matrix:
18-
python: ["3.10", "3.13"]
18+
python: ["3.10", "3.14"]
1919
os: [ubuntu-latest, macos-intel, macos-arm, windows-latest]
2020
include:
2121
- os: macos-intel
22-
runsOn: macos-13
22+
runsOn: macos-15-intel
2323
- os: macos-arm
24-
runsOn: macos-14
24+
runsOn: macos-latest
2525
runs-on: ${{ matrix.runsOn || matrix.os }}
2626
steps:
2727
- uses: astral-sh/setup-uv@v5

bedrock/basic/workflows.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
class BasicBedrockWorkflow:
1111
@workflow.run
1212
async def run(self, prompt: str) -> str:
13-
1413
workflow.logger.info("Prompt: %s" % prompt)
1514

1615
response = await workflow.execute_activity_method(

bedrock/entity/workflows.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ async def run(
3131
self,
3232
params: BedrockParams,
3333
) -> str:
34-
3534
if params and params.conversation_summary:
3635
self.conversation_history.append(
3736
("conversation_summary", params.conversation_summary)

cloud_export_to_parquet/workflows.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
with workflow.unsafe.imports_passed_through():
88
from cloud_export_to_parquet.data_trans_activities import (
99
DataTransAndLandActivityInput,
10+
GetObjectKeysActivityInput,
1011
data_trans_and_land,
1112
get_object_keys,
12-
GetObjectKeysActivityInput,
1313
)
1414
from dataclasses import dataclass
1515

custom_converter/shared.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self) -> None:
5454
# Just add ours as first before the defaults
5555
super().__init__(
5656
GreetingEncodingPayloadConverter(),
57-
*DefaultPayloadConverter.default_encoding_payload_converters
57+
*DefaultPayloadConverter.default_encoding_payload_converters,
5858
)
5959

6060

custom_metric/worker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def intercept_activity(
2525

2626
class CustomScheduleToStartInterceptor(ActivityInboundInterceptor):
2727
async def execute_activity(self, input: ExecuteActivityInput):
28-
2928
schedule_to_start = (
3029
activity.info().started_time
3130
- activity.info().current_attempt_scheduled_time

eager_wf_start/run.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313

1414
async def main():
15-
1615
# Note that the worker and client run in the same process and share the same client connection.
1716
config = ClientConfig.load_client_connect_config()
1817
config.setdefault("target_host", "localhost:7233")

env_config/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-

gevent_async/worker.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ async def async_main():
4848
# running this async main. The max_workers here needs to have enough room to
4949
# support the max concurrent activities/workflows settings.
5050
with GeventExecutor(max_workers=200) as executor:
51-
5251
# Run a worker for the workflow and activities
5352
async with Worker(
5453
client,
@@ -68,7 +67,6 @@ async def async_main():
6867
max_concurrent_activities=100,
6968
max_concurrent_workflow_tasks=100,
7069
):
71-
7270
# Wait until interrupted
7371
logging.info("Worker started, ctrl+c to exit")
7472
await interrupt_event.wait()

hello/hello_activity.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ async def main():
6161
# This same thread pool could be passed to multiple workers if desired.
6262
activity_executor=ThreadPoolExecutor(5),
6363
):
64-
6564
# While the worker is running, use the client to run the workflow and
6665
# print out its result. Note, in many production setups, the client
6766
# would be in a completely separate process from the worker.

0 commit comments

Comments
 (0)