-
Notifications
You must be signed in to change notification settings - Fork 18
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
Define slots explicitly #132
Comments
As for now I have decided to specifically silence this warning, as it just clutters the output and could confuse users. We might have to keep watching what xarray decides to do, but they seem to not have made any changes or decisions over the last year. |
@bdestombe do we still need to tackle this issue? If our way of subclassing xarray is deprecated, it could break upon any new release of xarray. This might be a thing we should do before v3.0 😔 |
Hi Bart, this has been the case for several years now. Furthermore, I don't see any urgent deprecation warnings and therefor also don't think we have to tackle this now. Instead, let's build an accessor in parallel to the current implementation. |
I have been trying out accessors, and one problem is that it's difficult for code analyzers to determine what the type and available methods are of xarray/pandas extensions: microsoft/pylance-release#1112 In VS Code, the code analyzer does not see that |
Fixed by #204 |
Describe the bug
Upon importing the library:
To Reproduce
Import the dtscalibration library
Expected behavior
No warnings.
Additional context
Xarray, does not recommend subclassing (and thus using slots), but instead to put everything under an accessor:
For reasons listed here:
http://xarray.pydata.org/en/stable/internals.html#extending-xarray
Mostly needed when combining multiple 'extensions' to xarray. But to my opinion, this requires a lot of work, breaks the current version, and would not change the functionality of the package.
The text was updated successfully, but these errors were encountered: