From 4eb1a437e93c77395405e90a1d915e1844344a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 1 Feb 2022 13:01:18 +0100 Subject: [PATCH 1/3] odoo: 15.0.20211029 -> 15.0.20220126 --- pkgs/applications/finance/odoo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/finance/odoo/default.nix b/pkgs/applications/finance/odoo/default.nix index c2f201774fea..d77c3cc2a77e 100644 --- a/pkgs/applications/finance/odoo/default.nix +++ b/pkgs/applications/finance/odoo/default.nix @@ -14,7 +14,7 @@ buildPythonApplication rec { major = "15"; minor = "0"; - patch = "20211029"; + patch = "20220126"; version = "${major}.${minor}.${patch}"; @@ -22,7 +22,7 @@ buildPythonApplication rec { src = fetchurl { url = "https://nightly.odoo.com/${major}.${minor}/nightly/src/odoo_${version}.tar.gz"; name = "${pname}-${version}"; - sha256 = "sha256-/E+bLBbiz7fRyTwP+0AMpqbuRkOpE4B4P6kREIB4m1Q="; + hash = "sha256-mofV0mNCdyzJecp0XegZBR/5NzHjis9kbpsUA/KJbZg="; }; nativeBuildInputs = [ From 7a7876a90bda89399bde38694e055c15201842be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 1 Feb 2022 13:24:47 +0100 Subject: [PATCH 2/3] werkzeug/1: init at 1.0.1 --- .../development/python-modules/werkzeug/1.nix | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pkgs/development/python-modules/werkzeug/1.nix diff --git a/pkgs/development/python-modules/werkzeug/1.nix b/pkgs/development/python-modules/werkzeug/1.nix new file mode 100644 index 000000000000..ae7ce1f2b90a --- /dev/null +++ b/pkgs/development/python-modules/werkzeug/1.nix @@ -0,0 +1,62 @@ +{ lib, stdenv, buildPythonPackage, fetchPypi +, itsdangerous, hypothesis +, pytestCheckHook, requests +, pytest-timeout +, isPy3k + }: + +buildPythonPackage rec { + pname = "Werkzeug"; + version = "1.0.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "6c80b1e5ad3665290ea39320b91e1be1e0d5f60652b964a3070216de83d2e47c"; + }; + + propagatedBuildInputs = [ itsdangerous ]; + checkInputs = [ pytestCheckHook requests hypothesis pytest-timeout ]; + + postPatch = '' + # ResourceWarning causes tests to fail + rm tests/test_routing.py + ''; + + disabledTests = [ + "test_save_to_pathlib_dst" + "test_cookie_maxsize" + "test_cookie_samesite_attribute" + "test_cookie_samesite_invalid" + "test_range_parsing" + "test_content_range_parsing" + "test_http_date_lt_1000" + "test_best_match_works" + "test_date_to_unix" + "test_easteregg" + + # Seems to be a problematic test-case: + # + # > warnings.warn(pytest.PytestUnraisableExceptionWarning(msg)) + # E pytest.PytestUnraisableExceptionWarning: Exception ignored in: <_io.FileIO [closed]> + # E + # E Traceback (most recent call last): + # E File "/nix/store/cwv8aj4vsqvimzljw5dxsxy663vjgibj-python3.9-Werkzeug-1.0.1/lib/python3.9/site-packages/werkzeug/formparser.py", line 318, in parse_multipart_headers + # E return Headers(result) + # E ResourceWarning: unclosed file <_io.FileIO name=11 mode='rb+' closefd=True> + "test_basic_routing" + "test_merge_slashes_match" + "test_merge_slashes_build" + "TestMultiPart" + "TestHTTPUtility" + ] ++ lib.optionals stdenv.isDarwin [ + "test_get_machine_id" + ]; + + meta = with lib; { + homepage = "https://palletsprojects.com/p/werkzeug/"; + description = "A WSGI utility library for Python"; + license = licenses.bsd3; + maintainers = [ ]; + }; +} + From e062e44e6567ae4418501ac3a80387561e666a4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Tue, 1 Feb 2022 13:25:06 +0100 Subject: [PATCH 3/3] odoo: fix package: use werkzeug v1 --- pkgs/applications/finance/odoo/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/finance/odoo/default.nix b/pkgs/applications/finance/odoo/default.nix index d77c3cc2a77e..66b1bb0f97fe 100644 --- a/pkgs/applications/finance/odoo/default.nix +++ b/pkgs/applications/finance/odoo/default.nix @@ -5,10 +5,15 @@ , python3Packages , nodePackages , wkhtmltopdf +, callPackage }: with python3Packages; +let + werkzeug = python3Packages.callPackage ../../../development/python-modules/werkzeug/1.nix {}; +in + buildPythonApplication rec { pname = "odoo";