Hello community,

here is the log from the commit of package python-hiredis for openSUSE:Factory 
checked in at 2020-01-16 18:22:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-hiredis (Old)
 and      /work/SRC/openSUSE:Factory/.python-hiredis.new.26092 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-hiredis"

Thu Jan 16 18:22:35 2020 rev:4 rq:764900 version:1.0.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-hiredis/python-hiredis.changes    
2019-09-23 12:32:35.321657627 +0200
+++ /work/SRC/openSUSE:Factory/.python-hiredis.new.26092/python-hiredis.changes 
2020-01-16 18:22:43.489025178 +0100
@@ -1,0 +2,8 @@
+Thu Jan 16 08:54:49 UTC 2020 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 1.0.1:
+  * Permit all allowed values of codec errors (see #86)
+  * BUGFIX: READEME.md has UTF-8 characters, setup.py will fail on systems 
where the locale is not UTF-8. (see #89)
+- Drop merged patch 0002-Fix-README.md-has-unicode.patch
+
+-------------------------------------------------------------------

Old:
----
  0002-Fix-README.md-has-unicode.patch
  v1.0.0.tar.gz

New:
----
  v1.0.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-hiredis.spec ++++++
--- /var/tmp/diff_new_pack.ZiHQnB/_old  2020-01-16 18:22:45.141026112 +0100
+++ /var/tmp/diff_new_pack.ZiHQnB/_new  2020-01-16 18:22:45.145026114 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-hiredis
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,17 +18,15 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-hiredis
-Version:        1.0.0
+Version:        1.0.1
 Release:        0
 Summary:        Python wrapper for hiredis
 License:        BSD-3-Clause
-Group:          Development/Languages/Python
 URL:            https://github.com/redis/hiredis-py
 Source:         https://github.com/redis/hiredis-py/archive/v%{version}.tar.gz
 Patch0:         0001-Use-system-libhiredis.patch
 Patch1:         fix_build_dir_in_tests.patch
 Patch2:         drop-vendor-sources.patch
-Patch3:         0002-Fix-README.md-has-unicode.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes

++++++ v1.0.0.tar.gz -> v1.0.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hiredis-py-1.0.0/CHANGELOG.md 
new/hiredis-py-1.0.1/CHANGELOG.md
--- old/hiredis-py-1.0.0/CHANGELOG.md   2019-01-20 08:39:27.000000000 +0100
+++ new/hiredis-py-1.0.1/CHANGELOG.md   2019-11-13 11:31:27.000000000 +0100
@@ -1,3 +1,9 @@
+### 1.0.1 (2019-11-13)
+
+* Permit all allowed values of codec errors (see #86)
+* BUGFIX: READEME.md has UTF-8 characters, setup.py will fail on systems
+          where the locale is not UTF-8. (see #89)
+
 ### 1.0.0 (2019-01-20)
 
 * **(BREAKING CHANGE)** Add ability to control how unicode decoding errors are 
handled (see #82)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hiredis-py-1.0.0/hiredis/version.py 
new/hiredis-py-1.0.1/hiredis/version.py
--- old/hiredis-py-1.0.0/hiredis/version.py     2019-01-20 08:39:27.000000000 
+0100
+++ new/hiredis-py-1.0.1/hiredis/version.py     2019-11-13 11:31:27.000000000 
+0100
@@ -1 +1 @@
-__version__ = "1.0.0"
+__version__ = "1.0.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hiredis-py-1.0.0/setup.py 
new/hiredis-py-1.0.1/setup.py
--- old/hiredis-py-1.0.0/setup.py       2019-01-20 08:39:27.000000000 +0100
+++ new/hiredis-py-1.0.1/setup.py       2019-11-13 11:31:27.000000000 +0100
@@ -4,7 +4,7 @@
   from setuptools import setup, Extension
 except ImportError:
   from distutils.core import setup, Extension
-import sys, imp, os, glob
+import sys, imp, os, glob, io
 
 def version():
   module = imp.load_source("hiredis.version", "hiredis/version.py")
@@ -19,7 +19,7 @@
   name="hiredis",
   version=version(),
   description="Python wrapper for hiredis",
-  long_description=open('README.md', 'r').read(),
+  long_description=io.open('README.md', 'rt', encoding='utf-8').read(),
   long_description_content_type='text/markdown',
   url="https://github.com/redis/hiredis-py";,
   author="Jan-Erik Rediger, Pieter Noordhuis",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hiredis-py-1.0.0/src/reader.c 
new/hiredis-py-1.0.1/src/reader.c
--- old/hiredis-py-1.0.0/src/reader.c   2019-01-20 08:39:27.000000000 +0100
+++ new/hiredis-py-1.0.1/src/reader.c   2019-11-13 11:31:27.000000000 +0100
@@ -209,17 +209,16 @@
             return -1;
 
     self->encoding = encoding;
-    if(errors) {
-        if (strcmp(errors, "strict") != 0 &&
-            strcmp(errors, "replace") != 0 &&
-            strcmp(errors, "ignore") != 0 &&
-            strcmp(errors, "backslashreplace") != 0) {
-
-            PyErr_SetString(PyExc_LookupError,
-                            "if specified, errors must be one of "
-                            "{'strict', 'replace', 'ignore', 
'backslashreplace'}");
+    if (errors) {   // validate that the error handler exists, raises 
LookupError if not
+        PyObject *codecs, *result;
+        codecs = PyImport_ImportModule("codecs");
+        if (!codecs)
+            return -1;
+        result = PyObject_CallMethod(codecs, "lookup_error", "s", errors);
+        Py_DECREF(codecs);
+        if (!result)
             return -1;
-        }
+        Py_DECREF(result);
         self->errors = errors;
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/hiredis-py-1.0.0/test/reader.py 
new/hiredis-py-1.0.1/test/reader.py
--- old/hiredis-py-1.0.0/test/reader.py 2019-01-20 08:39:27.000000000 +0100
+++ new/hiredis-py-1.0.1/test/reader.py 2019-11-13 11:31:27.000000000 +0100
@@ -156,6 +156,12 @@
     self.reader.feed(b"+\x80value\r\n")
     self.assertEquals("value", self.reader.gets())
 
+  if IS_PY3K:
+    def test_decode_error_with_surrogateescape_errors(self):
+      self.reader = hiredis.Reader(encoding="utf-8", errors="surrogateescape")
+      self.reader.feed(b"+\x80value\r\n")
+      self.assertEquals("\udc80value", self.reader.gets())
+
   def test_invalid_encoding_error_handler(self):
     self.assertRaises(LookupError, hiredis.Reader, errors='unknown')
 


Reply via email to