Skip to content

Commit 96da884

Browse files
feat: drop Python 3.8 (#976)
* feat: drop Python 3.8 Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * style: pre-commit fixes --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 38ae735 commit 96da884

19 files changed

Lines changed: 52 additions & 62 deletions

File tree

.github/workflows/tests.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ jobs:
6060
strategy:
6161
fail-fast: false
6262
matrix:
63-
python-version: ["3.9", "3.13", "pypy3.10"]
63+
python-version: ["3.11", "3.13", "pypy3.10"]
6464
include:
65-
- python-version: "3.8"
65+
- python-version: "3.9"
6666
cmake-extras: "-DCMAKE_CXX_STANDARD=17"
6767
- python-version: "3.13t"
6868

@@ -111,13 +111,13 @@ jobs:
111111
- os: ubuntu-24.04-arm
112112
only: cp313-manylinux_aarch64
113113
- os: windows-latest
114-
only: cp38-win32
114+
only: cp39-win32
115115
- os: windows-latest
116116
only: cp313-win_amd64
117117
- os: macos-13
118-
only: cp39-macosx_x86_64
118+
only: cp310-macosx_x86_64
119119
- os: macos-14
120-
only: cp39-macosx_arm64
120+
only: cp312-macosx_arm64
121121

122122
steps:
123123
- uses: actions/checkout@v4

.github/workflows/wheels.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,6 @@ jobs:
9191

9292
- uses: astral-sh/setup-uv@v5
9393

94-
- uses: actions/setup-python@v5
95-
if: matrix.os == 'macos-14'
96-
with:
97-
python-version: 3.8
98-
9994
- uses: pypa/cibuildwheel@v2.23
10095
env:
10196
CIBW_BUILD: ${{ matrix.build }}

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ python3 -m pip install boost-histogram
178178
```
179179

180180
All the normal best-practices for Python apply; Pip should not be very old (Pip
181-
9 is very old), you should be in a virtual environment, etc. Python 3.8+ is
181+
9 is very old), you should be in a virtual environment, etc. Python 3.9+ is
182182
required; for older versions of Python (3.5 and 2.7), `0.13` will be installed
183183
instead, which is API equivalent to 1.0, but will not be gaining new features.
184184
1.3.x was the last series to support Python 3.6. 1.4.x was the last series to
185-
support Python 3.7.
185+
support Python 3.7. 1.5.x was the last series to support Python 3.8.
186186

187187
#### Binaries available:
188188

@@ -191,15 +191,15 @@ when you run the above command on a supported platform. Wheels are produced usin
191191
[cibuildwheel](https://cibuildwheel.readthedocs.io/en/stable/); all common
192192
platforms have wheels provided in boost-histogram:
193193

194-
| System | Arch | Python versions | PyPy versions |
195-
| ----------------- | ------ | --------------------------------------- | ------------- |
196-
| manylinux2014 | 64-bit | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
197-
| manylinux2014 | ARM64 | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
198-
| musllinux_1_1 | 64-bit | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | |
199-
| macOS 10.9+ Intel | 64-bit | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
200-
| macOS 11+ AS | Arm64 | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
201-
| Windows | 32-bit | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | |
202-
| Windows | 64-bit | 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
194+
| System | Arch | Python versions | PyPy versions |
195+
| ------------- | ------ | ---------------------------------- | ------------- |
196+
| manylinux2014 | 64-bit | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
197+
| manylinux2014 | ARM64 | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
198+
| musllinux_1_1 | 64-bit | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | |
199+
| macOS | 64-bit | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
200+
| macOS | Arm64 | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
201+
| Windows | 32-bit | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | |
202+
| Windows | 64-bit | 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t | 3.9, 3.10 |
203203

204204
PowerPC or IBM-Z wheels are not provided but are available on request.
205205

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# -- Path setup --------------------------------------------------------------
2222

2323

24-
DIR = Path(__file__).parent.resolve()
24+
DIR = Path(__file__).parent
2525
BASEDIR = DIR.parent
2626

2727
sys.path.append(str(BASEDIR / "src"))

examples/README.md

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

3-
The examples require Python 3.8. It is left as an exercise for the reader to
3+
The examples require Python 3.9. It is left as an exercise for the reader to
44
convert back to older versions if they so desire.
55

66
### Setup
@@ -10,6 +10,6 @@ You can run these examples in a virtual environment using:
1010
#### Conda
1111

1212
```bash
13-
conda create -p .env python=3.8 boost-histogram matplotlib numpy -c conda-forge
13+
conda create -p .env python=3.9 boost-histogram matplotlib numpy -c conda-forge
1414
conda activate ./.env
1515
```

notebooks/BoostHistogramHandsOn.ipynb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -879,12 +879,7 @@
879879
}
880880
],
881881
"source": [
882-
"print(\n",
883-
" f\"mean.count={mean.count} mean.value={mean.value:g} mean.variance={mean.variance:g}\"\n",
884-
")\n",
885-
"\n",
886-
"# Python 3.8:\n",
887-
"# print(f\"{mean.count=} {mean.value=} {mean.variance=}\")"
882+
"print(f\"{mean.count=} {mean.value=} {mean.variance=}\")"
888883
]
889884
},
890885
{

notebooks/xarray.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"channels:\n",
1414
" - conda-forge\n",
1515
"dependencies:\n",
16-
" - python==3.8\n",
16+
" - python==3.9\n",
1717
" - boost-histogram\n",
1818
" - xhistogram\n",
1919
" - matplotlib\n",

pyproject.toml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "boost-histogram"
77
dynamic = ["version"]
88
description = "The Boost::Histogram Python wrapper."
99
readme = "README.md"
10-
requires-python = ">=3.8"
10+
requires-python = ">=3.9"
1111
authors = [
1212
{ name = "Hans Dembinski", email = "hans.dembinski@gmail.com" },
1313
{ name = "Henry Schreiner", email = "hschrein@cern.ch" },
@@ -32,7 +32,6 @@ classifiers = [
3232
"Programming Language :: C++",
3333
"Programming Language :: Python :: 3 :: Only",
3434
"Programming Language :: Python :: 3",
35-
"Programming Language :: Python :: 3.8",
3635
"Programming Language :: Python :: 3.9",
3736
"Programming Language :: Python :: 3.10",
3837
"Programming Language :: Python :: 3.11",
@@ -145,7 +144,7 @@ required_plugins = ["pytest-benchmark"]
145144
log_cli_level = "DEBUG"
146145

147146
[tool.mypy]
148-
python_version = "3.8"
147+
python_version = "3.9"
149148
files = ["src"]
150149
strict = true
151150
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
@@ -190,7 +189,7 @@ environment.MACOSX_DEPLOYMENT_TARGET = "14.0"
190189

191190

192191
[tool.pylint]
193-
py-version = "3.8"
192+
py-version = "3.9"
194193
ignore-patterns = ['.*\.pyi']
195194
extension-pkg-allow-list = ["boost_histogram._core"]
196195
reports.output-format = "colorized"

src/boost_histogram/_core/axis/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
from typing import Any, Iterable, Iterator, Tuple, TypeVar
1+
from collections.abc import Iterable, Iterator
2+
from typing import Any
23

34
import numpy as np
45
from numpy.typing import ArrayLike

src/boost_histogram/_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import itertools
44
import sys
55
import typing
6-
from typing import Any, Callable, ClassVar, Iterator, Protocol, TypeVar
6+
from collections.abc import Iterator
7+
from typing import Any, Callable, ClassVar, Protocol, TypeVar
78

89
import boost_histogram
910

0 commit comments

Comments
 (0)