Skip to content

Commit 0708614

Browse files
NO-SNOW: drop EOL Python 3.9 support (#2889)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 714448d commit 0708614

32 files changed

Lines changed: 71 additions & 200 deletions

.github/workflows/build_test.yml

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ jobs:
5454
MATRIX=$(jq -c . < ./.github/workflows/generated_pr_matrix.json)
5555
fi
5656
echo "test_matrix=$MATRIX" >> "$GITHUB_OUTPUT"
57-
echo "build_matrix=$(echo "$MATRIX" | jq -c '[group_by(.os_download_name, .["python-version"]) | .[] | first]')" >> "$GITHUB_OUTPUT"
57+
# Always build manylinux_x86_64+py3.11 even when not in the PR test matrix:
58+
# the FIPS test job depends on that wheel artifact.
59+
echo "build_matrix=$(echo "$MATRIX" | jq -c '[group_by(.os_download_name, .["python-version"]) | .[] | first] + [{"os_image_name": "ubuntu-latest", "os_download_name": "manylinux_x86_64", "python-version": "3.11"}] | unique_by([.os_download_name, .["python-version"]])')" >> "$GITHUB_OUTPUT"
5860
lint:
5961
name: Check linting
6062
runs-on: ubuntu-latest
@@ -254,7 +256,7 @@ jobs:
254256
# TODO: It can be changed to ubuntu-latest, when python sf connector version in tox is above 3.4.0
255257
- image_name: ubuntu-22.04
256258
download_name: linux
257-
python-version: [3.9]
259+
python-version: ["3.10"]
258260
cloud-provider: [aws]
259261
steps:
260262
- uses: actions/checkout@v4
@@ -300,7 +302,7 @@ jobs:
300302
os:
301303
- image_name: ubuntu-latest
302304
download_name: linux
303-
python-version: [3.9]
305+
python-version: ["3.10"]
304306
cloud-provider: [aws]
305307
steps:
306308
- uses: actions/checkout@v4
@@ -323,7 +325,7 @@ jobs:
323325
shell: bash
324326

325327
test-fips:
326-
name: Test FIPS linux-3.9-${{ matrix.cloud-provider }}
328+
name: Test FIPS linux-3.11-${{ matrix.cloud-provider }}
327329
needs: build
328330
runs-on: ubuntu-latest
329331
strategy:
@@ -349,15 +351,15 @@ jobs:
349351
- name: Download wheel(s)
350352
uses: actions/download-artifact@v4
351353
with:
352-
name: manylinux_x86_64_py3.9
354+
name: manylinux_x86_64_py3.11
353355
path: dist
354356
- name: Show wheels downloaded
355357
run: ls -lh dist
356358
shell: bash
357359
- name: Run tests
358360
run: ./ci/test_fips_docker.sh
359361
env:
360-
PYTHON_VERSION: 3.9
362+
PYTHON_VERSION: "3.11"
361363
cloud_provider: ${{ matrix.cloud-provider }}
362364
PYTEST_ADDOPTS: --color=yes --tb=short
363365
TOX_PARALLEL_NO_SPINNER: 1
@@ -366,15 +368,15 @@ jobs:
366368
if: always()
367369
with:
368370
include-hidden-files: true
369-
name: coverage_linux-fips-3.9-${{ matrix.cloud-provider }}
371+
name: coverage_linux-fips-3.11-${{ matrix.cloud-provider }}
370372
path: |
371373
.coverage
372374
coverage.xml
373375
- uses: actions/upload-artifact@v4
374376
if: always()
375377
with:
376378
include-hidden-files: true
377-
name: junit_linux-fips-3.9-${{ matrix.cloud-provider }}
379+
name: junit_linux-fips-3.11-${{ matrix.cloud-provider }}
378380
path: |
379381
junit.*.xml
380382
@@ -521,46 +523,15 @@ jobs:
521523
.tox/.coverage
522524
.tox/coverage.xml
523525
524-
test-unsupported-aio:
525-
if: false # temporarily disable aio - SNOW-2905263
526-
name: Test unsupported asyncio ${{ matrix.os.download_name }}-${{ matrix.python-version }}
527-
runs-on: ${{ matrix.os.image_name }}
528-
strategy:
529-
fail-fast: false
530-
matrix:
531-
os:
532-
- image_name: ubuntu-latest
533-
download_name: manylinux_x86_64
534-
python-version: [ "3.9", ]
535-
steps:
536-
- uses: actions/checkout@v4
537-
- name: Set up Python
538-
uses: actions/setup-python@v5
539-
with:
540-
python-version: ${{ matrix.python-version }}
541-
- name: Display Python version
542-
run: python -c "import sys; print(sys.version)"
543-
- name: Upgrade setuptools, pip and wheel
544-
run: python -m pip install -U setuptools pip wheel
545-
- name: Install tox
546-
run: python -m pip install tox>=4
547-
- name: Run tests
548-
run: python -m tox run -e aio-unsupported-python
549-
env:
550-
PYTHON_VERSION: ${{ matrix.python-version }}
551-
PYTEST_ADDOPTS: --color=yes --tb=short
552-
TOX_PARALLEL_NO_SPINNER: 1
553-
shell: bash
554-
555526
test-rockylinux9:
556527
name: Test Rocky Linux 9 rockylinux9-${{ matrix.python-version }}-${{ matrix.cloud-provider }}
557528
needs: lint
558529
runs-on: ubuntu-latest
559530
strategy:
560531
fail-fast: false
561532
matrix:
562-
# Rocky Linux 9 has Python 3.9, 3.11, and 3.12 available
563-
python-version: ["3.9", "3.11", "3.12"]
533+
# Rocky Linux 9 has Python 3.11 and 3.12 available
534+
python-version: ["3.11", "3.12"]
564535
cloud-provider: [aws, azure, gcp]
565536
steps:
566537
- name: Set shortver
@@ -633,7 +604,7 @@ jobs:
633604
- name: Set up Python
634605
uses: actions/setup-python@v5
635606
with:
636-
python-version: '3.9'
607+
python-version: '3.10'
637608
- name: Display Python version
638609
run: python -c "import sys; print(sys.version)"
639610
- name: Upgrade setuptools and pip

.github/workflows/create_req_files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
12+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Set up Python

.github/workflows/generated_full_matrix.json

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
11
[
2-
{
3-
"os_image_name": "ubuntu-latest",
4-
"os_download_name": "manylinux_x86_64",
5-
"python-version": "3.9",
6-
"cloud-provider": "aws"
7-
},
8-
{
9-
"os_image_name": "ubuntu-latest",
10-
"os_download_name": "manylinux_x86_64",
11-
"python-version": "3.9",
12-
"cloud-provider": "azure"
13-
},
14-
{
15-
"os_image_name": "ubuntu-latest",
16-
"os_download_name": "manylinux_x86_64",
17-
"python-version": "3.9",
18-
"cloud-provider": "gcp"
19-
},
202
{
213
"os_image_name": "ubuntu-latest",
224
"os_download_name": "manylinux_x86_64",
@@ -107,24 +89,6 @@
10789
"python-version": "3.14",
10890
"cloud-provider": "gcp"
10991
},
110-
{
111-
"os_image_name": "macos-latest",
112-
"os_download_name": "macosx_x86_64",
113-
"python-version": "3.9",
114-
"cloud-provider": "aws"
115-
},
116-
{
117-
"os_image_name": "macos-latest",
118-
"os_download_name": "macosx_x86_64",
119-
"python-version": "3.9",
120-
"cloud-provider": "azure"
121-
},
122-
{
123-
"os_image_name": "macos-latest",
124-
"os_download_name": "macosx_x86_64",
125-
"python-version": "3.9",
126-
"cloud-provider": "gcp"
127-
},
12892
{
12993
"os_image_name": "macos-latest",
13094
"os_download_name": "macosx_x86_64",
@@ -215,24 +179,6 @@
215179
"python-version": "3.14",
216180
"cloud-provider": "gcp"
217181
},
218-
{
219-
"os_image_name": "windows-latest",
220-
"os_download_name": "win_amd64",
221-
"python-version": "3.9",
222-
"cloud-provider": "aws"
223-
},
224-
{
225-
"os_image_name": "windows-latest",
226-
"os_download_name": "win_amd64",
227-
"python-version": "3.9",
228-
"cloud-provider": "azure"
229-
},
230-
{
231-
"os_image_name": "windows-latest",
232-
"os_download_name": "win_amd64",
233-
"python-version": "3.9",
234-
"cloud-provider": "gcp"
235-
},
236182
{
237183
"os_image_name": "windows-latest",
238184
"os_download_name": "win_amd64",

.github/workflows/generated_pr_matrix.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{
33
"os_image_name": "ubuntu-latest",
44
"os_download_name": "manylinux_x86_64",
5-
"python-version": "3.9",
5+
"python-version": "3.10",
66
"cloud-provider": "aws"
77
},
88
{
@@ -14,7 +14,7 @@
1414
{
1515
"os_image_name": "macos-latest",
1616
"os_download_name": "macosx_x86_64",
17-
"python-version": "3.9",
17+
"python-version": "3.10",
1818
"cloud-provider": "azure"
1919
},
2020
{
@@ -26,7 +26,7 @@
2626
{
2727
"os_image_name": "windows-latest",
2828
"os_download_name": "win_amd64",
29-
"python-version": "3.9",
29+
"python-version": "3.10",
3030
"cloud-provider": "gcp"
3131
},
3232
{

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ dependencies installed with `snowflake-connector-python` installed as an editabl
3030
Setting up a development environment is super easy with this [one simple tox command](https://tox.wiki/en/legacy/example/devenv.html).
3131

3232
```shell
33-
tox --devenv venv39 -e py39
34-
. venv39/bin/activate
33+
tox --devenv venv310 -e py310
34+
. venv310/bin/activate
3535
```
3636

3737
Note: we suggest using the lowest supported Python version for development.

DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
88

99
# Release Notes
1010
- Upcoming Release
11+
- Dropped support for Python 3.9. The minimum supported version is now Python 3.10.
1112
- Fixed sdist to only install the minicore binary matching the current platform (SNOW-3526469). Previous 4.x releases copied every platform's minicore `.so`/`.dylib`/`.dll` into the install prefix, breaking downstream packagers (e.g. Homebrew) whose audits reject foreign-arch binaries.
1213
- Added one in-band telemetry record per successful login describing which connection-identifier fields the user supplied (`account_provided`, `account_with_region`, `account_org_provided`, `region_provided`, `host_provided`). No hostname or account value is included. This is gated by the existing server-side `CLIENT_TELEMETRY_ENABLED` parameter and can additionally be disabled locally by setting `SF_TELEMETRY_DISABLE_CONNECTION_SHAPE=true`. The telemetry collection is time-boxed and will be removed in a future release.
1314

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ using the Snowflake JDBC or ODBC drivers.
1515

1616
The connector has **no** dependencies on JDBC or ODBC.
1717
It can be installed using ``pip`` on Linux, Mac OSX, and Windows platforms
18-
where Python 3.9.0 (or higher) is installed.
18+
where Python 3.10.0 (or higher) is installed.
1919

2020
Snowflake Documentation is available at:
2121
https://docs.snowflake.com/
@@ -42,7 +42,7 @@ Find the `snowflake_connector_python*.whl` package in the `./dist` directory.
4242
### In Docker
4343
Or use our Dockerized build script `ci/build_docker.sh` and find the built wheel files in `dist/repaired_wheels`.
4444

45-
Note: `ci/build_docker.sh` can be used to compile only certain versions, like this: `ci/build_docker.sh "3.9 3.10"`
45+
Note: `ci/build_docker.sh` can be used to compile only certain versions, like this: `ci/build_docker.sh "3.10 3.11"`
4646

4747
## Code hygiene and other utilities
4848
These tools are integrated into `tox` to allow us to easily set them up universally on any computer.

ci/anaconda/conda_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
conda install conda-build
33
conda install conda-verify
44
conda install diffutils
5-
conda build ci/anaconda/recipe/ --python 3.9
65
conda build ci/anaconda/recipe/ --python 3.10
76
conda build ci/anaconda/recipe/ --python 3.11
87
conda build ci/anaconda/recipe/ --python 3.12

ci/anaconda/recipe/meta.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ requirements:
3737
- cython
3838
- python {{ python }}
3939
run:
40-
{% if py == 39 %}
41-
- python >=3.9,<3.10.0a0
42-
{% elif py == 310 %}
40+
{% if py == 310 %}
4341
- python >=3.10,<3.11.0a0
4442
{% elif py == 311 %}
4543
- python >=3.11,<3.12.0a0
@@ -61,7 +59,6 @@ requirements:
6159
- packaging
6260
- charset-normalizer >=2,<4
6361
- idna >=3.7,<4
64-
- urllib3 >=1.26.5,<2.0.0 # [py<310]
6562
- certifi >=2024.7.4
6663
- typing_extensions >=4.3,<5
6764
- filelock >=3.5,<4

ci/build_darwin.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#
33
# Build Snowflake Python Connector on Mac
44
# NOTES:
5-
# - To compile only a specific version(s) pass in versions like: `./build_darwin.sh "3.9 3.10"`
6-
PYTHON_VERSIONS="${1:-3.9 3.10 3.11 3.12 3.13 3.14}"
5+
# - To compile only a specific version(s) pass in versions like: `./build_darwin.sh "3.10 3.11"`
6+
PYTHON_VERSIONS="${1:-3.10 3.11 3.12 3.13 3.14}"
77

88
THIS_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
99
CONNECTOR_DIR="$(dirname "${THIS_DIR}")"
@@ -36,7 +36,7 @@ for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
3636

3737
log "[Info] ===== Starting build for Python ${PYTHON_VERSION} ====="
3838

39-
# Select the matching pyenv-installed version (e.g. 3.9 -> 3.9.21)
39+
# Select the matching pyenv-installed version (e.g. 3.10 -> 3.10.15)
4040
if command -v pyenv &> /dev/null; then
4141
PYENV_MATCH=$(pyenv versions --bare | grep "^${PYTHON_VERSION//./\\.}" | head -1)
4242
if [ -n "$PYENV_MATCH" ]; then

0 commit comments

Comments
 (0)