Skip to content
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

Use pysnmplib instead of pysnmp #69841

Merged
merged 2 commits into from
Apr 11, 2022
Merged

Use pysnmplib instead of pysnmp #69841

merged 2 commits into from
Apr 11, 2022

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented Apr 11, 2022

Breaking change

Proposed change

snmp and brother integrations use pysnmp package, which has not been developed in a long time and has a bug preventing it from working with Python 3.10. There is a community fork for this package and the bug has been fixed.
This PR changes pysnmp to pysnmplib for snmp integration and upgrades the version of the brother package which also uses pysnmplib.

pysnmplib changelog: pysnmp/pysnmp@v4.4.12...v5.0.10
brother changelog: bieniu/brother@1.1.0...1.2.0

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

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:

@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Apr 11, 2022
@bdraco
Copy link
Member

bdraco commented Apr 11, 2022

Testing this now

@bdraco
Copy link
Member

bdraco commented Apr 11, 2022

Works fine.

Its a shame this still uses Cryptodome instead of https://pypi.org/project/cryptography/

python3 192 root  mem       REG               0,31               12390 /usr/local/lib/python3.9/site-packages/Cryptodome/Hash/_SHA1.abi3.so (path dev=0,475)
python3 192 root  mem       REG               0,31               12385 /usr/local/lib/python3.9/site-packages/Cryptodome/Hash/_BLAKE2s.abi3.so (path dev=0,475)

@bdraco bdraco merged commit 85f698f into home-assistant:dev Apr 11, 2022
@bieniu bieniu deleted the use-pysnmplib branch April 11, 2022 17:51
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
by-code-owner cla-signed dependency dependency-bump integration: brother integration: snmp small-pr PRs with less than 30 lines. smash Indicator this PR is close to finish for merging or closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HA 2021.11.05 python 3.10 brother.utils module 'asyncio' has no attribute 'async'
5 participants