You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TST: matplotlib 3.4.1 broke RTD with MatplotlibDeprecationWarning #11458
You will see this error on CircleCI for mpldev and in the dev job of Actions:
INTERNALERROR> ValueError: Key backend: '' is not a valid value for backend; supported values are
['GTK3Agg', 'GTK3Cairo', 'MacOSX', 'nbAgg', 'Qt4Agg', 'Qt4Cairo', 'Qt5Agg', 'Qt5Cairo',
'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg', 'WXCairo', 'agg', 'cairo',
'pdf', 'pgf', 'ps', 'svg', 'template']
You will see these warnings on RTD:
MatplotlibDeprecationWarning:
The validCap attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
return getattr(obj, attr, *defargs)
MatplotlibDeprecationWarning:
The validJoin attribute was deprecated in Matplotlib 3.4 and will be removed two minor releases later.
return getattr(obj, attr, *defargs)
changed the title [-]TST: matplotlib 3.4.1 error and warnings broke CI and RTD[/-][+]TST: matplotlib 3.4.1/dev error and warnings broke CI and RTD[/+]on Apr 1, 2021
Nothing I tried work for the "missing backend," so I opened issue at matplotlib/matplotlib#19848 . (UPDATE: This is a bug upstream so nothing we can do until they fix it.)
As for RTD, I am also not sure what is going on. The warning came from sphinx-automodapi without any useful info. So, a stop-gap patch to get RTD working again until we find out is at #11462 . Also opened issue at astropy/sphinx-automodapi#125 . (UPDATE: Might also be a bug upstream at matplotlib/matplotlib#19839 but something we can hack-patch until they fix it.)
@pllim. I know it's not elegant, but the following monkey-patch works and is safe on all matplotlib versions. It needs to be applied before subclassing Polygon.
@nstarman , I did try that after being redirected to matplotlib/matplotlib#19839 but it didn't work for me. Couldn't be I did it wrong. If you can figure out how to apply it to astropy/visualization/wcsaxes/patches.py , please open PR!
I see in 11464 that the monkey-patch is only applied within an if-statement. I know it shouldn't matter, but what if it were outside of the if-statement? It is matplotlib version safe.
@pllim. I removed that part of the patch because I found it didn't have an effect. The matplotlib docs use `.CapStyle`, which as a relative path can't be overridden or ignored by numpydoc xref.
Thanks, I'll open a PR
changed the title [-]TST: matplotlib 3.4.1/dev error and warnings broke CI and RTD[/-][+]TST: matplotlib 3.4.1 broke RTD with MatplotlibDeprecationWarning[/+]on Apr 3, 2021
Not sure, gotta ask @nstarman . See the first unchecked check box in TODO above. We worked around it instead of fixing the actual problem but I am not sure if the problem is still a problem.
Activity
[-]TST: matplotlib 3.4.1 warnings broke CI and RTD[/-][+]TST: matplotlib 3.4.1 error and warnings broke CI and RTD[/+]github-actions commentedon Apr 1, 2021
Greetings from Skynet!
(A special day message.)
pllim commentedon Apr 1, 2021
[-]TST: matplotlib 3.4.1 error and warnings broke CI and RTD[/-][+]TST: matplotlib 3.4.1/dev error and warnings broke CI and RTD[/+]pllim commentedon Apr 1, 2021
Nothing I tried work for the "missing backend," so I opened issue at matplotlib/matplotlib#19848 . (UPDATE: This is a bug upstream so nothing we can do until they fix it.)
As for RTD, I am also not sure what is going on. The warning came from
sphinx-automodapiwithout any useful info. So, a stop-gap patch to get RTD working again until we find out is at #11462 . Also opened issue at astropy/sphinx-automodapi#125 . (UPDATE: Might also be a bug upstream at matplotlib/matplotlib#19839 but something we can hack-patch until they fix it.)nstarman commentedon Apr 2, 2021
@pllim. I know it's not elegant, but the following monkey-patch works and is safe on all matplotlib versions. It needs to be applied before subclassing Polygon.
pllim commentedon Apr 2, 2021
@nstarman , I did try that after being redirected to matplotlib/matplotlib#19839 but it didn't work for me. Couldn't be I did it wrong. If you can figure out how to apply it to
astropy/visualization/wcsaxes/patches.py, please open PR!pllim commentedon Apr 2, 2021
@nstarman -- correction: I did apply your patch (see #11464) but the patches alone weren't enough, not sure why.
nstarman commentedon Apr 2, 2021
@pllim hmm. that's odd. When I ran into this problem in #11118, I solved it with https://github.com/astropy/astropy/blob/54e25d3fea11d33bb9bb53e265174949d16da898/astropy/visualization/wcsaxes/patches.py
I see in 11464 that the monkey-patch is only applied within an if-statement. I know it shouldn't matter, but what if it were outside of the if-statement? It is matplotlib version safe.
pllim commentedon Apr 2, 2021
@nstarman , given that you found this solution originally, do you want to open a PR and take credit for it?
pllim commentedon Apr 2, 2021
Ah, looks like you also patched
docs/conf.py. I missed that part. 501c72bnstarman commentedon Apr 2, 2021
@pllim. I removed that part of the patch because I found it didn't have an effect. The matplotlib docs use
`.CapStyle`, which as a relative path can't be overridden or ignored by numpydoc xref.Thanks, I'll open a PR
pllim commentedon Apr 3, 2021
Update: Dev job should be green now. But looks like
mpldevjob on CircleCI needs some sort of data update.[-]TST: matplotlib 3.4.1/dev error and warnings broke CI and RTD[/-][+]TST: matplotlib 3.4.1 broke RTD with MatplotlibDeprecationWarning[/+]neutrinoceros commentedon Jun 14, 2024
I guess this is vestigial and should be closed now ?
At a minimum, it would be closed by #16557, I think
pllim commentedon Jun 14, 2024
Not sure, gotta ask @nstarman . See the first unchecked check box in TODO above. We worked around it instead of fixing the actual problem but I am not sure if the problem is still a problem.
nstarman commentedon Jun 14, 2024
We could try removing https://github.com/nstarman/astropy/blob/1a40abccc9ac6f4e24ffca87f4249cc72b83a591/astropy/visualization/wcsaxes/patches.py#L14-L23
That was the monkey-patch
neutrinoceros commentedon Jun 15, 2024
Looks like it doesn't work yet:
#16570
https://readthedocs.org/projects/astropy/builds/24703727/