Skip to content

Commit

Permalink
Merge pull request natcap#1554 from phargogh/task/1425-add-support-fo…
Browse files Browse the repository at this point in the history
…r-py312

Add explicit support for python 3.12
  • Loading branch information
emlys authored Apr 11, 2024
2 parents 504e026 + 784735b commit e5dd80e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ env:
# nomkl: make sure numpy w/out mkl
# setuptools_scm: needed for versioning to work
CONDA_DEFAULT_DEPENDENCIES: python-build nomkl setuptools_scm
LATEST_SUPPORTED_PYTHON_VERSION: "3.11"
LATEST_SUPPORTED_PYTHON_VERSION: "3.12"

jobs:
check-syntax-errors:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -159,7 +159,7 @@ jobs:
needs: check-syntax-errors
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v3
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "natcap.invest"
description = "InVEST Ecosystem Service models"
readme = "README_PYTHON.rst"
requires-python = ">=3.8,<3.12"
requires-python = ">=3.8"
license = {file = "LICENSE.txt"}
maintainers = [
{name = "Natural Capital Project Software Team"}
Expand All @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Cython",
"License :: OSI Approved :: BSD License",
"Topic :: Scientific/Engineering :: GIS"
Expand Down
4 changes: 3 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ pytest
pytest-subtests
wheel>=0.27.0
pypiwin32; sys_platform == 'win32' # pip-only
setuptools>=8.0,<60.7.0 # https://github.com/pyinstaller/pyinstaller/issues/6564

# 60.7.0 exception because of https://github.com/pyinstaller/pyinstaller/issues/6564
setuptools>=8.0,!=60.7.0
PyInstaller>=4.10
setuptools_scm>=6.4.0
requests
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ def test_os_path_normalization_linux(self):
relative_to = os.path.join(self.workspace_dir, 'test.csv')
expected_path = os.path.join(self.workspace_dir, "foo/bar.shp")
path = utils.expand_path(rel_path, relative_to)
self.assertEquals(path, expected_path)
self.assertEqual(path, expected_path)

@unittest.skipIf(platform.system() != 'Windows',
"Function behavior differs across systems.")
Expand All @@ -1213,7 +1213,7 @@ def test_os_path_normalization_windows(self):
relative_to = os.path.join(self.workspace_dir, 'test.csv')
expected_path = os.path.join(self.workspace_dir, "foo\\bar.shp")
path = utils.expand_path(rel_path, relative_to)
self.assertEquals(path, expected_path)
self.assertEqual(path, expected_path)

def test_falsey(self):
"""Utils: test return None when falsey."""
Expand Down

0 comments on commit e5dd80e

Please sign in to comment.