Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

FIX: re-instate verbose alias#10726

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

jklymak
Copy link
Member

@jklymakjklymak commentedMar 8, 2018
edited
Loading

PR Summary

Theverbose alias was inadvertently dropped so folks can no longer

import matplotlib.verbose

Given that this is public API, it should not have been removed...

closes#10716

PR Checklist

  • Code is PEP 8 compliant

@jklymakjklymak mentioned this pull requestMar 8, 2018
6 tasks
@jklymakjklymak added this to thev2.2.1 milestoneMar 8, 2018
@jklymakjklymak added the Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions. labelMar 8, 2018
@anntzer
Copy link
Contributor

You almost certainly need to 1) wrap that in something that catches the deprecation warning, and 2) add a deprecation warning to all methods of verbose (as the user will not see the one in the ctor (unless he decides to build his own instance of Verbose)).

@jklymak
Copy link
MemberAuthor

I get the deprecation warning with

frommatplotlibimportverbose

Not good enough?

@anntzer
Copy link
Contributor

you probably get it with just "import matplotlib" no?...

@jklymak
Copy link
MemberAuthor

Oh goodness I hope not.

If so hints on wrapping appreciated.

@anntzer
Copy link
Contributor

Just wrap all methods manually too.
There's no (practical) way in which you can trigger a warning when people just access the object from the module without interacting with it in any way (well see njsmith's metamodule for example for a solution, not that I suggest to use this here), but that's the same situation as when we're deprecating e.g. functions (the warning only occurs when you call the function) and we just accept that as being good enough.

@dopplershift
Copy link
Contributor

I didn't realize it when we had the RC's, but I think this broke PyCharm's support for embedding figures.

Not to make this any worse or anything. 😉

@jklymak
Copy link
MemberAuthor

OK, well, this is a bit out of my depth.

importmatplotlib

indeed triggers the deprecation warning if I have in__init__.py:

# define verbose so it can be imported...verbose=Verbose()

I don't know how to turn that warning off and still assignverbose.

@jklymakjklymakforce-pushed theFIX-re-instate-verbose-alias branch from8c63473 toa10e0eeCompareMarch 8, 2018 23:58
@jklymak
Copy link
MemberAuthor

OK< think I got it.

importmatplotlibfrommatplotlibimportverbose

issues no warnings. But

verbose.report('Boo')

does....

@jklymakjklymakforce-pushed theFIX-re-instate-verbose-alias branch froma10e0ee tob603978CompareMarch 9, 2018 00:01
@efiring
Copy link
Member

Looks like this can go in after a rebase.

jklymak reacted with thumbs up emoji

@jklymakjklymakforce-pushed theFIX-re-instate-verbose-alias branch fromb603978 toeecdc3cCompareMarch 11, 2018 17:43
@jklymak
Copy link
MemberAuthor

@dopplershift this is a good example of a mysterious failing codecov/project/tests.

@QuLogic
Copy link
Member

Because macOS builds didn't upload any coverage...

@jklymak
Copy link
MemberAuthor

Ahhhh. Cool. Thanks!

@tacaswelltacaswell merged commite99bee8 intomatplotlib:masterMar 12, 2018
QuLogic added a commit that referenced this pull requestMar 12, 2018
@tacaswell
Copy link
Member

I think something went wrong with the rebase as this does not actually butverbose back any more....

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@efiringefiringefiring approved these changes

@tacaswelltacaswelltacaswell approved these changes

Assignees
No one assigned
Labels
Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
Projects
None yet
Milestone
v2.2.1
Development

Successfully merging this pull request may close these issues.

Removal of verbose not documented: AttributeError: module 'matplotlib' has no attribute 'verbose'
6 participants
@jklymak@anntzer@dopplershift@efiring@QuLogic@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp