python312Packages.gradio: 5.1.0 -> 5.11.0 (#371430)

authored by Peder Bergebakken Sundt and committed by GitHub d033c5a0 bd641be4

+107 -11
+5 -3
pkgs/development/python-modules/gradio/client.nix
··· 24 rich, 25 tomlkit, 26 gradio, 27 }: 28 29 buildPythonPackage rec { 30 pname = "gradio-client"; 31 - version = "1.4.0"; 32 pyproject = true; 33 34 disabled = pythonOlder "3.8"; ··· 38 owner = "gradio-app"; 39 repo = "gradio"; 40 # not to be confused with @gradio/client@${version} 41 - rev = "refs/tags/gradio_client@${version}"; 42 sparseCheckout = [ "client/python" ]; 43 - hash = "sha256-pS7yrqBuq/Pe7sEfReAM6OL2qFQVA+vWra36UuhyDkk="; 44 }; 45 prePatch = '' 46 cd client/python ··· 75 pydub 76 rich 77 tomlkit 78 gradio.sans-reverse-dependencies 79 ]; 80 # ensuring we don't propagate this intermediate build
··· 24 rich, 25 tomlkit, 26 gradio, 27 + safehttpx, 28 }: 29 30 buildPythonPackage rec { 31 pname = "gradio-client"; 32 + version = "1.5.3"; 33 pyproject = true; 34 35 disabled = pythonOlder "3.8"; ··· 39 owner = "gradio-app"; 40 repo = "gradio"; 41 # not to be confused with @gradio/client@${version} 42 + tag = "gradio_client@${version}"; 43 sparseCheckout = [ "client/python" ]; 44 + hash = "sha256-u4GQYtCeAMDqRRbZGtjfqIHwuHyxUpw6kRE75SJMALg="; 45 }; 46 prePatch = '' 47 cd client/python ··· 76 pydub 77 rich 78 tomlkit 79 + safehttpx 80 gradio.sans-reverse-dependencies 81 ]; 82 # ensuring we don't propagate this intermediate build
+62 -8
pkgs/development/python-modules/gradio/default.nix
··· 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 pythonOlder, 7 writeShellScriptBin, 8 gradio, ··· 12 hatch-requirements-txt, 13 hatch-fancy-pypi-readme, 14 15 # runtime 16 setuptools, 17 aiofiles, ··· 35 python-multipart, 36 pydub, 37 pyyaml, 38 semantic-version, 39 typing-extensions, 40 uvicorn, ··· 64 65 buildPythonPackage rec { 66 pname = "gradio"; 67 - version = "5.1.0"; 68 pyproject = true; 69 70 disabled = pythonOlder "3.7"; 71 72 - # We use the Pypi release, since it provides prebuilt webui assets 73 - src = fetchPypi { 74 - inherit pname version; 75 - hash = "sha256-0hU2aObeLfegG7M/AaB0/HcW7IY8QPRy2OQ5Q57x4VM="; 76 }; 77 78 # fix packaging.ParserSyntaxError, which can't handle comments 79 postPatch = '' 80 sed -i -e "s/ #.*$//g" requirements*.txt 81 - 82 - # they bundle deps? 83 - rm -rf venv/ 84 ''; 85 86 pythonRelaxDeps = [ ··· 94 # our package is presented as a binary, not a python lib - and 95 # this isn't a real runtime dependency 96 "ruff" 97 ]; 98 99 build-system = [ ··· 125 python-multipart 126 pydub 127 pyyaml 128 semantic-version 129 typing-extensions 130 uvicorn ··· 158 (writeShellScriptBin "npm" "false") 159 ] ++ optional-dependencies.oauth ++ pydantic.optional-dependencies.email; 160 161 # Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail). 162 # We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi. 163 preCheck = ··· 193 194 # fails without network 195 "test_download_if_url_correct_parse" 196 197 # flaky: OSError: Cannot find empty port in range: 7860-7959 198 "test_docs_url" 199 "test_orjson_serialization" 200 "test_dataset_is_updated" 201 "test_multimodal_api" 202 203 # tests if pip and other tools are installed 204 "test_get_executable_path" ··· 256 disabledTestPaths = [ 257 # 100% touches network 258 "test/test_networking.py" 259 # makes pytest freeze 50% of the time 260 "test/test_interfaces.py" 261 ··· 289 doInstallCheck = false; 290 doCheck = false; 291 preCheck = ""; 292 pythonImportsCheck = null; 293 dontCheckRuntimeDeps = true; 294 });
··· 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 + fetchFromGitHub, 7 + fetchpatch, 8 pythonOlder, 9 writeShellScriptBin, 10 gradio, ··· 14 hatch-requirements-txt, 15 hatch-fancy-pypi-readme, 16 17 + # web assets 18 + zip, 19 + nodejs, 20 + pnpm_9, 21 + 22 # runtime 23 setuptools, 24 aiofiles, ··· 42 python-multipart, 43 pydub, 44 pyyaml, 45 + safehttpx, 46 semantic-version, 47 typing-extensions, 48 uvicorn, ··· 72 73 buildPythonPackage rec { 74 pname = "gradio"; 75 + version = "5.11.0"; 76 pyproject = true; 77 78 disabled = pythonOlder "3.7"; 79 80 + # unfortunately no fetchPypi due to https://github.com/gradio-app/gradio/pull/9778 81 + src = fetchFromGitHub { 82 + owner = "gradio-app"; 83 + repo = "gradio"; 84 + tag = "gradio@${version}"; 85 + hash = "sha256-HW0J7oSkCo4DIHpU4LUoBZ2jmmrv5Xd64floA4uyo5A="; 86 }; 87 88 + pnpmDeps = pnpm_9.fetchDeps { 89 + inherit pname version src; 90 + hash = "sha256-9fAkP2zV3OfyROdtvmS94ujpkGmlB0wGOaWS13LgJTM="; 91 + }; 92 + 93 # fix packaging.ParserSyntaxError, which can't handle comments 94 postPatch = '' 95 sed -i -e "s/ #.*$//g" requirements*.txt 96 ''; 97 98 pythonRelaxDeps = [ ··· 106 # our package is presented as a binary, not a python lib - and 107 # this isn't a real runtime dependency 108 "ruff" 109 + ]; 110 + 111 + nativeBuildInputs = [ 112 + zip 113 + nodejs 114 + pnpm_9.configHook 115 ]; 116 117 build-system = [ ··· 143 python-multipart 144 pydub 145 pyyaml 146 + safehttpx 147 semantic-version 148 typing-extensions 149 uvicorn ··· 177 (writeShellScriptBin "npm" "false") 178 ] ++ optional-dependencies.oauth ++ pydantic.optional-dependencies.email; 179 180 + preBuild = '' 181 + pnpm build 182 + pnpm package 183 + ''; 184 + 185 + postBuild = '' 186 + # SyntaxError: 'await' outside function 187 + zip -d dist/gradio-*.whl gradio/_frontend_code/lite/examples/transformers_basic/run.py 188 + ''; 189 + 190 # Add a pytest hook skipping tests that access network, marking them as "Expected fail" (xfail). 191 # We additionally xfail FileNotFoundError, since the gradio devs often fail to upload test assets to pypi. 192 preCheck = ··· 222 223 # fails without network 224 "test_download_if_url_correct_parse" 225 + "test_encode_url_to_base64_doesnt_encode_errors" 226 227 # flaky: OSError: Cannot find empty port in range: 7860-7959 228 "test_docs_url" 229 "test_orjson_serialization" 230 "test_dataset_is_updated" 231 "test_multimodal_api" 232 + "test_examples_keep_all_suffixes" 233 + "test_progress_bar" 234 + "test_progress_bar_track_tqdm" 235 + "test_info_and_warning_alerts" 236 + "test_info_isolation[True]" 237 + "test_info_isolation[False]" 238 + "test_examples_no_cache_optional_inputs" 239 + "test_start_server[127.0.0.1]" 240 + "test_start_server[[::1]]" 241 + "test_single_request" 242 + "test_all_status_messages" 243 + "test_default_concurrency_limits[not_set-statuses0]" 244 + "test_default_concurrency_limits[None-statuses1]" 245 + "test_default_concurrency_limits[1-statuses2]" 246 + "test_default_concurrency_limits[2-statuses3]" 247 + "test_concurrency_limits" 248 249 # tests if pip and other tools are installed 250 "test_get_executable_path" ··· 302 disabledTestPaths = [ 303 # 100% touches network 304 "test/test_networking.py" 305 + "client/python/test/test_client.py" 306 # makes pytest freeze 50% of the time 307 "test/test_interfaces.py" 308 ··· 336 doInstallCheck = false; 337 doCheck = false; 338 preCheck = ""; 339 + postInstall = '' 340 + shopt -s globstar 341 + for f in $out/**/*.py; do 342 + cp $f "$f"i 343 + done 344 + shopt -u globstar 345 + ''; 346 pythonImportsCheck = null; 347 dontCheckRuntimeDeps = true; 348 });
+38
pkgs/development/python-modules/safehttpx/default.nix
···
··· 1 + { 2 + lib, 3 + buildPythonPackage, 4 + fetchPypi, 5 + hatchling, 6 + httpx, 7 + pythonOlder, 8 + }: 9 + 10 + buildPythonPackage rec { 11 + pname = "safehttpx"; 12 + version = "0.1.6"; 13 + pyproject = true; 14 + 15 + src = fetchPypi { 16 + inherit pname version; 17 + hash = "sha256-s1a/yCzuOiTDlblKLb6rvtYK/xql+jtf6XxPJFbrzkI="; 18 + }; 19 + 20 + build-system = [ 21 + hatchling 22 + ]; 23 + 24 + dependencies = [ 25 + httpx 26 + ]; 27 + 28 + pythonImportsCheck = [ "safehttpx" ]; 29 + 30 + doCheck = false; # require network access 31 + 32 + meta = { 33 + description = "SSRF-safe wrapper around httpx"; 34 + homepage = "https://github.com/gradio-app/safehttpx"; 35 + license = lib.licenses.asl20; 36 + maintainers = with lib.maintainers; [ fliegendewurst ]; 37 + }; 38 + }
+2
pkgs/top-level/python-packages.nix
··· 14418 14419 safe-pysha3 = callPackage ../development/python-modules/safe-pysha3 { }; 14420 14421 safeio = callPackage ../development/python-modules/safeio { }; 14422 14423 safetensors = callPackage ../development/python-modules/safetensors { };
··· 14418 14419 safe-pysha3 = callPackage ../development/python-modules/safe-pysha3 { }; 14420 14421 + safehttpx = callPackage ../development/python-modules/safehttpx { }; 14422 + 14423 safeio = callPackage ../development/python-modules/safeio { }; 14424 14425 safetensors = callPackage ../development/python-modules/safetensors { };