-
-
Notifications
You must be signed in to change notification settings - Fork 205
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
Python 3.10 compatibility #413
Comments
Thanks to @mheppner for finding the issue and reporting the bug.
Thanks @mheppner and @flaviut. I ran into this issue as soon as I upgraded to Python 3.10. I applied the patch that @flaviut made to the latest release version (v4.4.12) if anyone is interested: https://github.com/antonc42/pysnmp/tree/antonc42-4.4.12-fix-python3.10 You can install with: Or put this in your requirements.txt: Or put this in your |
I just tested it for the home-assistant/core#60350 But it's still crash for me :
|
@roumano If you are using v4.4.12 from pip, you may have to do a It also might be that your Home Assistant is using a Python virtualenv or something rather than the system Python modules. Sorry, I'm not familiar with how Home Assistant does things. From the output above, it looks like something other than the standard system Python module location. Yours is |
I manually applied the patch to my HASS installation without going through
pip, and I can confirm that it fixes the issue.
…On Mon, Jan 10, 2022, 14:12 antonc42 ***@***.***> wrote:
@roumano <https://github.com/roumano> If you are using v4.4.12 from pip,
you may have to do a python3 -m pip install --force-reinstall git+
***@***.***
(assuming you are using my branch). This is because the version number is
the same and pip won't reinstall the same version by default.
It also might be that your Home Assistant is using a Python virtualenv or
something rather than the system Python modules. Sorry, I'm not familiar
with how Home Assistant does things. From the output above, it looks like
something other than the standard system Python module location. Yours is
/data/homeassistant/lib/python3.10/site-packages. You will have to figure
out how to enter the proper virtual environment to remove/add the module.
—
Reply to this email directly, view it on GitHub
<#413 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABHY2HO7GASBGJWNI4DMQSDUVMVSXANCNFSM5IWPPTXQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Forgot to restart HA, it's working after, sorry for the noise... |
Various forks (pysnmp/pysnmp or lextudio/pysnmp) have fixed this. |
Time to revisit this after closing #429. Recent releases by my team (6.x/7.x) have fixed this. Please upgrade to them, https://docs.lextudio.com/pysnmp/upgrade |
String comparison between the Python tuple version is not working with Python 3.10.
Located here:
platform.python_version_tuple()
returns('3', '10', '0')
and'10'
is not greater than'4'
.This causes the following error in this section:
I think the comparison should be something like this instead:
IS_PYTHON_344_PLUS = [int(v) for v in platform.python_version_tuple()] < [3, 4, 4]
The text was updated successfully, but these errors were encountered: