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

pyfunction: better error message with async fn #1633

Merged
merged 1 commit into from
May 26, 2021

Conversation

davidhewitt
Copy link
Member

This PR adds a better error message when users try to use async fn, which points them to the new tracking issue #1632. We can update that issue over time to keep useful up-to-date information on thirdparty options like pyo3-asyncio.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

I love this attention to detail! This is really useful and user-friendly.

@davidhewitt
Copy link
Member Author

😅 proc macros are awesome, but the error messages users get when proc macros expand to non-functional code are usually just gibberish! At least in this case we can catch this one early and give them something better to read.

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

Nice!

@messense messense merged commit 5523ad6 into PyO3:main May 26, 2021
@davidhewitt davidhewitt deleted the async-fn-error branch May 26, 2021 07:37
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.

3 participants