Skip to content

Commit

Permalink
Ignore AttributeError on eventlet import
Browse files Browse the repository at this point in the history
running on python 3.12, we get this error, we should ignore
it until eventlet is fixed

```
ImportError while loading conftest '/home/runner/work/python-driver/python-driver/tests/integration/conftest.py'.
tests/integration/__init__.py:16: in <module>
    from cassandra.cluster import Cluster
cassandra/cluster.py:103: in init cassandra.cluster
    from cassandra.io.eventletreactor import EventletConnection
cassandra/io/eventletreactor.py:18: in <module>
    import eventlet
.test-venv/lib/python3.12/site-packages/eventlet/__init__.py:17: in <module>
    from eventlet import convenience
.test-venv/lib/python3.12/site-packages/eventlet/convenience.py:7: in <module>
    from eventlet.green import socket
.test-venv/lib/python3.12/site-packages/eventlet/green/socket.py:21: in <module>
    from eventlet.support import greendns
.test-venv/lib/python3.12/site-packages/eventlet/support/greendns.py:45: in <module>
    from eventlet.green import ssl
.test-venv/lib/python3.12/site-packages/eventlet/green/ssl.py:25: in <module>
    _original_wrap_socket = __ssl.wrap_socket
E   AttributeError: module 'ssl' has no attribute 'wrap_socket'
```

Ref: eventlet/eventlet#812
  • Loading branch information
fruch committed Oct 11, 2023
1 parent a9bad78 commit ec80814
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cassandra/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@

try:
from cassandra.io.eventletreactor import EventletConnection
except ImportError:
except (ImportError, AttributeError): # AttributeError was add for handling python 3.12 https://github.com/eventlet/eventlet/issues/812
EventletConnection = None

try:
Expand Down

0 comments on commit ec80814

Please sign in to comment.