[Python-modules-commits] [python-vertica] 09/10: Remove d/patches. Merged upstream

Jean Baptiste Favre jbfavre-guest at moszumanska.debian.org
Mon May 23 19:39:10 UTC 2016


This is an automated email from the git hooks/post-receive script.

jbfavre-guest pushed a commit to branch master
in repository python-vertica.

commit 283f9642514045d82206e238fe73bc1eeb197690
Author: Jean Baptiste Favre <debian at jbfavre.org>
Date:   Mon May 23 20:53:40 2016 +0200

    Remove d/patches. Merged upstream
---
 debian/patches/github_pr_118_fix_116.patch | 57 ------------------------------
 debian/patches/github_pr_119_fix_117.patch | 54 ----------------------------
 debian/patches/series                      |  2 --
 3 files changed, 113 deletions(-)

diff --git a/debian/patches/github_pr_118_fix_116.patch b/debian/patches/github_pr_118_fix_116.patch
deleted file mode 100644
index 0e105d7..0000000
--- a/debian/patches/github_pr_118_fix_116.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Description: fixed issue #116 where column names were bytes objects instead of strings
- This addresses an issue in vertica-python when run in Python3 where column names are
- bytes objects instead of utf-8 encoded strings. Also added a test case that fails in
- Python3 before this PR and succeeds after. (Note: Tests fail under python3.5 for
- test_unicode_named_parameter_binding even from master. This doesn't do anything to
- address that.)
-Author: Dennis O'Brien
-Origin: https://github.com/uber/vertica-python/pull/118
-Bug: https://github.com/uber/vertica-python/issues/116
-Reviewed-by: Jean Baptiste Favre <debian at jbfavre.org>
-Last-Update: 2016-05-22
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- /dev/null
-+++ b/vertica_python/tests/column_tests.py
-@@ -0,0 +1,21 @@
-+from .test_commons import conn_info, VerticaTestCase
-+from .. import connect
-+
-+
-+class ColumnTestCase(VerticaTestCase):
-+    def test_column_names_query(self):
-+        column_0 = 'isocode'
-+        column_1 = 'name'
-+        query = """
-+        select 'US' as {column_0}, 'United States' as {column_1}
-+        union all
-+        select 'CA', 'Canada'
-+        union all
-+        select 'MX', 'Mexico'
-+        """.format(column_0=column_0, column_1=column_1)
-+        with connect(**conn_info) as conn:
-+            cur = conn.cursor()
-+            cur.execute(query)
-+            description = cur.description
-+            assert description[0].name == column_0
-+            assert description[1].name == column_1
---- a/vertica_python/vertica/column.py
-+++ b/vertica_python/vertica/column.py
-@@ -124,7 +124,7 @@ class Column(object):
-         return map(lambda x: x[0], Column.data_type_conversions())
- 
-     def __init__(self, col, unicode_error=None):
--        self.name = col['name']
-+        self.name = col['name'].decode()
-         self.type_code = col['data_type_oid']
-         self.display_size = None
-         self.internal_size = col['data_type_size']
-@@ -143,7 +143,7 @@ class Column(object):
-             self.type_code = 0
- 
-         #self.props = ColumnTuple(col['name'], col['data_type_oid'], None, col['data_type_size'], None, None, None)
--        self.props = ColumnTuple(col['name'], self.type_code, None, col['data_type_size'], None, None, None)
-+        self.props = ColumnTuple(self.name, self.type_code, None, col['data_type_size'], None, None, None)
- 
-         #self.converter = self.data_type_conversions[col['data_type_oid']][1]
-         self.converter = self.data_type_conversions[self.type_code][1]
diff --git a/debian/patches/github_pr_119_fix_117.patch b/debian/patches/github_pr_119_fix_117.patch
deleted file mode 100644
index 1aade49..0000000
--- a/debian/patches/github_pr_119_fix_117.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-Description: fixed parsing of Timestamp and TimestampTz columns in Python3
- This modifies timestamp_parse and timestamp_tz_parse to coerce the argument
- to a utf-8 encode string. In Python2 the argument is already a string while
- in Python3 it is a bytes object.
-Author: Dennis O'Brien
-Origin: https://github.com/uber/vertica-python/pull/119
-Bug: https://github.com/uber/vertica-python/issues/117
-Reviewed-by: Jean Baptiste Favre <debian at jbfavre.org>
-Last-Update: 2016-05-22
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/vertica_python/vertica/column.py
-+++ b/vertica_python/vertica/column.py
-@@ -34,6 +34,7 @@ years_re = re.compile(r'^([0-9]+)-')
- # timestamptz type stores: 2013-01-01 05:00:00.01+00
- #       select t AT TIMEZONE 'America/New_York' returns: 2012-12-31 19:00:00.01
- def timestamp_parse(s):
-+    s = str(s, 'utf-8')
-     try:
-         dt = _timestamp_parse(s)
-     except ValueError:
-@@ -62,6 +63,7 @@ def _timestamp_parse_without_year(s):
- 
- 
- def timestamp_tz_parse(s):
-+    s = str(s, 'utf-8')
-     # if timezome is simply UTC...
-     if s.endswith('+00'):
-         # remove time zone
---- a/vertica_python/tests/date_tests.py
-+++ b/vertica_python/tests/date_tests.py
-@@ -56,16 +56,19 @@ class TimestampParsingTestCase(VerticaTe
- 
- 
-     def test_timestamp_parser(self):
--        parsed_timestamp = timestamp_parse('1841-05-05 22:07:58')
-+        test_timestamp = '1841-05-05 22:07:58'.encode(encoding='utf-8', errors='strict')
-+        parsed_timestamp = timestamp_parse(test_timestamp)
-         # Assert parser default to strptime
-         self.assertEqual(datetime(year=1841, month=5, day=5, hour=22, minute=7, second=58), parsed_timestamp)
- 
-     def test_timestamp_with_year_over_9999(self):
--        parsed_timestamp = timestamp_parse('44841-05-05 22:07:58')
-+        test_timestamp = '44841-05-05 22:07:58'.encode(encoding='utf-8', errors='strict')
-+        parsed_timestamp = timestamp_parse(test_timestamp)
-         # Assert year was truncated properly
-         self.assertEqual(datetime(year=4841, month=5, day=5, hour=22, minute=7, second=58), parsed_timestamp)
- 
-     def test_timestamp_with_year_over_9999_and_ms(self):
--        parsed_timestamp = timestamp_parse('124841-05-05 22:07:58.000003')
-+        test_timestamp = '124841-05-05 22:07:58.000003'.encode(encoding='utf-8', errors='strict')
-+        parsed_timestamp = timestamp_parse(test_timestamp)
-         # Assert year was truncated properly
-         self.assertEqual(datetime(year=4841, month=5, day=5, hour=22, minute=7, second=58, microsecond=3), parsed_timestamp)
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index 12a0c3d..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,2 +0,0 @@
-github_pr_118_fix_116.patch
-github_pr_119_fix_117.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-vertica.git



More information about the Python-modules-commits mailing list