Skip to content

Commit 71a4c96

Browse files
authored
build: add back support for python3.8 (#19)
* build: add back py38 * future
1 parent 6539419 commit 71a4c96

File tree

8 files changed

+22
-12
lines changed

8 files changed

+22
-12
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
fail-fast: false
3434
matrix:
3535
os: [ubuntu-latest, macos-latest]
36-
python-version: ["3.10", "3.11"]
36+
python-version: ["3.8", "3.10", "3.11"]
3737

3838
test-array-libs:
3939
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@ name = "ndv"
1919
dynamic = ["version"]
2020
description = "simple nd image viewer"
2121
readme = "README.md"
22-
requires-python = ">=3.9"
22+
requires-python = ">=3.8"
2323
license = { text = "BSD-3-Clause" }
2424
authors = [{ name = "Talley Lambert", email = "[email protected]" }]
2525
classifiers = [
2626
"Development Status :: 3 - Alpha",
2727
"License :: OSI Approved :: BSD License",
2828
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3.8",
2930
"Programming Language :: Python :: 3.9",
3031
"Programming Language :: Python :: 3.10",
3132
"Programming Language :: Python :: 3.11",
@@ -68,7 +69,7 @@ repository = "https://github.com/pyapp-kit/ndv"
6869
# https://docs.astral.sh/ruff
6970
[tool.ruff]
7071
line-length = 88
71-
target-version = "py39"
72+
target-version = "py38"
7273
src = ["src"]
7374

7475
# https://docs.astral.sh/ruff/rules

src/ndv/data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
"""Sample data for testing and examples."""
22

3+
from __future__ import annotations
4+
35
import numpy as np
46

57
__all__ = ["nd_sine_wave", "cells3d"]

src/ndv/viewer/_data_wrapper.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,20 @@
55
import logging
66
import sys
77
from abc import abstractmethod
8-
from collections.abc import Container, Hashable, Iterable, Iterator, Mapping, Sequence
98
from concurrent.futures import Future, ThreadPoolExecutor
109
from contextlib import suppress
11-
from typing import TYPE_CHECKING, ClassVar, Generic, TypeVar
10+
from typing import (
11+
TYPE_CHECKING,
12+
ClassVar,
13+
Container,
14+
Generic,
15+
Hashable,
16+
Iterable,
17+
Iterator,
18+
Mapping,
19+
Sequence,
20+
TypeVar,
21+
)
1222

1323
import numpy as np
1424

src/ndv/viewer/_dims_slider.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@
2424
from superqt.utils import signals_blocked
2525

2626
if TYPE_CHECKING:
27-
from collections.abc import Hashable, Mapping
28-
from typing import TypeAlias
27+
from typing import Hashable, Mapping, TypeAlias
2928

3029
from qtpy.QtGui import QResizeEvent
3130

src/ndv/viewer/_lut_control.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ._dims_slider import SS
1313

1414
if TYPE_CHECKING:
15-
from collections.abc import Iterable
15+
from typing import Iterable
1616

1717
import cmap
1818

src/ndv/viewer/_viewer.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
from ._lut_control import LutControl
2424

2525
if TYPE_CHECKING:
26-
from collections.abc import Hashable, Iterable, Sequence
2726
from concurrent.futures import Future
28-
from typing import Any, Callable, TypeAlias
27+
from typing import Any, Callable, Hashable, Iterable, Sequence, TypeAlias
2928

3029
from qtpy.QtGui import QCloseEvent
3130

tests/conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import gc
2-
from collections.abc import Iterator
3-
from typing import TYPE_CHECKING
2+
from typing import TYPE_CHECKING, Iterator
43

54
import pytest
65

0 commit comments

Comments
 (0)