Skip to content
New issue

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

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

Already on GitHub? # to your account

Upgrade boto3 to 1.20.24 + aiobotocore to 2.1.0 #64045

Merged
merged 4 commits into from
Jan 14, 2022

Conversation

cdce8p
Copy link
Member

@cdce8p cdce8p commented Jan 13, 2022

Proposed change

Upgrade boto3 to 1.20.24.
Changelog: https://github.com/boto/boto3/blob/1.20.24/CHANGELOG.rst

Upgrade aiobotocore to 2.1.0.
Changes: https://github.com/aio-libs/aiobotocore/blob/2.1.0/CHANGES.rst
Compare view: aio-libs/aiobotocore@1.2.2...2.1.0

This will help resolve a dependency conflict with pyoverkiz==1.1.0 (which requires >=1.18.59) from the overkiz integration.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

To help with the load of incoming pull requests:

@cdce8p cdce8p mentioned this pull request Jan 13, 2022
22 tasks
@cdce8p cdce8p changed the title Upgrade boto3 to 1.20.34 Upgrade boto3 to 1.20.24 + aiobotocore to 2.1.0 Jan 13, 2022
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

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

Thanks!

@MartinHjelmare MartinHjelmare merged commit b17860a into home-assistant:dev Jan 14, 2022
@cdce8p cdce8p deleted the dep-boto3 branch January 14, 2022 16:17
@github-actions github-actions bot locked and limited conversation to collaborators Jan 15, 2022
@chemelli74
Copy link
Contributor

@cdce8p I noticed some issues with current dev code related to this change when using sns service:

2022-01-23 00:02:49 ERROR (MainThread) [homeassistant.components.aws] Validating credential [default] failed: module 'aiobotocore' has no attribute 'session'
Traceback (most recent call last):
  File "/workspaces/core/homeassistant/components/aws/__init__.py", line 168, in _validate_aws_credentials
    session = aiobotocore.session.AioSession(profile=profile)
AttributeError: module 'aiobotocore' has no attribute 'session'

and also related to the way additional data are loaded.
This change makes it work fine:

message_attributes = {}
if kwargs.get(ATTR_DATA):
    message_attributes = {
        k: {"StringValue": v, "DataType": "String"}
        for k, v in kwargs[ATTR_DATA].items()
        if v is not None
    }

We can investigate on discord if you have time.

Simone

@chemelli74
Copy link
Contributor

2022-01-23 00:02:49 ERROR (MainThread) [homeassistant.components.aws] Validating credential [default] failed: module 'aiobotocore' has no attribute 'session'
Traceback (most recent call last):
  File "/workspaces/core/homeassistant/components/aws/__init__.py", line 168, in _validate_aws_credentials
    session = aiobotocore.session.AioSession(profile=profile)
AttributeError: module 'aiobotocore' has no attribute 'session'

Fixed :-)

old code:

import aiobotocore
session = aiobotocore.session.Aiosession()

new code:

from aiobotocore.session import AioSession
session = Aiosession()

Simone

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants