Skip to content

fix(python): preserve reusable replies and unit continuations - #5082

Merged
dbrattli merged 1 commit into
mainfrom
fix/python-async-reply-reuse
Oct 15, 2026
Merged

dbrattli merged 1 commit into
mainfrom
fix/python-async-reply-reuse

Conversation

@dbrattli

Copy link
Copy Markdown
Collaborator

Follow-up to #5081, targeting the branch for #5062.

Reusing a Python PostAndAsyncReply computation could hang after its first execution. Consume each waiting continuation once while retaining the cached reply for later executions.

Unit success continuations again accept both erased calls and an explicit None from generic callers. Apply the existing Python typing adapter to direct generic callback arguments as well as nested callbacks.

The duplicate-reply tests now await mailbox body completion before checking their logs, avoiding a scheduling race on .NET. Add regressions for reusable replies, forwarded generic unit values, and reply/start races.

@dbrattli
dbrattli marked this pull request as ready for review October 15, 2026 18:38
@dbrattli
dbrattli marked this pull request as draft October 15, 2026 18:40
@dbrattli
dbrattli marked this pull request as ready for review October 15, 2026 18:49
@dbrattli
dbrattli force-pushed the fix/python-async-reply-reuse branch from 6b81384 to 14df95b Compare October 15, 2026 19:11
@dbrattli
dbrattli force-pushed the fix/async-cleanup-generic-continuations branch from 18ce662 to efe486d Compare October 15, 2026 19:11
Base automatically changed from fix/async-cleanup-generic-continuations to main October 15, 2026 20:23
@dbrattli
dbrattli force-pushed the fix/python-async-reply-reuse branch from 14df95b to a20e7c2 Compare October 15, 2026 20:25
@github-actions

Copy link
Copy Markdown
Contributor

Python Type Checking Results (Pyright)

Metric Value
Total errors 36
Files with errors 5
Excluded files 4
New errors ❌ Yes

⚠️ New Files with Errors

These files are NOT in the exclude list and must be fixed or added to pyrightconfig.ci.json:

File Errors Status
temp/tests/Python/fable_modules/thoth_json_core/codec.py 2 ⚠️ NEW
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_hash_set.py 18 Excluded
temp/tests/Python/test_applicative.py 12 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 2 Excluded

@dbrattli
dbrattli merged commit f19e2c5 into main Oct 15, 2026
35 of 36 checks passed
@dbrattli
dbrattli deleted the fix/python-async-reply-reuse branch October 15, 2026 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant