Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Python 3.11 #336

Closed
wants to merge 2 commits into from
Closed

Add support for Python 3.11 #336

wants to merge 2 commits into from

Conversation

joshuataylor
Copy link
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
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 join this conversation on GitHub. Already have an account? Sign in to comment
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