-
Notifications
You must be signed in to change notification settings - Fork 123
Change of behavior in str(pystac.RelType.root)
#626
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
#514 is a change in API that we didn't catch as such - this should have technically forced a PySTAC 2.0 for semver. I'd be in favor of reverting back to the 1.0 behavior and releasing as a bugfix version of 1.1. @duckontheweb @l0b0 thoughts? |
@TomAugspurger You can get the same value by using @lossyrob Whether this should be considered an API change is interesting. The original implementation had a I would be in favour of keeping the current behaviour but informing the users of the removal of the redundant accessor. |
Yeah, I'm using I'm no fan of semver, but this is definitely an API breaking change :)
There's a difference between private methods (single underscore) and "magic" or dunder methods that are part of the Python data model. Magic methods are meant to be used by top-level functions like If you really want to remove |
This seems related to #652, which is also causing breaking changes in the serialization. I'm in favor of reinstating the old behavior by overwriting the |
In pystac 1.0, calling str on the value of an enum like
RelType.ROOT
would return the value:On the latest release (1.1.0) that includes the class name.
I suspect this was changed in #514.
I was relying on the old behavior in https://github.com/TomAugspurger/xstac, which seems useful to me. Do we want to restore the 1.0 behavior? Or stick with the 1.1 behavior?
The text was updated successfully, but these errors were encountered: