-
Notifications
You must be signed in to change notification settings - Fork 794
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
docs: Versioning policy #3488
docs: Versioning policy #3488
Conversation
Based on discussions in vega#3454 (comment) and vega#3454 (comment) vega#3454
Special handling of upstream
|
parameter = Parameter(name) | |
if empty is not Undefined: | |
parameter.empty = empty | |
if parameter.empty == "none": | |
warnings.warn( | |
"""The value of 'empty' should be True or False.""", | |
utils.AltairDeprecationWarning, | |
stacklevel=1, | |
) | |
parameter.empty = False | |
elif parameter.empty == "all": | |
warnings.warn( | |
"""The value of 'empty' should be True or False.""", | |
utils.AltairDeprecationWarning, | |
stacklevel=1, | |
) | |
parameter.empty = True | |
elif (parameter.empty is False) or (parameter.empty is True): | |
pass | |
else: | |
msg = "The value of 'empty' should be True or False." | |
raise ValueError(msg) | |
if "init" in kwds: | |
warnings.warn( | |
"""Use 'value' instead of 'init'.""", | |
utils.AltairDeprecationWarning, | |
stacklevel=1, | |
) | |
if value is Undefined: | |
kwds["value"] = kwds.pop("init") | |
else: | |
# If both 'value' and 'init' are set, we ignore 'init'. | |
kwds.pop("init") |
Issues
The example I've given highlights the conflict between how SemVer specifies deprecation and the most recent major version of altair
.
v5.0.0
should be where a breaking change is made, but was instead a backwards-compatible change.
This is complicated by (AFAIK) the change occuring - without deprecation - in vega-lite
.
@mattijn Do you think there is a need to state here about the level of docs for deprecated functionality? |
I trust you here👍 |
First thought is that if something is no longer compliant with the VL schema and it leads to a breaking change, we have to support it until the next major version following the policy you're drafting. If it's a feature which we know was heavily used by users and we can write some compatibility code around it, we can optionally consider deprecating it and still supporting it for a while. If we can make the lives of our users easier, I'm all for it :) What do you think? |
Thanks @binste, reading your comment and then re-reading the policy I've drafted has made me think I've overcomplicated this. |
Intentionally simple, see linked thread for discussion vega#3478 (comment)
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.
This looks good for me, thanks for putting it together.
Thanks both @joelostblom @mattijn |
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.
Precise and succinct, great!
Will close: #3454
Based on discussions in #3454 (comment) and #3454 (comment)
Public API definition
iswas blocking, see discussion in #3478 (reply in thread).Tasks
@deprecated
versioning, IDE highlighting #3455