[Python-modules-commits] r19018 - in packages/python-riak/trunk/debian/patches (6 files)

soren-guest at users.alioth.debian.org soren-guest at users.alioth.debian.org
Fri Oct 21 15:30:24 UTC 2011


    Date: Friday, October 21, 2011 @ 15:30:22
  Author: soren-guest
Revision: 19018

Add simple unicode coercion fix to get search to work.
Add patch descriptions to the patches missing them.

Added:
  packages/python-riak/trunk/debian/patches/0038-Temporary-simple-fix-for-issue-32.patch
Modified:
  packages/python-riak/trunk/debian/patches/0000-Add-stuff-missing-from-tarball.patch
  packages/python-riak/trunk/debian/patches/0032-riak_search_header.patch
  packages/python-riak/trunk/debian/patches/0033-move-erl-src.patch
  packages/python-riak/trunk/debian/patches/0034-urllib3-not-required.patch
  packages/python-riak/trunk/debian/patches/series

Modified: packages/python-riak/trunk/debian/patches/0000-Add-stuff-missing-from-tarball.patch
===================================================================
--- packages/python-riak/trunk/debian/patches/0000-Add-stuff-missing-from-tarball.patch	2011-10-20 22:47:52 UTC (rev 19017)
+++ packages/python-riak/trunk/debian/patches/0000-Add-stuff-missing-from-tarball.patch	2011-10-21 15:30:22 UTC (rev 19018)
@@ -1,4 +1,10 @@
-diff -urNw riak-1.3.0.orig/docs/bucket.rst riak-1.3.0/docs/bucket.rst
+From: Soren Hansen <soren at ubuntu.com>
+Subject: Add all the stuff from git that is missing in the tarball
+
+There's a lot of stuff missing from the tarball that is needed
+for the package to actually work. Rather than building a fake release tarball,
+I prefer to add them like this.
+
 --- riak-1.3.0.orig/docs/bucket.rst	1970-01-01 01:00:00.000000000 +0100
 +++ riak-1.3.0/docs/bucket.rst	2011-04-10 21:18:31.000000000 +0200
 @@ -0,0 +1,9 @@

Modified: packages/python-riak/trunk/debian/patches/0032-riak_search_header.patch
===================================================================
--- packages/python-riak/trunk/debian/patches/0032-riak_search_header.patch	2011-10-20 22:47:52 UTC (rev 19017)
+++ packages/python-riak/trunk/debian/patches/0032-riak_search_header.patch	2011-10-21 15:30:22 UTC (rev 19018)
@@ -1,3 +1,8 @@
+From: Soren Hansen <soren at ubuntu.com>
+Subject: Add riak_search.hrl from Riak
+
+In order to build the test search and kv backends from source (rather
+using the embedded beam files), we need this header from Riak.
 Index: riak-1.3.0/include/riak_search.hrl
 ===================================================================
 --- /dev/null

Modified: packages/python-riak/trunk/debian/patches/0033-move-erl-src.patch
===================================================================
--- packages/python-riak/trunk/debian/patches/0033-move-erl-src.patch	2011-10-20 22:47:52 UTC (rev 19017)
+++ packages/python-riak/trunk/debian/patches/0033-move-erl-src.patch	2011-10-21 15:30:22 UTC (rev 19018)
@@ -1,3 +1,8 @@
+From: Soren Hansen <soren at ubuntu.com>
+Subject: Move erl_src under the Riak namespace
+
+In order to get erl_src installed in the package,
+we move it under riak's namespace.
 Index: riak-1.3.0/erl_src/riak_kv_test_backend.erl
 ===================================================================
 --- riak-1.3.0.orig/erl_src/riak_kv_test_backend.erl

Modified: packages/python-riak/trunk/debian/patches/0034-urllib3-not-required.patch
===================================================================
--- packages/python-riak/trunk/debian/patches/0034-urllib3-not-required.patch	2011-10-20 22:47:52 UTC (rev 19017)
+++ packages/python-riak/trunk/debian/patches/0034-urllib3-not-required.patch	2011-10-21 15:30:22 UTC (rev 19018)
@@ -1,3 +1,8 @@
+From: Soren Hansen <soren at ubuntu.com>
+Subject: Remove urllib3 from install_requires
+
+urllib3 is optional. If it's available, it'll be used, but it's not
+required, and we don't have it in Debian.
 Index: python-riak-1.3.0/setup.py
 ===================================================================
 --- python-riak-1.3.0.orig/setup.py

Added: packages/python-riak/trunk/debian/patches/0038-Temporary-simple-fix-for-issue-32.patch
===================================================================
--- packages/python-riak/trunk/debian/patches/0038-Temporary-simple-fix-for-issue-32.patch	                        (rev 0)
+++ packages/python-riak/trunk/debian/patches/0038-Temporary-simple-fix-for-issue-32.patch	2011-10-21 15:30:22 UTC (rev 19018)
@@ -0,0 +1,76 @@
+From 4031652267c3f1c6677a3cf5e41364ea3adb991e Mon Sep 17 00:00:00 2001
+From: Soren Hansen <soren at linux2go.dk>
+Date: Thu, 20 Oct 2011 10:35:46 +0200
+Subject: [PATCH] Temporary, simple fix for issue #32
+
+https://issues.basho.com/show_bug.cgi?id=649 has more details.
+Eventually, we want to allow unicode keys and bucket names,
+but we have yet to decide how to do that. Until we figure
+that out, this patch will at least let us use the search
+interface as long as we only use ascii-encodable keys and
+bucket names.
+---
+ riak/bucket.py      |    8 ++++++--
+ riak/mapreduce.py   |    4 +++-
+ riak/riak_object.py |    4 +++-
+ 3 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/riak/bucket.py b/riak/bucket.py
+index cef4327..69c044e 100644
+--- a/riak/bucket.py
++++ b/riak/bucket.py
+@@ -38,7 +38,9 @@ class RiakBucket(object):
+         :param name: The bucket name
+         :type name: string
+         """
+-        if isinstance(name, unicode):
++        try:
++            name.encode('ascii')
++        except UnicodeEncodeError:
+             raise TypeError('Unicode bucket names are not supported.')
+ 
+         self._client = client
+@@ -210,7 +212,9 @@ class RiakBucket(object):
+         :type data: object
+         :rtype: :class:`RiakObject <riak.riak_object.RiakObject>`
+         """
+-        if isinstance(data, unicode):
++        try:
++            data.encode('ascii')
++        except:
+             raise TypeError('Unicode data values are not supported.')
+ 
+         obj = RiakObject(self._client, self, key)
+diff --git a/riak/mapreduce.py b/riak/mapreduce.py
+index d2b956d..0a3ddf3 100644
+--- a/riak/mapreduce.py
++++ b/riak/mapreduce.py
+@@ -320,7 +320,9 @@ class RiakMapReducePhase(object):
+         @param mixed arg - Additional value to pass into the map or
+         reduce function.
+         """
+-        if isinstance(function, unicode):
++        try:
++            function.encode('ascii')
++        except UnicodeEncodeError:
+             raise TypeError('Unicode encoded functions are not supported.')
+ 
+         self._type = type
+diff --git a/riak/riak_object.py b/riak/riak_object.py
+index 7ad0503..7e99174 100644
+--- a/riak/riak_object.py
++++ b/riak/riak_object.py
+@@ -39,7 +39,9 @@ class RiakObject(object):
+          is generated by the server when :func:`store` is called.
+         :type key: string
+         """
+-        if isinstance(key, unicode):
++        try:
++            key.encode('ascii')
++        except UnicodeEncodeError:
+             raise TypeError('Unicode keys are not supported.')
+ 
+         self._client = client
+-- 
+1.7.5.4
+

Modified: packages/python-riak/trunk/debian/patches/series
===================================================================
--- packages/python-riak/trunk/debian/patches/series	2011-10-20 22:47:52 UTC (rev 19017)
+++ packages/python-riak/trunk/debian/patches/series	2011-10-21 15:30:22 UTC (rev 19018)
@@ -35,3 +35,4 @@
 0035-First-draft-at-fixing-issue-53.patch
 0036-Test-the-retrieval-of-a-new-object-s-key-and-its-for.patch
 0037-Fix-extraction-of-the-key-from-the-Location-header.patch
+0038-Temporary-simple-fix-for-issue-32.patch




More information about the Python-modules-commits mailing list