Python3.9 compatibility error

Description

When connecting to a server fails, Python 3.8 shows this error:
`cassandra.cluster.NoHostAvailable: ("Unable to connect to any servers using keyspace 'test'", ['127.0.0.1'])`

With concise stack trace:
```
File "cassandra/cluster.py", line 1712, in cassandra.cluster.Cluster.connect
File "cassandra/cluster.py", line 1769, in cassandra.cluster.Cluster._new_session
File "cassandra/cluster.py", line 2550, in cassandra.cluster.Session._init_
```

Python 3.9, on the other hand shows this error:
`cassandra.cluster.NoHostAvailable: ('Unable to connect to any servers', {'127.0.0.1:9042': TypeError('type() takes 1 or 3 arguments')})`

with longer stack trace:
```
File "cassandra/cluster.py", line 1664, in cassandra.cluster.Cluster.connect
File "cassandra/cluster.py", line 1700, in cassandra.cluster.Cluster.connect
File "cassandra/cluster.py", line 1687, in cassandra.cluster.Cluster.connect
File "cassandra/cluster.py", line 3485, in cassandra.cluster.ControlConnection.connect
File "cassandra/cluster.py", line 3530, in cassandra.cluster.ControlConnection._reconnect_internal
```

This suggests to me that there's a bug in error handling or raising an exception.

Environment

macOS, Python 3.9.0b1 vs. Python 3.8.3, using AsyncioConnection

Pull Requests

None

Activity

Show:
Alan Boudreault
June 1, 2020, 12:43 PM

Thanks for the report Dima. We'll fix this when adding the Python 3.9 support.

Assignee

Unassigned

Reporter

Dima Tisnek

Fix versions

None

Labels

PM Priority

None

External issue ID

None

Doc Impact

None

Reviewer

None

Size

None

Pull Request

None

Affects versions

Priority

Minor
Configure