Skip to content

Commit 1afa1f4

Browse files
committed
weakref.ref does not support keyword args in python 2.7.12+
With thanks to Jan Urbański in apache#585 for the heads up.
1 parent b3dfbce commit 1afa1f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cassandra/cluster.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2262,7 +2262,7 @@ def _try_connect(self, host):
22622262
# _clear_watcher will be called when this ControlConnection is about to be finalized
22632263
# _watch_callback will get the actual callback from the Connection and relay it to
22642264
# this object (after a dereferencing a weakref)
2265-
self_weakref = weakref.ref(self, callback=partial(_clear_watcher, weakref.proxy(connection)))
2265+
self_weakref = weakref.ref(self, partial(_clear_watcher, weakref.proxy(connection)))
22662266
try:
22672267
connection.register_watchers({
22682268
"TOPOLOGY_CHANGE": partial(_watch_callback, self_weakref, '_handle_topology_change'),

0 commit comments

Comments
 (0)