Skip to content

Remove botocore dependency by transform any IO-stream #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

bblommers
Copy link
Contributor

This reduces the footprint for any projects that use this library - they shouldn't have to have botocore as a dependency.

Note that I went with the io.IOBase as a replacement, simply because that's the immediate parent of botocore.response.StreamingBody.

However: a class that implements IOBase does not need to have a read method implemented . From the docs:

Even though IOBase does not declare read() or write() because their signatures will vary, implementations and clients should consider those methods part of the interface.

Considering all known IOstreams (StringIO, BytesIO, etc) do have the read implemented, I think this is an edge case though, and not something we should worry about.

Copy link
Member

@steffyP steffyP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great initiative @bblommers 🙌 🚀
This makes a lot of sense, thanks for tackling!

@@ -12,7 +12,6 @@ description = "Extracted snapshot testing lib for LocalStack"
dependencies = [
"jsonpath-ng>1.6",
"deepdiff",
"botocore",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@bblommers bblommers merged commit dc65d10 into main Sep 5, 2024
@bblommers bblommers deleted the remove-boto3-dependency branch September 5, 2024 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants