askap-vast / vast-pipeline

This repository holds the code of the Radio Transient detection pipeline for the VAST project.
https://vast-survey.org/vast-pipeline/
MIT License
7 stars 3 forks source link

bump jinja2 to v3 #634

Closed marxide closed 2 years ago

marxide commented 2 years ago

Jinja2 depends on Markupsafe but the constraint is a minimum version with no upper bound. Markupsafe recently removed a deprecated function which causes the following error:

ImportError: cannot import name 'soft_unicode' from 'markupsafe'

The problem has been reported by a few Jinja2 users, e.g. https://github.com/pallets/jinja/issues/1585. The Jinja2 dev team recommends upgrading Jinja2 - they refuse to patch the v2 releases with an upper bound to their Markupsafe constraint as it's considered "unsupported".

This PR bumps out Jinja2 requirement to Jinja2 = "^3.0.3". We only use Jinja2 for templating the run config files - I see no breaking changes and the tests passed locally.

marxide commented 2 years ago

@ajstewart I think this is better than adding Markupsafe to our dependencies since we don't directly depend on Markupsafe, Jinja2 does.

If you agree, I suggest merging this into dev then rebasing #627 onto dev, and removing the Markupsafe pin in #627.

ajstewart commented 2 years ago

@ajstewart I think this is better than adding Markupsafe to our dependencies since we don't directly depend on Markupsafe, Jinja2 does.

If you agree, I suggest merging this into dev then rebasing #627 onto dev, and removing the Markupsafe pin in #627.

Yep makes sense, I'm happy with that.