lol

python3Packages.a2wsgi: fix build (#355656)

authored by

Gaétan Lepage and committed by
GitHub
fbc12b07 bcfd2f53

+124 -19
+10 -3
pkgs/development/python-modules/a2wsgi/default.nix
··· 7 7 pdm-backend, 8 8 pytest-asyncio, 9 9 pytestCheckHook, 10 + starlette, 11 + baize, 10 12 }: 11 13 12 14 buildPythonPackage rec { ··· 28 30 pytestCheckHook 29 31 ]; 30 32 31 - meta = with lib; { 33 + dependencies = [ 34 + starlette 35 + baize 36 + ]; 37 + 38 + meta = { 32 39 description = "Convert WSGI app to ASGI app or ASGI app to WSGI app"; 33 40 homepage = "https://github.com/abersheeran/a2wsgi"; 34 - license = licenses.asl20; 35 - maintainers = with maintainers; [ SuperSandro2000 ]; 41 + license = lib.licenses.asl20; 42 + maintainers = with lib.maintainers; [ SuperSandro2000 ]; 36 43 }; 37 44 }
+60
pkgs/development/python-modules/baize/default.nix
··· 1 + { 2 + buildPythonPackage, 3 + lib, 4 + fetchPypi, 5 + pytestCheckHook, 6 + pdm-pep517, 7 + pytest-httpx, 8 + setuptools, 9 + starlette, 10 + anyio, 11 + pytest-asyncio, 12 + pytest-tornasync, 13 + pytest-trio, 14 + pytest-twisted, 15 + twisted, 16 + }: 17 + 18 + buildPythonPackage rec { 19 + pname = "baize"; 20 + version = "0.22.2"; 21 + pyproject = true; 22 + 23 + src = fetchPypi { 24 + inherit pname version; 25 + hash = "sha256-J+l8NsSTpCh7Uws+Zp45LXkLEBBurqOsOr8Iik/9smY="; 26 + }; 27 + 28 + build-system = [ 29 + pdm-pep517 30 + setuptools 31 + ]; 32 + 33 + dependencies = [ 34 + starlette 35 + ]; 36 + 37 + nativeCheckInputs = [ 38 + pytestCheckHook 39 + pytest-httpx 40 + anyio 41 + pytest-asyncio 42 + pytest-tornasync 43 + pytest-trio 44 + pytest-twisted 45 + twisted 46 + ]; 47 + 48 + disabledTests = [ 49 + # https://github.com/abersheeran/baize/issues/67 50 + "test_files" 51 + "test_request_response" 52 + ]; 53 + 54 + meta = { 55 + description = "Powerful and exquisite WSGI/ASGI framework/toolkit"; 56 + maintainers = with lib.maintainers; [ bot-wxt1221 ]; 57 + homepage = "https://baize.aber.sh/"; 58 + license = lib.licenses.asl20; 59 + }; 60 + }
+25
pkgs/development/python-modules/connexion/0001-Part-of-1992.patch
··· 1 + From 10c3d787cc9c7fb31c6cc7074e9ce00dfeb6bb85 Mon Sep 17 00:00:00 2001 2 + From: wxt <3264117476@qq.com> 3 + Date: Thu, 14 Nov 2024 16:16:17 +0800 4 + Subject: [PATCH] Part of 1992 5 + 6 + --- 7 + tests/decorators/test_validation.py | 2 +- 8 + 1 file changed, 1 insertion(+), 1 deletion(-) 9 + 10 + diff --git a/tests/decorators/test_validation.py b/tests/decorators/test_validation.py 11 + index bece403..d7e0984 100644 12 + --- a/tests/decorators/test_validation.py 13 + +++ b/tests/decorators/test_validation.py 14 + @@ -78,7 +78,7 @@ def test_invalid_type(monkeypatch): 15 + logger = MagicMock() 16 + monkeypatch.setattr("connexion.validators.parameter.logger", logger) 17 + result = ParameterValidator.validate_parameter( 18 + - "formdata", 20, {"type": "string", "name": "foo"} 19 + + "formdata", 20, {"name": "foo", "type": "string"} 20 + ) 21 + expected_result = """20 is not of type 'string' 22 + 23 + -- 24 + 2.47.0 25 +
+27 -16
pkgs/development/python-modules/connexion/default.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 fetchFromGitHub, 4 5 buildPythonPackage, 5 6 pythonOlder, ··· 46 47 hash = "sha256-rngQDU9kXw/Z+Al0SCVnWN8xnphueTtZ0+xPBR5MbEM="; 47 48 }; 48 49 50 + patches = [ 51 + # A really small Part of https://github.com/spec-first/connexion/pull/1992 Will fix check on newest dependencies 52 + ./0001-Part-of-1992.patch 53 + ]; 54 + 49 55 build-system = [ poetry-core ]; 50 56 51 57 dependencies = [ ··· 79 85 80 86 pythonImportsCheck = [ "connexion" ]; 81 87 82 - disabledTests = [ 83 - "test_build_example" 84 - "test_mock_resolver_no_example" 85 - # Tests require network access 86 - "test_remote_api" 87 - # AssertionError 88 - "test_headers" 89 - # waiter.acquire() deadlock 90 - "test_cors_server_error" 91 - "test_get_bad_default_response" 92 - "test_schema_response" 93 - "test_writeonly" 94 - ]; 88 + disabledTests = 89 + [ 90 + "test_build_example" 91 + "test_mock_resolver_no_example" 92 + # Tests require network access 93 + "test_remote_api" 94 + # AssertionError 95 + "test_headers" 96 + # waiter.acquire() deadlock 97 + "test_cors_server_error" 98 + "test_get_bad_default_response" 99 + "test_schema_response" 100 + "test_writeonly" 101 + ] 102 + ++ lib.optionals stdenv.hostPlatform.isDarwin [ 103 + # ImportError: Error while finding loader for '/private/tmp/nix-build-python3.12-connexion-3.1.0.drv-0/source' (<class 'ModuleNotFoundError'>: No module named '/private/tmp/nix-build-python3') 104 + "test_lifespan" 105 + ]; 95 106 96 - meta = with lib; { 107 + meta = { 97 108 description = "Swagger/OpenAPI First framework on top of Flask"; 98 109 homepage = "https://github.com/spec-first/connexion"; 99 110 changelog = "https://github.com/spec-first/connexion/releases/tag/${version}"; 100 - license = licenses.asl20; 101 - maintainers = [ ]; 111 + license = lib.licenses.asl20; 112 + maintainers = with lib.maintainers; [ bot-wxt1221 ]; 102 113 mainProgram = "connexion"; 103 114 }; 104 115 }
+2
pkgs/top-level/python-packages.nix
··· 1452 1452 1453 1453 bagit = callPackage ../development/python-modules/bagit { }; 1454 1454 1455 + baize = callPackage ../development/python-modules/baize { }; 1456 + 1455 1457 banal = callPackage ../development/python-modules/banal { }; 1456 1458 1457 1459 bandcamp-api = callPackage ../development/python-modules/bandcamp-api { };