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

Default installation missing pyasyncore #386

Open
runborg opened this issue Nov 22, 2024 · 1 comment
Open

Default installation missing pyasyncore #386

runborg opened this issue Nov 22, 2024 · 1 comment

Comments

@runborg
Copy link

runborg commented Nov 22, 2024

After a installation following the readme the package pyasyncore is missing.

[13:07:05] runarb@dlrunbor-17 /home/runarb/zino2
--> $ python3 -m venv zino-env

[13:07:14] runarb@dlrunbor-17 /home/runarb/zino2
--> $ source zino-env/bin/activate

[13:07:25] runarb@dlrunbor-17 /home/runarb/zino2
(zino-env) --> $ cd zino-git-orig

[13:07:36] runarb@dlrunbor-17 /home/runarb/zino2/zino-git-orig
(zino-env) --> $ pip install .
Processing /home/runarb/zino2/zino-git-orig
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting apscheduler (from Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached APScheduler-3.10.4-py3-none-any.whl.metadata (5.7 kB)
Collecting pydantic>=2.7.0 (from Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pydantic-2.10.1-py3-none-any.whl.metadata (169 kB)
Collecting pysnmplib (from Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pysnmplib-5.0.24-py3-none-any.whl.metadata (7.8 kB)
Collecting aiodns (from Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached aiodns-3.2.0-py3-none-any.whl.metadata (4.0 kB)
Collecting annotated-types>=0.6.0 (from pydantic>=2.7.0->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.27.1 (from pydantic>=2.7.0->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (6.6 kB)
Collecting typing-extensions>=4.12.2 (from pydantic>=2.7.0->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached typing_extensions-4.12.2-py3-none-any.whl.metadata (3.0 kB)
Collecting pycares>=4.0.0 (from aiodns->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pycares-4.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.1 kB)
Collecting six>=1.4.0 (from apscheduler->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Collecting pytz (from apscheduler->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pytz-2024.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzlocal!=3.*,>=2.0 (from apscheduler->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached tzlocal-5.2-py3-none-any.whl.metadata (7.8 kB)
Collecting pycryptodomex<4.0.0,>=3.11.0 (from pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pycryptodomex-3.21.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.4 kB)
Collecting pysnmp-pyasn1<2.0.0,>=1.1.3 (from pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pysnmp_pyasn1-1.1.3-py3-none-any.whl.metadata (7.5 kB)
Collecting pysnmp-pysmi<2.0.0,>=1.0.4 (from pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pysnmp_pysmi-1.1.12-py3-none-any.whl.metadata (7.8 kB)
Collecting cffi>=1.5.0 (from pycares>=4.0.0->aiodns->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (1.5 kB)
Collecting ply<4.0,>=3.11 (from pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached ply-3.11-py2.py3-none-any.whl.metadata (844 bytes)
Collecting requests<3.0.0,>=2.31.0 (from pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting pycparser (from cffi>=1.5.0->pycares>=4.0.0->aiodns->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached pycparser-2.22-py3-none-any.whl.metadata (943 bytes)
Collecting charset-normalizer<4,>=2 (from requests<3.0.0,>=2.31.0->pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (34 kB)
Collecting idna<4,>=2.5 (from requests<3.0.0,>=2.31.0->pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached idna-3.10-py3-none-any.whl.metadata (10 kB)
Collecting urllib3<3,>=1.21.1 (from requests<3.0.0,>=2.31.0->pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached urllib3-2.2.3-py3-none-any.whl.metadata (6.5 kB)
Collecting certifi>=2017.4.17 (from requests<3.0.0,>=2.31.0->pysnmp-pysmi<2.0.0,>=1.0.4->pysnmplib->Zino==2.0.0b3.dev21+gb9665d3.d20241122)
  Using cached certifi-2024.8.30-py3-none-any.whl.metadata (2.2 kB)
Using cached pydantic-2.10.1-py3-none-any.whl (455 kB)
Using cached pydantic_core-2.27.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)
Using cached aiodns-3.2.0-py3-none-any.whl (5.7 kB)
Using cached APScheduler-3.10.4-py3-none-any.whl (59 kB)
Using cached pysnmplib-5.0.24-py3-none-any.whl (286 kB)
Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Using cached pycares-4.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (290 kB)
Using cached pycryptodomex-3.21.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.3 MB)
Using cached pysnmp_pyasn1-1.1.3-py3-none-any.whl (77 kB)
Using cached pysnmp_pysmi-1.1.12-py3-none-any.whl (79 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Using cached typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Using cached tzlocal-5.2-py3-none-any.whl (17 kB)
Using cached pytz-2024.2-py2.py3-none-any.whl (508 kB)
Using cached cffi-1.17.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (479 kB)
Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Using cached requests-2.32.3-py3-none-any.whl (64 kB)
Using cached certifi-2024.8.30-py3-none-any.whl (167 kB)
Using cached charset_normalizer-3.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (143 kB)
Using cached idna-3.10-py3-none-any.whl (70 kB)
Using cached urllib3-2.2.3-py3-none-any.whl (126 kB)
Using cached pycparser-2.22-py3-none-any.whl (117 kB)
Building wheels for collected packages: Zino
  Building wheel for Zino (pyproject.toml) ... done
  Created wheel for Zino: filename=Zino-2.0.0b3.dev21+gb9665d3.d20241122-py3-none-any.whl size=262498 sha256=c1af89d74f9894c25336405ef7bc5bd2d1e97e53759dabbf9bdbcc598c4862b1
  Stored in directory: /home/runarb/.cache/pip/wheels/fa/82/35/54e63707452caefcbc3cd55fc3a1138b67f62f158c82a012c8
Successfully built Zino
Installing collected packages: pytz, ply, urllib3, tzlocal, typing-extensions, six, pysnmp-pyasn1, pycryptodomex, pycparser, idna, charset-normalizer, certifi, annotated-types, requests, pydantic-core, cffi, apscheduler, pysnmp-pysmi, pydantic, pycares, pysnmplib, aiodns, Zino
Successfully installed Zino-2.0.0b3.dev21+gb9665d3.d20241122 aiodns-3.2.0 annotated-types-0.7.0 apscheduler-3.10.4 certifi-2024.8.30 cffi-1.17.1 charset-normalizer-3.4.0 idna-3.10 ply-3.11 pycares-4.4.0 pycparser-2.22 pycryptodomex-3.21.0 pydantic-2.10.1 pydantic-core-2.27.1 pysnmp-pyasn1-1.1.3 pysnmp-pysmi-1.1.12 pysnmplib-5.0.24 pytz-2024.2 requests-2.32.3 six-1.16.0 typing-extensions-4.12.2 tzlocal-5.2 urllib3-2.2.3

[13:07:48] runarb@dlrunbor-17 /home/runarb/zino2/zino-git-orig
(zino-env) --> $ cd ..

[13:07:54] runarb@dlrunbor-17 /home/runarb/zino2
(zino-env) --> $ zino --trap-port 0  2>&1 | tee log | grep -v -e "executed successfully" -e "Running job" -e "Home of "
Traceback (most recent call last):
  File "/home/runarb/zino2/zino-env/bin/zino", line 5, in <module>
    from zino.zino import main
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/zino/zino.py", line 19, in <module>
    from zino.api.server import ZinoServer
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/zino/api/server.py", line 5, in <module>
    from zino.api.legacy import Zino1ServerProtocol
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/zino/api/legacy.py", line 34, in <module>
    from zino.tasks.linkstatetask import LinkStateTask
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/zino/tasks/linkstatetask.py", line 9, in <module>
    from zino.snmp import SparseWalkResponse
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/zino/snmp.py", line 12, in <module>
    from pysnmp.hlapi.asyncio import (
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/hlapi/__init__.py", line 10, in <module>
    from pysnmp.hlapi import auth
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/hlapi/auth.py", line 7, in <module>
    from pysnmp.entity import config
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/entity/config.py", line 8, in <module>
    from pysnmp.carrier.asyncore.dgram import udp, udp6, unix
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/carrier/asyncore/dgram/udp.py", line 9, in <module>
    from pysnmp.carrier.asyncore.dgram.base import DgramSocketTransport
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/carrier/asyncore/dgram/base.py", line 10, in <module>
    from pysnmp.carrier.asyncore.base import AbstractSocketTransport
  File "/home/runarb/zino2/zino-env/lib/python3.12/site-packages/pysnmp/carrier/asyncore/base.py", line 9, in <module>
    import asyncore
ModuleNotFoundError: No module named 'asyncore'

[13:08:02] runarb@dlrunbor-17 /home/runarb/zino2
(zino-env) --> $

fixing this can be done by installing pyasyncore like this:

[13:35:20] runarb@dlrunbor-17 /home/runarb/zino2
(zino-env) --> $ python -m pip install pyasyncore
Collecting pyasyncore
  Downloading pyasyncore-1.0.4-py3-none-any.whl.metadata (3.7 kB)
Downloading pyasyncore-1.0.4-py3-none-any.whl (10 kB)
Installing collected packages: pyasyncore
Successfully installed pyasyncore-1.0.4

[13:35:23] runarb@dlrunbor-17 /home/runarb/zino2
(zino-env) --> $ zino --trap-port 0  2>&1 | tee log | grep -v -e "executed successfully" -e "Running job" -e "Home of "
2024-11-22 13:35:29,197 - INFO - zino.state (MainThread) - Loading saved state from zino-state.json
2024-11-22 13:35:29,736 - INFO - apscheduler.scheduler (MainThread) - Scheduler started
@runborg runborg changed the title Default installation missing pysnmpcore Default installation missing pyasyncore Nov 22, 2024
@runborg
Copy link
Author

runborg commented Nov 25, 2024

as for another workaround, pyasyncore is removed from pysnmp 6.x and it also looks compatible with zino.

a quick patch:

diff --git a/pyproject.toml b/pyproject.toml
index 1d64ee9..0421c4b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -23,7 +23,8 @@ classifiers = [
 dependencies = [
     "apscheduler",
     "pydantic>=2.7.0",
-    "pysnmplib",
+    "pysnmp<7.0.0",
     "aiodns",
     "tomli; python_version < '3.11'",
 ]

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