Skip to content

Commit

Permalink
Python 3.8-3.9 support
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 25, 2023
1 parent cd7acff commit 097264d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/pepotron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,23 @@
import importlib.metadata
import logging
import warnings
from itertools import pairwise
from pathlib import Path

from . import _cache

try:
# Python 3.10+
from itertools import pairwise
except ImportError:
# Python 3.9 and below
def pairwise(iterable): # type: ignore
from itertools import tee

a, b = tee(iterable)
next(b, None)
return zip(a, b)


__version__ = importlib.metadata.version(__name__)

BASE_URL = "https://peps.python.org"
Expand Down

0 comments on commit 097264d

Please sign in to comment.