-
-
Notifications
You must be signed in to change notification settings - Fork 141
fix pyright and pytest --nightly #819
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this, and while we now don't fail, shouldn't we be trying to catch the FutureWarning
cases in the tests? There were some pytest_warns_bounded()
that you removed, but if you changed it to FutureWarning
, it would have been correct.
The other advantage of trying to catch the warnings now is that when it is invalid due to a future release (e.g., 2.2 or 3.0), we know we have to change the tests to indicate this is invalid usage, and also change the stubs to disallow the usage. So by having the pytest_warns_bounded
in there, those changes are easier to spot.
That would be good! Or should we already remove this functionality (assuming the new behavior is already possible)?
I didn't realize - will fix that. |
No, because for the current release, the "future behavior" is allowed without deprecation. Assuming the next release is version 2.2, when that's released, we then remove the deprecated behavior from the stubs. |
How about warnings that are caught with |
Yes, that is what should happen. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @twoertwein
I will try to look into that in the coming weeks - I have been busy with my thesis and job search. |
assert_type()
to assert the type of any return valueThere are still many FutureWarnings triggered by
poe pytest --nightly
but they do not seem to fail pytest.