-
Notifications
You must be signed in to change notification settings - Fork 789
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
create_exception
macro triggers unexpected_cfgs
lint in nightly build
#4743
Comments
Which patch version are you using? This should be fixed since 0.22.4, please try updating? (Was done in #4589 but I missed a CHANGELOG entry.) |
EDIT: I see your code says 0.22.6, will investigate... |
Ah, no I take that back, I see the Is it possible for you to update to 0.23? It is definitely fixed on |
Thanks for looking into it! We will switch to 0.23 soon enough, so I'll keep our workaround until then. No problem at all. Good to know it's fixed on main! I'll close this then. |
Bug Description
At Polars we have just updated our toolchain to
nightly-2024-11-29
. This version includes an update to theunexpected_cfgs
check that also checks external macros. See rust-lang/rust#132577This seems to indicate the macro "leaves ineffective cfgs in the users code".
Not exactly sure what the fix should be here, but I figured I'd report it.
Steps to Reproduce
nightly-2024-11-29
pyo3::create_exception
macro.cargo build
Backtrace
Your operating system and version
Ubuntu 24.04.1
Your Python version (
python --version
)Python 3.12.2
Your Rust version (
rustc --version
)rustc 1.85.0-nightly (a2545fd6f 2024-11-28)
Your PyO3 version
0.22
How did you install python? Did you use a virtualenv?
pyenv
yes I am using a virtual environment
Additional Info
My current workaround is to use
#![allow(unexpected_cfgs)]
at the top of myexceptions.rs
module.The text was updated successfully, but these errors were encountered: