Skip to content

Commit

Permalink
Minor doc update (#305)
Browse files Browse the repository at this point in the history
Fixes #293
Fixes #285
Fixes #291
  • Loading branch information
cretz authored Mar 30, 2023
1 parent d790468 commit 61166af
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 107 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ event loop. This means task management, sleep, cancellation, etc have all been d
- [Workflow Replay](#workflow-replay)
- [OpenTelemetry Support](#opentelemetry-support)
- [Protobuf 3.x vs 4.x](#protobuf-3x-vs-4x)
- [Known Compatibility Issues](#known-compatibility-issues)
- [gevent Patching](#gevent-patching)
- [Development](#development)
- [Building](#building)
- [Prepare](#prepare)
Expand Down Expand Up @@ -1230,6 +1232,16 @@ versions can cause issues with the sandbox due to global state sharing. Temporal
protobuf 4.x library unless you absolutely cannot at which point some proto libraries may have to be marked as
[Passthrough Modules](#passthrough-modules).

### Known Compatibility Issues

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.

# Development

The Python SDK is built to work with Python 3.7 and newer. It is built using
Expand Down
9 changes: 8 additions & 1 deletion temporalio/worker/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@
WorkflowInterceptorClassInput,
WorkflowOutboundInterceptor,
)
from ._replayer import Replayer, ReplayerConfig
from ._replayer import (
Replayer,
ReplayerConfig,
WorkflowReplayResult,
WorkflowReplayResults,
)
from ._worker import Worker, WorkerConfig
from ._workflow_instance import (
UnsandboxedWorkflowRunner,
Expand All @@ -34,6 +39,8 @@
"WorkerConfig",
"Replayer",
"ReplayerConfig",
"WorkflowReplayResult",
"WorkflowReplayResults",
# Interceptor base classes
"Interceptor",
"ActivityInboundInterceptor",
Expand Down
4 changes: 2 additions & 2 deletions temporalio/worker/_workflow_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,14 +800,14 @@ def workflow_start_activity(
self,
activity: Any,
*args: Any,
activity_id: Optional[str],
task_queue: Optional[str],
schedule_to_close_timeout: Optional[timedelta],
schedule_to_start_timeout: Optional[timedelta],
start_to_close_timeout: Optional[timedelta],
heartbeat_timeout: Optional[timedelta],
retry_policy: Optional[temporalio.common.RetryPolicy],
cancellation_type: temporalio.workflow.ActivityCancellationType,
activity_id: Optional[str],
) -> temporalio.workflow.ActivityHandle[Any]:
# Get activity definition if it's callable
name: str
Expand Down Expand Up @@ -899,13 +899,13 @@ def workflow_start_local_activity(
self,
activity: Any,
*args: Any,
activity_id: Optional[str],
schedule_to_close_timeout: Optional[timedelta],
schedule_to_start_timeout: Optional[timedelta],
start_to_close_timeout: Optional[timedelta],
retry_policy: Optional[temporalio.common.RetryPolicy],
local_retry_threshold: Optional[timedelta],
cancellation_type: temporalio.workflow.ActivityCancellationType,
activity_id: Optional[str],
) -> temporalio.workflow.ActivityHandle[Any]:
# Get activity definition if it's callable
name: str
Expand Down
Loading

0 comments on commit 61166af

Please sign in to comment.