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

fix clippy-beta #4375

Merged
merged 1 commit into from
Jul 23, 2024
Merged

fix clippy-beta #4375

merged 1 commit into from
Jul 23, 2024

Conversation

Icxolu
Copy link
Contributor

@Icxolu Icxolu commented Jul 23, 2024

Dead code detection getting better and linted a case where our reexport of PyFunction

pyo3/src/types/mod.rs

Lines 25 to 26 in b2b5203

#[cfg(all(not(Py_LIMITED_API), not(PyPy), not(GraalPy)))]
pub use self::function::PyFunction;

has a more restrictive gate than its type definition

pyo3/src/types/function.rs

Lines 183 to 184 in b2b5203

#[cfg(all(not(Py_LIMITED_API), not(all(PyPy, not(Py_3_8)))))]
pub struct PyFunction(PyAny);

So that type is actually not nameable on PyPy 3.8+ but it was actually intended to be.

This updates the cfg on the reexport to reflect the cfgs on the type definition.

@Icxolu Icxolu added the CI-skip-changelog Skip checking changelog entry label Jul 23, 2024
@davidhewitt
Copy link
Member

Actually see #2542 - maybe we need to cfg the struct away on PyPy?

@Icxolu
Copy link
Contributor Author

Icxolu commented Jul 23, 2024

In #2838 you did re-enable it explicitly for PyPy 3.8+

@davidhewitt
Copy link
Member

Ah right yes sorry 👍 🤣

@davidhewitt davidhewitt added this pull request to the merge queue Jul 23, 2024
Merged via the queue into PyO3:main with commit 4a1355b Jul 23, 2024
43 checks passed
@Icxolu Icxolu deleted the fix-clippy branch July 23, 2024 20:25
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