Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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