Merge branch 'master' into 2.1-support

This commit is contained in:
Tyler Hobbs
2014-06-24 13:52:32 -05:00
6 changed files with 29 additions and 9 deletions

View File

@@ -20,6 +20,8 @@ Bug Fixes
process has connected a Cluster before forking (github #141)
* Don't share prepared statement lock across Cluster
instances
* Format CompositeType and DynamicCompositeType columns correctly
in CREATE TABLE statements.
2.0.2
=====

View File

@@ -3,6 +3,7 @@ Releasing
* Run the tests and ensure they all pass
* If dependencies have changed, make sure ``debian/control``
is up to date
* Make sure all patches in ``debian/patches`` still apply cleanly
* Update CHANGELOG.rst
* Update the version in ``cassandra/__init__.py``
* Commit the changelog and version changes

View File

@@ -843,10 +843,17 @@ class CompositeType(_ParameterizedType):
typename = "'org.apache.cassandra.db.marshal.CompositeType'"
num_subtypes = 'UNKNOWN'
@classmethod
def cql_parameterized_type(cls):
"""
There is no CQL notation for Composites, so we override this.
"""
typestring = cls.cass_parameterized_type(full=True)
return "'%s'" % (typestring,)
class DynamicCompositeType(_ParameterizedType):
class DynamicCompositeType(CompositeType):
typename = "'org.apache.cassandra.db.marshal.DynamicCompositeType'"
num_subtypes = 'UNKNOWN'
class ColumnToCollectionType(_ParameterizedType):

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
python-cassandra-driver (2.0.2-2) unstable; urgency=low
* Fixed debian/patches
-- Carsten Aulbert <carsten.aulbert@aei.mpg.de> Thu, 19 Jun 2014 14:07:27 +0200
python-cassandra-driver (2.0.2-1) unstable; urgency=low
* Release 2.0.2

View File

@@ -18,7 +18,8 @@ diff --git a/setup.py b/setup.py
index 0c28d3d..c0fd6c1 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,5 @@
@@ -15,9 +15,6 @@
from __future__ import print_function
import sys
-import ez_setup
@@ -27,12 +28,12 @@ index 0c28d3d..c0fd6c1 100644
if __name__ == '__main__' and sys.argv[1] == "gevent_nosetests":
from gevent.monkey import patch_all
patch_all()
@@ -174,8 +171,8 @@ def run_setup(extensions):
@@ -192,8 +189,8 @@
author_email='tyler@datastax.com',
packages=['cassandra', 'cassandra.io'],
include_package_data=True,
- install_requires=dependencies,
- tests_require=['nose', 'mock', 'ccm', 'unittest2', 'PyYAML', 'pytz'],
- tests_require=['nose', 'mock', 'PyYAML', 'pytz'],
+ install_requires=(),
+ tests_require=(),
classifiers=[

View File

@@ -42,15 +42,18 @@ Protocol v1 Authentication
^^^^^^^^^^^^^^^^^^^^^^^^^^
When working with Cassandra 1.2 (or a higher version with
:attr:`~.Cluster.protocol_version` set to ``1``), you will not pass in
an :class:`~.AuthProvider` instance. Instead, you should pass a dict
of credentials with a ``username`` and ``password`` key:
an :class:`~.AuthProvider` instance. Instead, you should pass in a
function that takes one argument, the IP address of a host, and returns
a dict of credentials with a ``username`` and ``password`` key:
.. code-block:: python
from cassandra.cluster import Cluster
credentials = {'username': 'joe', 'password': '1234'}
cluster = Cluster(auth_provider=credentials, protocol_version=1)
def get_credentials(host_address):
return {'username': 'joe', 'password': '1234'}
cluster = Cluster(auth_provider=get_credentials, protocol_version=1)
SSL
---