Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1042466: AttributeError: module 'eventlet.green.select' has no attribute 'epoll'

1,350 views
Skip to first unread message

Gregor Riepl

unread,
Jul 28, 2023, 1:00:05 PM7/28/23
to
Package: python3-eventlet
Version: 0.33.1-4
Severity: important
Tags: upstream
Forwarded: https://github.com/eventlet/eventlet/issues/805
X-Debbugs-Cc: oni...@gmail.com
Control: affects -1 cura

Dear Maintainer,

The eventlet module has a known incompatibility with dnspython 0.24, that
causes it to throw exceptions of the form: AttributeError: module
'eventlet.green.select' has no attribute 'epoll'

One example is cura 5.0.0, which won't start start any more due to this bug
(full report further below):

/usr/lib/python3/dist-packages/eventlet/support/greenlets.py:6:
DeprecationWarning: distutils Version classes are deprecated. Use
packaging.version instead.
preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__)
...
File "/usr/bin/cura", line 30, in <module>
import sentry_sdk
...
File "/usr/lib/python3/dist-packages/trio/_core/_io_epoll.py", line 190, in
EpollIOManager
_epoll = attr.ib(factory=select.epoll)
^^^^^^^^^^^^
AttributeError: module 'eventlet.green.select' has no attribute 'epoll'

Please provide a fix for this issue as soon as one is available from upstream,
or pin to dnspython to 0.23 until this is fixed (which would break on
sid/trixie, because dnspython 0.23 isn't available there).

Thanks.


Full output from cura:

/usr/lib/python3/dist-packages/UM/PluginRegistry.py:4: DeprecationWarning: the
imp module is deprecated in favour of importlib and slated for removal in
Python 3.12; see the module's documentation for alternative uses
import imp
/usr/lib/python3/dist-packages/eventlet/support/greenlets.py:6:
DeprecationWarning: distutils Version classes are deprecated. Use
packaging.version instead.
preserves_excinfo = (distutils.version.LooseVersion(greenlet.__version__)
Traceback (most recent call last):
File "/usr/bin/cura", line 30, in <module>
import sentry_sdk
File "/usr/lib/python3/dist-packages/sentry_sdk/__init__.py", line 1, in
<module>
from sentry_sdk.hub import Hub, init
File "/usr/lib/python3/dist-packages/sentry_sdk/hub.py", line 8, in <module>
from sentry_sdk.scope import Scope
File "/usr/lib/python3/dist-packages/sentry_sdk/scope.py", line 7, in
<module>
from sentry_sdk.utils import logger, capture_internal_exceptions
File "/usr/lib/python3/dist-packages/sentry_sdk/utils.py", line 925, in
<module>
HAS_REAL_CONTEXTVARS, ContextVar = _get_contextvars()
^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/sentry_sdk/utils.py", line 895, in
_get_contextvars
if not _is_contextvars_broken():
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/sentry_sdk/utils.py", line 856, in
_is_contextvars_broken
from eventlet.patcher import is_monkey_patched # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/eventlet/__init__.py", line 17, in
<module>
from eventlet import convenience
File "/usr/lib/python3/dist-packages/eventlet/convenience.py", line 7, in
<module>
from eventlet.green import socket
File "/usr/lib/python3/dist-packages/eventlet/green/socket.py", line 21, in
<module>
from eventlet.support import greendns
File "/usr/lib/python3/dist-packages/eventlet/support/greendns.py", line 79,
in <module>
setattr(dns, pkg, import_patched('dns.' + pkg))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/eventlet/support/greendns.py", line 61,
in import_patched
return patcher.import_patched(module_name, **modules)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/eventlet/patcher.py", line 132, in
import_patched
return inject(
^^^^^^^
File "/usr/lib/python3/dist-packages/eventlet/patcher.py", line 109, in
inject
module = __import__(module_name, {}, {}, module_name.split('.')[:-1])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/dns/asyncquery.py", line 38, in <module>
from dns.query import (
File "/usr/lib/python3/dist-packages/dns/query.py", line 63, in <module>
import httpcore
File "/usr/lib/python3/dist-packages/httpcore/__init__.py", line 1, in
<module>
from ._api import request, stream
File "/usr/lib/python3/dist-packages/httpcore/_api.py", line 5, in <module>
from ._sync.connection_pool import ConnectionPool
File "/usr/lib/python3/dist-packages/httpcore/_sync/__init__.py", line 1, in
<module>
from .connection import HTTPConnection
File "/usr/lib/python3/dist-packages/httpcore/_sync/connection.py", line 12,
in <module>
from .._synchronization import Lock
File "/usr/lib/python3/dist-packages/httpcore/_synchronization.py", line 13,
in <module>
import trio
File "/usr/lib/python3/dist-packages/trio/__init__.py", line 19, in <module>
from ._core import TASK_STATUS_IGNORED as TASK_STATUS_IGNORED # isort:
skip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/trio/_core/__init__.py", line 21, in
<module>
from ._local import RunVar
File "/usr/lib/python3/dist-packages/trio/_core/_local.py", line 5, in
<module>
from . import _run
File "/usr/lib/python3/dist-packages/trio/_core/_run.py", line 2543, in
<module>
from ._io_epoll import EpollIOManager as TheIOManager
File "/usr/lib/python3/dist-packages/trio/_core/_io_epoll.py", line 189, in
<module>
class EpollIOManager:
File "/usr/lib/python3/dist-packages/trio/_core/_io_epoll.py", line 190, in
EpollIOManager
_epoll = attr.ib(factory=select.epoll)
^^^^^^^^^^^^
AttributeError: module 'eventlet.green.select' has no attribute 'epoll'


-- System Information:
Debian Release: trixie/sid
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (300, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.3.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-eventlet depends on:
ii netbase 6.4
ii python3 3.11.4-5
ii python3-dnspython 2.4.0-1
ii python3-greenlet 2.0.2-1
ii python3-monotonic 1.6-2
ii python3-six 1.16.0-4

python3-eventlet recommends no packages.

Versions of packages python3-eventlet suggests:
pn python-eventlet-doc <none>

-- no debconf information

Gregor Riepl

unread,
Aug 2, 2023, 3:40:04 AM8/2/23
to
Here's a temporary workaround until the issue is fixed.

Either set the environment variable EVENTLET_NO_GREENDNS to "yes" before
launching applications that import eventlet, or put the following Python
code before loading the module:

import os
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
import eventlet
...
0 new messages