Hello community,

here is the log from the commit of package python-backports.os for 
openSUSE:Factory checked in at 2019-04-04 14:12:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-backports.os (Old)
 and      /work/SRC/openSUSE:Factory/.python-backports.os.new.3908 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-backports.os"

Thu Apr  4 14:12:55 2019 rev:2 rq:691265 version:0.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-backports.os/python-backports.os.changes  
2019-01-28 20:49:16.497852636 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-backports.os.new.3908/python-backports.os.changes
        2019-04-04 14:12:56.713314444 +0200
@@ -1,0 +2,10 @@
+Wed Apr  3 14:16:42 UTC 2019 - John Vandenberg <jay...@gmail.com>
+
+- Use devendor-pyutf8.patch to de-vendor pyutf8
+
+-------------------------------------------------------------------
+Tue Apr  2 02:48:16 UTC 2019 - John Vandenberg <jay...@gmail.com>
+
+- Fix test invocation as tests were not running
+
+-------------------------------------------------------------------

New:
----
  devendor-pyutf8.patch

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

Other differences:
------------------
++++++ python-backports.os.spec ++++++
--- /var/tmp/diff_new_pack.OQvUTL/_old  2019-04-04 14:12:57.661314900 +0200
+++ /var/tmp/diff_new_pack.OQvUTL/_new  2019-04-04 14:12:57.665314902 +0200
@@ -26,14 +26,18 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/pjdelport/backports.os
 Source:         
https://files.pythonhosted.org/packages/source/b/backports.os/backports.os-%{version}.tar.gz
+Patch0:         devendor-pyutf8.patch
 BuildRequires:  %{python_module backports}
 BuildRequires:  %{python_module future}
+BuildRequires:  %{python_module hypothesis}
+BuildRequires:  %{python_module pyutf8 >= 0.1.1}
 BuildRequires:  %{python_module setuptools_scm}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
 Requires:       python-backports
 Requires:       python-future
+Requires:       python-pyutf8 >= 0.1.1
 BuildArch:      noarch
 %python_subpackages
 
@@ -43,6 +47,7 @@
 
 %prep
 %setup -q -n backports.os-%{version}
+touch tests/__init__.py
 
 %build
 %python_build
@@ -54,12 +59,11 @@
 %python_expand %fdupes %{buildroot}%{$python_sitelib}
 
 %check
-%python_exec setup.py test
+%python_exec setup.py test --test-suite=tests
 
 %files %{python_files}
 %doc README.rst
 %license LICENSE
 %{python_sitelib}/*
 
-
 %changelog

++++++ devendor-pyutf8.patch ++++++
diff -ur backports.os-0.1.1-orig/setup.py backports.os-0.1.1/setup.py
--- backports.os-0.1.1-orig/setup.py    2017-09-18 03:33:53.000000000 +0700
+++ backports.os-0.1.1/setup.py 2019-04-03 16:45:31.527323311 +0700
@@ -11,6 +11,7 @@
 # Backward-compatibility dependencies for Python 2
 _python2_requires = [
     'future',  # For backport of surrogateescape
+    'pyutf8 >= 0.1.1',  # De-vendor
 ] if sys.version_info < (3,) else []
 
 
diff -ur backports.os-0.1.1-orig/src/backports/os.py 
backports.os-0.1.1/src/backports/os.py
--- backports.os-0.1.1-orig/src/backports/os.py 2017-09-21 01:39:07.000000000 
+0700
+++ backports.os-0.1.1/src/backports/os.py      2019-04-03 16:48:25.460954708 
+0700
@@ -19,67 +19,7 @@
     from future.utils.surrogateescape import register_surrogateescape
     register_surrogateescape()
 
-
-# XXX backport: This invalid_utf8_indexes() helper is shamelessly copied from
-# Bob Ippolito's pyutf8 package (pyutf8/ref.py), in order to help support the
-# Python 2 UTF-8 decoding hack in fsdecode() below.
-#
-# URL: https://github.com/etrepum/pyutf8/blob/master/pyutf8/ref.py
-#
-def _invalid_utf8_indexes(bytes):
-    skips = []
-    i = 0
-    len_bytes = len(bytes)
-    while i < len_bytes:
-        c1 = bytes[i]
-        if c1 < 0x80:
-            # U+0000 - U+007F - 7 bits
-            i += 1
-            continue
-        try:
-            c2 = bytes[i + 1]
-            if ((c1 & 0xE0 == 0xC0) and (c2 & 0xC0 == 0x80)):
-                # U+0080 - U+07FF - 11 bits
-                c = (((c1 & 0x1F) << 6) |
-                     (c2 & 0x3F))
-                if c < 0x80:
-                    # Overlong encoding
-                    skips.extend([i, i + 1])
-                i += 2
-                continue
-            c3 = bytes[i + 2]
-            if ((c1 & 0xF0 == 0xE0) and
-                (c2 & 0xC0 == 0x80) and
-                (c3 & 0xC0 == 0x80)):
-                # U+0800 - U+FFFF - 16 bits
-                c = (((((c1 & 0x0F) << 6) |
-                       (c2 & 0x3F)) << 6) |
-                     (c3 & 0x3f))
-                if ((c < 0x800) or (0xD800 <= c <= 0xDFFF)):
-                    # Overlong encoding or surrogate.
-                    skips.extend([i, i + 1, i + 2])
-                i += 3
-                continue
-            c4 = bytes[i + 3]
-            if ((c1 & 0xF8 == 0xF0) and
-                (c2 & 0xC0 == 0x80) and
-                (c3 & 0xC0 == 0x80) and
-                (c4 & 0xC0 == 0x80)):
-                # U+10000 - U+10FFFF - 21 bits
-                c = (((((((c1 & 0x0F) << 6) |
-                         (c2 & 0x3F)) << 6) |
-                       (c3 & 0x3F)) << 6) |
-                     (c4 & 0x3F))
-                if (c < 0x10000) or (c > 0x10FFFF):
-                    # Overlong encoding or invalid code point.
-                    skips.extend([i, i + 1, i + 2, i + 3])
-                i += 4
-                continue
-        except IndexError:
-            pass
-        skips.append(i)
-        i += 1
-    return skips
+from pyutf8.ref import invalid_utf8_indexes as _invalid_utf8_indexes
 
 
 # XXX backport: Another helper to support the Python 2 UTF-8 decoding hack.

Reply via email to