From dc09f694c229ad07284e1f93c1f294424d70f8d1 Mon Sep 17 00:00:00 2001 From: Marcin Raba Date: Mon, 15 Apr 2024 10:36:53 +0200 Subject: [PATCH 1/3] SNOW-1324105-dependency-pinning: move versions pinning from project env to metadata --- .github/workflows/build_test.yml | 32 +++++++++++++++++++++++++++++--- pyproject.toml | 7 +------ 2 files changed, 30 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index f232e669..1ea769cf 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -45,9 +45,35 @@ jobs: - name: Run lint checks run: hatch run check + build-install: + name: Test package build and installation + runs-on: ubuntu-latest + needs: lint + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Setup up Python + uses: actions/setup-python@v5 + with: + python-version: '3.8' + - name: Upgrade and install tools + run: | + python -m pip install -U pip + python -m pip install -U hatch + - name: Build package + run: | + python -m hatch clean + python -m hatch build + - name: Install and check import + run: | + pip install dist/snowflake-sqlalchemy + python -m pip install dist/snowflake_sqlalchemy-1.5.2-py3-none-any.whl + python -c "import snowflake.sqlalchemy; print(snowflake.sqlalchemy.__version__)" + test-dialect: name: Test dialect ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }} - needs: lint + needs: [ lint, build-install ] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -93,7 +119,7 @@ jobs: test-dialect-compatibility: name: Test dialect compatibility ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }} - needs: lint + needs: [ lint, build-install ] runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -139,7 +165,7 @@ jobs: test-dialect-run-v20: name: Test dialect run v20 ${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.cloud-provider }} - needs: lint + needs: [ lint, build-install ] runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/pyproject.toml b/pyproject.toml index 8707fae3..d0c31cb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules", ] -dependencies = ["snowflake-connector-python", "SQLAlchemy"] +dependencies = ["snowflake-connector-python<4.0.0", "SQLAlchemy>=1.4.19,<2.0.0"] [tool.hatch.version] path = "src/snowflake/sqlalchemy/version.py" @@ -73,14 +73,9 @@ exclude = ["/.github"] packages = ["src/snowflake"] [tool.hatch.envs.default] -extra-dependencies = ["SQLAlchemy<2.0.0,>=1.4.19"] features = ["development", "pandas"] python = "3.8" -[tool.hatch.envs.sa20] -extra-dependencies = ["SQLAlchemy>=2.0.0"] -python = "3.8" - [tool.hatch.envs.default.env-vars] COVERAGE_FILE = "coverage.xml" SQLACHEMY_WARN_20 = "1" From 394f6a4640843dabbec337fd02854415416be5dd Mon Sep 17 00:00:00 2001 From: Marcin Raba Date: Mon, 15 Apr 2024 10:44:00 +0200 Subject: [PATCH 2/3] SNOW-1324105-dependency-pinning: update version and description --- DESCRIPTION.md | 4 ++++ src/snowflake/sqlalchemy/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION.md b/DESCRIPTION.md index f41ee797..e826b42a 100644 --- a/DESCRIPTION.md +++ b/DESCRIPTION.md @@ -9,6 +9,10 @@ Source code is also available at: # Release Notes +- v1.5.3(Unrelased) + + - Limit SQLAlchemy to < 2.0.0 before releasing version compatible with 2.0 + - v1.5.2(April 11, 2024) - Bump min SQLAlchemy to 1.4.19 for outer lateral join diff --git a/src/snowflake/sqlalchemy/version.py b/src/snowflake/sqlalchemy/version.py index 24f188c2..61c9fc41 100644 --- a/src/snowflake/sqlalchemy/version.py +++ b/src/snowflake/sqlalchemy/version.py @@ -3,4 +3,4 @@ # # Update this for the versions # Don't change the forth version number from None -VERSION = "1.5.2" +VERSION = "1.5.3" From 514087a8162ad3036e558c32258ddc00f061da94 Mon Sep 17 00:00:00 2001 From: Marcin Raba Date: Mon, 15 Apr 2024 13:03:10 +0200 Subject: [PATCH 3/3] SNOW-1324105-dependency-pinning: remove duplicated command in CI job --- .github/workflows/build_test.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 1ea769cf..be19f1f1 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -67,8 +67,7 @@ jobs: python -m hatch build - name: Install and check import run: | - pip install dist/snowflake-sqlalchemy - python -m pip install dist/snowflake_sqlalchemy-1.5.2-py3-none-any.whl + python -m pip install dist/snowflake_sqlalchemy-*.whl python -c "import snowflake.sqlalchemy; print(snowflake.sqlalchemy.__version__)" test-dialect: