Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Add support for Python 3.11#336

Closed
joshuataylor wants to merge 2 commits intodbt-labs:mainfrom
joshuataylor:feature/python311
Closed

Add support for Python 3.11#336
joshuataylor wants to merge 2 commits intodbt-labs:mainfrom
joshuataylor:feature/python311

Conversation

@joshuataylor
Copy link
Copy Markdown
Contributor

resolves #331

Description

Bump to support Python 3.11 . Unfortunately Snowflake isn't planning to support wheels for this until 2023.

However, they are up for this: snowflakedb/snowflake-connector-python#1349

So it looks like it could come sooner than expected, hopefully :).

So to test this is a bit fiddly, you have a few options:

Option 1) Use my wheels
I've built the above PR, and I'm using the wheels locally. For dbt-snowflake you will need to edit setup.py and change snowflake-connector-python to the following:

"snowflake-connector-python[secure-local-storage] @ https://pub-06bff9b264344d5c807b16a2c12bf62d.r2.dev/snowflake_connector_python-2.9.0-cp311-cp311-linux_x86_64.whl",

Linux: https://pub-06bff9b264344d5c807b16a2c12bf62d.r2.dev/snowflake_connector_python-2.9.0-cp311-cp311-linux_x86_64.whl
Mac: https://pub-06bff9b264344d5c807b16a2c12bf62d.r2.dev/snowflake_connector_python-2.8.3-cp311-cp311-macosx_12_0_arm64.whl

Not sure why these versions are different 🤷

Option 2) Use that branch and build your wheels
If you are on Linux, you can use that branch above:

git clone https://github.com/snowflakedb/snowflake-connector-python
cd snowflake-connector-python
git fetch origin pull/1349/head:feature/3.11 # check out the branch
git checkout feature/3.11

Now you have a few options:

  1. Build the wheel using docker (probably easiest)
  2. Install arrow dependencies and try your luck :)

Docker: ./ci/build_docker.sh 3.11
Shell (Mac): ./ci/build_darwin.sh 3.11
Shell (Linux): ./ci/build_linux.sh 3.11 # Note this didn't work for me, it's designed for their CI environment

If using a mac and you want to build wheels, you're going to want to brew install apache-arrow if using homebrew to grab the latest 10.0.0-1 which supports Python 3.11.

Checklist

@cla-bot cla-bot bot added the cla:yes label Dec 2, 2022
@joshuataylor joshuataylor changed the title Feature/python311 Add support for Python 3.11 Dec 2, 2022
@jtcohen6 jtcohen6 added the ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering label Dec 6, 2022
@joshuataylor joshuataylor mentioned this pull request Dec 27, 2022
6 tasks
@dataders
Copy link
Copy Markdown
Contributor

thanks for the issue and PR @joshuataylor! hoping to get this support out this week or next. for now, closing this in favor of #331

@dataders dataders closed this Jan 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla:yes ready_for_review Externally contributed PR has functional approval, ready for code review from Core engineering

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CT-1529] [Feature] Support Python 3.11

3 participants