-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Revert "REF: remove unnecessary na_value fixture" #54930
Revert "REF: remove unnecessary na_value fixture" #54930
Conversation
Wouldn't actually addressing this be the correct solution? |
Yes, certainly, and we have a two year old open issue about it. But nevertheless in the meantime it would be easier for downstream EAs that use None to keep the tests as they were |
Is this time-sensitive? Or just "before 2.2"? If the latter we should take some time to try to address the underlying issue. |
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.
Let's deprecate this then so that EA authors have time to adjust but we can clean it up at some point
It's "time sensitive" in the sense that it is annoying that we have a bunch of failing tests on our CI build with nightly pandas. And I also don't see the issue with just merging this. We can easily change it back at some point when the issue is fixed (or tested, as it might already be fixed), although even then, we might want to wait a while with changing the test, as downstream EAs still test against multiple pandas versions typically. |
Do you mean to deprecate the pytest fixture? (not fully sure how that would work) |
I commented on #44602; I expect the geopandas problem is subtly different |
Yes, the problem for geopandas is that it supports multiple pandas versions, and this was only apparently fixed in a recent version. |
Hmm i dont think we have a policy on the extension backward/forward compatibility of the extension tests. Tests in general I wouldn't expect to work with anything but the matching version. |
This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this. |
Of course the tests only work in the matching version, and downstream EA implementation import those tests from pandas, and thus in practice only test with matching versions. This PR is a very simple change, that makes the life easier for downstream testing in geopandas. So unless there is actual strong objection to do so, I am planning to merge this. |
As I commented in #44602, that appears to be working without this kludge. IIUC you said the geopandas use case is working too. If geopandas wants to test against older pandas, they'll need to test against older versions of the extension tests. I don't see any way around that. As you say this is a small change so I don't care that much. Is there a path to getting rid of this eventually? e.g. keep it around through 2.x and then re-remove it? |
This is working for the latest version of pandas, but geopandas cannot yet adopt that because we support a range of pandas versions. |
This reverts one of the four commits of #54719.
While this was certainly a logical change to make (it's superfluous for our tests), it can give problems for downstream EAs (we got several failures in the geopandas' CI with pandas nightly), if they use
None
as their missing value.The problem is that pandas didn't really support to properly set None as the
ExtensionDtype.na_value
(see eg #44602), and so we relied on the fixture to use the correct value for the tests while using the default of NaN for the attribute.