Skip to content

Commit a670fda

Browse files
committed
refactor(python)!: drop Python 3.9
1 parent 2f4a685 commit a670fda

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+330
-2419
lines changed

.github/workflows/ibis-backends-cloud.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
os:
3838
- ubuntu-latest
3939
python-version:
40-
- "3.9"
40+
- "3.10"
4141
- "3.13"
4242
backend:
4343
- name: snowflake
@@ -54,7 +54,7 @@ jobs:
5454
- --extra athena
5555
include:
5656
- os: ubuntu-latest
57-
python-version: "3.9"
57+
python-version: "3.10"
5858
backend:
5959
name: bigquery
6060
title: BigQuery

.github/workflows/ibis-backends.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- ubuntu-latest
5353
- windows-latest
5454
python-version:
55-
- "3.9"
55+
- "3.10"
5656
- "3.13"
5757
steps:
5858
- name: checkout
@@ -92,7 +92,7 @@ jobs:
9292
- ubuntu-latest
9393
- windows-latest
9494
python-version:
95-
- "3.9"
95+
- "3.10"
9696
- "3.13"
9797
backend:
9898
- name: duckdb
@@ -557,7 +557,7 @@ jobs:
557557
fail-fast: false
558558
matrix:
559559
include:
560-
- python-version: "3.9"
560+
- python-version: "3.10"
561561
pyspark-minor-version: "3.3"
562562
tag: local
563563
deps:

.github/workflows/ibis-main.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ jobs:
4747
- ubuntu-24.04-arm
4848
- windows-latest
4949
python-version:
50-
- "3.9"
5150
- "3.10"
5251
- "3.11"
5352
- "3.12"
@@ -108,31 +107,6 @@ jobs:
108107
flags: core,${{ runner.os }},python-${{ steps.install_python.outputs.python-version }}
109108
token: ${{ secrets.CODECOV_TOKEN }}
110109

111-
test_shapely_duckdb_import:
112-
name: Test shapely and duckdb import
113-
runs-on: ubuntu-latest
114-
steps:
115-
- name: checkout
116-
uses: actions/checkout@v5
117-
118-
- name: install python
119-
uses: actions/setup-python@v6
120-
with:
121-
python-version: "3.9"
122-
123-
- name: install uv
124-
uses: astral-sh/[email protected]
125-
126-
- name: install system dependencies
127-
run: |
128-
set -euo pipefail
129-
130-
sudo apt-get update -y -qq
131-
sudo apt-get install -y -q build-essential libgeos-dev
132-
133-
- name: check shapely and duckdb imports
134-
run: uv run --extra duckdb --extra geospatial python -c 'import shapely.geometry, duckdb'
135-
136110
test_duckdb_sqlite3_import:
137111
name: Test sqlite3 and duckdb import
138112
runs-on: ubuntu-latest

ibis/backends/__init__.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import urllib.parse
1313
import weakref
1414
from collections import Counter
15+
from collections.abc import Callable
1516
from pathlib import Path
16-
from typing import TYPE_CHECKING, Any, Callable, ClassVar, NamedTuple, overload
17+
from typing import TYPE_CHECKING, Any, ClassVar, NamedTuple, overload
1718

1819
import ibis
1920
import ibis.common.exceptions as exc
@@ -1662,12 +1663,8 @@ def _get_backend_names(*, exclude: tuple[str] = ()) -> frozenset[str]:
16621663
are visible to every caller of this function.
16631664
16641665
"""
1665-
1666-
if sys.version_info < (3, 10):
1667-
entrypoints = importlib.metadata.entry_points()["ibis.backends"]
1668-
else:
1669-
entrypoints = importlib.metadata.entry_points(group="ibis.backends")
1670-
return frozenset(ep.name for ep in entrypoints).difference(exclude)
1666+
entry_points = importlib.metadata.entry_points(group="ibis.backends")
1667+
return frozenset(ep.name for ep in entry_points).difference(exclude)
16711668

16721669

16731670
def connect(resource: Path | str, /, **kwargs: Any) -> BaseBackend:

ibis/backends/athena/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
import os
88
import re
99
import sys
10+
from collections.abc import Callable
1011
from pathlib import Path
11-
from typing import TYPE_CHECKING, Any, Callable
12+
from typing import TYPE_CHECKING, Any
1213

1314
import fsspec
1415
import pyarrow_hotfix # noqa: F401

ibis/backends/bigquery/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
import glob
99
import os
1010
import re
11+
from collections.abc import Callable
1112
from decimal import Decimal
1213
from functools import partial
13-
from typing import IO, TYPE_CHECKING, Any, Callable, Optional
14+
from typing import IO, TYPE_CHECKING, Any, Optional
1415

1516
import google.api_core.exceptions
1617
import google.auth.credentials

ibis/backends/databricks/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
import os
1010
import sys
1111
import tempfile
12+
from collections.abc import Callable
1213
from pathlib import Path
13-
from typing import TYPE_CHECKING, Any, Callable
14+
from typing import TYPE_CHECKING, Any
1415

1516
import databricks.sql
1617
import pyarrow as pa

ibis/backends/exasol/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
import datetime
55
import re
66
import ssl
7-
from typing import TYPE_CHECKING, Any, Callable
7+
from collections.abc import Callable
8+
from typing import TYPE_CHECKING, Any
89
from urllib.parse import unquote_plus
910

1011
import pyexasol

ibis/backends/oracle/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
import contextlib
66
import re
77
import warnings
8+
from collections.abc import Callable
89
from functools import cached_property
910
from operator import itemgetter
10-
from typing import TYPE_CHECKING, Any, Callable
11+
from typing import TYPE_CHECKING, Any
1112
from urllib.parse import unquote_plus
1213

1314
import oracledb

ibis/backends/oracle/tests/test_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from __future__ import annotations
22

3-
from datetime import date # noqa: TC003
3+
from datetime import date
44

55
import oracledb
66
import pandas as pd

0 commit comments

Comments
 (0)