From 212442322b509eb34deee2ac000c85c1e4daba73 Mon Sep 17 00:00:00 2001 From: Mila Page <67295367+VersusFacit@users.noreply.github.com> Date: Thu, 8 Aug 2024 15:56:10 -0700 Subject: [PATCH] Add support for 3.12 in workflow files and configs. (#1081) * Add support for 3.12 in workflow files and configs. * Try updating odbc * Temporarily flip to 3.12 * Revert to 3.11. Add note about unixodbc --------- Co-authored-by: Mila Page --- .github/workflows/main.yml | 4 ++-- .github/workflows/release-prep.yml | 2 +- .pre-commit-config.yaml | 1 + README.md | 7 +++++++ requirements.txt | 2 +- setup.py | 3 ++- 6 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a89082969..e4fc66ccc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -75,7 +75,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Check out the repository @@ -173,7 +173,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-12, windows-latest] - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/release-prep.yml b/.github/workflows/release-prep.yml index 11af8214d..9cb2c3e19 100644 --- a/.github/workflows/release-prep.yml +++ b/.github/workflows/release-prep.yml @@ -448,7 +448,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Check out the repository diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e228e7d97..fdb195262 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,7 @@ repos: - --target-version=py39 - --target-version=py310 - --target-version=py311 + - --target-version=py312 additional_dependencies: [flaky] - repo: https://github.com/pycqa/flake8 diff --git a/README.md b/README.md index 7e95b1fc3..adeb16915 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,13 @@ rm -rf ./.hive-metastore/ rm -rf ./.spark-warehouse/ ``` +#### Additional Configuration for MacOS + +If installing on MacOS, use `homebrew` to install required dependencies. + ```sh + brew install unixodbc + ``` + ### Reporting bugs and contributing code - Want to report a bug or request a feature? Let us know on [Slack](http://slack.getdbt.com/), or open [an issue](https://github.com/fishtown-analytics/dbt-spark/issues/new). diff --git a/requirements.txt b/requirements.txt index b32884c43..412630919 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pyhive[hive_pure_sasl]~=0.7.0 requests>=2.28.1 -pyodbc~=4.0.39 --no-binary pyodbc +pyodbc~=5.1.0 --no-binary pyodbc sqlparams>=3.0.0 thrift>=0.13.0 pyspark>=3.0.0,<4.0.0 diff --git a/setup.py b/setup.py index fd985eba4..9e1fa31e3 100644 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ def _get_plugin_version_dict(): package_version = "1.9.0a1" description = """The Apache Spark adapter plugin for dbt""" -odbc_extras = ["pyodbc~=4.0.39"] +odbc_extras = ["pyodbc~=5.1.0"] pyhive_extras = [ "PyHive[hive_pure_sasl]~=0.7.0", "thrift>=0.11.0,<0.17.0", @@ -87,6 +87,7 @@ def _get_plugin_version_dict(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], python_requires=">=3.8", )