From 02660f220ba8fb478c0a8f4f8b533dbeb5606adb Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 26 Nov 2024 13:19:47 +0100 Subject: [PATCH 1/5] python312Packages.prettytable: 3.11.0 -> 3.12.0 Diff: https://github.com/jazzband/prettytable/compare/refs/tags/3.11.0...3.12.0 Changelog: https://github.com/jazzband/prettytable/releases/tag/3.12.0 --- .../python-modules/prettytable/default.nix | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/prettytable/default.nix b/pkgs/development/python-modules/prettytable/default.nix index b5cecedd6388..c4ba297b6ecd 100644 --- a/pkgs/development/python-modules/prettytable/default.nix +++ b/pkgs/development/python-modules/prettytable/default.nix @@ -2,26 +2,31 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system hatch-vcs, hatchling, + + # dependencies + wcwidth, + + # tests + coverage, + pytest-cov-stub, pytest-lazy-fixtures, pytestCheckHook, - pythonOlder, - wcwidth, }: buildPythonPackage rec { pname = "prettytable"; - version = "3.11.0"; + version = "3.12.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "jazzband"; repo = "prettytable"; - rev = "refs/tags/${version}"; - hash = "sha256-LtphoD5gCMgWgDcFghinq9zjUD69XudEeGIToqqmVPs="; + tag = version; + hash = "sha256-RoBPmnuAOtTET898Gdm1zzPIst26GdCY5nU1PyJ+Nro="; }; build-system = [ @@ -32,17 +37,19 @@ buildPythonPackage rec { dependencies = [ wcwidth ]; nativeCheckInputs = [ + coverage + pytest-cov-stub pytest-lazy-fixtures pytestCheckHook ]; pythonImportsCheck = [ "prettytable" ]; - meta = with lib; { + meta = { description = "Display tabular data in a visually appealing ASCII table format"; homepage = "https://github.com/jazzband/prettytable"; changelog = "https://github.com/jazzband/prettytable/releases/tag/${version}"; - license = licenses.bsd3; + license = lib.licenses.bsd3; maintainers = [ ]; }; } From f02e016caa44097bf8905f7e448419c0c4442c21 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 26 Nov 2024 13:22:59 +0100 Subject: [PATCH 2/5] python312Packages.prettytable: add GaetanLepage as maintainer --- pkgs/development/python-modules/prettytable/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/prettytable/default.nix b/pkgs/development/python-modules/prettytable/default.nix index c4ba297b6ecd..32257b5ffa9a 100644 --- a/pkgs/development/python-modules/prettytable/default.nix +++ b/pkgs/development/python-modules/prettytable/default.nix @@ -50,6 +50,6 @@ buildPythonPackage rec { homepage = "https://github.com/jazzband/prettytable"; changelog = "https://github.com/jazzband/prettytable/releases/tag/${version}"; license = lib.licenses.bsd3; - maintainers = [ ]; + maintainers = with lib.maintainers; [ GaetanLepage ]; }; } From 9745ad0a8216601541bd0613507f7aeb68daebcc Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 17 Oct 2024 13:51:46 +0200 Subject: [PATCH 3/5] python312Packages.jupysql: 0.10.13 -> 0.10.16 Diff: https://github.com/ploomber/jupysql/compare/refs/tags/0.10.13...0.10.16 Changelog: https://github.com/ploomber/jupysql/blob/0.10.16/CHANGELOG.md --- .../python-modules/jupysql/default.nix | 53 ++++++++++--------- 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/jupysql/default.nix b/pkgs/development/python-modules/jupysql/default.nix index 01fa1c0f3163..56326d52d837 100644 --- a/pkgs/development/python-modules/jupysql/default.nix +++ b/pkgs/development/python-modules/jupysql/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -36,15 +37,15 @@ buildPythonPackage rec { pname = "jupysql"; - version = "0.10.13"; + version = "0.10.16"; pyproject = true; src = fetchFromGitHub { owner = "ploomber"; repo = "jupysql"; - rev = "refs/tags/${version}"; - hash = "sha256-vNuMGHFkatJS5KjxaOBwZ7JolIDAdYqGq3JNKSV2fKE="; + tag = version; + hash = "sha256-TIISiGvspRG0d/4nEyi8Tiu0y80D1Rf8puDEkGIeA08="; }; pythonRelaxDeps = [ "sqlalchemy" ]; @@ -81,33 +82,35 @@ buildPythonPackage rec { psutil ] ++ optional-dependencies.dev; - disabledTests = [ - # AttributeError: 'DataFrame' object has no attribute 'frame_equal' - "test_resultset_polars_dataframe" - # all of these are broken with later versions of duckdb; see - # https://github.com/ploomber/jupysql/issues/1030 - "test_resultset_getitem" - "test_resultset_dict" - "test_resultset_len" - "test_resultset_dicts" - "test_resultset_dataframe" - "test_resultset_csv" - "test_resultset_str" - "test_resultset_repr_html_when_feedback_is_2" - "test_resultset_repr_html_with_reduced_feedback" - "test_invalid_operation_error" - "test_resultset_config_autolimit_dict" - # fails due to strict warnings - "test_calling_legacy_plotting_functions_displays_warning" - ]; + disabledTests = + [ + # AttributeError: 'DataFrame' object has no attribute 'frame_equal' + "test_resultset_polars_dataframe" + # all of these are broken with later versions of duckdb; see + # https://github.com/ploomber/jupysql/issues/1030 + "test_resultset_getitem" + "test_resultset_dict" + "test_resultset_len" + "test_resultset_dicts" + "test_resultset_dataframe" + "test_resultset_csv" + "test_resultset_str" + "test_resultset_repr_html_when_feedback_is_2" + "test_resultset_repr_html_with_reduced_feedback" + "test_invalid_operation_error" + "test_resultset_config_autolimit_dict" + # fails due to strict warnings + "test_calling_legacy_plotting_functions_displays_warning" + ] + ++ lib.optionals stdenv.hostPlatform.isDarwin [ + # Fatal Python error: Aborted (in matplotlib) + "test_no_errors_with_stored_query" + ]; disabledTestPaths = [ # require docker "src/tests/integration" - # require network access - "src/tests/test_telemetry.py" - # want to download test data from the network "src/tests/test_parse.py" "src/tests/test_ggplot.py" From 47755f037380ddc8c7425f78d5de6958ae00b890 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 27 Nov 2024 00:46:30 +0100 Subject: [PATCH 4/5] python312Packages.libuuu: fix typo in description --- pkgs/development/python-modules/libuuu/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/libuuu/default.nix b/pkgs/development/python-modules/libuuu/default.nix index 2cd77ce3b699..d824c2379877 100644 --- a/pkgs/development/python-modules/libuuu/default.nix +++ b/pkgs/development/python-modules/libuuu/default.nix @@ -6,8 +6,8 @@ setuptools, setuptools-scm, autoPatchelfHook, - pytestCheckHook, udev, + pytestCheckHook, }: buildPythonPackage rec { @@ -51,7 +51,7 @@ buildPythonPackage rec { ]; meta = { - description = "Python wraper for libuuu"; + description = "Python wrapper for libuuu"; homepage = "https://github.com/nxp-imx/mfgtools/tree/master/wrapper"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ GaetanLepage ]; From 0e6166eaf82f8388622bb4dd4d6630c9aa5a0ba8 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 5 Dec 2024 10:07:59 +0100 Subject: [PATCH 5/5] python312Packages.softlayer: fix on darwin --- .../python-modules/softlayer/default.nix | 49 ++++++++++++------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/softlayer/default.nix b/pkgs/development/python-modules/softlayer/default.nix index b2238da2916f..49550048e359 100644 --- a/pkgs/development/python-modules/softlayer/default.nix +++ b/pkgs/development/python-modules/softlayer/default.nix @@ -1,44 +1,52 @@ { lib, + stdenv, buildPythonPackage, - click, fetchFromGitHub, - mock, + + # build-system + setuptools, + + # dependencies + click, prettytable, prompt-toolkit, ptable, pygments, - pytestCheckHook, - pythonOlder, requests, rich, + urllib3, + + # tests + mock, + pytestCheckHook, sphinx, testtools, tkinter, - urllib3, zeep, }: buildPythonPackage rec { pname = "softlayer"; version = "6.2.5"; - format = "setuptools"; - - disabled = pythonOlder "3.7"; + pyproject = true; src = fetchFromGitHub { - owner = pname; + owner = "softlayer"; repo = "softlayer-python"; - rev = "refs/tags/v${version}"; + tag = "v${version}"; hash = "sha256-wDLMVonPUexoaZ60kRBILmr5l46yajzACozCp6uETGY="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace "rich ==" "rich >=" - ''; + build-system = [ + setuptools + ]; - propagatedBuildInputs = [ + pythonRelaxDeps = [ + "rich" + ]; + + dependencies = [ click prettytable prompt-toolkit @@ -66,6 +74,11 @@ buildPythonPackage rec { export HOME=$(mktemp -d) ''; + pytestFlagsArray = lib.optionals stdenv.hostPlatform.isDarwin [ + # SoftLayer.exceptions.TransportError: TransportError(0): ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')) + "--deselect=tests/CLI/modules/hardware/hardware_basic_tests.py::HardwareCLITests" + ]; + disabledTestPaths = [ # Test fails with ConnectionError trying to connect to api.softlayer.com "tests/transports/soap_tests.py.unstable" @@ -73,11 +86,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "SoftLayer" ]; - meta = with lib; { + meta = { description = "Python libraries that assist in calling the SoftLayer API"; homepage = "https://github.com/softlayer/softlayer-python"; changelog = "https://github.com/softlayer/softlayer-python/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ onny ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ onny ]; }; }