#15 Backport python-cffi 1.15.0 back to Fedora 35
Merged a year ago by churchyard. Opened a year ago by mhayden.
rpms/ mhayden/python-cffi f35  into  f35

@@ -0,0 +1,106 @@ 

+ From 871bae572cafc3afb81eb13705945f0a6f708d54 Mon Sep 17 00:00:00 2001

+ From: Armin Rigo <arigo@tunes.org>

+ Date: Tue, 1 Feb 2022 08:00:11 +0100

+ Subject: [PATCH] =?UTF-8?q?apply=20patch=20from=20Tom=C3=A1=C5=A1=20on=20P?=

+  =?UTF-8?q?R=20111?=

+ MIME-Version: 1.0

+ Content-Type: text/plain; charset=UTF-8

+ Content-Transfer-Encoding: 8bit

+ 

+ --HG--

+ branch : adapt-tests-for-python3.11

+ ---

+  c/test_c.py | 47 ++++++++++++++++++++++++++++++++++++++++++++++-

+  1 file changed, 46 insertions(+), 1 deletion(-)

+ 

+ diff --git a/c/test_c.py b/c/test_c.py

+ index 654584d9..906eb074 100644

+ --- a/c/test_c.py

+ +++ b/c/test_c.py

+ @@ -1331,9 +1331,11 @@ def test_callback_exception():

+      except ImportError:

+          import io as cStringIO    # Python 3

+      import linecache

+ -    def matches(istr, ipattern, ipattern38):

+ +    def matches(istr, ipattern, ipattern38, ipattern311):

+          if sys.version_info >= (3, 8):

+              ipattern = ipattern38

+ +        if sys.version_info >= (3, 11):

+ +            ipattern = ipattern311

+          str, pattern = istr, ipattern

+          while '$' in pattern:

+              i = pattern.index('$')

+ @@ -1387,6 +1389,16 @@ Traceback (most recent call last):

+    File "$", line $, in check_value

+      $

+  ValueError: 42

+ +""", """\

+ +Exception ignored from cffi callback <function$Zcb1 at 0x$>:

+ +Traceback (most recent call last):

+ +  File "$", line $, in Zcb1

+ +    $

+ +    $

+ +  File "$", line $, in check_value

+ +    $

+ +    $

+ +ValueError: 42

+  """)

+          sys.stderr = cStringIO.StringIO()

+          bigvalue = 20000

+ @@ -1401,6 +1413,13 @@ Traceback (most recent call last):

+    File "$", line $, in test_callback_exception

+      $

+  OverflowError: integer 60000 does not fit 'short'

+ +""", """\

+ +Exception ignored from cffi callback <function$Zcb1 at 0x$>, trying to convert the result back to C:

+ +Traceback (most recent call last):

+ +  File "$", line $, in test_callback_exception

+ +    $

+ +    $

+ +OverflowError: integer 60000 does not fit 'short'

+  """)

+          sys.stderr = cStringIO.StringIO()

+          bigvalue = 20000

+ @@ -1449,6 +1468,19 @@ Traceback (most recent call last):

+    File "$", line $, in test_callback_exception

+      $

+  TypeError: $integer$

+ +""", """\

+ +Exception ignored from cffi callback <function$Zcb1 at 0x$>, trying to convert the result back to C:

+ +Traceback (most recent call last):

+ +  File "$", line $, in test_callback_exception

+ +    $

+ +    $

+ +OverflowError: integer 60000 does not fit 'short'

+ +Exception ignored during handling of the above exception by 'onerror':

+ +Traceback (most recent call last):

+ +  File "$", line $, in test_callback_exception

+ +    $

+ +    $

+ +TypeError: $integer$

+  """)

+          #

+          sys.stderr = cStringIO.StringIO()

+ @@ -1478,6 +1510,19 @@ Traceback (most recent call last):

+    File "$", line $, in oops

+      $

+  AttributeError: 'str' object has no attribute 'append$

+ +""", """\

+ +Exception ignored from cffi callback <function$Zcb1 at 0x$>, trying to convert the result back to C:

+ +Traceback (most recent call last):

+ +  File "$", line $, in test_callback_exception

+ +    $

+ +    $

+ +OverflowError: integer 60000 does not fit 'short'

+ +Exception ignored during handling of the above exception by 'onerror':

+ +Traceback (most recent call last):

+ +  File "$", line $, in oops

+ +    $

+ +    $

+ +AttributeError: 'str' object has no attribute 'append$

+  """)

+      finally:

+          sys.stderr = orig_stderr

+ -- 

+ GitLab

+ 

file modified
+24 -4
@@ -1,10 +1,12 @@ 

  Name:           python-cffi

- Version:        1.14.6

- Release:        2%{?dist}

+ %global general_version 1.15.0

+ Version:        %{general_version}%{?prerel:~%{prerel}}

+ Release:        4%{?dist}

  Summary:        Foreign Function Interface for Python to call C code

  License:        MIT

  URL:            https://cffi.readthedocs.org/

  Source0:        %{pypi_source cffi}

+ Patch1:         https://foss.heptapod.net/pypy/cffi/-/commit/871bae572cafc3afb81eb13705945f0a6f708d54.patch

  

  BuildRequires: make

  BuildRequires:  libffi-devel
@@ -42,7 +44,7 @@ 

  Documentation for CFFI, the Foreign Function Interface for Python.

  

  %prep

- %autosetup -p1 -n cffi-%{version}

+ %autosetup -p1 -n cffi-%{general_version}%{?prerel}

  

  %build

  %py3_build
@@ -62,12 +64,30 @@ 

  %license LICENSE

  %{python3_sitearch}/cffi/

  %{python3_sitearch}/_cffi_backend.*.so

- %{python3_sitearch}/cffi-%{version}-py%{python3_version}.egg-info/

+ %{python3_sitearch}/cffi-%{general_version}%{?prerel}-py%{python3_version}.egg-info/

  

  %files doc

  %doc doc/build/html

  

  %changelog

+ * Wed Feb 02 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.15.0-4

+ - Backport patch to fix compatibility with Python 3.11

+ - Fixes: rhbz#2040165

+ 

+ * Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-3

+ - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

+ 

+ * Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 1.15.0-2

+ - Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34

+ 

+ * Tue Dec 21 2021 Lumír Balhar <lbalhar@redhat.com> - 1.15.0-1

+ - Update to 1.15.0

+ Resolves: rhbz#2013760

+ 

+ * Thu Oct 07 2021 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.15.0~rc2-1

+ - Update to 1.15.0rc2

+ Resolves: rhbz#2007006

+ 

  * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.6-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (cffi-1.14.6.tar.gz) = 30a8b25b74921a90a1fa96d05de1f25437d0fbbf73b7de0bb9ce22dfcaccbd78376b605525fe970212221d3e598357a9b1da420bfbd1a3e513263ed2b789e813

+ SHA512 (cffi-1.15.0.tar.gz) = ee83efde6f77f4a0c5889088c4c208ed7b9071fe06dfc16a8d2396de07f78fe859e1e39866760198a9d700f3b7359e8715e8a3e4907feb81d3fc4b8dd0dbaca1

azure-cli 2.33.0 now requires cffi >= 1.15.0. Would it be possible to backport this version to Fedora 35?

This failed:

asv
azure-cli
bodhi
copr-backend
copr-dist-git
cura
gerbera
noggin
paraview
python-cryptography
python-fasjson-client
python-glanceclient
python-inspyred
python-notebook
python-numpoly
python-oauthlib
python-octaviaclient
python-oletools
python-rpmautospec
python-uvicorn
sagemath

I've resubmitted all of them to rule out flaky results.

paraview will time out. The rest has failed in the control copr. We can ship this.

Pull-Request has been merged by churchyard

a year ago