Skip to content

Pin Jinja2 to fix docs build #91294

Closed
Closed

Description

@hugovk
BPO 47138
Nosy @ned-deily, @ambv, @zooba, @hugovk, @miss-islington, @m-aciek
PRs
  • [3.7] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 #32111
  • [3.8] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 #32109
  • [3.9] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 #32153
  • [3.10] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 #32154
  • bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms #32161
  • [3.10] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) #32163
  • [3.8] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) #32167
  • [3.7] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) #32168
  • [3.9] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) #32169
  • [3.7] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms #32182
  • [3.8] bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161) #32183
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2022-03-28.08:17:25.467>
    labels = ['3.7', '3.8', '3.9', '3.10', 'docs']
    title = 'Pin Jinja2 to fix docs build'
    updated_at = <Date 2022-04-08.13:06:24.310>
    user = 'https://github.com/hugovk'

    bugs.python.org fields:

    activity = <Date 2022-04-08.13:06:24.310>
    actor = 'lukasz.langa'
    assignee = 'docs@python'
    closed = False
    closed_date = None
    closer = None
    components = ['Documentation']
    creation = <Date 2022-03-28.08:17:25.467>
    creator = 'hugovk'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47138
    keywords = ['patch']
    message_count = 14.0
    messages = ['416149', '416151', '416158', '416167', '416171', '416194', '416195', '416196', '416197', '416209', '416233', '416235', '416285', '416983']
    nosy_count = 7.0
    nosy_names = ['ned.deily', 'docs@python', 'lukasz.langa', 'steve.dower', 'hugovk', 'miss-islington', 'Maciej Olko']
    pr_nums = ['32111', '32109', '32153', '32154', '32161', '32163', '32167', '32168', '32169', '32182', '32183']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue47138'
    versions = ['Python 3.7', 'Python 3.8', 'Python 3.9', 'Python 3.10']

    Activity

    1. hugovk commented on Mar 28, 2022

      @hugovk
      MemberAuthor

      The docs build on GitHub Actions is passing on main but has started failing for the 3.7 - 3.10 branches:

      Missing the required blurb or sphinx-build tools.
      Please run 'make venv' to install local copies.
      
      make[1]: *** [Makefile:50: build] Error 1
      

      https://github.com/python/cpython/actions/workflows/doc.yml
      https://github.com/python/cpython/runs/5714593700?check_suite_focus=true

      This is because the PATH=./venv/bin:$PATH sphinx-build --version check is failing:

      /home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py:45: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
        __version_info__ = tuple(LooseVersion(docutils.__version__).version)
      Traceback (most recent call last):
        File "/home/runner/work/cpython/cpython/Doc/./venv/bin/sphinx-build", line 5, in <module>
          from sphinx.cmd.build import main
        File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/cmd/build.py", line 25, in <module>
          from sphinx.application import Sphinx
        File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/application.py", line 42, in <module>
          from sphinx.registry import SphinxComponentRegistry
        File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/registry.py", line 24, in <module>
          from sphinx.builders import Builder
        File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/builders/__init__.py", line 26, in <module>
          from sphinx.util import import_object, logging, rst, progress_message, status_iterator
        File "/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/sphinx/util/rst.py", line 22, in <module>
          from jinja2 import environmentfilter
      ImportError: cannot import name 'environmentfilter' from 'jinja2' (/home/runner/work/cpython/cpython/Doc/venv/lib/python3.10/site-packages/jinja2/__init__.py)
      

      This is because 3.10 and 3.9 are still using old versions of Sphinx (3.2.1 and 2.4.4 respectively) which is incompatible with the newest Jinja2:

      pallets/jinja#1630

      main is using a newer Sphinx (4.2.0), so it passes.

      Bumping to Sphinx 4.5.0 will fix both 3.9 and 3.10. 3.7 and 3.8 are affected too. We can bump main to use 4.5.0 as well.

    2. added
      3.11
      3.10 (EOL)
      3.7 (EOL)
      3.8 (EOL)
      3.9 (EOL)
      on Mar 28, 2022
    3. added
      3.10 (EOL)
      docs
      3.7 (EOL)
      3.8 (EOL)
      3.9 (EOL)
      on Mar 28, 2022
    4. added
      docs
      on Mar 28, 2022
    5. 9 remaining items

    6. changed the title [-]Bump Sphinx or pin Jinja2 to fix docs build[/-] on Mar 28, 2022
    7. ned-deily commented on Mar 28, 2022

      @ned-deily
      Member

      New changeset 25f00bf by m-aciek in branch '3.7':
      bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32111)
      25f00bf

    8. ned-deily commented on Mar 28, 2022

      @ned-deily
      Member

      New changeset 9194a7b by Hugo van Kemenade in branch '3.10':
      bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32154)
      9194a7b

    9. ned-deily commented on Mar 28, 2022

      @ned-deily
      Member

      New changeset 25c40bd by Hugo van Kemenade in branch '3.9':
      bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32153)
      25c40bd

    10. ned-deily commented on Mar 28, 2022

      @ned-deily
      Member

      Thanks, everyone! Merged for 3.10.5, 3.9.13, and 3.7.14. I'll leave the issue in pending state until merged for 3.8.14.

    11. zooba commented on Mar 28, 2022

      @zooba
      Member

      New changeset 295114d by Steve Dower in branch 'main':
      bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161)
      295114d

    12. zooba commented on Mar 28, 2022

      @zooba
      Member

      New changeset 0dfabf9 by Steve Dower in branch '3.10':
      bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161)
      0dfabf9

    13. miss-islington commented on Mar 29, 2022

      @miss-islington
      Contributor

      New changeset d2c6a44 by Miss Islington (bot) in branch '3.9':
      bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32161)
      d2c6a44

    14. ned-deily commented on Mar 29, 2022

      @ned-deily
      Member

      New changeset d97497b by Steve Dower in branch '3.7':
      bpo-47138: Ensure Windows docs build uses the same pinned version as other platforms (GH-32182)
      d97497b

    15. ambv commented on Apr 8, 2022

      @ambv
      Contributor

      New changeset d35af52 by m-aciek in branch '3.8':
      [3.8] bpo-47138: Fix documentation build by pinning Jinja version to 3.0.3 (GH-32109)
      d35af52

    16. transferred this issue fromon Apr 10, 2022
    17. kumaraditya303 commented on May 9, 2022

      @kumaraditya303
      Contributor

      @hugovk Can this be closed now ?

    18. hugovk commented on May 9, 2022

      @hugovk
      MemberAuthor

      We're still waiting for #32183 to be merged for 3.8.

      Ping 3.8 RM @ambv.

    19. hugovk commented on May 9, 2022

      @hugovk
      MemberAuthor

      #32183 is now merged! Closing, thanks all!

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.10 (EOL)3.7 (EOL)3.8 (EOL)3.9 (EOL)docs

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions