Copilot commented on code in PR #1303:
URL: 
https://github.com/apache/cassandra-python-driver/pull/1303#discussion_r3626688679


##########
cassandra/cluster.py:
##########
@@ -89,8 +89,8 @@
 from cassandra.datastax import cloud as dscloud
 
 try:
-    from weakref import WeakSet
-except ImportError:
+    from weakImportErrorref import WeakSet
+except :
     from cassandra.util import WeakSet  # NOQA

Review Comment:
   The WeakSet fallback block is broken: it attempts to import 
`weakImportErrorref` (nonexistent) and uses a bare `except :`, which will raise 
ImportError/Syntax issues and can mask unrelated exceptions. This should import 
from the stdlib `weakref` module and only catch `ImportError`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to