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: Disallow Jinja2 v3.1.0 to avoid nbsphinx triggering attribute error #1824

Merged
merged 3 commits into from
Mar 24, 2022

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Mar 24, 2022

Description

Stopgap measure to deal with Issue #1823 for the time being until there is a fix. As nbsphinx v0.8.7 is reliant on Jinja2 v3.0.X APIs and so Jinja2 v3.1.0 breaks it.

This is a stopgap measure and this should be removed as soon as there is a resolution and new nbsphinx release.

c.f. spatialaudio/nbsphinx#641 for more details.

Checklist Before Requesting Reviewer

  • Tests are passing
  • "WIP" removed from the title of the pull request
  • Selected an Assignee for the PR to be responsible for the log summary

Before Merging

For the PR Assignees:

  • Summarize commit messages into a comprehensive review of the PR
* Disallow Jinja2 v3.1.0 to avoid nbsphinx triggering attribute error:
    
    AttributeError: module 'jinja2.utils' has no attribute 'escape'

This is a stopgap measure and this line should be removed as soon as there
is a resolution and new nbsphinx release.
   - c.f. https://github.com/spatialaudio/nbsphinx/issues/641

@matthewfeickert matthewfeickert added docs Documentation related fix A bug fix labels Mar 24, 2022
@matthewfeickert matthewfeickert self-assigned this Mar 24, 2022
@codecov
Copy link

codecov bot commented Mar 24, 2022

Codecov Report

Merging #1824 (1a7fac2) into master (419bc76) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1824   +/-   ##
=======================================
  Coverage   98.16%   98.16%           
=======================================
  Files          68       68           
  Lines        4315     4315           
  Branches      725      725           
=======================================
  Hits         4236     4236           
  Misses         46       46           
  Partials       33       33           
Flag Coverage Δ
contrib 26.44% <ø> (ø)
doctest 60.78% <ø> (ø)
unittests-3.10 96.03% <ø> (ø)
unittests-3.7 96.02% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 419bc76...1a7fac2. Read the comment docs.

@matthewfeickert matthewfeickert merged commit 3ab2077 into master Mar 24, 2022
@matthewfeickert matthewfeickert deleted the fix/no-jinja-310 branch March 24, 2022 19:56
matthewfeickert added a commit that referenced this pull request Apr 3, 2022
* Revert PR #1824 to remove restrictions place on Jinja2 given
spatialaudio/nbsphinx#641. The issues
described there were resolved upstream of nbsphinx in
jupyter/nbconvert#1737.
   - Lower bounds of 'nbconvert>=6.4.5' are not added as lower
     bound restrictions should be applied upstream of pyhf in
     nbsphinx. PR #1824 was applied only because it was
     necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation related fix A bug fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants