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

Deprecate the backend.qt{4,5} rcParams. #10282

Merged
merged 1 commit into from Jan 29, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Jan 22, 2018

  1. For the rcParams rewrite (MEP32), they may make it tricky to
    transform rcParams into a nested dictionary type of object, as "backend"
    is already the name of another (more important) rcParam.
    (I haven't decided on a nested dict design yet, just keeping options open.)
    This specific issue could be solved with deprecation + renaming, but also...

  2. The use of these rcParams can easily be replaced by a) first
    importing one of the bindings (qt_compat will ensure that the already
    imported binding gets used, as importing multiple bindings in the same
    process is a bad idea anyways), or b) setting the QT_API environment
    variable appropriately.

Milestoning as 2.2 so that the rcparams may actually get removed when (if) MEP32 makes it in 3.0, but feel free to push back too.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@anntzer anntzer added this to the v2.2 milestone Jan 22, 2018
1) For the rcParams rewrite (MEP32), they may make it tricky to
transform rcParams into a nested dictionary type of object, as "backend"
is already the name of another (more important) rcParam.  This specific
issue could be solved with deprecation + renaming, but also...

2) The use of these rcParams can easily be replaced by a) first
importing one of the bindings (qt_compat will ensure that the already
imported binding gets used, as importing multiple bindings in the same
process is a bad idea anyways), or b) setting the QT_API environment
variable appropriately.
@jklymak jklymak added the Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. label Jan 24, 2018
@jklymak
Copy link
Member

jklymak commented Jan 24, 2018

So, is an alternative to make new rcParams that do the same thing? I don't use these rcParams, but maybe some people do. I'm not sure about the goal here other than an rcParams namespace issue?

@anntzer
Copy link
Contributor Author

anntzer commented Jan 24, 2018

Renaming would be the other option, but again I think QT_API or preimporting either module is good enough. Of course, we'll see how much pushback we get after releasing this...

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.

I'm fine w/ this, but maybe there is a large audience who uses these rcParams...

@tacaswell tacaswell merged commit 090e9f1 into matplotlib:master Jan 29, 2018
@anntzer anntzer deleted the deprecate-backend-qt45 branch January 29, 2018 21:05
@jklymak
Copy link
Member

jklymak commented Jan 30, 2018

OK, maybe I made a mistake approving this.

On master, with no matplotlibrc file (i.e. using the defaults), I get both these deprecation warnings, which is super annoying.

I think somehow if the user does not specify these parameters, they should not still get a warning!

@jklymak jklymak mentioned this pull request Jan 30, 2018
6 tasks
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release critical For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants