-
Notifications
You must be signed in to change notification settings - Fork 20
Improve DeprecationWarning #109
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
Comments
Interesting. If that's happening internally, then internally, we should switch that to use the "proper" Quantity unit so that the library itself isn't using things that are deprecated. Agreed, if the user isn't using the Units object, they shouldn't be seeing the warning. Now sure when I'll get to this, but should be straightforward to solve. |
possibly your thought was, that even so it's used internally, it might surprise the user by what they find in the resulting object, if you would just change that yourself. |
I must be getting rusty. I can't replicate the problem you're having. If I
The units1.lbl file above is in the pvl test data here: https://github.com/planetarypy/pvl/blob/main/tests/data/pds3/units1.lbl I also looked through the library, it isn't instantiating the old pvl Can you provide a minimal working example that demonstrates the emission of the warning? |
python -Werror -c "import pvl" triggers the warning for me on 1.3.2 |
Aha! I had put the PendingDeprecationWarning in the wrong place. Its now fixed in PR #110 |
Using version 1.3.2 via conda python 3.12
I'm getting:
even so I am not using the mentioned objects.
It seems, that when pvl.load() is called to parse a PDS label file, it internally creates Units objects if there are units in the PDS label. This is happening even though my code isn't directly using the Units class, hence the confusion.
Could this be solved differently somehow, maybe inform the user that it's an internal deprecation, or how to exactly use the Quantity object, even so I'm not controlling it?
Thanks!
The text was updated successfully, but these errors were encountered: