Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor doc update #305

Merged
merged 4 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it break the event loop in a predictable way? Just wondering if we could put the error here or in the github issue so people searching for the specific error find this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, just need research. I admit I have not set up gevent and done all the testing. Can probably just raise an error in client creation if gevent has patched asyncio. I'm just being lazy atm in just adding docs. Given time, I will do full research around #59.

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