Skip to content

jupyterlab: Use jupyterlab-server < 2.11 #33607

@mkoeppe

Description

@mkoeppe

Versions of jupyterlab-server >= 2.11 require jinja2 >= 3, which is incompatible. https://github.com/jupyter-server/jupyter_server/blob/main/CHANGELOG.md

This leads to errors when creating a new jupyter notebook:

      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/notebook/templates/notebook.html", line 115, in block 'header'
        {% for exporter in get_frontend_exporters() %}
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/notebook/notebook/handlers.py", line 23, in get_frontend_exporters
        from nbconvert.exporters.base import get_export_names, get_exporter
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/nbconvert/__init__.py", line 4, in <module>
        from .exporters import *
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/nbconvert/exporters/__init__.py", line 3, in <module>
        from .html import HTMLExporter
      File "/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/nbconvert/exporters/html.py", line 14, in <module>
        from jinja2 import contextfilter
    ImportError: cannot import name 'contextfilter' from 'jinja2' (/Users/mkoeppe/s/sage/sage-rebasing/worktree-gcc11/local/var/lib/sage/venv-python3.10/lib/python3.10/site-packages/jinja2/__init__.py)

Our upgrade for jinja2 is stuck in #31937, so we set a version bound here.

CC: @egourgoulhon

Component: packages: optional

Author: Matthias Koeppe

Branch/Commit: 09c3fd2

Reviewer: Eric Gourgoulhon

Issue created by migration from https://trac.sagemath.org/ticket/33607

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions