Fix deprecation warning - #1420
Conversation
|
How do y'all feel about actually making the breaking change now? We need to do it before v1.0.0 anyway. |
|
That is true. I am happy to rip the bandaid off. |
|
I vote in favor of ripping off the band-aid :) And burning it 🔥 🩹 🔥 |
|
@mfisher87 Can you remind me what making the breaking change means in terms of a new or existing PR? I have lost sight of whether this is already in work or not. Should we still merge this now? I saw this reviewer comment on our PyOpenSci submission and noted that this may be continuing to have some negative user impact. |
|
I'm not sure I follow your question. We could do the breaking change in this PR as a means of "fixing" the deprecation warning, and that's what I'm proposing.
I believe it is not. The change is very simple so I think there was no incentive to get started on it ahead of time.
There are two problems: 1) We have a deprecation warning that gets printed regardless of whether the user calls the deprecated method, because we use the deprecated method internally, and we shouldn't do that. The original intent of this PR is to fix this. 2) Actually replacing the deprecated method (#1421) is a breaking change, and because of the way Python is designed, we can't reasonably have both the deprecated method and the new method exist at the same time (i.e. we can't have a transition period). We could fix (1) alone and deal with (2) later but I'd instead advocate to take the hit and deal with (2) now. We've had this spammy deprecation warning in the latest version for some time now, folks have seen it. The breaking change is fairly trivial to resolve (users will have to change |
|
The |
Description
closes #1301
Extracts code from
results.DataGranules.sizeto a private propertyresults.DataGranules._size.Deprecation warning is only in
results.DataGranules.sizeso only appears when.size()is called directly.results.DataGranules.sizethen callsresults.DataGranules._sizeInternal calls to get granule size are changed to call
results.DataGranules._sizeThese were in:
Merge checklist
closes #1)CHANGELOG.mdupdatedREADME.mdupdatedpre-commit.ci autofixif pre-commit is failing)📚 Documentation preview 📚: https://earthaccess--1420.org.readthedocs.build/en/1420/