diff --git a/.github/workflows/docker-gdal.yml b/.github/workflows/docker-gdal.yml index 189954a0..19fe609e 100644 --- a/.github/workflows/docker-gdal.yml +++ b/.github/workflows/docker-gdal.yml @@ -25,8 +25,8 @@ jobs: - "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.7.3" # python 3.10.12 - "ghcr.io/osgeo/gdal:ubuntu-small-3.6.4" # python 3.10.6 - - "osgeo/gdal:ubuntu-small-3.5.3" # python 3.8.10 - - "osgeo/gdal:ubuntu-small-3.4.3" # python 3.8.10 + - "osgeo/gdal:ubuntu-small-3.5.3" # python 3.9.20 (installed manually) + - "osgeo/gdal:ubuntu-small-3.4.3" # python 3.9.20 (installed manually) container: image: ${{ matrix.container }} @@ -36,6 +36,15 @@ jobs: run: | apt-get update && apt-get install -y build-essential git python3-dev + - name: Install Python + # the GDAL 3.4 and 3.5 images do have Python 3.8 installed, so have to + # install a more recent Python version manually + if: matrix.container == 'osgeo/gdal:ubuntu-small-3.5.3' || matrix.container == 'osgeo/gdal:ubuntu-small-3.4.3' + run: | + apt-get update && apt-get install -y software-properties-common + add-apt-repository -y ppa:deadsnakes/ppa + apt-get update && apt-get install -y python3.9-dev + - uses: actions/checkout@v4 - name: Create virtual environment diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 238b291d..f1ab3dec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -247,7 +247,7 @@ jobs: "macos-12", "macos-latest", ] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] include: - os: "ubuntu-latest" artifact: pyogrio-wheel-linux-manylinux2014_x86_64 diff --git a/CHANGES.md b/CHANGES.md index 242cf518..02eb6087 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -18,6 +18,8 @@ This also leads to `pyproj` becoming an optional dependency; you will need to install `pyproj` in order to support spatial reference systems (#452). - The GDAL library included in the wheels is updated from 3.8.5 to GDAL 3.9.2 (#466). +- pyogrio now requires a minimum version of Python >= 3.9 (#473). +- Wheels are now available for Python 3.13. ## 0.9.0 (2024-06-17) diff --git a/README.md b/README.md index 0b02463d..8b9f8868 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ substantial change. Please see [CHANGES](CHANGES.md). ## Requirements -Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.8.x. +Supports Python 3.9 - 3.13 and GDAL 3.4.x - 3.9.x. Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`. diff --git a/docs/source/install.md b/docs/source/install.md index 5419a36d..94513d11 100644 --- a/docs/source/install.md +++ b/docs/source/install.md @@ -2,7 +2,7 @@ ## Requirements -Supports Python 3.8 - 3.11 and GDAL 3.4.x - 3.8.x +Supports Python 3.9 - 3.13 and GDAL 3.4.x - 3.9.x Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`. diff --git a/pyogrio/_env.py b/pyogrio/_env.py index ee15883c..76e8e4b6 100644 --- a/pyogrio/_env.py +++ b/pyogrio/_env.py @@ -7,7 +7,6 @@ import logging import os import platform -import sys from contextlib import contextmanager from pathlib import Path @@ -28,7 +27,7 @@ gdal_dll_dir = None -if platform.system() == "Windows" and sys.version_info >= (3, 8): +if platform.system() == "Windows": # if loading of extension modules fails, search for gdal dll directory try: import pyogrio._io # noqa: F401 diff --git a/pyproject.toml b/pyproject.toml index fb09a0f0..26617a79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ classifiers = [ "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: GIS", ] -requires-python = ">=3.8" +requires-python = ">=3.9" dependencies = ["certifi", "numpy", "packaging"] [project.optional-dependencies] diff --git a/setup.py b/setup.py index 25699c09..4acb7677 100644 --- a/setup.py +++ b/setup.py @@ -20,12 +20,12 @@ logger = logging.getLogger(__name__) -MIN_PYTHON_VERSION = (3, 8, 0) +MIN_PYTHON_VERSION = (3, 9, 0) MIN_GDAL_VERSION = (2, 4, 0) if sys.version_info < MIN_PYTHON_VERSION: - raise RuntimeError("Python >= 3.8 is required") + raise RuntimeError("Python >= 3.9 is required") def copy_data_tree(datadir, destdir):