diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 17feba9a..1e3a7d94 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -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 ===== diff --git a/README-dev.rst b/README-dev.rst index 8c6a13bb..5242e5d3 100644 --- a/README-dev.rst +++ b/README-dev.rst @@ -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 diff --git a/cassandra/cqltypes.py b/cassandra/cqltypes.py index 71a58114..8a623e4e 100644 --- a/cassandra/cqltypes.py +++ b/cassandra/cqltypes.py @@ -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): diff --git a/debian/changelog b/debian/changelog index 0360d906..1568c12f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python-cassandra-driver (2.0.2-2) unstable; urgency=low + + * Fixed debian/patches + + -- Carsten Aulbert Thu, 19 Jun 2014 14:07:27 +0200 + python-cassandra-driver (2.0.2-1) unstable; urgency=low * Release 2.0.2 diff --git a/debian/patches/0001-don-t-use-ez_setup.patch b/debian/patches/0001-don-t-use-ez_setup.patch index ece0bef8..7e73a67a 100644 --- a/debian/patches/0001-don-t-use-ez_setup.patch +++ b/debian/patches/0001-don-t-use-ez_setup.patch @@ -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=[ diff --git a/docs/security.rst b/docs/security.rst index 04ecda01..c87c5de8 100644 --- a/docs/security.rst +++ b/docs/security.rst @@ -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 ---