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

pyasn1 0.6.1 breaks eaton and poe_mib power backends #1493

Open
Bastian-Krause opened this issue Sep 11, 2024 · 0 comments · May be fixed by #1497
Open

pyasn1 0.6.1 breaks eaton and poe_mib power backends #1493

Bastian-Krause opened this issue Sep 11, 2024 · 0 comments · May be fixed by #1497
Labels

Comments

@Bastian-Krause
Copy link
Member

pysnmp depends on pyasn1. pyasn1.compat.octets was removed in pyasn1 0.6.1 leading to ModuleNotFoundErrors in labgrid's "eaton" and "poe_mib" power backends:

_______________ TestNetworkPowerDriver.test_import_backend_eaton _______________

self = <test_powerdriver.TestNetworkPowerDriver object at 0x7f84794bfdd0>

    def test_import_backend_eaton(self):
        pytest.importorskip("pysnmp")
>       import labgrid.driver.power.eaton

tests/test_powerdriver.py:295: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
labgrid/driver/power/eaton.py:2: in <module>
    from ...util.snmp import SimpleSNMP
labgrid/util/snmp.py:1: in <module>
    from pysnmp import hlapi
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/hlapi/__init__.py:7: in <module>
    from pysnmp.proto.rfc1902 import *
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/rfc1902.py:8: in <module>
    from pysnmp.proto import rfc1155, error
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/rfc1155.py:10: in <module>
    from pysnmp.proto import error
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/error.py:9: in <module>
    from pysnmp import debug
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    #
    # This file is part of pysnmp software.
    #
    # Copyright (c) 2005-2019, Ilya Etingof <[email protected]>
    # License: https://www.pysnmp.com/pysnmp/license.html
    #
    import logging
>   from pyasn1.compat.octets import octs2ints
E   ModuleNotFoundError: No module named 'pyasn1.compat.octets'

/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/debug.py:8: ModuleNotFoundError
______________ TestNetworkPowerDriver.test_import_backend_poe_mib ______________

self = <test_powerdriver.TestNetworkPowerDriver object at 0x7f84794bd910>

    def test_import_backend_poe_mib(self):
        pytest.importorskip("pysnmp")
>       import labgrid.driver.power.poe_mib

tests/test_powerdriver.py:307: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
labgrid/driver/power/poe_mib.py:4: in <module>
    from ...util.snmp import SimpleSNMP
labgrid/util/snmp.py:1: in <module>
    from pysnmp import hlapi
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/hlapi/__init__.py:7: in <module>
    from pysnmp.proto.rfc1902 import *
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/rfc1902.py:8: in <module>
    from pysnmp.proto import rfc1155, error
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/rfc1155.py:10: in <module>
    from pysnmp.proto import error
/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/proto/error.py:9: in <module>
    from pysnmp import debug
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

    #
    # This file is part of pysnmp software.
    #
    # Copyright (c) 2005-2019, Ilya Etingof <[email protected]>
    # License: https://www.pysnmp.com/pysnmp/license.html
    #
    import logging
>   from pyasn1.compat.octets import octs2ints
E   ModuleNotFoundError: No module named 'pyasn1.compat.octets'

/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/pysnmp/debug.py:8: ModuleNotFoundError

CI error: https://github.com/labgrid-project/labgrid/actions/runs/10807937704/job/29979812648
Upstream issue: pyasn1/pyasn1#76

#1332 limited the pysnmp version to <6. pysnmp 6.1.4, 6.2.6, and 7.1.0 are not affected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant