Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sphinx error at tests execution #259

Closed
wants to merge 1 commit into from
Closed

Fix sphinx error at tests execution #259

wants to merge 1 commit into from

Conversation

sandcha
Copy link
Contributor

@sandcha sandcha commented Apr 28, 2022

Fixes the Extension error: Could not import extension sphinx.builders.latex (exception: cannot import name 'contextfunction' from 'jinja2' (/.../virtualenvs/doc-install/lib/python3.7/site-packages/jinja2/__init__.py)) raised at make test.

Additional information

  • make test was executed in a virtual environment after make install.
  • The error was detected with Jinja2 v.3.1.1, Sphinx v.1.5.1 and Flask 1.1.4.

@sandcha
Copy link
Contributor Author

sandcha commented Apr 28, 2022

This is a draft pull request as:

  • It fixes Jinja2 dependency revision but we might find a better solution as Jinja2 isn't a first level dependency but comes with Flask.
  • The error is also related to Sphinx and, as said by this comment for a similar issue, it might be better to upgrade Sphinx dependency instead.
  • With Jinja2 fix make install still contains this message:
    ERROR: pip's legacy dependency resolver does not consider dependency conflicts when selecting packages. This behaviour is the source of the following dependency conflicts.
    flake8 3.9.2 requires pycodestyle<2.8.0,>=2.7.0, but you'll have pycodestyle 2.8.0 which is incompatible.
    flask 1.1.4 requires Jinja2<3.0,>=2.10.1, but you'll have jinja2 3.0.3 which is incompatible.

Jinja2 releases history.
Sphinx releases history.

@MattiSG
Copy link
Member

MattiSG commented Apr 28, 2022

I'm in favour of upgrading Sphinx if that fixes the issue 🙂

@MattiSG MattiSG mentioned this pull request May 10, 2022
4 tasks
@MattiSG
Copy link
Member

MattiSG commented Jun 17, 2022

Superseded by #264.

@MattiSG MattiSG closed this Jun 17, 2022
@MattiSG MattiSG deleted the fix-dep-error branch June 17, 2022 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants