[Feature Request] Support InterpreterPoolExecutor from py3.14
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
Start in worker/_activity.py and trace how activity work is submitted to the executor, comparing the current ThreadPoolExecutor assumptions with Python 3.14's InterpreterPoolExecutor behavior. Verify the change with an InterpreterPoolExecutor activity run and confirm that execution no longer raises NotShareableError.
Written by the indexing model from the issue text.
Description
Python 3.14 adds InterpreterPoolExecutor, a subclass of ThreadPoolExecutor that runs tasks in isolated subinterpreters.
The Temporal Python SDK appears to assume ThreadPoolExecutor-like behavior in worker/_activity.py, which doesn’t hold for InterpreterPoolExecutor. Using it as an activity executor leads to the following errors:
concurrent.interpreters.NotShareableError: (Queue(2), <built-in method run of _contextvars.Context object at 0x1015fec00>, (<function _execute_sync_activity at 0x1014171c0>, Info(activity_id='61', activity_type='task', attempt=3, current_attempt_scheduled_time=datetime.datetime(2025, 10, 13, 9, 32, 51, 324811, tzinfo=datetime.timezone.utc), heartbeat_details=[], heartbeat_timeout=None, is_local=False, schedule_to_close_timeout=None, scheduled_time=datetime.datetime(2025, 10, 13, 9, 32, 47, 122424, tzinfo=datetime.timezone.utc), start_to_close_timeout=datetime.timedelta(seconds=36000), started_time=datetime.datetime(2025, 10, 13, 9, 32, 51, 692224, tzinfo=datetime.timezone.utc), task_queue='hello-task-queue', task_token=b'\n$0199c8e3-3716-7223-b18b-3a720150440f\x1231906eac1-8e34-4119-b7d5-0da5e8ffefd4-hello-workflow\x1a$0199dcea-4e2f-7cb2-bf9b-ef9859498ab6 A(\x032\x0261B\x04taskJ\x08\x08\x01\x10\x93\xb4A\x18\x01', workflow_id='1906eac1-8e34-4119-b7d5-0da5e8ffefd4-hello-workflow', workflow_namespace='default', workflow_run_id='0199dcea-4e2f-7cb2-bf9b-ef9859498ab6', workflow_type='GreetingWorkflow', priority=Priority(priority_key=None, fairness_key=None, fairness_weight=None), retry_policy=RetryPolicy(initial_interval=datetime.timedelta(seconds=1), backoff_coefficient=2.0, maximum_interval=datetime.timedelta(seconds=100), maximum_attempts=0, non_retryable_error_types=None)), <function _ActivityInboundImpl.execute_activity.<locals>.<lambda> at 0x1016381a0>, <temporalio.worker._activity._ThreadExceptionRaiser object at 0x10161df60>, <threading.Event at 0x101620fb0: unset>, <threading.Event at 0x10152d810: unset>, <temporalio.converter.DefaultPayloadConverter object at 0x1010e4c20>, <temporalio.common._NoopMetricMeter object at 0x100d9be00>, _ActivityCancellationDetailsHolder(details=None), <function task at 0x101529430>), {}) does not support cross-interpreter data
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 241
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 49
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from temporalio/sdk-python
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
temporalio/sdk-python#1517 · 10 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
temporalio/sdk-python#496 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
temporalio/sdk-python#1890 ·
-
[Bug] Local activity resolutions regrouped on replay since 1.32.0, delivering the wrong payload Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
temporalio/sdk-python#1881 · 1 comment ·
-
bug
temporalio/sdk-python#1817 · 1 comment · 1 assignee ·
All issues in temporalio/sdk-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100