conda-forge / sagelib-feedstock

A conda-smithy repository for sagelib.
BSD 3-Clause "New" or "Revised" License
4 stars 8 forks source link

Plotting does not work in SageMath <9.2 with matplotlib-base >=3.5.0 #136

Open saraedum opened 2 years ago

saraedum commented 2 years ago

Solution to issue cannot be found in the documentation.

Issue

matplotlib removed the OldScalarFormatter in 3.5.0. This is used by SageMath<9.2. Consequently some plotting is broken resulting in:

     doctest:warning
      File "/usr/share/miniconda/envs/test/bin/sage-runtests", line 179, in <module>
        err = DC.run()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/control.py", line 1232, in run
        self.run_doctests()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/control.py", line 933, in run_doctests
        self.dispatcher.dispatch()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 2033, in dispatch
        self.parallel_dispatch()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 1925, in parallel_dispatch
        w.start()  # This might take some time
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 2200, in start
        super(DocTestWorker, self).start()
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/process.py", line 112, in start
        self._popen = self._Popen(self)
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/context.py", line 223, in _Popen
        return _default_context.get_context().Process._Popen(process_obj)
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/context.py", line 277, in _Popen
        return Popen(process_obj)
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/popen_fork.py", line 20, in __init__
        self._launch(process_obj)
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/popen_fork.py", line 74, in _launch
        code = process_obj._bootstrap()
      File "/usr/share/miniconda/envs/test/lib/python3.7/multiprocessing/process.py", line 297, in _bootstrap
        self.run()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 2172, in run
        task(self.options, self.outtmpfile, msgpipe, self.result_queue)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 2504, in __call__
        doctests, extras = self._run(runner, options, results)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 2553, in _run
        result = runner.run(test)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 897, in run
        return self._run(test, compileflags, out)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/doctest/forker.py", line 1123, in compile_and_execute
        exec(compiled, globs)
      File "<doctest flatsurf.geometry.hyperbolic.HyperbolicConvexSet.plot[2]>", line 1, in <module>
        H.vertical(Integer(0)).plot()
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 811, in displayhook
        plain_text, rich_output = self._rich_output_formatter(obj, dict())
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 625, in _rich_output_formatter
        rich_output = self._call_rich_repr(obj, rich_repr_kwds)
      File "/usr/share/miniconda/envs/test/lib/python3.7/site-packages/sage/repl/rich_output/display_manager.py", line 592, in _call_rich_repr
        RichReprWarning,
      File "/usr/share/miniconda/envs/test/lib/python3.7/warnings.py", line 110, in _showwarnmsg
        msg.file, msg.line)
    :
    sage.repl.rich_output.display_manager.RichReprWarning: Exception in _rich_repr_ while displaying object: cannot import name 'OldScalarFormatter' from 'matplotlib.ticker' (/usr/share/miniconda/envs/test/lib/python3.7/site-packages/matplotlib/ticker.py)

We should probably patch the metadata and add a run constraint.

Installed packages

_libgcc_mutex             0.1                 conda_forge    conda-forge
_openmp_mutex             4.5                       2_gnu    conda-forge
arb                       2.16.0            h04dde30_1001    conda-forge
argon2-cffi               21.3.0             pyhd8ed1ab_0    conda-forge
argon2-cffi-bindings      21.2.0           py37h540881e_2    conda-forge
attrs                     21.4.0             pyhd8ed1ab_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
bdw-gc                    8.0.6                h4bd325d_0    conda-forge
beautifulsoup4            4.11.1             pyha770c72_0    conda-forge
bleach                    5.0.0              pyhd8ed1ab_0    conda-forge
brotli                    1.0.9                h166bdaf_7    conda-forge
brotli-bin                1.0.9                h166bdaf_7    conda-forge
ca-certificates           2021.10.8            ha878542_0    conda-forge
cddlib                    1!0.94m              h9202a9a_0    conda-forge
certifi                   2021.10.8        py37h89c1867_2    conda-forge
cffi                      1.15.0           py37h036bc23_0    conda-forge
cliquer                   1.21              h516909a_1001    conda-forge
cycler                    0.11.0             pyhd8ed1ab_0    conda-forge
cypari2                   2.1.2            py37h17f1a16_0    conda-forge
cysignals                 1.10.3           py37h25c962d_0    conda-forge
cython                    0.29.28          py37hd23a5d3_2    conda-forge
decorator                 5.1.1              pyhd8ed1ab_0    conda-forge
defusedxml                0.7.1              pyhd8ed1ab_0    conda-forge
ecl                       16.1.3            h33275a5_1006    conda-forge
eclib                     20190226             h961da46_2    conda-forge
ecm                       7.0.4             h9202a9a_1002    conda-forge
entrypoints               0.4                pyhd8ed1ab_0    conda-forge
execnet                   1.9.0              pyhd8ed1ab_0    conda-forge
expat                     2.4.8                h27087fc_0    conda-forge
fflas-ffpack              2.4.3                h912ac81_2    conda-forge
flipper                   0.15.3                   pypi_0    pypi
flit-core                 3.7.1              pyhd8ed1ab_0    conda-forge
fontconfig                2.14.0               h8e229c2_0    conda-forge
fonttools                 4.33.3           py37h540881e_0    conda-forge
freetype                  2.10.4               h0708190_1    conda-forge
future                    0.18.2           py37h89c1867_5    conda-forge
gap-core                  4.10.2               h600fbeb_6    conda-forge
gap-defaults              4.10.2               ha770c72_6    conda-forge
gf2x                      1.2               h5586051_1003    conda-forge
giflib                    5.2.1                h36c2ea0_2    conda-forge
givaro                    4.1.1                h192cbe9_1    conda-forge
glpk                      4.65              h9202a9a_1004    conda-forge
gmp                       6.2.1                h58526e2_0    conda-forge
gmpy2                     2.1.2            py37h025e8b9_0    conda-forge
gsl                       2.5                  h294904e_1    conda-forge
icu                       67.1                 he1b5a44_0    conda-forge
iml                       1.0.5             hd75c201_1003    conda-forge
importlib-metadata        4.11.3           py37h89c1867_1    conda-forge
importlib_metadata        4.11.3               hd8ed1ab_1    conda-forge
importlib_resources       5.7.1              pyhd8ed1ab_0    conda-forge
iniconfig                 1.1.1              pyh9f0ad1d_0    conda-forge
ipykernel                 5.5.5            py37h085eea5_0    conda-forge
ipython                   5.8.0                    py37_1    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
ipywidgets                7.7.0              pyhd8ed1ab_0    conda-forge
jbig                      2.1               h7f98852_2003    conda-forge
jinja2                    2.10.3                     py_0    conda-forge
jpeg                      9e                   h166bdaf_1    conda-forge
jsonschema                4.5.1              pyhd8ed1ab_0    conda-forge
jupyter_client            7.3.1              pyhd8ed1ab_0    conda-forge
jupyter_core              4.9.2            py37h89c1867_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_widgets        1.1.0              pyhd8ed1ab_0    conda-forge
kiwisolver                1.4.2            py37h7cecad7_1    conda-forge
lcalc                     1.23              h0d16fac_1004    conda-forge
lcms2                     2.12                 hddcbb42_0    conda-forge
ld_impl_linux-64          2.36.1               hea4e1c9_2    conda-forge
lerc                      3.0                  h9c3ff4c_0    conda-forge
libblas                   3.9.0           14_linux64_openblas    conda-forge
libbraiding               1.0                  he1b5a44_0    conda-forge
libbrial                  1.2.10               hb0536f6_0    conda-forge
libbrotlicommon           1.0.9                h166bdaf_7    conda-forge
libbrotlidec              1.0.9                h166bdaf_7    conda-forge
libbrotlienc              1.0.9                h166bdaf_7    conda-forge
libcblas                  3.9.0           14_linux64_openblas    conda-forge
libdeflate                1.10                 h7f98852_0    conda-forge
libffi                    3.4.2                h7f98852_5    conda-forge
libflint                  2.5.2             h3fb3072_1003    conda-forge
libgcc-ng                 11.2.0              h1d223b6_16    conda-forge
libgd                     2.2.5             h6e6070c_1008    conda-forge
libgfortran-ng            11.2.0              h69a702a_16    conda-forge
libgfortran5              11.2.0              h5c6108e_16    conda-forge
libgomp                   11.2.0              h1d223b6_16    conda-forge
libhomfly                 1.02r6               h36c2ea0_0    conda-forge
libiconv                  1.16                 h516909a_0    conda-forge
liblapack                 3.9.0           14_linux64_openblas    conda-forge
liblapacke                3.9.0           14_linux64_openblas    conda-forge
libnsl                    2.0.0                h7f98852_0    conda-forge
libopenblas               0.3.20          pthreads_h78a6416_0    conda-forge
libpng                    1.6.37               h21135ba_2    conda-forge
libsodium                 1.0.18               h36c2ea0_1    conda-forge
libstdcxx-ng              11.2.0              he4da1e4_16    conda-forge
libtiff                   4.3.0                h542a066_3    conda-forge
libuuid                   2.32.1            h7f98852_1000    conda-forge
libwebp                   1.2.2                h3452ae3_0    conda-forge
libwebp-base              1.2.2                h7f98852_1    conda-forge
libxcb                    1.13              h7f98852_1004    conda-forge
libzlib                   1.2.11            h166bdaf_1014    conda-forge
linbox                    1.6.3                h03cd913_2    conda-forge
lrcalc                    1.2               h58526e2_1000    conda-forge
lz4-c                     1.9.3                h9c3ff4c_1    conda-forge
m4ri                      20140914          h7ca028e_1005    conda-forge
m4rie                     20150908          h7ca028e_1001    conda-forge
markupsafe                1.1.1            py37h5e8e339_3    conda-forge
matplotlib-base           3.5.2            py37hc347a89_0    conda-forge
mistune                   0.8.4           py37h5e8e339_1005    conda-forge
mpc                       1.2.1                h9f54685_0    conda-forge
mpfi                      1.5.4             h9f54685_1001    conda-forge
mpfr                      4.1.0                h9202a9a_1    conda-forge
mpmath                    1.2.1                    pypi_0    pypi
munkres                   1.1.4              pyh9f0ad1d_0    conda-forge
nbclient                  0.5.13             pyhd8ed1ab_0    conda-forge
nbconvert                 6.4.4            py37h89c1867_0    conda-forge
nbformat                  5.4.0              pyhd8ed1ab_0    conda-forge
ncurses                   6.3                  h27087fc_1    conda-forge
nest-asyncio              1.5.5              pyhd8ed1ab_0    conda-forge
networkx                  2.6.3                    pypi_0    pypi
notebook                  6.4.11             pyha770c72_0    conda-forge
ntl                       11.3.2            h4703815_1000    conda-forge
numpy                     1.21.6           py37h976b520_0    conda-forge
openjpeg                  2.4.0                hb52868f_1    conda-forge
openssl                   1.1.1o               h166bdaf_0    conda-forge
packaging                 21.3               pyhd8ed1ab_0    conda-forge
pandas                    1.3.5                    pypi_0    pypi
pandoc                    2.18                 ha770c72_0    conda-forge
pandocfilters             1.5.0              pyhd8ed1ab_0    conda-forge
pari                      2.11.4               hddaffa3_2    conda-forge
pari-galdata              0.0.20180411                  0    conda-forge
pari-seadata-small        0.0.20090618                  0    conda-forge
perl                      5.32.1          2_h7f98852_perl5    conda-forge
pexpect                   4.8.0              pyh9f0ad1d_2    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    9.1.0            py37h44f0d7a_2    conda-forge
pip                       22.0.4             pyhd8ed1ab_0    conda-forge
planarity                 3.0.0.5           h36c2ea0_1002    conda-forge
pluggy                    1.0.0            py37h89c1867_3    conda-forge
ppl                       1.2               h8c76519_1005    conda-forge
pplpy                     0.8.6            py37he4953fd_1    conda-forge
prometheus_client         0.14.1             pyhd8ed1ab_0    conda-forge
prompt_toolkit            1.0.15                     py_1    conda-forge
psutil                    5.9.0            py37h540881e_1    conda-forge
pthread-stubs             0.4               h36c2ea0_1001    conda-forge
ptyprocess                0.7.0              pyhd3deb0d_0    conda-forge
py                        1.11.0             pyh6c4a22f_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pygments                  2.12.0             pyhd8ed1ab_0    conda-forge
pynac                     0.7.26           py37h4fdf5a9_1    conda-forge
pyparsing                 3.0.8              pyhd8ed1ab_0    conda-forge
pyrsistent                0.18.1           py37h540881e_1    conda-forge
pytest                    7.1.2            py37h89c1867_0    conda-forge
pytest-forked             1.4.0              pyhd8ed1ab_0    conda-forge
pytest-repeat             0.9.1              pyhd8ed1ab_0    conda-forge
pytest-xdist              2.5.0              pyhd8ed1ab_0    conda-forge
python                    3.7.12          hb7a2778_100_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python-fastjsonschema     2.15.3             pyhd8ed1ab_0    conda-forge
python_abi                3.7                     2_cp37m    conda-forge
pytz                      2022.1                   pypi_0    pypi
pyzmq                     22.3.0           py37h0c0c2a8_2    conda-forge
ratpoints                 2.1.3             h445213a_1002    conda-forge
readline                  8.1                  h46c0cb4_0    conda-forge
realalg                   0.3.4                    pypi_0    pypi
rw                        0.7                           1    conda-forge
sagelib                   8.9              py37h9c8e189_0    conda-forge
scipy                     1.7.3            py37hf2a6cf1_0    conda-forge
send2trash                1.8.0              pyhd8ed1ab_0    conda-forge
setuptools                62.1.0           py37h89c1867_0    conda-forge
simplegeneric             0.8.1                      py_1    conda-forge
singular                  4.1.1.p2             h7f49944_2    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
soupsieve                 2.3.1              pyhd8ed1ab_0    conda-forge
sqlite                    3.38.5               h4ff8645_0    conda-forge
surface-dynamics          0.4.7            py37h446f4a5_3    conda-forge
symmetrica                2.0               h58526e2_1007    conda-forge
sympy                     1.10.1                   pypi_0    pypi
terminado                 0.13.3           py37h89c1867_1    conda-forge
testpath                  0.6.0              pyhd8ed1ab_0    conda-forge
tk                        8.6.12               h27826a3_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tornado                   6.1              py37h540881e_3    conda-forge
traitlets                 5.1.1              pyhd8ed1ab_0    conda-forge
typing-extensions         4.2.0                hd8ed1ab_1    conda-forge
typing_extensions         4.2.0              pyha770c72_1    conda-forge
unicodedata2              14.0.0           py37h540881e_1    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
webencodings              0.5.1                      py_1    conda-forge
wheel                     0.37.1             pyhd8ed1ab_0    conda-forge
widgetsnbextension        3.6.0            py37h89c1867_0    conda-forge
xorg-libxau               1.0.9                h7f98852_0    conda-forge
xorg-libxdmcp             1.1.3                h7f98852_0    conda-forge
xz                        5.2.5                h516909a_1    conda-forge
zeromq                    4.3.4                h9c3ff4c_1    conda-forge
zipp                      3.8.0              pyhd8ed1ab_0    conda-forge
zlib                      1.2.11            h166bdaf_1014    conda-forge
zn_poly                   0.9.2                h9202a9a_0    conda-forge
zstd                      1.5.2                ha95c52a_0    conda-forge

Environment info

CI environment, https://github.com/flatsurf/sage-flatsurf/runs/6369184640?check_suite_focus=true