Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.gradio: 4.44.1 -> 5.1.0 #349625

Merged
merged 3 commits into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions pkgs/development/python-modules/gradio-pdf/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@

buildPythonPackage rec {
pname = "gradio-pdf";
version = "0.0.15";
format = "pyproject";
version = "0.0.17";
pyproject = true;

src = fetchPypi {
pname = "gradio_pdf";
inherit version;
hash = "sha256-R+4CDJo84/+PUTTxoz9CsZlHUVsldgjufWsRkALrfN4=";
hash = "sha256-LoVcwE7eGcK5Nc6qKTnrnI+rNlsDbekhKUP+Fzq2SQ8=";
};
GaetanLepage marked this conversation as resolved.
Show resolved Hide resolved

nativeBuildInputs = [
build-system = [
hatch-fancy-pypi-readme
hatch-requirements-txt
hatchling
Expand All @@ -36,10 +36,10 @@ buildPythonPackage rec {
# tested in `gradio`
doCheck = false;

meta = with lib; {
meta = {
description = "Python library for easily interacting with trained machine learning models";
homepage = "https://pypi.org/project/gradio-pdf/";
license = licenses.asl20;
maintainers = with maintainers; [ pbsds ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pbsds ];
};
}
11 changes: 6 additions & 5 deletions pkgs/development/python-modules/gradio/client.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

buildPythonPackage rec {
pname = "gradio-client";
version = "1.3.0";
version = "1.4.0";
pyproject = true;

disabled = pythonOlder "3.8";
Expand All @@ -40,7 +40,7 @@ buildPythonPackage rec {
# not to be confused with @gradio/client@${version}
rev = "refs/tags/gradio_client@${version}";
sparseCheckout = [ "client/python" ];
hash = "sha256-UZQWguUN3l0cj2wb2f7A61RTLy9nPYcIEwHIo+F1kR0=";
hash = "sha256-pS7yrqBuq/Pe7sEfReAM6OL2qFQVA+vWra36UuhyDkk=";
};
prePatch = ''
cd client/python
Expand Down Expand Up @@ -108,10 +108,11 @@ buildPythonPackage rec {
extraArgs = [ "--version-regex" "gradio_client@(.*)" ];
};

meta = with lib; {
meta = {
homepage = "https://www.gradio.app/";
changelog = "https://github.com/gradio-app/gradio/releases/tag/gradio_client@${version}";
description = "Lightweight library to use any Gradio app as an API";
license = licenses.asl20;
maintainers = with maintainers; [ pbsds ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pbsds ];
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def iterate_exc_chain(exc: Exception):
for exc in iterate_exc_chain(call.excinfo.value):
if isinstance(exc, NixNetworkAccessDeniedError):
tr.outcome, tr.wasxfail = 'skipped', "reason: Requires network access."
if isinstance(exc, socket.gaierror):
tr.outcome, tr.wasxfail = 'skipped', "reason: Requires network access."
if isinstance(exc, httpx.ConnectError):
tr.outcome, tr.wasxfail = 'skipped', "reason: Requires network access."
if isinstance(exc, FileNotFoundError): # gradio specific
Expand Down
23 changes: 15 additions & 8 deletions pkgs/development/python-modules/gradio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@

buildPythonPackage rec {
pname = "gradio";
version = "4.44.1";
format = "pyproject";
version = "5.1.0";
pyproject = true;

disabled = pythonOlder "3.7";

# We use the Pypi release, since it provides prebuilt webui assets
src = fetchPypi {
inherit pname version;
hash = "sha256-popSSYrGtj+IZO+Ev3hmpw59B+vpE+35IeHSo3CK1a4=";
hash = "sha256-0hU2aObeLfegG7M/AaB0/HcW7IY8QPRy2OQ5Q57x4VM=";
};

# fix packaging.ParserSyntaxError, which can't handle comments
Expand All @@ -83,15 +83,19 @@ buildPythonPackage rec {
rm -rf venv/
'';

pythonRelaxDeps = [ "tomlkit" ];
pythonRelaxDeps = [
"tomlkit"
"aiofiles"
"markupsafe"
];

pythonRemoveDeps = [
# our package is presented as a binary, not a python lib - and
# this isn't a real runtime dependency
"ruff"
];

nativeBuildInputs = [
build-system = [
hatchling
hatch-requirements-txt
hatch-fancy-pypi-readme
Expand Down Expand Up @@ -168,6 +172,7 @@ buildPythonPackage rec {
disabledTests = [
# Actually broken
"test_mount_gradio_app"
"test_processing_utils_backwards_compatibility" # type error

# requires network, it caught our xfail exception
"test_error_analytics_successful"
Expand Down Expand Up @@ -280,14 +285,16 @@ buildPythonPackage rec {
pythonRemoveDeps = (old.pythonRemoveDeps or [ ]) ++ [ "gradio-client" ];
doInstallCheck = false;
doCheck = false;
preCheck = "";
pythonImportsCheck = null;
dontCheckRuntimeDeps = true;
});

meta = with lib; {
meta = {
homepage = "https://www.gradio.app/";
changelog = "https://github.com/gradio-app/gradio/releases/tag/gradio@${version}";
description = "Python library for easily interacting with trained machine learning models";
license = licenses.asl20;
maintainers = with maintainers; [ pbsds ];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pbsds ];
};
}