dbx: 0.8.18 -> 0.8.19, fix (#387872)

authored by

Sandro and committed by
GitHub
52dac5c7 b12e0d01

+72 -38
+72 -37
pkgs/by-name/db/dbx/package.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 4 + python3, 3 5 fetchFromGitHub, 4 - git, 5 - python3, 6 + 7 + # tests 8 + addBinToPathHook, 9 + gitMinimal, 10 + versionCheckHook, 11 + writableTmpDirAsHomeHook, 6 12 }: 7 13 let 8 14 python = python3.override { 9 15 self = python; 10 - packageOverrides = self: super: { pydantic = super.pydantic_1; }; 16 + packageOverrides = self: super: { 17 + pydantic = super.pydantic_1; 18 + 19 + # python-on-whales is the only aiohttp dependency that is incompatible with pydantic_1 20 + # Override aiohttp to remove this dependency 21 + aiohttp = super.aiohttp.overridePythonAttrs (old: { 22 + # Remove python-on-whales from nativeCheckInputs 23 + nativeCheckInputs = lib.filter (p: (p.pname or "") != "python-on-whales") old.nativeCheckInputs; 24 + 25 + disabledTestPaths = [ 26 + # Requires python-on-whales 27 + "tests/autobahn/test_autobahn.py" 28 + ] ++ (old.disabledTestPaths or [ ]); 29 + }); 30 + 31 + databricks-sdk = super.databricks-sdk.overridePythonAttrs (old: { 32 + # Tests require langchain-openai which is incompatible with pydantic_1 33 + doCheck = false; 34 + }); 35 + }; 11 36 }; 12 37 in 13 38 python.pkgs.buildPythonApplication rec { 14 39 pname = "dbx"; 15 - version = "0.8.18"; 40 + version = "0.8.19"; 16 41 pyproject = true; 17 42 18 43 src = fetchFromGitHub { 19 44 owner = "databrickslabs"; 20 45 repo = "dbx"; 21 46 tag = "v${version}"; 22 - hash = "sha256-5qjEABNTSUD9I2uAn49HQ4n+gbAcmfnqS4Z2M9MvFXQ="; 47 + hash = "sha256-DNVJcCDHyWCorTxNN6RR6TWNF2MrysXT44UbwegROTU="; 23 48 }; 24 49 50 + postPatch = '' 51 + # Probably a typo 52 + substituteInPlace src/dbx/custom.py \ 53 + --replace-fail "_make_rich_rext" "_make_rich_text" 54 + 55 + # dbx pins an old version of typer. 56 + # In newer versions of typer, `callback` does not accept the 'name' argument anymore. 57 + substituteInPlace src/dbx/cli.py \ 58 + --replace-fail 'name="dbx",' "" 59 + 60 + # Fixes: TypeError: 'NoneType' object is not iterable 61 + substituteInPlace src/dbx/utils/common.py \ 62 + --replace-fail \ 63 + '[t.split("=") for t in multiple_argument]' \ 64 + '[t.split("=") for t in multiple_argument] if multiple_argument else []' 65 + ''; 66 + 25 67 pythonRelaxDeps = [ 26 68 "cryptography" 27 69 "databricks-cli" 70 + "pydantic" 28 71 "rich" 72 + "tenacity" 29 73 "typer" 30 74 ]; 31 75 32 76 pythonRemoveDeps = [ "mlflow-skinny" ]; 33 77 34 - build-system = with python.pkgs; [ setuptools ]; 78 + build-system = with python.pkgs; [ 79 + hatch-vcs 80 + hatchling 81 + ]; 35 82 36 - propagatedBuildInputs = with python.pkgs; [ 83 + dependencies = with python.pkgs; [ 37 84 aiohttp 38 85 click 39 86 cookiecutter ··· 47 94 requests 48 95 retry 49 96 rich 97 + setuptools 50 98 tenacity 51 99 typer 52 100 watchdog 53 101 ]; 54 102 55 - optional-dependencies = with python3.pkgs; { 103 + optional-dependencies = with python.pkgs; { 56 104 aws = [ boto3 ]; 57 105 azure = [ 58 106 azure-storage-blob ··· 62 110 }; 63 111 64 112 nativeCheckInputs = 65 - [ git ] 66 - ++ (with python3.pkgs; [ 113 + [ 114 + addBinToPathHook 115 + gitMinimal 116 + versionCheckHook 117 + writableTmpDirAsHomeHook 118 + ] 119 + ++ (with python.pkgs; [ 67 120 pytest-asyncio 68 121 pytest-mock 69 122 pytest-timeout 123 + pytest-xdist 70 124 pytestCheckHook 71 125 ]); 72 - 73 - preCheck = '' 74 - export HOME=$(mktemp -d) 75 - export PATH="$PATH:$out/bin" 76 - ''; 77 - 78 - pytestFlagsArray = [ "tests/unit" ]; 126 + versionCheckProgramArg = "--version"; 79 127 80 128 disabledTests = [ 81 129 # Fails because of dbfs CLI wrong call ··· 85 133 "test_python_basic_sanity_check" 86 134 ]; 87 135 88 - disabledTestPaths = [ 89 - "tests/unit/api/" 90 - "tests/unit/api/test_build.py" 91 - "tests/unit/api/test_destroyer.py" 92 - "tests/unit/api/test_jinja.py" 93 - "tests/unit/commands/test_configure.py" 94 - "tests/unit/commands/test_deploy_jinja_variables_file.py" 95 - "tests/unit/commands/test_deploy.py" 96 - "tests/unit/commands/test_destroy.py" 97 - "tests/unit/commands/test_execute.py" 98 - "tests/unit/commands/test_help.py" 99 - "tests/unit/commands/test_launch.py" 100 - "tests/unit/models/test_deployment.py" 101 - "tests/unit/models/test_destroyer.py" 102 - "tests/unit/models/test_task.py" 103 - "tests/unit/sync/test_commands.py" 104 - "tests/unit/utils/test_common.py" 136 + disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [ 137 + # ERROR fsevents:fsevents.py:310 Unhandled exception in FSEventsEmitter 138 + # SystemError: Cannot start fsevents stream. Use a kqueue or polling observer instead. 139 + "tests/unit/sync/test_event_handler.py" 105 140 ]; 106 141 107 142 pythonImportsCheck = [ "dbx" ]; 108 143 109 - meta = with lib; { 144 + meta = { 110 145 description = "CLI tool for advanced Databricks jobs management"; 111 146 homepage = "https://github.com/databrickslabs/dbx"; 112 147 changelog = "https://github.com/databrickslabs/dbx/blob/v${version}/CHANGELOG.md"; 113 - license = licenses.databricks-dbx; 114 - maintainers = with maintainers; [ GuillaumeDesforges ]; 148 + license = lib.licenses.databricks-dbx; 149 + maintainers = with lib.maintainers; [ GuillaumeDesforges ]; 115 150 }; 116 151 }
-1
pkgs/development/python-modules/langsmith/default.nix
··· 9 9 10 10 # dependencies 11 11 httpx, 12 - langchain-core, 13 12 orjson, 14 13 pydantic, 15 14 requests,