craigerl / aprsd

Amateur radio APRS daemon which listens for messages and responds. By KM6LYW.
Apache License 2.0
120 stars 19 forks source link

Update eventlet to fix bug in python 3.10 #87

Closed samlachance closed 1 year ago

samlachance commented 2 years ago

Hello,

When I attempted to install aprsd in arch linux using python 3.10 I received this error at runtime:

Traceback (most recent call last):
  File "/home/user/.local/bin/aprsd", line 8, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.10/site-packages/aprsd/aprsd.py", line 69, in main
    from .cmds import (  # noqa
  File "/home/user/.local/lib/python3.10/site-packages/aprsd/cmds/server.py", line 8, in <module>
    from aprsd import (
  File "/home/user/.local/lib/python3.10/site-packages/aprsd/flask.py", line 15, in <module>
    from flask_socketio import Namespace, SocketIO
  File "/home/user/.local/lib/python3.10/site-packages/flask_socketio/__init__.py", line 9, in <module>
    from socketio import socketio_manage  # noqa: F401
  File "/home/user/.local/lib/python3.10/site-packages/socketio/__init__.py", line 9, in <module>
    from .zmq_manager import ZmqManager
  File "/home/user/.local/lib/python3.10/site-packages/socketio/zmq_manager.py", line 5, in <module>
    import eventlet.green.zmq as zmq
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/__init__.py", line 17, in <module>
    from eventlet import convenience
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/convenience.py", line 7, in <module>
    from eventlet.green import socket
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/green/socket.py", line 4, in <module>
    __import__('eventlet.green._socket_nodns')
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/green/_socket_nodns.py", line 11, in <module>
    from eventlet import greenio
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/greenio/__init__.py", line 3, in <module>
    from eventlet.greenio.base import *  # noqa
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/greenio/base.py", line 32, in <module>
    socket_timeout = eventlet.timeout.wrap_is_timeout(socket.timeout)
  File "/home/user/.local/lib/python3.10/site-packages/eventlet/timeout.py", line 166, in wrap_is_timeout
    base.is_timeout = property(lambda _: True)
TypeError: cannot set 'is_timeout' attribute of immutable type 'TimeoutError'

After a bit of searching, I discovered this issue on eventlet: https://github.com/eventlet/eventlet/issues/733

It appears that they've patched the bug but since we're receiving the error I'm assuming we're on the broken version.

Would it be possible to attempt an upgrade to a patched version? I think it is breaking python 3.10 support outright.

Apologies for not making a PR myself -- I'm not familiar enough with python dependency management or this project to do it safely in a reasonable amount of time.

Thanks for the excellent project and 73! Sam, N3SAM

ranguli commented 1 year ago

Can confirm that I'm also having this issue on Python 3.10.6