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

docs: Precise the abscense of py: Python for the #[pyo3(signature)] #2929

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

jjerphan
Copy link
Contributor

Hi,

First, thank you for working on PyO3!

I think this adds a precision which was not obvious when migrating to 0.18.0 conventions.

What do you think? Also, should something be added to the migration guide in this regard?

Thank you!

@davidhewitt davidhewitt added the CI-skip-changelog Skip checking changelog entry label Jan 29, 2023
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, good to have this in documentation! It also inspired me to add #2930 to further help users.

I just have one suggestion on wording here...

guide/src/function/signature.md Outdated Show resolved Hide resolved
Copy link
Member

@mejrs mejrs left a comment

Choose a reason for hiding this comment

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

Looks good to me, this doesn't compile though 🙂

guide/src/function/signature.md Outdated Show resolved Hide resolved
guide/src/function/signature.md Show resolved Hide resolved
guide/src/function/signature.md Outdated Show resolved Hide resolved
@mejrs
Copy link
Member

mejrs commented Feb 2, 2023

Just one thing 🙂

error[E0425]: cannot find function, tuple struct or tuple variant `OK` in this scope
   --> src/lib.rs:561:5
    |
16  |     OK(())
    |     ^^ help: a tuple variant with a similar name exists (notice the capitalization): `Ok`

bors bot added a commit that referenced this pull request Feb 3, 2023
2930: add better error message for Python in signature r=adamreichold a=davidhewitt

Inspired by #2929, this just adds a better error message when `Python` arguments are accidentally included in the signature.

Co-authored-by: David Hewitt <[email protected]>
Copy link
Member

@davidhewitt davidhewitt left a comment

Choose a reason for hiding this comment

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

Thanks, this looks great to me! I'll force-push this to squash, and then merge.

@davidhewitt davidhewitt force-pushed the docs/pyo3-signature-precise-py-argument branch from 2652cb7 to 9306d56 Compare February 3, 2023 20:57
@davidhewitt
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 3, 2023

Build succeeded:

@bors bors bot merged commit 4d80475 into PyO3:main Feb 3, 2023
@jjerphan jjerphan deleted the docs/pyo3-signature-precise-py-argument branch February 4, 2023 05:06
@jjerphan
Copy link
Contributor Author

jjerphan commented Feb 4, 2023

Thank you @davidhewitt ! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI-skip-changelog Skip checking changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants