From ddb5a1988b59a15888ec609ace17a4916c161860 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 22 Oct 2025 21:27:38 +0000 Subject: [PATCH 1/2] python3Packages.sqlfmt: 0.27.0 -> 0.28.1 Diff: https://github.com/tconbeer/sqlfmt/compare/v0.27.0...v0.28.1 Changelog: https://github.com/tconbeer/sqlfmt/blob/v0.28.1/CHANGELOG.md --- .../python-modules/sqlfmt/default.nix | 46 +++++++++++++------ 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/sqlfmt/default.nix b/pkgs/development/python-modules/sqlfmt/default.nix index 2f1dff47901a..1acdfcfa0664 100644 --- a/pkgs/development/python-modules/sqlfmt/default.nix +++ b/pkgs/development/python-modules/sqlfmt/default.nix @@ -1,23 +1,33 @@ { lib, - black, buildPythonPackage, - click, fetchFromGitHub, - gitpython, + pythonOlder, + + # build-system + hatchling, + + # dependencies + click, jinja2, platformdirs, - poetry-core, + tqdm, + + # optional-dependencies + black, + gitpython, + + # tests + addBinToPathHook, pytest-asyncio, pytestCheckHook, - pythonOlder, - tqdm, + versionCheckHook, writableTmpDirAsHomeHook, }: buildPythonPackage rec { pname = "sqlfmt"; - version = "0.27.0"; + version = "0.28.1"; pyproject = true; disabled = pythonOlder "3.12"; @@ -26,11 +36,14 @@ buildPythonPackage rec { owner = "tconbeer"; repo = "sqlfmt"; tag = "v${version}"; - hash = "sha256-Yel9SB7KrDqtuZxNx4omz6u4AID8Fk5kFYKBEZD1fuU="; + hash = "sha256-H896Ey4iJFuvcLLvLilN/6nN4gxpvv3VJKIjivEDwMU="; }; - build-system = [ poetry-core ]; + build-system = [ hatchling ]; + pythonRelaxDeps = [ + "click" + ]; dependencies = [ click jinja2 @@ -43,18 +56,23 @@ buildPythonPackage rec { sqlfmt_primer = [ gitpython ]; }; + pythonImportsCheck = [ "sqlfmt" ]; + nativeCheckInputs = [ + addBinToPathHook pytest-asyncio pytestCheckHook + versionCheckHook writableTmpDirAsHomeHook ] ++ lib.flatten (builtins.attrValues optional-dependencies); + versionCheckProgramArg = "--version"; - preCheck = '' - export PATH="$PATH:$out/bin"; - ''; - - pythonImportsCheck = [ "sqlfmt" ]; + disabledTestPaths = [ + # TypeError: CliRunner.__init__() got an unexpected keyword argument 'mix_stderr' + "tests/functional_tests/test_end_to_end.py" + "tests/unit_tests/test_cli.py" + ]; meta = { description = "Sqlfmt formats your dbt SQL files so you don't have to"; From dd76681b3a0f072ff626cdd2b267c0fae46ad17d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Wed, 22 Oct 2025 21:42:21 +0000 Subject: [PATCH 2/2] harlequin: address click 8.2.x incompatibility --- pkgs/by-name/ha/harlequin/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/ha/harlequin/package.nix b/pkgs/by-name/ha/harlequin/package.nix index 6a06668e656c..b12abb6b7a03 100644 --- a/pkgs/by-name/ha/harlequin/package.nix +++ b/pkgs/by-name/ha/harlequin/package.nix @@ -47,6 +47,7 @@ pythonPackages.buildPythonApplication rec { }; pythonRelaxDeps = [ + "click" "numpy" "pyarrow" "questionary" @@ -104,6 +105,10 @@ pythonPackages.buildPythonApplication rec { # Tests require network access "test_connect_extensions" "test_connect_prql" + + # Broken since click was updated to 8.2.1 in https://github.com/NixOS/nixpkgs/pull/448189 + # AssertionError + "test_bad_adapter_opt" ] ++ lib.optionals (!stdenv.hostPlatform.isx86_64) [ # Test incorrectly tries to load a dylib/so compiled for x86_64