Page MenuHomeSoftware Heritage

Fix support of Werkzeug 2.1.0
ClosedPublic

Authored by vlorentz on Mar 29 2022, 2:33 PM.

Details

Summary

Since https://github.com/pallets/werkzeug/commit/74601150b559c73a8c8732b4c67bbc6377d1a7df
(published yesterday as part of version 2.1.0), Werkzeug crashes when WERKZEUG_RUN_MAIN
is true but WERKZEUG_SERVER_FD is not provided.

This is legitimate, because applications should not set WERKZEUG_RUN_MAIN.

This commit rewrites the hack hiding the server banner so it still works
with this Werkzeug version.

Diff Detail

Repository
rDCORE Foundations and core functionalities
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7455 (id=26986)

Rebasing onto ba5a6ef533...

Current branch diff-target is up to date.
Changes applied before test
commit 06ad6596368b4ebe25b170a11533104f4725022f
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Tue Mar 29 14:32:51 2022 +0200

    Fix support of Werkzeug 2.1.0
    
    Since https://github.com/pallets/werkzeug/commit/74601150b559c73a8c8732b4c67bbc6377d1a7df
    (published yesterday as part of version 2.1.0), Werkzeug crashes when WERKZEUG_RUN_MAIN
    is true but WERKZEUG_SERVER_FD is not provided.
    
    This is legitimate, because applications should not set WERKZEUG_RUN_MAIN.
    
    This commit rewrites the hack hiding the server banner so it still works
    with this Werkzeug version.

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

This revision is now accepted and ready to land.Mar 29 2022, 2:36 PM
This revision was automatically updated to reflect the committed changes.