-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make Axis3D constructor signature closer to the one of 2D axis. #21425
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
Conversation
lib/mpl_toolkits/mplot3d/axis3d.py
Outdated
if "d_intervalx" in params: | ||
self.d_interval = params["d_intervalx"] | ||
if "v_intervalx" in params: | ||
self.v_interval = params["v_intervalx"] |
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.
Are either of these used for anything? Maybe they should be deprecated as well.
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.
They are not used, but let's deprecate them some other time?
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.
Actually they have direct replacements, so I deprecated them.
Do we expect external users of the API and if so, end users or other libs? In case of other libs, we should be more cautious because that warning will propagate to their users, who cannot do anything about it. The correct way then would be a pending depredcation warning to give downstream libs time to adapt. |
I don't expect anyone to use these APIs externally, but of course one never knows... |
I'm generally a bit concerned on the rate of deprecations. We don't want to become a library that users have to adapt to on every release. Most deprecations have either a very clear benefit or are quite unlikely to affect users. |
I switched to pending deprecations. |
If others are more confident than me, you might also merge with a non-pending deprecation. 😄 |
I'm not really in a hurry either. |
Setting `adir` to a direction not matching the specific axis class doesn't make sense anyways; the viewlims and datalims properties previously got init'ed to their preexisting values; and init3d doesn't warrant being a separate public API. Also deprecate the 3D-specific d_interval and v_interval attributes, as they have direct replacements compatible with 2D.
Setting
adir
to a direction not matching the specific axis classdoesn't make sense anyways; the viewlims and datalims properties
previously got init'ed to their preexisting values; and init3d doesn't
warrant being a separate public API.
Also deprecate the 3D-specific d_interval and v_interval attributes, as
they have direct replacements compatible with 2D.
PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).