Skip to content

Conversation

@AraHaan
Copy link
Collaborator

@AraHaan AraHaan commented Jan 9, 2025

Implements #36.

@AraHaan AraHaan added the feature New feature or request label Jan 9, 2025
@AraHaan AraHaan requested a review from ZeroIntensity January 9, 2025 16:11
@netlify
Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for awaitable canceled.

Name Link
🔨 Latest commit 561b49c
🔍 Latest deploy log https://app.netlify.com/sites/awaitable/deploys/678023e69f74d90008c192b3

Copy link
Owner

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

Mostly LGTM.

Copy link
Owner

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

You need to also update the ctypes bindings in src/pyawaitable/bindings.py and add tests with them.

@AraHaan AraHaan added this to the 1.4.0 milestone Jan 9, 2025
@AraHaan
Copy link
Collaborator Author

AraHaan commented Jan 9, 2025

I wonder if the test should start out as sync and simply use asyncio.run to test the defined awaitable in the test code.

@ZeroIntensity
Copy link
Owner

Why? pytest.mark.asyncio works fine. (And, I'm not sure if asyncio.run supports non-native coroutines.)

Copy link
Owner

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

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

I'll deal with documentation after this gets merged.

@ZeroIntensity ZeroIntensity changed the title Add defer await callback feature. Add PyAwaitable_DeferAwait Jan 9, 2025
@AraHaan AraHaan merged commit 4c5303f into master Jan 9, 2025
26 checks passed
@AraHaan AraHaan deleted the add-defer-callback branch January 9, 2025 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a special type of awaitable callback that defers calling a python coroutine until the awaitable object is awaited.

3 participants