Skip to content

Commit

Permalink
Drop Python 3.8 support, require Python 3.9+ (#321)
Browse files Browse the repository at this point in the history
* Drop Python 3.8 support, require Python 3.9+

* Run pyupgrade for Python 3.9+

Apply pyupgrade for Python 3.9+
  • Loading branch information
EwoutH authored Jul 10, 2024
1 parent cffb52e commit 89fd9ec
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fail-fast: true
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']
# test oldesst and newest libspatialindex versions
sidx-version: ['1.8.5', '2.0.0']
exclude:
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion DEPENDENCIES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- python 3.8+
- python 3.9+
- setuptools
- libspatialindex C library 1.8.5+:
https://libspatialindex.org/
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ channels:
- defaults
- conda-forge
dependencies:
- python>=3.8
- python>=3.9
- libspatialindex>=1.8.5
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ maintainers = [
]
description = "R-Tree spatial index for Python GIS"
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
keywords = ["gis", "spatial", "index", "r-tree"]
license = {text = "MIT"}
classifiers = [
Expand All @@ -23,7 +23,6 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
Expand All @@ -49,7 +48,7 @@ version = {attr = "rtree.__version__"}
rtree = ["py.typed"]

[tool.cibuildwheel]
build = "cp38-*"
build = "cp39-*"
build-verbosity = 3
repair-wheel-command = "python scripts/repair_wheel.py -w {dest_dir} {wheel}"
test-requires = "tox"
Expand Down
3 changes: 2 additions & 1 deletion rtree/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import pickle
import pprint
import warnings
from typing import Any, Iterator, Literal, Sequence, overload
from collections.abc import Iterator, Sequence
from typing import Any, Literal, overload

from . import core
from .exceptions import RTreeError
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import os
import shutil
from typing import Iterator
from collections.abc import Iterator

import py
import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import sys
import tempfile
import unittest
from typing import Iterator
from collections.abc import Iterator

import numpy as np
import pytest
Expand Down
3 changes: 2 additions & 1 deletion tests/test_tpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
import os
import unittest
from collections import defaultdict, namedtuple
from collections.abc import Iterator
from math import ceil
from typing import Any, Iterator
from typing import Any

import numpy as np
from numpy.random import default_rng
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
requires =
tox>=4
env_list = py{38,39,310,311,312}
env_list = py{39,310,311,312}

[testenv]
description = run unit tests
Expand Down

0 comments on commit 89fd9ec

Please sign in to comment.