When trying to run the tests locally, the command fails with the following error:
ImportError while loading conftest '/home/mjarosie/source/mjarosie/arsenic/tests/conftest.py'.
tests/conftest.py:13: in <module>
from .app import build_app
tests/app.py:4: in <module>
from jinja2 import FileSystemLoader, Environment
../../../.cache/pypoetry/virtualenvs/arsenic-AKF9VmY4-py3.10/lib/python3.10/site-packages/jinja2/__init__.py:12: in <module>
from .environment import Environment
../../../.cache/pypoetry/virtualenvs/arsenic-AKF9VmY4-py3.10/lib/python3.10/site-packages/jinja2/environment.py:25: in <module>
from .defaults import BLOCK_END_STRING
../../../.cache/pypoetry/virtualenvs/arsenic-AKF9VmY4-py3.10/lib/python3.10/site-packages/jinja2/defaults.py:3: in <module>
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
../../../.cache/pypoetry/virtualenvs/arsenic-AKF9VmY4-py3.10/lib/python3.10/site-packages/jinja2/filters.py:13: in <module>
from markupsafe import soft_unicode
E ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/home/mjarosie/.cache/pypoetry/virtualenvs/arsenic-AKF9VmY4-py3.10/lib/python3.10/site-packages/markupsafe/__init__.py)
One solution would be to pin markupsafe dependency to 2.0.1 as suggested in this SO answer. Another solution would be to update Jinja2 dependency, which seems safe as it's a dev-dependency anyway.
EDIT:
It turns out the CI check is failing because of yet another outdated dependency. Invoking black causes the following error:
ImportError: cannot import name '_unicodefun' from 'click'
Pinning to Jinja2<3.1 did fix the issue and the build is green now. I've tried upgradingsphinx version instead which also results in a green build. As a side effect https://arsenic.readthedocs.io will get a refreshed look, such as a navigation bar which I was going to mention in another GitHub issue anyway.
When trying to run the tests locally, the command fails with the following error:
It's caused by using an old version of
Jinja2
with its broken dependency (markupsafe
): https://github.com/pallets/markupsafe/issues/282Steps to reproduce:
One solution would be to pin
markupsafe
dependency to2.0.1
as suggested in this SO answer. Another solution would be to updateJinja2
dependency, which seems safe as it's a dev-dependency anyway.EDIT:
It turns out the CI check is failing because of yet another outdated dependency. Invoking
black
causes the following error:More details about the cause: https://github.com/psf/black/issues/2964
EDIT:
After updating
Jinja2
to its latest version (^3.1.2
) it turns outsphinx-build
isn't happy because:Pinning to
Jinja2<3.1
apparently should fix it.EDIT:
Pinning to
Jinja2<3.1
did fix the issue and the build is green now. I've tried upgradingsphinx
version instead which also results in a green build. As a side effect https://arsenic.readthedocs.io will get a refreshed look, such as a navigation bar which I was going to mention in another GitHub issue anyway.Old look
New look