I'm seeing ~54 failures locally: =================================================================================================================================================================================== short test summary info ====================================================================================================================================================================================FAILED lib/matplotlib/tests/test_backend_qt.py::test_enums_available[{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'def _test_enums_impl():\n import sys\n\n from matplotlib.backends.qt_compat import _enum, _to_int\n from matplotlib.backend_bases import cursors, MouseButton\n\n _enum("QtGui.QDoubleValidator.State").Acceptable\n\n _enum("QtWidgets.QDialogButtonBox.StandardButton"...FAILED lib/matplotlib/tests/test_backends_interactive.py::test_figure_leak_20490[time_mem0-{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_figure_leak; _test_figure_leak()', '0.0']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backend_svg.py::test_url_tick - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).FAILED lib/matplotlib/tests/test_backend_svg.py::test_svg_default_metadata - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).FAILED lib/matplotlib/tests/test_backend_svg.py::test_svg_clear_default_metadata - DeprecationWarning: datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.now(datetime.UTC).FAILED lib/matplotlib/tests/test_lines.py::test_set_line_coll_dash_image[pdf] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.402):FAILED lib/matplotlib/tests/test_lines.py::test_set_line_coll_dash_image[svg] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.412):FAILED lib/matplotlib/tests/test_backends_interactive.py::test_figure_leak_20490[time_mem1-{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_figure_leak; _test_figure_leak()', '0.1']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backend_pgf.py::test_pdflatex[pdf] - matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 13.194):FAILED lib/matplotlib/tests/test_backends_interactive.py::test_figure_leak_20490[time_mem1-{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_figure_leak; _test_figure_leak()', '0.1']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[hspace without value] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[hspace with invalid value] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[function without space] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[accent without space] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[frac without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[frac with empty parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[binom without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[binom with empty parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[genfrac without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[genfrac with empty parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_backend_pgf.py::test_rcupdate - matplotlib.testing.exceptions.ImageComparisonFailure: Error: Image files did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[sqrt without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[sqrt with invalid value] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[overline without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[overline with empty parameter] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[left with invalid delimiter] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[right with invalid delimiter] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[unclosed parentheses with sizing] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[unclosed parentheses without sizing] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[dfrac without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[dfrac with empty parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[overset without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[underset without parameters] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[unknown symbol] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[double superscript] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[double subscript] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_mathtext.py::test_mathtext_exceptions[super on sub without braces] - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_interactive_backend[toolbar2-{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - Failed: Subprocess failed to test intended behaviorFAILED lib/matplotlib/tests/test_pickle.py::test_pickle_load_from_subprocess[png] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_pickle import _pickle_load_subprocess; _pickle_load_subprocess()']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_rcparams.py::test_backend_fallback_headful - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', "import matplotlib as mpl; sentinel = mpl.rcsetup._auto_backend_sentinel; assert mpl.RcParams({'backend': sentinel})['backend'] == sentinel; assert mpl.rcParams._get('backend') == sentinel; import matplotlib.pyplot; print(matplotlib.get_backend())"]' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_pyplot.py::test_pylab_integration - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from IPython import start_ipython; start_ipython()', '--pylab', '-c', 'import matplotlib.pyplot as plt;assert plt._REPL_DISPLAYHOOK == plt._ReplDisplayHook.IPYTHON']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_text.py::test_parse_math - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_text.py::test_parse_math_rcparams - AssertionError: Regex pattern did not match.FAILED lib/matplotlib/tests/test_texmanager.py::test_openin_any_paranoid - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'import matplotlib.pyplot as plt;plt.rcParams.update({"text.usetex": True});plt.title("paranoid");plt.show(block=False);']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_interactive_backend[toolbar2-{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - Failed: Subprocess failed to test intended behaviorFAILED lib/matplotlib/tests/test_backends_interactive.py::test_interactive_backend[toolmanager-{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - Failed: Subprocess failed to test intended behaviorFAILED lib/matplotlib/tests/test_backends_interactive.py::test_interactive_backend[toolmanager-{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - Failed: Subprocess failed to test intended behaviorFAILED lib/matplotlib/tests/test_backends_interactive.py::test_interactive_thread_safety[{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_thread_impl; _test_thread_impl()']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_lazy_auto_backend_selection - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _impl_test_lazy_auto_backend_selection; _impl_test_lazy_auto_backend_selection()']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_lazy_linux_headless[{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _lazy_headless; _lazy_headless()', 'qtagg', 'PyQt6']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_lazy_linux_headless[{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _lazy_headless; _lazy_headless()', 'qtcairo', 'PyQt6,cairocffi']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_blitting_events[{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_number_of_draws_script; _test_number_of_draws_script()']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_blitting_events[{'MPLBACKEND': 'qtcairo', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_number_of_draws_script; _test_number_of_draws_script()']' died with <Signals.SIGSEGV: 11>.FAILED lib/matplotlib/tests/test_backends_interactive.py::test_figure_leak_20490[time_mem0-{'MPLBACKEND': 'qtagg', 'QT_API': 'PyQt6'}] - subprocess.CalledProcessError: Command '['/home/tcaswell/.virtualenvs/bleeding/bin/python3', '-c', 'from matplotlib.tests.test_backends_interactive import _test_figure_leak; _test_figure_leak()', '0.0']' died with <Signals.SIGSEGV: 11>.================================================================================================================================================= 54 failed, 9060 passed, 257 skipped, 13 xfailed, 12 warnings, 23 rerun in 202.31s (0:03:22) ==================================================================================================================================================
Some of these are the utcdatetime issue (being dealt with), some of these are Python segfaulting on exit (which I need to sort out a way to get a better reproducer of!), and some of these are things that look like: ___________________________________________________________________________________________________________________________________________________________________________________ test_parse_math_rcparams ___________________________________________________________________________________________________________________________________________________________________________________[gw9] linux -- Python 3.12.0 /home/tcaswell/.virtualenvs/bleeding/bin/python3 def test_parse_math_rcparams(): # Default is True fig, ax = plt.subplots() ax.text(0, 0, r"$ \wrong{math} $") with pytest.raises(ValueError, match='Unknown symbol'):> fig.canvas.draw()lib/matplotlib/tests/test_text.py:836:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <matplotlib.backends.backend_agg.FigureCanvasAgg object at 0x7f2318a19730> def draw(self): # docstring inherited self.renderer = self.get_renderer() self.renderer.clear() # Acquire a lock on the shared font cache. with RendererAgg.lock, \ (self.toolbar._wait_cursor_for_draw_cm() if self.toolbar else nullcontext()):> self.figure.draw(self.renderer)lib/matplotlib/backends/backend_agg.py:401:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _artist = <Figure size 640x480 with 1 Axes>, renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0>, args = (), kwargs = {} @wraps(draw) def draw_wrapper(artist, renderer, *args, **kwargs):> result = draw(artist, renderer, *args, **kwargs)lib/matplotlib/artist.py:95:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _artist = <Figure size 640x480 with 1 Axes>, renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @wraps(draw) def draw_wrapper(artist, renderer): try: if artist.get_rasterized(): if renderer._raster_depth == 0 and not renderer._rasterizing: renderer.start_rasterizing() renderer._rasterizing = True renderer._raster_depth += 1 else: if renderer._raster_depth == 0 and renderer._rasterizing: # Only stop when we are not in a rasterized parent # and something has be rasterized since last stop renderer.stop_rasterizing() renderer._rasterizing = False if artist.get_agg_filter() is not None: renderer.start_filter()> return draw(artist, renderer)lib/matplotlib/artist.py:72:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <Figure size 640x480 with 1 Axes>, renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @_finalize_rasterization @allow_rasterization def draw(self, renderer): # docstring inherited # draw the figure bounding box, perhaps none for white figure if not self.get_visible(): return artists = self._get_draw_artists(renderer) try: renderer.open_group('figure', gid=self.get_gid()) if self.axes and self.get_layout_engine() is not None: try: self.get_layout_engine().execute(self) except ValueError: pass # ValueError can occur when resizing a window. self.patch.draw(renderer)> mimage._draw_list_compositing_images( renderer, self, artists, self.suppressComposite)lib/matplotlib/figure.py:3139:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0>, parent = <Figure size 640x480 with 1 Axes>, artists = [<Axes: >], suppress_composite = None def _draw_list_compositing_images( renderer, parent, artists, suppress_composite=None): """ Draw a sorted list of artists, compositing images into a single image where possible. For internal Matplotlib use only: It is here to reduce duplication between `Figure.draw` and `Axes.draw`, but otherwise should not be generally useful. """ has_images = any(isinstance(x, _ImageBase) for x in artists) # override the renderer default if suppressComposite is not None not_composite = (suppress_composite if suppress_composite is not None else renderer.option_image_nocomposite()) if not_composite or not has_images: for a in artists:> a.draw(renderer)lib/matplotlib/image.py:131:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _artist = <Axes: >, renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @wraps(draw) def draw_wrapper(artist, renderer): try: if artist.get_rasterized(): if renderer._raster_depth == 0 and not renderer._rasterizing: renderer.start_rasterizing() renderer._rasterizing = True renderer._raster_depth += 1 else: if renderer._raster_depth == 0 and renderer._rasterizing: # Only stop when we are not in a rasterized parent # and something has be rasterized since last stop renderer.stop_rasterizing() renderer._rasterizing = False if artist.get_agg_filter() is not None: renderer.start_filter()> return draw(artist, renderer)lib/matplotlib/artist.py:72:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <Axes: >, renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @martist.allow_rasterization def draw(self, renderer): # docstring inherited if renderer is None: raise RuntimeError('No renderer defined') if not self.get_visible(): return self._unstale_viewLim() renderer.open_group('axes', gid=self.get_gid()) # prevent triggering call backs during the draw process self._stale = True # loop over self and child Axes... locator = self.get_axes_locator() self.apply_aspect(locator(self, renderer) if locator else None) artists = self.get_children() artists.remove(self.patch) # the frame draws the edges around the Axes patch -- we # decouple these so the patch can be in the background and the # frame in the foreground. Do this before drawing the axis # objects so that the spine has the opportunity to update them. if not (self.axison and self._frameon): for spine in self.spines.values(): artists.remove(spine) self._update_title_position(renderer) if not self.axison: for _axis in self._axis_map.values(): artists.remove(_axis) if not self.figure.canvas.is_saving(): artists = [ a for a in artists if not a.get_animated() or isinstance(a, mimage.AxesImage)] artists = sorted(artists, key=attrgetter('zorder')) # rasterize artists with negative zorder # if the minimum zorder is negative, start rasterization rasterization_zorder = self._rasterization_zorder if (rasterization_zorder is not None and artists and artists[0].zorder < rasterization_zorder): split_index = np.searchsorted( [art.zorder for art in artists], rasterization_zorder, side='right' ) artists_rasterized = artists[:split_index] artists = artists[split_index:] else: artists_rasterized = [] if self.axison and self._frameon: if artists_rasterized: artists_rasterized = [self.patch] + artists_rasterized else: artists = [self.patch] + artists if artists_rasterized: _draw_rasterized(self.figure, artists_rasterized, renderer)> mimage._draw_list_compositing_images( renderer, self, artists, self.figure.suppressComposite)lib/matplotlib/axes/_base.py:3061:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0>, parent = <Axes: >, artists = [<matplotlib.patches.Rectangle object at 0x7f2318086e40>, <matplotlib.spines.Spine object at 0x7f2318a18ad0>, <matplot...2318a1b3b0>, <matplotlib.spines.Spine object at 0x7f2318a1b110>, <matplotlib.axis.XAxis object at 0x7f2318a18560>, ...], suppress_composite = None def _draw_list_compositing_images( renderer, parent, artists, suppress_composite=None): """ Draw a sorted list of artists, compositing images into a single image where possible. For internal Matplotlib use only: It is here to reduce duplication between `Figure.draw` and `Axes.draw`, but otherwise should not be generally useful. """ has_images = any(isinstance(x, _ImageBase) for x in artists) # override the renderer default if suppressComposite is not None not_composite = (suppress_composite if suppress_composite is not None else renderer.option_image_nocomposite()) if not_composite or not has_images: for a in artists:> a.draw(renderer)lib/matplotlib/image.py:131:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _artist = Text(0, 0, '$ \\wrong{math} $'), renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @wraps(draw) def draw_wrapper(artist, renderer): try: if artist.get_rasterized(): if renderer._raster_depth == 0 and not renderer._rasterizing: renderer.start_rasterizing() renderer._rasterizing = True renderer._raster_depth += 1 else: if renderer._raster_depth == 0 and renderer._rasterizing: # Only stop when we are not in a rasterized parent # and something has be rasterized since last stop renderer.stop_rasterizing() renderer._rasterizing = False if artist.get_agg_filter() is not None: renderer.start_filter()> return draw(artist, renderer)lib/matplotlib/artist.py:72:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = Text(0, 0, '$ \\wrong{math} $'), renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> @artist.allow_rasterization def draw(self, renderer): # docstring inherited if renderer is not None: self._renderer = renderer if not self.get_visible(): return if self.get_text() == '': return renderer.open_group('text', self.get_gid()) with self._cm_set(text=self._get_wrapped_text()):> bbox, info, descent = self._get_layout(renderer)lib/matplotlib/text.py:717:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = Text(0, 0, '$ \\wrong{math} $'), renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0> def _get_layout(self, renderer): """ Return the extent (bbox) of the text together with multiple-alignment information. Note that it returns an extent of a rotated text when necessary. """ thisx, thisy = 0.0, 0.0 lines = self._get_wrapped_text().split("\n") # Ensures lines is not empty. ws = [] hs = [] xs = [] ys = [] # Full vertical extent of font, including ascenders and descenders: _, lp_h, lp_d = _get_text_metrics_with_cache( renderer, "lp", self._fontproperties, ismath="TeX" if self.get_usetex() else False, dpi=self.figure.dpi) min_dy = (lp_h - lp_d) * self._linespacing for i, line in enumerate(lines): clean_line, ismath = self._preprocess_math(line) if clean_line:> w, h, d = _get_text_metrics_with_cache( renderer, clean_line, self._fontproperties, ismath=ismath, dpi=self.figure.dpi)lib/matplotlib/text.py:350:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _renderer = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0>, text = '$ \\wrong{math} $', fontprop = <matplotlib.font_manager.FontProperties object at 0x7f2318084a70>, ismath = True, dpi = 80.0 def _get_text_metrics_with_cache(renderer, text, fontprop, ismath, dpi): """Call ``renderer.get_text_width_height_descent``, caching the results.""" # Cached based on a copy of fontprop so that later in-place mutations of # the passed-in argument do not mess up the cache.> return _get_text_metrics_with_cache_impl( weakref.ref(renderer), text, fontprop.copy(), ismath, dpi)lib/matplotlib/text.py:69:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _renderer_ref = <weakref at 0x7f23183ce340; to 'RendererAgg' at 0x7f231f207da0>, text = '$ \\wrong{math} $', fontprop = <matplotlib.font_manager.FontProperties object at 0x7f231825bdd0>, ismath = True, dpi = 80.0 @functools.lru_cache(4096) def _get_text_metrics_with_cache_impl( renderer_ref, text, fontprop, ismath, dpi): # dpi is unused, but participates in cache invalidation (via the renderer).> return renderer_ref().get_text_width_height_descent(text, fontprop, ismath)lib/matplotlib/text.py:77:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <matplotlib.backends.backend_agg.RendererAgg object at 0x7f231f207da0>, s = '$ \\wrong{math} $', prop = <matplotlib.font_manager.FontProperties object at 0x7f231825bdd0>, ismath = True def get_text_width_height_descent(self, s, prop, ismath): # docstring inherited _api.check_in_list(["TeX", True, False], ismath=ismath) if ismath == "TeX": return super().get_text_width_height_descent(s, prop, ismath) if ismath: ox, oy, width, height, descent, font_image = \> self.mathtext_parser.parse(s, self.dpi, prop)lib/matplotlib/backends/backend_agg.py:230:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <matplotlib.mathtext.MathTextParser object at 0x7f2318a1bc80>, s = '$ \\wrong{math} $', dpi = 80.0, prop = <matplotlib.font_manager.FontProperties object at 0x7f2318c4d9d0> def parse(self, s, dpi=72, prop=None): """ Parse the given math expression *s* at the given *dpi*. If *prop* is provided, it is a `.FontProperties` object specifying the "default" font to use in the math expression, used for all non-math text. The results are cached, so multiple calls to `parse` with the same expression should be fast. Depending on the *output* type, this returns either a `VectorParse` or a `RasterParse`. """ # lru_cache can't decorate parse() directly because prop # is mutable; key the cache using an internal copy (see # text._get_text_metrics_with_cache for a similar case). prop = prop.copy() if prop is not None else None> return self._parse_cached(s, dpi, prop)lib/matplotlib/mathtext.py:77:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <matplotlib.mathtext.MathTextParser object at 0x7f2318a1bc80>, s = '$ \\wrong{math} $', dpi = 80.0, prop = <matplotlib.font_manager.FontProperties object at 0x7f2318c4d9d0> @functools.lru_cache(50) def _parse_cached(self, s, dpi, prop): from matplotlib.backends import backend_agg if prop is None: prop = FontProperties() fontset_class = _api.check_getitem( self._font_type_mapping, fontset=prop.get_math_fontfamily()) load_glyph_flags = { "vector": LOAD_NO_HINTING, "raster": backend_agg.get_hinting_flag(), }[self._output_type] fontset = fontset_class(prop, load_glyph_flags) fontsize = prop.get_size_in_points() if self._parser is None: # Cache the parser globally. self.__class__._parser = _mathtext.Parser()> box = self._parser.parse(s, fontset, fontsize, dpi)lib/matplotlib/mathtext.py:98:_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _self = <matplotlib._mathtext.Parser object at 0x7f232911e540>, s = '$ \\wrong{math} $', fonts_object = <matplotlib._mathtext.BakomaFonts object at 0x7f2318259670>, fontsize = 12.0, dpi = 80.0 def parse(self, s, fonts_object, fontsize, dpi): """ Parse expression *s* using the given *fonts_object* for output, at the given *fontsize* and *dpi*. Returns the parse tree of `Node` instances. """ self._state_stack = [ ParserState(fonts_object, 'default', 'rm', fontsize, dpi)] self._em_width_cache = {} try: result = self._expression.parseString(s) except ParseBaseException as err: # explain becomes a plain method on pyparsing 3 (err.explain(0)).> raise ValueError("\n" + ParseException.explain(err, 0)) from NoneE ValueError:E \wrong{math}E ^E ParseFatalException: Expected token, found '\' (at char 1), (line:1, col:2)lib/matplotlib/_mathtext.py:1991: ValueErrorDuring handling of the above exception, another exception occurred: def test_parse_math_rcparams(): # Default is True fig, ax = plt.subplots() ax.text(0, 0, r"$ \wrong{math} $")> with pytest.raises(ValueError, match='Unknown symbol'):E AssertionError: Regex pattern did not match.E Regex: 'Unknown symbol'E Input: "\n \\wrong{math} \n ^\nParseFatalException: Expected token, found '\\' (at char 1), (line:1, col:2)"lib/matplotlib/tests/test_text.py:835: AssertionError
that appear to be pyparsing or pytest doing something a bit wild and not escaping\ properly. |
PR Summary
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst