Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MNT]: Remove axis parameter from scales #29349

Copy link
Copy link
Open
@timhoffm

Description

@timhoffm
Issue body actions

Summary

For historic reasons, Scales take the axis as the first parameter. It's use is discouraged and none of our own scales actually use it at least since #12831.

To simplify our code, we should get rid of that parameter.

Proposed fix

Do we know whether

  • downstream libraries add their own Scales via register_scale()?
  • user will directly instantiate our own Scale classes?

If so we need the full deprecation machinery:

  1. Make scale_factory work with scales have or have not an initial axis parameter. Either by try-except with/without this parameter or by introspecting the signature.
  2. Introspect scale classes passed to register_scale and warn if they still have the axis argument.
  3. Make all our scales work with/without the axis parameter by adding a suitable decorator to their init functions.

Otherwise, we can simplify the transition.

--

Edit: Both questions are yes, so we need the full deprecation mechanism.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.