Skip to content

Commit

Permalink
fix Buffer issue after python version 3.10
Browse files Browse the repository at this point in the history
pghoard is getting import Error for this Buffer in pipeline
  • Loading branch information
Aiqin-Aiven committed Sep 19, 2023
1 parent 1769e1b commit d8cd9c5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rohmu/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
Copyright (c) 2022 Ohmu Ltd
See LICENSE for details
"""
from __future__ import annotations

import sys
from io import BytesIO, UnsupportedOperation
from itertools import islice
from rohmu.typing import HasFileno
from typing import BinaryIO, Generator, Iterable, Optional, Tuple, TypeVar, Union
from typing_extensions import Buffer

if sys.version_info >= (3, 10):
# Python 3.10 and later
from bytes import bytes as Buffer
else:
# Python 3.8 and 3.9
from typing_extensions import Buffer

import fcntl
import logging
Expand Down

0 comments on commit d8cd9c5

Please sign in to comment.