Skip to content

Commit a630543

Browse files
committed
s/temporalio.bridge.temporal_sdk_bridge/rg-replace temporal_sdk_bridge/
1 parent 312c8f1 commit a630543

File tree

7 files changed

+23
-27
lines changed

7 files changed

+23
-27
lines changed

temporalio/bridge/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name = "temporal-sdk-bridge"
33
version = "0.1.0"
44
edition = "2021"
55

6-
[package.metadata.maturin]
7-
module-name = "temporalio.bridge.temporal_sdk_bridge"
8-
9-
106
[lib]
117
name = "temporal_sdk_bridge"
128
crate-type = ["cdylib"]

temporalio/bridge/client.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import google.protobuf.message
1313

1414
import temporalio.bridge.runtime
15-
import temporalio.bridge.temporal_sdk_bridge
16-
from temporalio.bridge.temporal_sdk_bridge import RPCError
15+
import temporal_sdk_bridge
16+
from temporal_sdk_bridge import RPCError
1717

1818

1919
@dataclass
@@ -94,15 +94,15 @@ async def connect(
9494
"""Establish connection with server."""
9595
return Client(
9696
runtime,
97-
await temporalio.bridge.temporal_sdk_bridge.connect_client(
97+
await temporal_sdk_bridge.connect_client(
9898
runtime._ref, config
9999
),
100100
)
101101

102102
def __init__(
103103
self,
104104
runtime: temporalio.bridge.runtime.Runtime,
105-
ref: temporalio.bridge.temporal_sdk_bridge.ClientRef,
105+
ref: temporal_sdk_bridge.ClientRef,
106106
):
107107
"""Initialize client with underlying SDK Core reference."""
108108
self._runtime = runtime

temporalio/bridge/metric.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Mapping, Optional, Union
99

1010
import temporalio.bridge.runtime
11-
import temporalio.bridge.temporal_sdk_bridge
11+
import temporal_sdk_bridge
1212

1313

1414
class MetricMeter:
@@ -17,13 +17,13 @@ class MetricMeter:
1717
@staticmethod
1818
def create(runtime: temporalio.bridge.runtime.Runtime) -> Optional[MetricMeter]:
1919
"""Create optional metric meter."""
20-
ref = temporalio.bridge.temporal_sdk_bridge.new_metric_meter(runtime._ref)
20+
ref = temporal_sdk_bridge.new_metric_meter(runtime._ref)
2121
if not ref:
2222
return None
2323
return MetricMeter(ref)
2424

2525
def __init__(
26-
self, ref: temporalio.bridge.temporal_sdk_bridge.MetricMeterRef
26+
self, ref: temporal_sdk_bridge.MetricMeterRef
2727
) -> None:
2828
"""Initialize metric meter."""
2929
self._ref = ref
@@ -161,7 +161,7 @@ class MetricAttributes:
161161
def __init__(
162162
self,
163163
meter: MetricMeter,
164-
ref: temporalio.bridge.temporal_sdk_bridge.MetricAttributesRef,
164+
ref: temporal_sdk_bridge.MetricAttributesRef,
165165
) -> None:
166166
"""Initialize attributes."""
167167
self._meter = meter

temporalio/bridge/runtime.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
from typing_extensions import Protocol
1212

13-
import temporalio.bridge.temporal_sdk_bridge
13+
import temporal_sdk_bridge
1414

1515

1616
class Runtime:
@@ -19,13 +19,13 @@ class Runtime:
1919
@staticmethod
2020
def _raise_in_thread(thread_id: int, exc_type: Type[BaseException]) -> bool:
2121
"""Internal helper for raising an exception in thread."""
22-
return temporalio.bridge.temporal_sdk_bridge.raise_in_thread(
22+
return temporal_sdk_bridge.raise_in_thread(
2323
thread_id, exc_type
2424
)
2525

2626
def __init__(self, *, telemetry: TelemetryConfig) -> None:
2727
"""Create SDK Core runtime."""
28-
self._ref = temporalio.bridge.temporal_sdk_bridge.init_runtime(telemetry)
28+
self._ref = temporal_sdk_bridge.init_runtime(telemetry)
2929

3030
def retrieve_buffered_metrics(self, durations_as_seconds: bool) -> Sequence[Any]:
3131
"""Get buffered metrics."""

temporalio/bridge/testing.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from typing import Optional, Sequence
1010

1111
import temporalio.bridge.runtime
12-
import temporalio.bridge.temporal_sdk_bridge
12+
import temporal_sdk_bridge
1313

1414

1515
@dataclass
@@ -53,7 +53,7 @@ async def start_dev_server(
5353
) -> EphemeralServer:
5454
"""Start a dev server instance."""
5555
return EphemeralServer(
56-
await temporalio.bridge.temporal_sdk_bridge.start_dev_server(
56+
await temporal_sdk_bridge.start_dev_server(
5757
runtime._ref, config
5858
)
5959
)
@@ -64,12 +64,12 @@ async def start_test_server(
6464
) -> EphemeralServer:
6565
"""Start a test server instance."""
6666
return EphemeralServer(
67-
await temporalio.bridge.temporal_sdk_bridge.start_test_server(
67+
await temporal_sdk_bridge.start_test_server(
6868
runtime._ref, config
6969
)
7070
)
7171

72-
def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.EphemeralServerRef):
72+
def __init__(self, ref: temporal_sdk_bridge.EphemeralServerRef):
7373
"""Initialize an ephemeral server."""
7474
self._ref = ref
7575

temporalio/bridge/worker.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
import temporalio.bridge.proto.workflow_activation
3030
import temporalio.bridge.proto.workflow_completion
3131
import temporalio.bridge.runtime
32-
import temporalio.bridge.temporal_sdk_bridge
32+
import temporal_sdk_bridge
3333
import temporalio.converter
3434
import temporalio.exceptions
35-
from temporalio.bridge.temporal_sdk_bridge import (
35+
from temporal_sdk_bridge import (
3636
CustomSlotSupplier as BridgeCustomSlotSupplier,
3737
)
38-
from temporalio.bridge.temporal_sdk_bridge import PollShutdownError
38+
from temporal_sdk_bridge import PollShutdownError
3939

4040

4141
@dataclass
@@ -111,7 +111,7 @@ class Worker:
111111
def create(client: temporalio.bridge.client.Client, config: WorkerConfig) -> Worker:
112112
"""Create a bridge worker from a bridge client."""
113113
return Worker(
114-
temporalio.bridge.temporal_sdk_bridge.new_worker(
114+
temporal_sdk_bridge.new_worker(
115115
client._runtime._ref, client._ref, config
116116
)
117117
)
@@ -120,17 +120,17 @@ def create(client: temporalio.bridge.client.Client, config: WorkerConfig) -> Wor
120120
def for_replay(
121121
runtime: temporalio.bridge.runtime.Runtime,
122122
config: WorkerConfig,
123-
) -> Tuple[Worker, temporalio.bridge.temporal_sdk_bridge.HistoryPusher]:
123+
) -> Tuple[Worker, temporal_sdk_bridge.HistoryPusher]:
124124
"""Create a bridge replay worker."""
125125
[
126126
replay_worker,
127127
pusher,
128-
] = temporalio.bridge.temporal_sdk_bridge.new_replay_worker(
128+
] = temporal_sdk_bridge.new_replay_worker(
129129
runtime._ref, config
130130
)
131131
return Worker(replay_worker), pusher
132132

133-
def __init__(self, ref: temporalio.bridge.temporal_sdk_bridge.WorkerRef) -> None:
133+
def __init__(self, ref: temporal_sdk_bridge.WorkerRef) -> None:
134134
"""Create SDK core worker from a bridge worker."""
135135
self._ref = ref
136136

temporalio/worker/workflow_sandbox/_restrictions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ def with_child_unrestricted(self, *child_path: str) -> SandboxMatcher:
459459
# Must pass through the entire bridge in even the most minimum causes
460460
# because PyO3 does not allow re-init since 0.17. See
461461
# https://github.com/PyO3/pyo3/pull/2523.
462-
"temporalio.bridge.temporal_sdk_bridge",
462+
"temporal_sdk_bridge",
463463
}
464464

465465
SandboxRestrictions.passthrough_modules_with_temporal = (

0 commit comments

Comments
 (0)