Hello community,

here is the log from the commit of package python-cffi for openSUSE:Factory 
checked in at 2018-01-20 11:20:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-cffi (Old)
 and      /work/SRC/openSUSE:Factory/.python-cffi.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-cffi"

Sat Jan 20 11:20:12 2018 rev:19 rq:567429 version:1.11.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-cffi/python-cffi.changes  2017-11-12 
18:00:51.368075777 +0100
+++ /work/SRC/openSUSE:Factory/.python-cffi.new/python-cffi.changes     
2018-01-20 11:20:18.782324222 +0100
@@ -1,0 +2,6 @@
+Thu Jan 18 13:35:08 UTC 2018 - [email protected]
+
+- Add patch cffi-loader.patch to fix bsc#1070737
+- Sort out with spec-cleaner
+
+-------------------------------------------------------------------

New:
----
  cffi-loader.patch

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

Other differences:
------------------
++++++ python-cffi.spec ++++++
--- /var/tmp/diff_new_pack.hGqnH9/_old  2018-01-20 11:20:19.918271116 +0100
+++ /var/tmp/diff_new_pack.hGqnH9/_new  2018-01-20 11:20:19.922270928 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-cffi
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -25,19 +25,18 @@
 License:        MIT
 Group:          Development/Languages/Python
 Url:            http://%{modname}.readthedocs.org
-Source0:        
https://files.pythonhosted.org/packages/source/c/%{modname}/%{modname}-%{version}.tar.gz
+Source0:        
https://files.pythonhosted.org/packages/source/c/cffi/%{modname}-%{version}.tar.gz
 Source1:        python-cffi-rpmlintrc
+Patch0:         cffi-loader.patch
 BuildRequires:  %{python_module devel}
+BuildRequires:  %{python_module pycparser}
+BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  gcc-c++
+BuildRequires:  pkgconfig
 BuildRequires:  python-rpm-macros
-# Documentation requirements:
-BuildRequires:  %{python_module pycparser}
-BuildRequires:  %{python_module pytest}
-Requires:       python-pycparser
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  pkgconfig(libffi)
-
+Requires:       python-pycparser
 %python_subpackages
 
 %description
@@ -46,6 +45,7 @@
 
 %prep
 %setup -q -n %{modname}-%{version}
+%patch0 -p1
 
 %build
 export CFLAGS="%{optflags}"
@@ -58,7 +58,6 @@
 %python_expand PYTHONPATH=%{buildroot}%{$python_sitearch} 
py.test-%$python_bin_suffix -k "not test_init_once_multithread" c/ testing/
 
 %files %{python_files}
-%defattr(-,root,root,-)
 %doc LICENSE
 %{python_sitearch}/*
 

++++++ cffi-loader.patch ++++++
# HG changeset patch
# User Armin Rigo <[email protected]>
# Date 1515619092 -3600
# Node ID d16706e3c2da4ff29729c312b96af5cc251f82c4
# Parent  a570b34ac8a60becdbc4a3404c737d03b4691353
Issue #352

Oops.

diff --git a/c/lib_obj.c b/c/lib_obj.c
--- a/c/lib_obj.c
+++ b/c/lib_obj.c
@@ -505,6 +505,7 @@
     return x;
 
  missing:
+    /*** ATTRIBUTEERROR IS SET HERE ***/
     p = PyText_AsUTF8(name);
     if (p == NULL)
         return NULL;
@@ -534,6 +535,7 @@
 #if PY_MAJOR_VERSION >= 3
     if (strcmp(p, "__loader__") == 0 || strcmp(p, "__spec__") == 0) {
         /* some more module-like behavior hacks */
+        PyErr_Clear();
         Py_INCREF(Py_None);
         return Py_None;
     }
diff --git a/testing/cffi1/test_recompiler.py b/testing/cffi1/test_recompiler.py
--- a/testing/cffi1/test_recompiler.py
+++ b/testing/cffi1/test_recompiler.py
@@ -2287,3 +2287,13 @@
 
 def test_char16_char32_plain_c():
     test_char16_char32_type(no_cpp=True)
+
+def test_loader_spec():
+    ffi = FFI()
+    lib = verify(ffi, "test_loader_spec", "")
+    if sys.version_info < (3,):
+        assert not hasattr(lib, '__loader__')
+        assert not hasattr(lib, '__spec__')
+    else:
+        assert lib.__loader__ is None
+        assert lib.__spec__ is None

Reply via email to