From 9435c037d3393eedbf405e3da69ce80d34a9846d Mon Sep 17 00:00:00 2001 From: Vladimir Timofeenko Date: Wed, 18 Jun 2025 10:17:28 -0700 Subject: [PATCH 1/2] python3Packages.snowflake-core: init at 1.4.0 --- .../python-modules/snowflake-core/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/development/python-modules/snowflake-core/default.nix diff --git a/pkgs/development/python-modules/snowflake-core/default.nix b/pkgs/development/python-modules/snowflake-core/default.nix new file mode 100644 index 000000000000..3c3349a2e082 --- /dev/null +++ b/pkgs/development/python-modules/snowflake-core/default.nix @@ -0,0 +1,56 @@ +{ + lib, + buildPythonPackage, + pydantic, + python-dateutil, + requests, + snowflake-connector-python, + pyyaml, + urllib3, + fetchPypi, + pythonOlder, + hatchling, +}: + +buildPythonPackage rec { + pname = "snowflake-core"; + version = "1.4.0"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchPypi { + pname = "snowflake_core"; + inherit version; + hash = "sha256-3BzO3s5BtS/cuF+JwKuAG8Usca5oo79ffp33TXUP5E8="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + pydantic + python-dateutil + pyyaml + requests + snowflake-connector-python + urllib3 + ]; + + pythonRelaxDeps = [ + "pyopenssl" + ]; + + # Tests require access to Snowflake + doCheck = false; + + pythonImportsCheck = [ + "snowflake.core" + ]; + + meta = { + description = "Subpackage providing Python access to Snowflake entity metadata."; + homepage = "https://pypi.org/project/snowflake.core"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.vtimofeenko ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 95f3fe42791a..a7ffe8d92a1e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -16436,6 +16436,8 @@ self: super: with self; { callPackage ../development/python-modules/snowflake-connector-python { }; + snowflake-core = callPackage ../development/python-modules/snowflake-core { }; + snowflake-sqlalchemy = callPackage ../development/python-modules/snowflake-sqlalchemy { }; snowplow-tracker = callPackage ../development/python-modules/snowplow-tracker { }; From a3ab14e5687c2b82ab360f086a626d27c42236bd Mon Sep 17 00:00:00 2001 From: Vladimir Timofeenko Date: Wed, 18 Jun 2025 10:18:50 -0700 Subject: [PATCH 2/2] snowflake-cli: 3.7.2 -> 3.9.1 --- pkgs/by-name/sn/snowflake-cli/package.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/sn/snowflake-cli/package.nix b/pkgs/by-name/sn/snowflake-cli/package.nix index 694a094c50cd..4a71fb017012 100644 --- a/pkgs/by-name/sn/snowflake-cli/package.nix +++ b/pkgs/by-name/sn/snowflake-cli/package.nix @@ -8,14 +8,14 @@ python3Packages.buildPythonApplication rec { pname = "snowflake-cli"; - version = "3.7.2"; + version = "3.9.1"; pyproject = true; src = fetchFromGitHub { owner = "snowflakedb"; repo = "snowflake-cli"; tag = "v${version}"; - hash = "sha256-MCJl6Mkkkp9JkG+8ZNfWAYQFMJccdtKfPdcnfaY8Y3w="; + hash = "sha256-2g3EiJ4mgqbyfF9brCvIWJGblWUtaBAO8qor2AeN8mU="; }; build-system = with python3Packages; [ @@ -39,6 +39,8 @@ python3Packages.buildPythonApplication rec { urllib3 gitpython pydantic + prompt-toolkit + snowflake-core snowflake-connector-python ]; @@ -72,6 +74,12 @@ python3Packages.buildPythonApplication rec { "test_executing_command_sends_telemetry_usage_data" # Fails on mocked version "test_internal_application_data_is_sent_if_feature_flag_is_set" "test_if_bundling_dependencies_resolves_requirements" # impure? + "test_silent_output_help" # Snapshot needs update? Diff between received and snapshot is the word 'TABLE' moving down a line + "test_new_connection_can_be_added_as_default" # Snapshot needs update? Diff between received and snapshot is an empty line + ]; + + disabledTestPaths = [ + "tests/app/test_version_check.py" ]; pythonRelaxDeps = true;