Skip to content

Commit 56a5961

Browse files
authored
MAINT: minimum python version required to 3.10 (#557)
1 parent 01d56c2 commit 56a5961

File tree

12 files changed

+21
-22
lines changed

12 files changed

+21
-22
lines changed

.github/workflows/docker-gdal.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
- "ghcr.io/osgeo/gdal:ubuntu-small-3.8.5" # python 3.10.12
2727
- "ghcr.io/osgeo/gdal:ubuntu-small-3.7.3" # python 3.10.12
2828
- "ghcr.io/osgeo/gdal:ubuntu-small-3.6.4" # python 3.10.6
29-
- "osgeo/gdal:ubuntu-small-3.5.3" # python 3.9.20 (installed manually)
30-
- "osgeo/gdal:ubuntu-small-3.4.3" # python 3.9.20 (installed manually)
29+
- "osgeo/gdal:ubuntu-small-3.5.3" # python 3.10 (installed manually)
30+
- "osgeo/gdal:ubuntu-small-3.4.3" # python 3.10 (installed manually)
3131

3232
container:
3333
image: ${{ matrix.container }}
@@ -44,7 +44,7 @@ jobs:
4444
run: |
4545
apt-get update && apt-get install -y software-properties-common
4646
add-apt-repository -y ppa:deadsnakes/ppa
47-
apt-get update && apt-get install -y python3.9-dev
47+
apt-get update && apt-get install -y python3.10-dev
4848
4949
- uses: actions/checkout@v5
5050

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ jobs:
257257
"macos-13",
258258
"macos-latest",
259259
]
260-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
260+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
261261
include:
262262
- os: "ubuntu-latest"
263263
artifact: pyogrio-wheel-linux-manylinux2014_x86_64

.github/workflows/tests-conda.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
geopandas=0.12
3434
# minimal environment without optional dependencies
3535
- os: "ubuntu-latest"
36-
python: "3.9"
36+
python: "3.10"
3737
env: "minimal"
3838
# environment for older Windows libgdal to make sure gdal_i.lib is
3939
# properly detected

CHANGES.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CHANGELOG
22

3-
## 0.12.0 (yyyy-mm-dd)
3+
## 0.12.0 (xxxx-xx-xx)
44

55
### Potentially breaking changes
66

@@ -23,7 +23,8 @@
2323
- The GDAL library included in the wheels is upgraded from 3.10.3 to 3.11.4 (#578).
2424
- Add libkml driver to the wheels for more recent Linux platforms supported
2525
by manylinux_2_28, MacOS, and Windows (#561).
26-
- Wheels are now available for Python 3.14.
26+
- Minimum required Python version is now 3.10 (#557).
27+
- Wheels are now available for Python 3.14 (#579).
2728

2829
## 0.11.1 (2025-08-02)
2930

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Read the documentation for more information:
2626

2727
## Requirements
2828

29-
Supports Python 3.9 - 3.13 and GDAL 3.4.x - 3.9.x.
29+
Supports Python 3.10 - 3.14 and GDAL 3.4.x - 3.11.x.
3030

3131
Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`.
3232

docs/environment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: pyogrio
22
channels:
33
- conda-forge
44
dependencies:
5-
- python==3.9.*
5+
- python==3.10.*
66
- gdal
7-
- numpy==1.19.*
7+
- numpy==1.24.*
88
- numpydoc==1.1.*
99
- Cython==0.29.*
1010
- docutils==0.16.*

docs/source/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Requirements
44

5-
Supports Python 3.9 - 3.13 and GDAL 3.4.x - 3.9.x
5+
Supports Python 3.10 - 3.14 and GDAL 3.4.x - 3.11.x
66

77
Reading to GeoDataFrames requires `geopandas>=0.12` with `shapely>=2`.
88

pyogrio/core.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Core functions to interact with OGR data sources."""
22

33
from pathlib import Path
4-
from typing import Optional, Union
54

65
from pyogrio._env import GDALEnv
76
from pyogrio.util import (
@@ -338,7 +337,7 @@ def get_gdal_data_path():
338337
return _get_gdal_data_path()
339338

340339

341-
def vsi_listtree(path: Union[str, Path], pattern: Optional[str] = None):
340+
def vsi_listtree(path: str | Path, pattern: str | None = None):
342341
"""Recursively list the contents of a VSI directory.
343342
344343
An fnmatch pattern can be specified to filter the directories/files
@@ -358,7 +357,7 @@ def vsi_listtree(path: Union[str, Path], pattern: Optional[str] = None):
358357
return ogr_vsi_listtree(path, pattern=pattern)
359358

360359

361-
def vsi_rmtree(path: Union[str, Path]):
360+
def vsi_rmtree(path: str | Path):
362361
"""Recursively remove VSI directory.
363362
364363
Parameters
@@ -373,7 +372,7 @@ def vsi_rmtree(path: Union[str, Path]):
373372
ogr_vsi_rmtree(path)
374373

375374

376-
def vsi_unlink(path: Union[str, Path]):
375+
def vsi_unlink(path: str | Path):
377376
"""Remove a VSI file.
378377
379378
Parameters

pyogrio/geopandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ def write_dataframe(
705705
if isinstance(values, pd.api.extensions.ExtensionArray):
706706
from pandas.arrays import BooleanArray, FloatingArray, IntegerArray
707707

708-
if isinstance(values, (IntegerArray, FloatingArray, BooleanArray)):
708+
if isinstance(values, IntegerArray | FloatingArray | BooleanArray):
709709
field_data.append(values._data)
710710
field_mask.append(values._mask)
711711
else:

pyogrio/util.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import sys
55
from packaging.version import Version
66
from pathlib import Path
7-
from typing import Union
87
from urllib.parse import urlparse
98

109
from pyogrio._ogr import MULTI_EXTENSIONS
@@ -53,7 +52,7 @@ def get_vsi_path_or_buffer(path_or_buffer):
5352
return vsi_path(str(path_or_buffer))
5453

5554

56-
def vsi_path(path: Union[str, Path]) -> str:
55+
def vsi_path(path: str | Path) -> str:
5756
"""Ensure path is a local path or a GDAL-compatible VSI path."""
5857
# Convert Path objects to string, but for VSI paths, keep posix style path.
5958
if isinstance(path, Path):
@@ -236,7 +235,7 @@ def _mask_to_wkb(mask):
236235
return shapely.to_wkb(mask)
237236

238237

239-
def vsimem_rmtree_toplevel(path: Union[str, Path]):
238+
def vsimem_rmtree_toplevel(path: str | Path):
240239
"""Remove the parent directory of the file path recursively.
241240
242241
This is used for final cleanup of an in-memory dataset, which may have been

0 commit comments

Comments
 (0)