-
-
Notifications
You must be signed in to change notification settings - Fork 33.6k
Bump pysnmp
to v7 and brother
to v5
#129761
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
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not-actionable, because brother==4.3.1 depends on pysnmp>=6.2.6,<7.0
brother
dependency will need to be adjusted to support pysnmp
v7 before this can be actionned
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
I hope to find time this week to try updating |
@nmaggioni Please bump |
@bieniu Thanks. I see that you've used the same MIBs caching snippet I did, does it work for you or are the definitions synchronously loaded again on the first use of the engine? |
Yeah I copied your solution 😄 I didn't notice any event loop blocking. I checked SNMP sensor and of course Brother. I'll try to test this PR again tonight. |
I tested the snmp sensor again and I don't see any event loop blocking. |
It seems that only the device_tracker implementation is causing warnings to be logged: to me it looks like the async generator returned by bulk_walk_cmd somehow still triggers blocking I/O detection when it parses the data in the response, but I'm not proficient enough with asyncio to understand why (isn't it already literally async?). Also, I had a dupe assignment in my caching snippet; it did no harm, but you may want to pull that revert too. |
I tried to find where this event loop blocking occurs today but I failed. Some asyncio specialist is needed here. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Still valid and needed, but unless logging a blocking I/O warning at boot is acceptable we need help with asyncio troubleshooting. Also rebased on current dev branch. |
Maybe try bumping |
Could you bump |
MibViewControllerManager.get_mib_view_controller already assigns the cached variable, no need to do that manually. This reverts commit 767d855.
Sorry, this slipped through. Anyway, I've bumped the version but the issue is still there: MIBs are getting (re?)loaded when the walker is first called, so HA reports the relative fs calls. I've retraced my steps briefly but I'm still stumped. Since the walker itself is an async iterator it can't be run inside an executor wrapper, but that point is more or less where the code flow moves away from HA and into pysnmp. |
@lextm Sorry to tag you directly, maybe you can help here? |
Proposed change
Spurred by #129685, this PR updates the
pysnmp
dependency to its most recent next major version, v7.1.9.I have tested these changes in my setup using the device_tracker platform only, but the synthetic tests for the other platforms (sensor, switch) look okay.
I can't seem to get the MIBs to cache properly, though: I tried to update the old mechanism by looking at pysnmp's own tests but I keep getting a couple of
Detected blocking call
warnings logged when the first SNMP scan starts.Logged warnings
Since thebrother
component also depends on pysnmp, @bieniu may want to chime in.brother
updated to5.0.0
.Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
Documentation added/updated for www.home-assistant.io)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
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: