PyO3 / rust-numpy

PyO3-based Rust bindings of the NumPy C-API
BSD 2-Clause "Simplified" License
1.11k stars 106 forks source link

Silence non_local_definition warnings until they fixed upstream in PyO3's macros #427

Closed adamreichold closed 5 months ago

adamreichold commented 5 months ago

@davidhewitt @messense Does one of you know whether the relevant Codecov token is configured for the rust-numpy repository? We had intermittent upload failures in the past and I think this might be related to the missing token which I tried to explicitly forward here. Since I do not have that access, could one of you have look? Thanks!

davidhewitt commented 5 months ago

I have tried to update this now, let's see if a rerun works 👀

adamreichold commented 5 months ago

I have tried to update this now, let's see if a rerun works 👀

Thanks! Looks better now.

Regarding the actual code changes, I wonder if I should just wait for 0.21.2 on Tuesday and avoid the temporary suppression of lints? This is mainly affecting nightly users after all.

davidhewitt commented 5 months ago

Regarding the actual code changes, I wonder if I should just wait for 0.21.2 on Tuesday and avoid the temporary suppression of lints? This is mainly affecting nightly users after all.

Indeed seeing this PR was part of what spurred me on to get the 0.21.2 patch shipped! Hopefully the code changes here are no longer necessary :)

adamreichold commented 5 months ago

PyO3 is still not completely transparent here as I had to move the definitions outside of function scope (which I don't think I would need to do for plain Rust struct/impl blocks), but let's merge this until we have a long-term plan for this lint.

davidhewitt commented 5 months ago

Hmm that's frustrating; I guess we need to figure out what is actually nightly being overly strict and what's definitely something to change on the PyO3 side...