15
0
forked from pool/python-pysnmp

- Update to 7.1.22:

* Dropped support for Python 3.9.
  * Added Python 3.14 to test matrix.
  * Fixed a bug in bulk walk command when lookupMib is set to False.
  * Implemented v1arch dispatcher timeout support.
  * Resolved dispatcher resource leak issue.
  * Upgraded pysmi dependency to 1.6.1.
  * Fixed an SNMPv2-SMI issue.
  * Fixed a few MIB related issues.
  * Improved shadow cloning patch.
  * Fixed v1arch local address issue.
  * Fixed shadow cloning issue.
  * Fixed a resource leak issue.
  * Updated built-in MIBs to match latest PySMI compiled results.
  * Fixed two bugs in MIB related code and improved compatibility layer.
  * Method names are revised to be PEP 8 compliant. Compatibility layer is
    added to support most of the old method names, but will be removed in the
    next major release, 8.0.
  * Python 3.8 support is dropped.
  * Python 3.13 support is added.
  * The pysmi dependency is now optional.
- Add a script to download MIBs that the testsuite requires.
- Fix formatting in early changelog entries.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pysnmp?expand=0&rev=61
This commit is contained in:
2025-11-06 04:28:42 +00:00
committed by Git OBS Bridge
commit 2820f26e2e
8 changed files with 1562 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

14
download-mibs.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
set -e
MIBS="LEXTUDIO-TEST-MIB CISCO-IPSEC-TC CISCO-SMI CISCO-TC CISCO-ENHANCED-IPSEC-FLOW-MIB"
URL_BASE="https://raw.githubusercontent.com/lextudio/mibs.pysnmp.com/refs/heads/master/asn1"
tmpdir=$(mktemp -d)
for mib in $MIBS; do
curl -o $tmpdir/$mib $URL_BASE/$mib
done
tar -czvf mibs.tgz -C $tmpdir .
rm -rf $tmpdir

3
mibs.tgz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5644b9424172e6a3dd05fe87c1fcc4e4b1a42b4a01910c96120c2b8736b95af8
size 56364

3
pysnmp-7.1.22.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6bda6ac80d65fac77fd40f259405fc066b4218a616bf16b4345b3e98ca70feeb
size 463898

3
pysnmp-7.1.4.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ec7fd78cb7437ad64644108dea603cad8e49f065da3dd3e0539dda68bad320c
size 442531

1416
python-pysnmp.changes Normal file

File diff suppressed because it is too large Load Diff

99
python-pysnmp.spec Normal file
View File

@@ -0,0 +1,99 @@
#
# spec file for package python-pysnmp
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-pysnmp
Version: 7.1.22
Release: 0
Summary: A pure-Python SNMPv1/v2c/v3 library
License: BSD-2-Clause
URL: https://github.com/lextudio/pysnmp
Source0: https://github.com/lextudio/pysnmp/archive/refs/tags/v%{version}.tar.gz#/pysnmp-%{version}.tar.gz
# Generated by download-mibs.sh
Source1: mibs.tgz
Source99: download-mibs.sh
BuildRequires: %{python_module flit-core}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pyasn1}
BuildRequires: %{python_module pysmi}
BuildRequires: %{python_module pytest-asyncio}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: net-snmp
BuildRequires: python-rpm-macros
Requires: python-cryptography
Requires: python-pyasn1 >= 0.4.8
Requires: python-pysmi
BuildArch: noarch
%python_subpackages
%description
This project is a SNMP v1/v2c/v3 engine written in the Python
programming language.
* Complete SNMPv1/v2c and SNMPv3 engine support
* Can act as Manager and/or Agent
* Manager and Agent side MIB support
* Asynchronous operations support
* Pure-Python implementation
* py2exe and .egg friendly
* Twisted binding
%package -n python-pysnmp-doc
Summary: PySNMP documentation
Provides: %{python_module pysnmp-doc = %{version}}
%description -n python-pysnmp-doc
PySNMP documentation and examples.
%prep
%autosetup -p1 -n pysnmp-%{version} -a1
# Remove uneeded files
find docs -name "\.*" -exec rm -Rf {} +
%build
%pyproject_wheel
%install
%pyproject_install
chmod -x docs/net-snmptrapd.conf docs/net-snmpd.conf
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
mibdump --generate-mib-texts NET-SNMP-EXAMPLES-MIB
mibdump --generate-mib-texts IF-MIB
mibdump --generate-mib-texts ./LEXTUDIO-TEST-MIB
mibdump --generate-mib-texts ./CISCO-ENHANCED-IPSEC-FLOW-MIB
# Running tests with python -m to make it work with the import path
%{python_expand #
# Not running asyncio tests that requires network
$python -m pytest -v -m 'not asyncio'
}
%files %{python_files}
%license LICENSE.rst
%doc README.md docs examples
%{python_sitelib}/pysnmp
%{python_sitelib}/pysnmp-%{version}.dist-info
%files -n python-pysnmp-doc
%license LICENSE.rst
%doc docs examples
%changelog