Merge pull request #299213 from fabaff/querystring-parser-bump

python312Packages.querystring-parser: refactor

authored by Fabian Affolter and committed by GitHub ec8f9ee3 0077febe

+151 -98
+67 -50
pkgs/applications/misc/dbx/default.nix
··· 1 - { lib 2 - , fetchFromGitHub 3 - , git 4 - , python3 1 + { 2 + lib, 3 + fetchFromGitHub, 4 + git, 5 + python3, 5 6 }: 6 - 7 - python3.pkgs.buildPythonApplication rec { 7 + let 8 + python = python3.override { packageOverrides = self: super: { pydantic = super.pydantic_1; }; }; 9 + in 10 + python.pkgs.buildPythonApplication rec { 8 11 pname = "dbx"; 9 12 version = "0.8.18"; 10 - format = "setuptools"; 13 + pyproject = true; 11 14 12 15 src = fetchFromGitHub { 13 16 owner = "databrickslabs"; ··· 17 20 }; 18 21 19 22 pythonRelaxDeps = [ 23 + "cryptography" 24 + "databricks-cli" 20 25 "rich" 21 26 "typer" 22 27 ]; 23 28 24 - pythonRemoveDeps = [ 25 - "mlflow-skinny" 26 - ]; 29 + pythonRemoveDeps = [ "mlflow-skinny" ]; 30 + 31 + build-system = with python.pkgs; [ setuptools ]; 27 32 28 - nativeBuildInputs = with python3.pkgs; [ 29 - pythonRelaxDepsHook 30 - ]; 33 + nativeBuildInputs = with python.pkgs; [ pythonRelaxDepsHook ]; 31 34 32 - propagatedBuildInputs = with python3.pkgs; [ 33 - aiohttp 34 - click 35 - cookiecutter 36 - cryptography 37 - databricks-cli 38 - jinja2 39 - mlflow 40 - pathspec 41 - pydantic 42 - pyyaml 43 - requests 44 - retry 45 - rich 46 - tenacity 47 - typer 48 - watchdog 49 - ] ++ typer.optional-dependencies.all; 35 + propagatedBuildInputs = 36 + with python.pkgs; 37 + [ 38 + aiohttp 39 + click 40 + cookiecutter 41 + cryptography 42 + databricks-cli 43 + jinja2 44 + mlflow 45 + pathspec 46 + pydantic 47 + pyyaml 48 + requests 49 + retry 50 + rich 51 + tenacity 52 + typer 53 + watchdog 54 + ] 55 + ++ typer.optional-dependencies.all; 50 56 51 57 passthru.optional-dependencies = with python3.pkgs; { 52 - aws = [ 53 - boto3 54 - ]; 58 + aws = [ boto3 ]; 55 59 azure = [ 56 60 azure-storage-blob 57 61 azure-identity 58 62 ]; 59 - gcp = [ 60 - google-cloud-storage 61 - ]; 63 + gcp = [ google-cloud-storage ]; 62 64 }; 63 65 64 - nativeCheckInputs = [ 65 - git 66 - ] ++ (with python3.pkgs; [ 67 - pytest-asyncio 68 - pytest-mock 69 - pytest-timeout 70 - pytestCheckHook 71 - ]); 66 + nativeCheckInputs = 67 + [ git ] 68 + ++ (with python3.pkgs; [ 69 + pytest-asyncio 70 + pytest-mock 71 + pytest-timeout 72 + pytestCheckHook 73 + ]); 72 74 73 75 preCheck = '' 74 76 export HOME=$(mktemp -d) 75 77 export PATH="$PATH:$out/bin" 76 78 ''; 77 79 78 - pytestFlagsArray = [ 79 - "tests/unit" 80 - ]; 80 + pytestFlagsArray = [ "tests/unit" ]; 81 81 82 82 disabledTests = [ 83 83 # Fails because of dbfs CLI wrong call ··· 87 87 "test_python_basic_sanity_check" 88 88 ]; 89 89 90 - pythonImportsCheck = [ 91 - "dbx" 90 + disabledTestPaths = [ 91 + "tests/unit/api/" 92 + "tests/unit/api/test_build.py" 93 + "tests/unit/api/test_destroyer.py" 94 + "tests/unit/api/test_jinja.py" 95 + "tests/unit/commands/test_configure.py" 96 + "tests/unit/commands/test_deploy_jinja_variables_file.py" 97 + "tests/unit/commands/test_deploy.py" 98 + "tests/unit/commands/test_destroy.py" 99 + "tests/unit/commands/test_execute.py" 100 + "tests/unit/commands/test_help.py" 101 + "tests/unit/commands/test_launch.py" 102 + "tests/unit/models/test_deployment.py" 103 + "tests/unit/models/test_destroyer.py" 104 + "tests/unit/models/test_task.py" 105 + "tests/unit/sync/test_commands.py" 106 + "tests/unit/utils/test_common.py" 92 107 ]; 108 + 109 + pythonImportsCheck = [ "dbx" ]; 93 110 94 111 meta = with lib; { 95 112 description = "CLI tool for advanced Databricks jobs management";
+23 -4
pkgs/development/python-modules/gorilla/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi}: 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + pytestCheckHook, 6 + pythonAtLeast, 7 + pythonOlder, 8 + setuptools, 9 + }: 2 10 3 11 buildPythonPackage rec { 4 12 pname = "gorilla"; 5 13 version = "0.4.0"; 6 - format = "setuptools"; 14 + pyproject = true; 15 + 16 + disabled = pythonOlder "3.7"; 7 17 8 18 src = fetchPypi { 9 19 inherit pname version; 10 - sha256 = "005ab8853b037162a7c77bb824604c6e081878ee03c09ad01ef41744856019d3"; 20 + hash = "sha256-AFq4hTsDcWKnx3u4JGBMbggYeO4DwJrQHvQXRIVgGdM="; 11 21 }; 12 22 23 + build-system = [ setuptools ]; 24 + 25 + nativeCheckInputs = [ pytestCheckHook ]; 26 + 27 + pythonImportsCheck = [ "gorilla" ]; 28 + 29 + disabledTests = lib.optionals (pythonAtLeast "3.12") [ "test_find_patches_2" ]; 30 + 13 31 meta = with lib; { 32 + description = "Convenient approach to monkey patching"; 14 33 homepage = "https://github.com/christophercrouzet/gorilla"; 15 - description = "Convenient approach to monkey patching"; 34 + changelog = "https://github.com/christophercrouzet/gorilla/releases/tag/v${version}"; 16 35 license = licenses.mit; 17 36 maintainers = with maintainers; [ tbenst ]; 18 37 };
+40 -33
pkgs/development/python-modules/mmengine/default.nix
··· 1 - { lib 2 - , addict 3 - , buildPythonPackage 4 - , coverage 5 - , fetchFromGitHub 6 - , lmdb 7 - , matplotlib 8 - , mlflow 9 - , numpy 10 - , opencv4 11 - , parameterized 12 - , pytestCheckHook 13 - , pythonOlder 14 - , pyyaml 15 - , rich 16 - , termcolor 17 - , torch 18 - , yapf 1 + { 2 + lib, 3 + addict, 4 + buildPythonPackage, 5 + coverage, 6 + fetchFromGitHub, 7 + lmdb, 8 + matplotlib, 9 + mlflow, 10 + numpy, 11 + opencv4, 12 + parameterized, 13 + pytestCheckHook, 14 + pythonOlder, 15 + pyyaml, 16 + rich, 17 + setuptools, 18 + termcolor, 19 + torch, 20 + yapf, 19 21 }: 20 22 21 23 buildPythonPackage rec { ··· 32 34 hash = "sha256-fKtPDdeKB3vX2mD+Tsicq8KOkPDSACzKK1XLyugdPQ4="; 33 35 }; 34 36 35 - propagatedBuildInputs = [ 37 + build-system = [ setuptools ]; 38 + 39 + dependencies = [ 36 40 addict 37 41 matplotlib 38 42 numpy ··· 47 51 coverage 48 52 lmdb 49 53 mlflow 50 - torch 51 54 parameterized 52 55 pytestCheckHook 56 + torch 53 57 ]; 54 58 55 - preCheck = '' 56 - export HOME=$TMPDIR 57 - '' 58 - # Otherwise, the backprop hangs forever. More precisely, this exact line: 59 - # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46 60 - # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188 61 - + '' 62 - export MKL_NUM_THREADS=1 63 - ''; 59 + preCheck = 60 + '' 61 + export HOME=$TMPDIR 62 + '' 63 + # Otherwise, the backprop hangs forever. More precisely, this exact line: 64 + # https://github.com/open-mmlab/mmengine/blob/02f80e8bdd38f6713e04a872304861b02157905a/tests/test_runner/test_activation_checkpointing.py#L46 65 + # Solution suggested in https://github.com/pytorch/pytorch/issues/91547#issuecomment-1370011188 66 + + '' 67 + export MKL_NUM_THREADS=1 68 + ''; 64 69 65 - pythonImportsCheck = [ 66 - "mmengine" 67 - ]; 70 + pythonImportsCheck = [ "mmengine" ]; 68 71 69 72 disabledTestPaths = [ 70 73 # AttributeError ··· 87 90 "test_lazy_import" 88 91 # AssertionError 89 92 "test_lazy_module" 90 - 91 93 # Require unpackaged aim 92 94 "test_experiment" 93 95 "test_add_config" ··· 95 97 "test_add_scalar" 96 98 "test_add_scalars" 97 99 "test_close" 100 + ]; 101 + 102 + pytestFlagsArray = [ 103 + "-W" 104 + "ignore::pytest.PytestRemovedIn8Warning" 98 105 ]; 99 106 100 107 meta = with lib; {
+21 -11
pkgs/development/python-modules/querystring-parser/default.nix
··· 1 - { lib, buildPythonPackage, fetchPypi, python, isPy27 2 - , six 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + python, 6 + pythonOlder, 7 + setuptools, 8 + six, 3 9 }: 4 10 5 11 buildPythonPackage rec { 6 12 pname = "querystring-parser"; 7 13 version = "1.2.4"; 8 - disabled = isPy27; 14 + pyproject = true; 15 + 16 + disabled = pythonOlder "3.7"; 9 17 10 18 src = fetchPypi { 11 19 pname = "querystring_parser"; 12 20 inherit version; 13 - sha256 = "644fce1cffe0530453b43a83a38094dbe422ccba8c9b2f2a1c00280e14ca8a62"; 21 + hash = "sha256-ZE/OHP/gUwRTtDqDo4CU2+QizLqMmy8qHAAoDhTKimI="; 14 22 }; 15 23 16 - propagatedBuildInputs = [ 17 - six 18 - ]; 24 + build-system = [ setuptools ]; 19 25 20 - checkPhase = "${python.interpreter} querystring_parser/tests.py -k 'not test_parse_normalized'"; 21 - # one test fails due to https://github.com/bernii/querystring-parser/issues/35 22 - doCheck = true; 26 + dependencies = [ six ]; 27 + 28 + # https://github.com/bernii/querystring-parser/issues/35 29 + doCheck = false; 30 + 31 + pythonImportsCheck = [ "querystring_parser" ]; 23 32 24 33 meta = with lib; { 34 + description = "Module to handle nested dictionaries"; 25 35 homepage = "https://github.com/bernii/querystring-parser"; 26 - description = "QueryString parser for Python/Django that correctly handles nested dictionaries"; 36 + changelog = "https://github.com/bernii/querystring-parser/releases/tag/${version}"; 27 37 license = licenses.mit; 28 38 maintainers = with maintainers; [ tbenst ]; 29 39 };