10000 Deprecate to-days converters in matplotlib dates by timhoffm · Pull Request #12393 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Deprecate to-days converters in matplotlib dates #12393

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

Merged
merged 1 commit into from
Oct 4, 2018

Conversation

timhoffm
Copy link
Member
@timhoffm timhoffm commented Oct 3, 2018

PR Summary

The functions seconds(), minutes(), hours() and weeks() in matplotlib.dates are unused. Additionally their name is quite ambiguous.

I don't see that they are needed and therefore deprecate them. If however, they serve some purpose for the user, they should be replaced by a single functionto_days(/, weeks=0, hours=0, minutes=0, seconds=0).

PR Checklist

  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@timhoffm timhoffm added this to the v3.1 milestone Oct 3, 2018
Copy link
Member
@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable if we don't use them... Should these have alternatives listed?

@timhoffm
Copy link
Member Author
timhoffm commented Oct 3, 2018

There are no alternatives. Well, you could say "divide by dates.SEC_PER_DAY". but that's a bit silly. As said, if users need such converters, I'd add to_days(/, weeks=0, hours=0, minutes=0, seconds=0).

@jklymak
Copy link
Member
jklymak commented Oct 3, 2018

Ooops, sorry misread your comment that such already existed. I realy doubt too many people are using this, or if they are, they shouldn't be.... I think the deprecation is fine as it is.

@anntzer
Copy link
Contributor
anntzer commented Oct 4, 2018

These were apparently introduced in 15556ab and never used...

@anntzer
Copy link
Contributor
anntzer commented Oct 4, 2018

build failure looks unrelated

@anntzer anntzer merged commit 723ae80 into matplotlib:master Oct 4, 2018
@timhoffm timhoffm deleted the deprecate-dates-day-converter branch October 4, 2018 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0