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
I discovered that the forthcoming matplotlib==3.10.0 which was released to PyPI 2024-12-14 results in an ImportError in Topoly.
The TopoStats test suite threw the error in a fresh virtual environment that had installed matplotlib==3.10.0
_______________________________________________________ ERROR collecting tests/test_entry_all_in_one.py _______________________________________________________
ImportError while importing test module '/home/neil/work/git/hub/AFM-SPM/TopoStats/tests/test_entry_all_in_one.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.11/importlib/__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/test_entry_all_in_one.py:8: in <module>
from topostats import run_modules
topostats/run_modules.py:33: in <module>
from topostats.processing import (
topostats/processing.py:29: in <module>
from topostats.tracing.ordered_tracing import ordered_tracing_image
topostats/tracing/ordered_tracing.py:12: in <module>
from topoly import jones, translate_code
/home/neil/.virtualenvs/tmp-2e7e1dcac8fb344/lib/python3.11/site-packages/topoly/__init__.py:24: in <module>
from .manipulation import read_file, data2dictionary, data2knotprot, data2matrix,\
/home/neil/.virtualenvs/tmp-2e7e1dcac8fb344/lib/python3.11/site-packages/topoly/manipulation.py:39: in <module>
from topoly.plotting import Reader, KnotMap
/home/neil/.virtualenvs/tmp-2e7e1dcac8fb344/lib/python3.11/site-packages/topoly/plotting.py:13: in <module>
from mpl_toolkits.axes_grid1.inset_locator import InsetPosition
E ImportError: cannot import name 'InsetPosition' from 'mpl_toolkits.axes_grid1.inset_locator' (/home/neil/.virtualenvs/tmp-2e7e1dcac8fb344/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/inset_locator.py)
In addressing #986 I tested in a fresh virtual environment. This pulled in
[matplotlib-3.10.0](https://github.com/matplotlib/matplotlib/releases/tag/v3.10.0) which was released 2024-12-14 (two
days ago!). Our dependency on [topoly](topoly.cent.uw.edu.pl/documentation.html) doesn't work with this new version
because of the removal of `inset_location.InsetPosition` in favour of `inset_axes`.
This has been reported to the Topoly developers, see [ImportError: cannot import name 'InsetPosition' from
'mpl_toolkits.axes_grid1.inset_locator' · Issue #5 ·
ilbsm/topoly_tutorial](ilbsm/topoly_tutorial#5) and hopefully won't take long to resolve. For
now though we pin our dependency `matplotlib~=3.9.4` and all tests pass.
I discovered that the forthcoming
matplotlib==3.10.0
which was released to PyPI 2024-12-14 results in anImportError
in Topoly.The TopoStats test suite threw the error in a fresh virtual environment that had installed
matplotlib==3.10.0
It looks like
inset_axes
should be used instead according to the note on the API changeThe text was updated successfully, but these errors were encountered: