Page MenuHomeSoftware Heritage

requirements: Workaround ImportError when running pytest
ClosedPublic

Authored by anlambert on Feb 18 2022, 4:28 PM.

Details

Summary

markupsafe 2.1.0 removes functions that were used by Jinja2 < 3,
the latter being a dependency of pybadges.

As Jinja2 < 3 is installed in the venv, pinning markupsafe to
a version still compatible with Jinja2 < 3 is the only way to
avoid error when running pytest as some plugins import jinja2.

See https://jenkins.softwareheritage.org/job/DENV/job/tests/2187/
and https://jenkins.softwareheritage.org/blue/organizations/jenkins/DWAPPS%2Ftests/detail/tests/2829/pipeline

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build has FAILED

Patch application report for D7205 (id=26117)

Rebasing onto 213828bfd4...

Current branch diff-target is up to date.
Changes applied before test
commit f7b35626cb3b885c04e811a18c88797065b36d4e
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 18 16:24:05 2022 +0100

    requirements: Workaround ImportError when running pytest
    
    markupsafe 2.1.0 removes functions that were used by Jinja2 < 3,
    the latter being a dependency of pybadges.
    
    As Jinja2 < 3 is installed in the venv, pinning markupsafe to
    a version still compatible with Jinja2 < 3 is the only way to
    avoid error when running pytest as some plugins import jinja2.

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1390/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1390/console

Harbormaster returned this revision to the author for changes because remote builds failed.Feb 18 2022, 4:30 PM
Harbormaster failed remote builds in B26989: Diff 26117!

Build is green

Patch application report for D7205 (id=26117)

Rebasing onto 213828bfd4...

Current branch diff-target is up to date.
Changes applied before test
commit f7b35626cb3b885c04e811a18c88797065b36d4e
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 18 16:24:05 2022 +0100

    requirements: Workaround ImportError when running pytest
    
    markupsafe 2.1.0 removes functions that were used by Jinja2 < 3,
    the latter being a dependency of pybadges.
    
    As Jinja2 < 3 is installed in the venv, pinning markupsafe to
    a version still compatible with Jinja2 < 3 is the only way to
    avoid error when running pytest as some plugins import jinja2.

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/1391/ for more details.

This revision is now accepted and ready to land.Feb 18 2022, 5:15 PM