Skip to content
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

Changing NewTask deprecation plan #452

Merged
merged 2 commits into from Sep 26, 2020

Conversation

Hedingber
Copy link
Contributor

@Hedingber Hedingber commented Sep 26, 2020

In #442 I created new_task to be instead NewTask.
NewTask remained but with a deprecation warning that it will be removed in 0.7.0, the chosen warning class was FutureWarning because DeprecationWarning is ignored by default while FutureWarning is not.

The problem is that our examples and demos use NewTask a lot.
If we'll change all of them to new_task it will be problematic since users running MLRun <0.5.3 won't have this new_task and they'll have to search for the examples relevant to their release which is very inconvient.
On the other hand keeping them as is means that when running them the deprecation warning will be printed which is also not nice (new user running latest version with latest examples getting deprecation warnings)

So my plan is this:

  • Currently change the warning to PendingDeprecationWarning which is ignored by default meaning users wouldn't really see it.
  • at 0.7.0 when it will be very unlikely that someone is running <0.5.3 we'll change the examples & demos + change the warning to FutureWarning - that way running latest code with latest examples won't print warnings, but using the NewTask will print warnings
  • at 0.9.0 when it will be very unlikely that someone is still using NewTask we'll remove it.

Note:
This change (NewTask -> new_task) is very minor change, not funtional at all, only cosmetic, however I'm purposely
putting effort on doing its deprecation right, by that I'm "practicing" on it, and when real stuff will come, we'll already know what's the right way to do it

@Hedingber Hedingber changed the title Changing from NewTask deprecation plan Changing NewTask deprecation plan Sep 26, 2020
@Hedingber Hedingber merged commit 0dd6ae8 into mlrun:development Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant