Skip to content

Commit 1dd621c

Browse files
committed
Bump other 39 -> 310 related things
1 parent 3084019 commit 1dd621c

File tree

5 files changed

+16
-14
lines changed

5 files changed

+16
-14
lines changed

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages = ["rustworkx", "rustworkx.visualization"]
2828
include-package-data = true
2929

3030
[tool.distutils.bdist_wheel]
31-
py-limited-api = "cp39"
31+
py-limited-api = "cp310"
3232

3333
[[tool.setuptools-rust.ext-modules]]
3434
target = "rustworkx.rustworkx"
@@ -104,7 +104,7 @@ releaseinfra = [
104104

105105
[tool.black]
106106
line-length = 100
107-
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
107+
target-version = ['py310', 'py311', 'py312', 'py313']
108108

109109
[tool.ruff]
110110
line-length = 105 # more lenient than black due to long function signatures
@@ -116,7 +116,7 @@ lint.select = [
116116
"PYI", # flake8-pyi
117117
"Q", # flake8-quotes
118118
]
119-
target-version = "py39"
119+
target-version = "py310"
120120
extend-exclude = ["doc"]
121121

122122
[tool.ruff.lint.per-file-ignores]

rustworkx/__init__.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ import sys
1313
import numpy as np
1414
import numpy.typing as npt
1515

16-
from typing import Generic, Any, Callable, overload
16+
from typing import Generic, Any, overload
17+
from collections.abc import Callable
1718
from collections.abc import Iterable, Iterator, Sequence
1819

1920
if sys.version_info >= (3, 13):
@@ -304,7 +305,7 @@ _BFSVisitor = TypeVar("_BFSVisitor", bound=visit.BFSVisitor)
304305
_DFSVisitor = TypeVar("_DFSVisitor", bound=visit.DFSVisitor)
305306
_DijkstraVisitor = TypeVar("_DijkstraVisitor", bound=visit.DijkstraVisitor)
306307

307-
class PyDAG(Generic[_S, _T], PyDiGraph[_S, _T]): ...
308+
class PyDAG(PyDiGraph[_S, _T], Generic[_S, _T]): ...
308309

309310
def distance_matrix(
310311
graph: PyGraph | PyDiGraph,

rustworkx/rustworkx.pyi

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
from .visit import BFSVisitor, DFSVisitor, DijkstraVisitor
1313
from types import GenericAlias
1414
from typing import (
15-
Callable,
1615
final,
1716
Any,
1817
Generic,
1918
overload,
2019
)
20+
from collections.abc import Callable
2121
from collections.abc import (
2222
Iterable,
2323
Iterator,
@@ -1151,7 +1151,7 @@ def dominance_frontiers(graph: PyDiGraph[_S, _T], start_node: int, /) -> dict[in
11511151

11521152
_T_co = TypeVar("_T_co", covariant=True, default=Any)
11531153

1154-
class _RustworkxCustomVecIter(Generic[_T_co], Sequence[_T_co], ABC):
1154+
class _RustworkxCustomVecIter(Sequence[_T_co], ABC, Generic[_T_co]):
11551155
def __init__(self) -> None: ...
11561156
def __eq__(self, other: object) -> bool: ...
11571157
@overload
@@ -1169,7 +1169,7 @@ class _RustworkxCustomVecIter(Generic[_T_co], Sequence[_T_co], ABC):
11691169
def __iter__(self) -> Iterator[_T_co]: ...
11701170
def __reversed__(self) -> Iterator[_T_co]: ...
11711171

1172-
class _RustworkxCustomHashMapIter(Generic[_S, _T_co], Mapping[_S, _T_co], ABC):
1172+
class _RustworkxCustomHashMapIter(Mapping[_S, _T_co], ABC, Generic[_S, _T_co]):
11731173
def __init__(self) -> None: ...
11741174
def items(self) -> ItemsView[_S, _T_co]: ...
11751175
def keys(self) -> KeysView[_S]: ...
@@ -1200,13 +1200,13 @@ class AllPairsPathLengthMapping(_RustworkxCustomHashMapIter[int, PathLengthMappi
12001200
class AllPairsPathMapping(_RustworkxCustomHashMapIter[int, PathMapping]): ...
12011201

12021202
@final
1203-
class BFSSuccessors(Generic[_T_co], _RustworkxCustomVecIter[tuple[_T_co, list[_T_co]]]): ...
1203+
class BFSSuccessors(_RustworkxCustomVecIter[tuple[_T_co, list[_T_co]]], Generic[_T_co]): ...
12041204

12051205
@final
1206-
class BFSPredecessors(Generic[_T_co], _RustworkxCustomVecIter[tuple[_T_co, list[_T_co]]]): ...
1206+
class BFSPredecessors(_RustworkxCustomVecIter[tuple[_T_co, list[_T_co]]], Generic[_T_co]): ...
12071207

12081208
@final
1209-
class EdgeIndexMap(Generic[_T_co], _RustworkxCustomHashMapIter[int, tuple[int, int, _T_co]]): ...
1209+
class EdgeIndexMap(_RustworkxCustomHashMapIter[int, tuple[int, int, _T_co]], Generic[_T_co]): ...
12101210

12111211
@final
12121212
class EdgeIndices(_RustworkxCustomVecIter[int]): ...
@@ -1233,7 +1233,7 @@ class NodesCountMapping(_RustworkxCustomHashMapIter[int, int]): ...
12331233
class Pos2DMapping(_RustworkxCustomHashMapIter[int, tuple[float, float]]): ...
12341234

12351235
@final
1236-
class WeightedEdgeList(Generic[_T_co], _RustworkxCustomVecIter[tuple[int, int, _T_co]]): ...
1236+
class WeightedEdgeList(_RustworkxCustomVecIter[tuple[int, int, _T_co]], Generic[_T_co]): ...
12371237

12381238
@final
12391239
class CentralityMapping(_RustworkxCustomHashMapIter[int, float]): ...

rustworkx/visualization/graphviz.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
import subprocess
1212
import tempfile
1313
import io
14-
from typing import TypeVar, Callable, cast, TYPE_CHECKING
14+
from typing import TypeVar, cast, TYPE_CHECKING
15+
from collections.abc import Callable
1516

1617
from rustworkx import PyDiGraph, PyGraph
1718

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tox]
22
minversion = 4.4.0
3-
envlist = py39, py310, py311, lint
3+
envlist = py310, py311, lint
44
isolated_build = true
55

66
[testenv]

0 commit comments

Comments
 (0)