Skip to content

What to do about Jinja2 dependency & supporting old sphinx versions #380

Closed
@rossbar

Description

@rossbar

I just wanted to float this out there given that there have been several issues (#376 #373) in addition to many more from libraries that use numpydoc (e.g. scipy/scipy#15895, many more linked examples in the parent sphinx issue: sphinx-doc/sphinx#10291).

The latest minor release of Jinja2 (3.1) is incompatible with all sphinx versions earlier than 4.0.2 (see sphinx-doc/sphinx#10291). Since numpydoc currently supports sphinx versions all the way back to 1.8, the Jinja2 incompatibility has been a bit disruptive. #369 added a pin for Jinja2, but this is inconvenient for projects that use numpydoc but have the latest sphinx installed and want to use the latest jinja2 as well. Essentially the (Jinja2<=3.1) pin is only in numpydoc because of the commitment to support sphinx < 4.0.2.

I wanted to collect opinions on what could be done here. Are there strong motivations for supporting sphinx<4 and is there a timeline for when numpydoc drops support for older sphinx versions? FWIW the sphinx devs have stated they are not patching sphinx 3. If numpydoc is going to keep supporting older sphinx versions, then I think an alternative to pinning Jinja2 should be investigated e.g. refactoring or vendoring the problematic code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions