- Upgrade to 1.16.0:

- Add support for Python 3.12. With the removal of distutils
    from Python 3.12, projects using CFFI features that depend on
    distutils at runtime must add a dependency on setuptools to
    function under Python 3.12+. CFFI does not declare a runtime
    setuptools requirement to avoid an unnecessary dependency for
    projects that do not require it.
  - Drop support for end-of-life Python versions (2.7, 3.6, 3.7).
  - Move project source under src/; a more standard layout that
    also enables CI to more easily catch packaging errors.
  - Move project home to python-cffi/cffi on GitHub.
  - Add support for PEP517 builds; setuptools is now a required
    build dependency.
  - Declare python_requires metadata for Python 3.8+. This allows
    unsupported Pythons to continue using previously released
    sdists and wheels.
  - Add missing calls to PyObject_GC_UnTrack to avoid
    ResourceWarning 15c4b71
- Remove upstreamed patch
  8a3c2c816d789639b49d3ae867213393ed7abdff.patch

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=92
This commit is contained in:
Matej Cepl 2023-10-06 16:35:58 +00:00 committed by Git OBS Bridge
parent ce4a4ca5a2
commit b5d4b45b53
5 changed files with 28 additions and 100 deletions

View File

@ -1,95 +0,0 @@
From 8a3c2c816d789639b49d3ae867213393ed7abdff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Fri, 15 Jul 2022 16:11:37 +0200
Subject: [PATCH] Adjust tests for a last minute Python 3.11 change in the
traceback format
See https://github.com/python/cpython/issues/93883
and https://github.com/python/cpython/pull/93994
--HG--
branch : python3.11.0b4
---
c/test_c.py | 35 ++---------------------------------
1 file changed, 2 insertions(+), 33 deletions(-)
diff --git a/c/test_c.py b/c/test_c.py
index cde83b80..048711c7 100644
--- a/c/test_c.py
+++ b/c/test_c.py
@@ -1342,11 +1342,11 @@ def test_callback_exception():
except ImportError:
import io as cStringIO # Python 3
import linecache
- def matches(istr, ipattern, ipattern38, ipattern311):
+ def matches(istr, ipattern, ipattern38, ipattern311=None):
if sys.version_info >= (3, 8):
ipattern = ipattern38
if sys.version_info >= (3, 11):
- ipattern = ipattern311
+ ipattern = ipattern311 or ipattern38
str, pattern = istr, ipattern
while '$' in pattern:
i = pattern.index('$')
@@ -1400,16 +1400,6 @@ 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
@@ -1424,13 +1414,6 @@ 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
@@ -1479,19 +1462,6 @@ 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()
@@ -1526,7 +1496,6 @@ Exception ignored from cffi callback <function$Zcb1 at 0x$>, trying to convert t
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):
--
GitLab

BIN
cffi-1.15.1.tar.gz (Stored with Git LFS)

Binary file not shown.

3
cffi-1.16.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0
size 512873

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Fri Oct 6 16:25:24 UTC 2023 - Matej Cepl <mcepl@cepl.eu>
- Upgrade to 1.16.0:
- Add support for Python 3.12. With the removal of distutils
from Python 3.12, projects using CFFI features that depend on
distutils at runtime must add a dependency on setuptools to
function under Python 3.12+. CFFI does not declare a runtime
setuptools requirement to avoid an unnecessary dependency for
projects that do not require it.
- Drop support for end-of-life Python versions (2.7, 3.6, 3.7).
- Move project source under src/; a more standard layout that
also enables CI to more easily catch packaging errors.
- Move project home to python-cffi/cffi on GitHub.
- Add support for PEP517 builds; setuptools is now a required
build dependency.
- Declare python_requires metadata for Python 3.8+. This allows
unsupported Pythons to continue using previously released
sdists and wheels.
- Add missing calls to PyObject_GC_UnTrack to avoid
ResourceWarning 15c4b71
- Remove upstreamed patch
8a3c2c816d789639b49d3ae867213393ed7abdff.patch
-------------------------------------------------------------------
Fri Oct 6 07:10:11 UTC 2023 - Matej Cepl <mcepl@cepl.eu>

View File

@ -18,14 +18,13 @@
%{?sle15_python_module_pythons}
Name: python-cffi
Version: 1.15.1
Version: 1.16.0
Release: 0
Summary: Foreign Function Interface for Python calling C code
License: MIT
URL: https://cffi.readthedocs.org
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
Source1: python-cffi-rpmlintrc
Patch1: https://foss.heptapod.net/pypy/cffi/-/commit/8a3c2c816d789639b49d3ae867213393ed7abdff.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pycparser}