Skip to content

Commit 6f00acf

Browse files
authored
chore: drop python 3.8 (#1236)
I did _not_ run **pyupgrade** as that'll be really noisy, so I'm going to wait until the sprint is over and the repo has fewer folks hacking on it.
1 parent 2dab105 commit 6f00acf

File tree

7 files changed

+18
-30
lines changed

7 files changed

+18
-30
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ jobs:
2626
fail-fast: false
2727
matrix:
2828
python-version:
29-
- "3.8"
3029
- "3.9"
3130
- "3.10"
3231
- "3.11"
@@ -59,10 +58,10 @@ jobs:
5958
steps:
6059
- uses: actions/checkout@v4
6160

62-
- name: Set up Python 3.8
61+
- name: Set up Python 3.9
6362
uses: actions/setup-python@v4
6463
with:
65-
python-version: "3.8"
64+
python-version: "3.9"
6665
cache: "pip"
6766

6867
- name: Install with dependencies
@@ -102,7 +101,6 @@ jobs:
102101
fail-fast: false
103102
matrix:
104103
python-version:
105-
- "3.8"
106104
- "3.9"
107105
- "3.10"
108106
- "3.11"
@@ -129,7 +127,7 @@ jobs:
129127

130128
- uses: actions/setup-python@v4
131129
with:
132-
python-version: "3.8"
130+
python-version: "3.9"
133131

134132
- name: Install
135133
run: pip install .[validation,test]
@@ -147,7 +145,7 @@ jobs:
147145

148146
- uses: actions/setup-python@v4
149147
with:
150-
python-version: "3.8"
148+
python-version: "3.9"
151149
cache: "pip"
152150

153151
- name: Install all dependencies
@@ -162,7 +160,7 @@ jobs:
162160
- uses: actions/checkout@v4
163161
- uses: actions/setup-python@v4
164162
with:
165-
python-version: "3.8"
163+
python-version: "3.9"
166164
cache: "pip"
167165
- name: Install pystac
168166
run: pip install .[bench]

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ version: 2
77
build:
88
os: ubuntu-22.04
99
tools:
10-
python: "3.8"
10+
python: "3.9"
1111

1212
formats:
1313
# Temporarily disabling PDF downloads due to problem with nbsphinx in LateX builds

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
- Typing of `href` arguments ([#1234](https://github.com/stac-utils/pystac/pull/1234))
1212
- Interactions between **pytest-recording** and the validator schema cache ([#1242](https://github.com/stac-utils/pystac/pull/1242))
1313

14+
### Removed
15+
16+
- Python 3.8 support ([#1236](https://github.com/stac-utils/pystac/pull/1236))
17+
1418
## [v1.8.4] - 2023-09-22
1519

1620
### Added

docs/installation.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ Install from source
2727
Dependencies
2828
============
2929

30-
PySTAC requires Python >= 3.8. This project follows the recommendations of
30+
PySTAC requires Python >= 3.9. This project follows the recommendations of
3131
`NEP-29 <https://numpy.org/neps/nep-0029-deprecation_policy.html>`__ in deprecating support
32-
for Python versions. This means that users can expect support for Python 3.8 to be
32+
for Python versions. This means that users can expect support for Python 3.9 to be
3333
removed from the ``main`` branch after Apr 14, 2023 and therefore from the next release
3434
after that date.
3535

pyproject.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,12 @@ classifiers = [
1515
"License :: OSI Approved :: Apache Software License",
1616
"Natural Language :: English",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.8",
1918
"Programming Language :: Python :: 3.9",
2019
"Programming Language :: Python :: 3.10",
2120
"Programming Language :: Python :: 3.11",
2221
]
23-
requires-python = ">=3.8"
24-
dependencies = [
25-
"importlib-resources>=5.12.0; python_version<'3.9'",
26-
"python-dateutil>=2.7.0",
27-
]
22+
requires-python = ">=3.9"
23+
dependencies = ["python-dateutil>=2.7.0"]
2824
dynamic = ["version"]
2925

3026
[project.optional-dependencies]

pystac/summaries.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from __future__ import annotations
22

3+
import importlib.resources
34
import json
45
import numbers
5-
import sys
66
from abc import abstractmethod
77
from copy import deepcopy
88
from enum import Enum
@@ -20,11 +20,6 @@
2020
Union,
2121
)
2222

23-
if sys.version_info[:2] < (3, 9):
24-
from importlib_resources import files as importlib_resources_files
25-
else:
26-
from importlib.resources import files as importlib_resources_files
27-
2823
import pystac
2924
from pystac.utils import get_required
3025

@@ -112,7 +107,7 @@ def _get_fields_json(url: Optional[str]) -> Dict[str, Any]:
112107
# Every time pystac is released this file gets pulled from
113108
# https://cdn.jsdelivr.net/npm/@radiantearth/stac-fields/fields-normalized.json
114109
jsonfields: Dict[str, Any] = json.loads(
115-
importlib_resources_files("pystac.static")
110+
importlib.resources.files("pystac.static")
116111
.joinpath("fields-normalized.json")
117112
.read_text()
118113
)

pystac/validation/local_validator.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import importlib.resources
12
import json
2-
import sys
33
import warnings
44
from typing import Any, Dict, List, cast
55

@@ -9,16 +9,11 @@
99
from pystac.errors import STACLocalValidationError
1010
from pystac.version import STACVersion
1111

12-
if sys.version_info[:2] < (3, 9):
13-
from importlib_resources import files as importlib_resources_files
14-
else:
15-
from importlib.resources import files as importlib_resources_files
16-
1712
VERSION = STACVersion.DEFAULT_STAC_VERSION
1813

1914

2015
def _read_schema(file_name: str) -> Dict[str, Any]:
21-
with importlib_resources_files("pystac.validation.jsonschemas").joinpath(
16+
with importlib.resources.files("pystac.validation.jsonschemas").joinpath(
2217
file_name
2318
).open("r") as f:
2419
return cast(Dict[str, Any], json.load(f))

0 commit comments

Comments
 (0)