terricain / aioboto3

Wrapper to use boto3 resources with the aiobotocore async backend
Apache License 2.0
732 stars 75 forks source link

Add jmespath and botocore as explicit dependencies #342

Closed peterbygrave closed 2 months ago

peterbygrave commented 2 months ago

Over on conda-forge ecosystem, their automatic dependencies checker identified that jmespath and botocore are explicitly imported in the code - see https://github.com/conda-forge/aioboto3-feedstock/pull/9

Here propose to add them as dependencies.

I did a best effort to determine compatible versions with botocore going back >6 years and had the used features and jmespath from boto's pinning.

I am very happy for this to be rejected, as these things can be personal preference and we can just them to conda-forge ecosystem.

terricain commented 2 months ago

Technically you are correct. As for explicitly depending on them, I'm somewhat against the idea, this library monkeypatches various methods of boto3, which as you can see, isn't a direct dependency, thats because aiobotocore (which monkeypatches botocore) brings in a specific version of boto3 as aiobotocore depends on a specific version of botocore. So whilst they're not listed as dependencies, there is technically no way for this package to be installed without them being installed as a pre-requisite.

This all being said, I reckon we can eliminate those imports by replacing them with the likes of from boto3.resources.response import jmespath etc...

terricain commented 2 months ago

I've released v13.1.1 which no longer references those imports directly 😉

peterbygrave commented 2 months ago

Technically you are correct. As for explicitly depending on them, I'm somewhat against the idea, this library monkeypatches various methods of boto3, which as you can see, isn't a direct dependency, thats because aiobotocore (which monkeypatches botocore) brings in a specific version of boto3 as aiobotocore depends on a specific version of botocore. So whilst they're not listed as dependencies, there is technically no way for this package to be installed without them being installed as a pre-requisite.

This all being said, I reckon we can eliminate those imports by replacing them with the likes of from boto3.resources.response import jmespath etc...

Oh cool, I had not appreciated that part. I'll look in to your changes and I'm sure I'll learn some more.

Thanks again, and for the speedy responses!