Skip to content

Commit

Permalink
chore(streaming): replace deprecated Version classes from distutils (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrodamascena authored Jul 12, 2023
1 parent e2372f1 commit d9dba96
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions aws_lambda_powertools/utilities/streaming/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
this file completely. See https://docs.aws.amazon.com/lambda/latest/dg/lambda-python.html.
"""
import logging
from distutils.version import StrictVersion
from io import IOBase
from typing import Optional

Expand All @@ -24,7 +23,11 @@

logger = logging.getLogger(__name__)

if StrictVersion(botocore.__version__) < StrictVersion("1.29.13"): # noqa: C901
# Splitting the botocore version string into major, minor, and patch versions,
# and performing a conditional check based on the extracted versions.
major, minor, patch = map(int, botocore.__version__.split("."))

if major == 1 and (minor < 29 or patch < 13):

class PowertoolsStreamingBody(IOBase):
"""Wrapper class for a HTTP response body.
Expand Down

0 comments on commit d9dba96

Please sign in to comment.