Skip to content

Commit

Permalink
Merge pull request #372 from phargogh/task/355-support-python-3.12
Browse files Browse the repository at this point in the history
Add explicit support for python 3.12
  • Loading branch information
emlys authored Feb 16, 2024
2 parents 5452fd3 + c0c6014 commit 254c7c8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-py-dists.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
python-arch: [x64]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all history so that setuptools_scm can build the correct version string.
fetch-depth: 0
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
name: Source Dist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all history so that setuptools_scm can build the correct version string.
fetch-depth: 0
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,31 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
gdal: ["3.2.2", "3.3.0", "3.4.3", "3.5", "3.6", "3.7"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
gdal: ["3.2.2", "3.3.0", "3.4.3", "3.5", "3.6", "3.7", "3.8"]
os: [ubuntu-latest, windows-latest, macos-latest]
exclude:
- gdal: "3.2.2"
python-version: 3.10
- gdal: "3.2.2"
python-version: 3.11
- gdal: "3.2.2"
python-version: 3.12
- gdal: "3.3.0"
python-version: 3.10
- gdal: "3.3.0"
python-version: 3.11
- gdal: "3.3.0"
python-version: 3.12
- gdal: "3.4.3"
python-version: 3.11
- gdal: "3.4.3"
python-version: 3.12
- gdal: "3.5"
python-version: 3.12

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# Fetch all history so that setuptool_scm can build the correct
# version string.
Expand Down
2 changes: 2 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Unreleased Changes
provided instead of a vector. If both are provided, the mask raster alone is
used. The new mask raster must have the same dimensions and geotransform as
the output warped raster. https://github.com/natcap/pygeoprocessing/issues/366
* Pygeoprocessing is now tested against python 3.12.
https://github.com/natcap/pygeoprocessing/issues/355

2.4.2 (2023-10-24)
------------------
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: Implementation :: CPython',
'Topic :: Scientific/Engineering :: GIS',
'License :: OSI Approved :: BSD License'
Expand Down
2 changes: 1 addition & 1 deletion tests/test_geoprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -4180,7 +4180,7 @@ def test_align_and_resize_raster_stack_int_with_vector_mask(self):
# have valid data.
self.assertTrue(os.path.exists(mask_raster_path))
mask_array = pygeoprocessing.raster_to_numpy_array(mask_raster_path)
self.assertEquals(mask_array.sum(), 1)
self.assertEqual(mask_array.sum(), 1)
numpy.testing.assert_allclose(target_array[mask_array.astype(bool)], 1)

def test_align_and_resize_raster_stack_int_with_vector_mask_bb(self):
Expand Down

0 comments on commit 254c7c8

Please sign in to comment.