Skip to content

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

Merged
merged 3 commits into from
Nov 26, 2023
Merged

fix pyright and pytest --nightly #819

merged 3 commits into from
Nov 26, 2023

Conversation

twoertwein
Copy link
Member

There are still many FutureWarnings triggered by poe pytest --nightly but they do not seem to fail pytest.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a 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.

@twoertwein
Copy link
Member Author

I tried this, and while we now don't fail, shouldn't we be trying to catch the FutureWarning cases in the tests?

That would be good! Or should we already remove this functionality (assuming the new behavior is already possible)?

There were some pytest_warns_bounded() that you removed, but if you changed it to FutureWarning, it would have been correct.

I didn't realize - will fix that.

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Nov 25, 2023

I tried this, and while we now don't fail, shouldn't we be trying to catch the FutureWarning cases in the tests?

That would be good! Or should we already remove this functionality (assuming the new behavior is already possible)?

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.

@twoertwein
Copy link
Member Author

How about warnings that are caught with lower="2.0.99" - they should move to the invalide section and the correspondig annotations should be removed, or?

@Dr-Irv
Copy link
Collaborator

Dr-Irv commented Nov 26, 2023

How about warnings that are caught with lower="2.0.99" - they should move to the invalide section and the correspondig annotations should be removed, or?

Yes, that is what should happen.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

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

Thanks @twoertwein

@Dr-Irv Dr-Irv merged commit 536db83 into pandas-dev:main Nov 26, 2023
@twoertwein
Copy link
Member Author

Yes, that is what should happen.

I will try to look into that in the coming weeks - I have been busy with my thesis and job search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nightly failing as of 10/24/23
2 participants