Skip to content

deprecate wrap_pyfunction with py argument#3954

Merged
davidhewitt merged 4 commits intoPyO3:mainfrom
Icxolu:deprecate-wrap-pyfunction-py
Mar 12, 2024
Merged

deprecate wrap_pyfunction with py argument#3954
davidhewitt merged 4 commits intoPyO3:mainfrom
Icxolu:deprecate-wrap-pyfunction-py

Conversation

@Icxolu
Copy link
Member

@Icxolu Icxolu commented Mar 11, 2024

Following #3847

The Python token in wrap_pyfunction is not handled automatically by WrapPyFunctionArg, for backwards compatibility. This uses deref specialization to deprecate this variant.

The Python token in `wrap_pyfunction` is not handled automatically by
`WrapPyFunctionArg`, for backwards compatibility. This uses deref
specialization to deprecate this variant.
@Icxolu Icxolu added the CI-skip-changelog Skip checking changelog entry label Mar 11, 2024
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, and sorry it took a couple days to get to this; a bit overloaded with family the last couple days. I will look at the other PRs tomorrow 👍

Comment on lines +80 to +81
// should lint but currently does not
let _ = wrap_pyfunction!(double)(py);
Copy link
Member

Choose a reason for hiding this comment

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

Yeah I suspect because of type inference within the closure this one will be hard to make work. But maybe there's a smart way!

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it kept inferring from the inside instead of the outside.

@davidhewitt davidhewitt added this pull request to the merge queue Mar 12, 2024
Merged via the queue into PyO3:main with commit ee89b2e Mar 12, 2024
@Icxolu Icxolu deleted the deprecate-wrap-pyfunction-py branch March 13, 2024 17:16
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.

2 participants