Merge pull request #1298 from tahoe-lafs/4024.remove-werkzeug-pin

Switch to modern Klein so we can remove werkzeug pin

Fixes: ticket:4024
This commit is contained in:
Jean-Paul Calderone 2023-05-13 08:17:04 -04:00 committed by GitHub
commit 6a6d4d7e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 3 deletions

0
newsfragments/4024.minor Normal file
View File

9
nix/klein.nix Normal file
View File

@ -0,0 +1,9 @@
{ klein, fetchPypi }:
klein.overrideAttrs (old: rec {
pname = "klein";
version = "23.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-kGkSt6tBDZp/NRICg5w81zoqwHe9AHHIYcMfDu92Aoc=";
};
})

View File

@ -21,6 +21,12 @@ in {
pycddl = self.callPackage ./pycddl.nix { };
txi2p = self.callPackage ./txi2p.nix { };
# Update the version of klein.
klein = self.callPackage ./klein.nix {
# Avoid infinite recursion.
inherit (super) klein;
};
# collections-extended is currently broken for Python 3.11 in nixpkgs but
# we know where a working version lives.
collections-extended = self.callPackage ./collections-extended.nix {

View File

@ -140,10 +140,10 @@ install_requires = [
"collections-extended >= 2.0.2",
# HTTP server and client
"klein",
# Latest version is necessary to work with latest werkzeug:
"klein >= 23.5.0",
# 2.2.0 has a bug: https://github.com/pallets/werkzeug/issues/2465
# 2.3.x has an incompatibility with Klein: https://github.com/twisted/klein/pull/575
"werkzeug != 2.2.0, < 2.3",
"werkzeug != 2.2.0",
"treq",
"cbor2",