Remove Python 3.9 support ahead of PyTorch 2.9 in v0.11.1 (#26416)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-10-08 18:40:42 +01:00
committed by GitHub
parent 4ba8875749
commit e09d1753ec
20 changed files with 45 additions and 87 deletions

View File

@@ -8,6 +8,7 @@ and that each field has a docstring.
import ast
import inspect
import sys
from itertools import pairwise
import regex as re
@@ -20,19 +21,6 @@ def get_attr_docs(cls_node: ast.ClassDef) -> dict[str, str]:
https://davidism.com/mit-license/
"""
def pairwise(iterable):
"""
Manually implement https://docs.python.org/3/library/itertools.html#itertools.pairwise
Can be removed when Python 3.9 support is dropped.
"""
iterator = iter(iterable)
a = next(iterator, None)
for b in iterator:
yield a, b
a = b
out = {}
# Consider each pair of nodes.