datastax/python-driver — pull request #44 by roncohen (2013-09-26 08:28:51+00:00)
Title: Fixed deadlock that occurs in an import scenario.

When user code imports code that initiates a new connection, it could cause a
deadlock when String.encode was called in a seperate thread (e.g. when reading
messages from the cassandra server).
See http://bugs.python.org/issue10923

Reproduce:

connect.py:

from cassandra.cluster import Cluster
cluster = Cluster(settings.CASSANDRA_HOSTS)
session = cluster.connect()

prompt:

$ python
Python 2.7.3 (default, Apr 10 2013, 06:20:15)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import connect
(stuck)

Ubuntu 12.04.3 LTS running in a VirtualBox