Skip to content

Revisit the temporary mistune<3.3 workaround for nbconvert on Python 3.8 #788

Description

@amol-

Goal

Replace the temporary mistune workaround with a proper long-term solution, or
roll it back once the upstream issue is resolved.

mistune 3.3+ uses re.Pattern[str] subscription syntax that is invalid on
Python 3.8, raising TypeError: 'type' object is not subscriptable. Since
nbconvert pulls mistune transitively, the notebook-executing tests crash on
the Python 3.8 CI job.

A workaround was applied in this commit:
6413971

It does two things:

  • Pins mistune<3.3; python_version=='3.8' in the test extra (covers the main
    test venv).
  • Skips the voila and notebook quickstart boot-smoke tests on Python 3.8
    (their scaffolded venv is built by uv sync and cannot use that pin).

Done means: either a clean long-term fix is in place, or the workaround is
removed once it is no longer needed.

Why

The workaround keeps CI green but is a stopgap. It reduces Python 3.8 coverage
(two skipped boot-smoke tests) and carries a version pin that should not outlive
the upstream problem. Leaving it undocumented risks it lingering after it stops
being necessary.

References

  • Workaround commit: 6413971
  • pyproject.toml (test extra, mistune pin)
  • tests/test_quickstart.py (_PY38_NBCONVERT_SKIP, boot-smoke matrix)
  • Possible trigger to revisit: nbconvert/mistune restoring Python 3.8 compatibility, or dropping Python 3.8 from the support matrix (requires-python = ">=3.8")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions