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

Call for your help to revive the PySNMP ecosystem together #429

Closed
13 tasks done
lextm opened this issue Nov 11, 2022 · 3 comments
Closed
13 tasks done

Call for your help to revive the PySNMP ecosystem together #429

lextm opened this issue Nov 11, 2022 · 3 comments

Comments

@lextm
Copy link

lextm commented Nov 11, 2022

Background

PySNMP ecosystem has been idle ever since 2020, and while many repos were forked by different parties, none of the authors showed a plan to completely take over the ecosystem as a whole and bring the repos forward,

  • https://github.com/pysnmp has forked several key components (Community Fork #416) and published several new releases mainly for a Splunk project. No documentation site was planned for this.
  • https://github.com/inexio has forked most of the components to maintain a documentation mirror (The sample address is not accessible #389) at https://snmplabs.thola.io/. However, contents on this site do not map to released versions of the packages, so you might hit breaking pieces here and there.

    Note that inexio GmbH was once the sponsor of Ilya.

  • https://github.com/pyasn1 has forked two ASN.1 related repos ([PSA] Transfer of ownership pyasn1#214) and taken over the PyPI packages pyasn1*. https://pyasn1.readthedocs.io/ was set up and matches the new releases.
  • Simon Fagerholm used his fork to create https://pysnmp.readthedocs.io/ but he made no other commits. Thus, this doc site while high in search engine results contains out-of-date information and does not really help much.
  • Other forks didn't show significant progress.
  • The primary domain name (snmplabs.com) was lost and fell into the hands of unknown. The current owner(s) never reveals the identity, so any connection to that domain can be risky for general public.
  • New Python releases (3.11 and 3.12 for example) introduced breaking changes that impact PySNMP 4.x users significantly (for example, changes related to asyncio and asyncore).

As Ilya passed away (#427), I think it is more important than ever to regroup all parties under the same banner.

My company LeXtudio Inc. has been active in SNMP field for more than a decade now, mainly focusing on its .NET ecosystem. But some clients asked if we can support PySNMP for them, so we asked ourselves why not take the lead to revive PySNMP.

Migration Plan

  • Forked all related repos under a single place (currently all under https://github.com/lextudio)

  • Set up a new documentation site (https://www.pysnmp.com) with up-to-date information.

  • Published new releases of the Python packages with postfix. (Don't use them now, and switch to PySNMP packages without postfix.)

    Name Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
  • Set up a new SNMP Simulator instance (demo.pysnmp.com) as documented here

  • Set up MIB site (https://mibs.pysnmp.com) based on this

  • Integrated with https://github.com/pyasn1.

    • PyPI
    • PyPI
  • Added unit test coverage to help reveal new/known bugs and ensure patches work as expected.

  • Added compatibility test to support all major Python releases (3.8+, in Feb 2024)

  • (in-progress) Help downstream projects upgrade to 6.0 releases (OpenStack, Home Assistant, etc).

  • PEP 541 request was fired to take over the remaining 11 PyPI packages (pysnmp*/pysmi/snmp*) from Ilya.

  • (in-progress) Review and cherry pick all existing patches (2020-2022)

  • (in-progress) Review and close most existing issues reported (2020-2022), tracked in Tracker of etingof/pysnmp opened issues lextudio/pysnmp#4

  • Updated the PyPI packages created by Ilya after the PEP 541 request approval. (These are the recommended packages to use)

    Name Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads
    PyPI PyPI Downloads

In the long run, LeXtudio Inc. plans to work with key stakeholders (projects that depend on pysnmp) and sponsors to set up the governing rules around the repos. Ideally there should be a PySNMP organization that supervises the development.

Known Projects Switched to LeXtudio Fork

This is not a complete list but can show you the momentum.

Name Comment
OpenStack
Checkmk
Arch Linux
Glances PyPI Downloads
Home Assistant PyPI Downloads
Genie libs PyPI Downloads
brother PyPI Downloads
Proliantutils PyPI Downloads
labgrid PyPI Downloads
snimpy PyPI Downloads

You Can Help

What help is needed from you?

  • Spread the words.
  • Open new issues at https://github.com/lextudio/pysnmp/issues so that we can track what are needed to address.
  • Sponsor this initiative to revive the ecosystem by contacting [email protected] if you like to offer financial support to speed up the process.
  • Write to [email protected] if you want to offer other kind of assistance (code review, documentation, and others).
mweinelt added a commit to mweinelt/nixpkgs that referenced this issue Sep 1, 2024
mweinelt added a commit to mweinelt/nixpkgs that referenced this issue Sep 1, 2024
dotlambda pushed a commit to NixOS/nixpkgs that referenced this issue Sep 2, 2024
dotlambda pushed a commit to NixOS/nixpkgs that referenced this issue Sep 4, 2024
dotlambda pushed a commit to NixOS/nixpkgs that referenced this issue Sep 4, 2024
@lextm lextm mentioned this issue Sep 25, 2024
@lextm
Copy link
Author

lextm commented Oct 1, 2024

With Simon's help, we are now redirecting visitors from https://pysnmp.readthedocs.io/ to https://www.pysnmp.com, which is another milestone to consolidate community resources.

Bastian-Krause added a commit to Bastian-Krause/labgrid that referenced this issue Oct 10, 2024
pysnmp depends on pyasn1. `pyasn1.compat.octets` was removed in pyasn1
0.6.1 [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

The issue is documented upstream [2]. [3] limited the pysnmp version to
<6. pysnmp 6.1.4, 6.2.6, and 7.1.0 are not affected.

Limit compatible pyasn1 versions to <0.6.1 until [5]
switches labgrid to pysnmp's asyncio API, thereby dropping the upper
bound introduced by [3].

While at it, switch from "pysnmp-lextudio" to "pysnmp". The original
author of pysnmp passed away and the lextudio folks took over maintenanc.
While the request to take over the pysnmp PyPi project was pending, the
maintained fork was called pysnmp-lextudio (see labgrid-project#1186, aa2549c). Now that
the migration is complete, let's move back to the original package name.

See: [6]

[1] https://github.com/pyasn1/pyasn1/releases/tag/v0.6.1
[2] pyasn1/pyasn1#76
[3] labgrid-project#1332
[4] lextudio/pysnmp#113 (comment)
[5] labgrid-project#1497
[6] etingof/pysnmp#429

Signed-off-by: Bastian Krause <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant