Sync from SUSE:SLFO:Main python-cffi revision 5cec4d410d2896698d13e1a29f9e52be
This commit is contained in:
@@ -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)
BIN
cffi-1.15.1.tar.gz
(Stored with Git LFS)
Binary file not shown.
BIN
cffi-1.17.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
cffi-1.17.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@@ -1,3 +1,76 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Oct 9 06:36:11 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.17.1:
|
||||||
|
* Fix failing distutils.msvc9compiler imports under Windows (#118).
|
||||||
|
* ffibuilder.emit_python_code() and ffibuiler.emit_c_code()
|
||||||
|
accept file-like objects (#115).
|
||||||
|
* ffiplatform calls are bypassed by ffibuilder.emit_python_code()
|
||||||
|
and ffibuilder.emit_c_code() (#81).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sat Aug 31 12:39:52 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- update to 1.17.0:
|
||||||
|
* Add support for Python 3.13.
|
||||||
|
* In API mode, when you get a function from a C library by writing
|
||||||
|
`fn = lib.myfunc`, you get an object of a special type for
|
||||||
|
performance reasons, instead of a `<cdata 'C-function-type'>`.
|
||||||
|
Before version 1.17 you could only call such objects.
|
||||||
|
You could write `ffi.addressof(lib, "myfunc")` in order to get
|
||||||
|
a real `<cdata>` object, based on the idea that in these cases
|
||||||
|
in C you'd usually write `&myfunc` instead of `myfunc`. In
|
||||||
|
version 1.17, the special object `lib.myfunc` can now be passed
|
||||||
|
in many places where CFFI expects
|
||||||
|
a regular `<cdata>` object. For example, you can now pass
|
||||||
|
it as a callback to a C function call, or write it inside a C
|
||||||
|
structure field of the correct pointer-to-function type, or use
|
||||||
|
`ffi.cast()` or `ffi.typeof()` on it.
|
||||||
|
- drop py313-compat.patch, py313-use-format-unraisable.patch,
|
||||||
|
py313-use-hashpointer.patch (upstream)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jun 30 21:26:53 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add py313-compat.patch
|
||||||
|
py313-use-format-unraisable.patch
|
||||||
|
py313-use-hashpointer.patch: add upstream patches for py3.13
|
||||||
|
support
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 29 09:46:12 UTC 2024 - Dan Čermák <dcermak@suse.com>
|
||||||
|
|
||||||
|
- drop unnecessary buildrequire python-py
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
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>
|
||||||
|
|
||||||
|
- Clean up the SPEC file
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:23:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:23:11 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
@@ -12,7 +85,7 @@ Thu Apr 13 22:40:28 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
|||||||
Fri Jan 6 08:59:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Jan 6 08:59:54 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- add 8a3c2c816d789639b49d3ae867213393ed7abdff.patch to resolve
|
- add 8a3c2c816d789639b49d3ae867213393ed7abdff.patch to resolve
|
||||||
testsuite failures with Python 3.11
|
testsuite failures with Python 3.11
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Dec 5 12:22:40 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
Mon Dec 5 12:22:40 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
@@ -44,7 +117,7 @@ Sat Nov 6 17:37:42 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
|||||||
Fri Jul 16 19:47:06 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Fri Jul 16 19:47:06 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- update to 1.14.6:
|
- update to 1.14.6:
|
||||||
* Revert "grovel: detect :float and :double in the :auto type"
|
* Revert "grovel: detect :float and :double in the :auto type"
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 12 20:15:07 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
Fri Feb 12 20:15:07 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||||
@@ -56,19 +129,19 @@ Fri Feb 12 20:15:07 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
|||||||
Sat Dec 19 10:46:36 UTC 2020 - Dirk Müller <dmueller@suse.com>
|
Sat Dec 19 10:46:36 UTC 2020 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
- update to 1.14.4:
|
- update to 1.14.4:
|
||||||
* no upstream changelog provided
|
* no upstream changelog provided
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 28 11:23:13 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Mon Sep 28 11:23:13 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
- update to 1.14.3:
|
- update to 1.14.3:
|
||||||
* no upstream changelog provided
|
* no upstream changelog provided
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Aug 20 12:13:23 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
Thu Aug 20 12:13:23 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
|
|
||||||
- update to 1.14.2
|
- update to 1.14.2
|
||||||
* CPython 3 on Windows: we again try to compile with Py_LIMITED_API by default
|
* CPython 3 on Windows: we again try to compile with Py_LIMITED_API by default
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Aug 10 08:10:36 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Mon Aug 10 08:10:36 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
@@ -240,7 +313,7 @@ Fri Nov 3 15:56:32 UTC 2017 - arun@gmx.de
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 4 11:36:56 UTC 2017 - sean.marlow@suse.com
|
Wed Oct 4 11:36:56 UTC 2017 - sean.marlow@suse.com
|
||||||
|
|
||||||
- Update pytest in spec to add c directory tests in addition to
|
- Update pytest in spec to add c directory tests in addition to
|
||||||
testing directory.
|
testing directory.
|
||||||
- Omit test_init_once_multithread tests as they rely on multiple
|
- Omit test_init_once_multithread tests as they rely on multiple
|
||||||
threads finishing in a given time. Returns sporadic pass/fail
|
threads finishing in a given time. Returns sporadic pass/fail
|
||||||
@@ -301,7 +374,7 @@ Thu Sep 28 15:00:46 UTC 2017 - sean.marlow@suse.com
|
|||||||
I just noticed, but pycparser always supported the preprocessor
|
I just noticed, but pycparser always supported the preprocessor
|
||||||
directive # 42 "foo.h" to mean “from the next line, we’re in
|
directive # 42 "foo.h" to mean “from the next line, we’re in
|
||||||
file foo.h starting from line 42”, which it puts in the error
|
file foo.h starting from line 42”, which it puts in the error
|
||||||
messages.
|
messages.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jun 29 16:03:46 UTC 2017 - tbechtold@suse.com
|
Thu Jun 29 16:03:46 UTC 2017 - tbechtold@suse.com
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-cffi
|
# spec file for package python-cffi
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -16,22 +16,20 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-cffi
|
Name: python-cffi
|
||||||
Version: 1.15.1
|
Version: 1.17.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Foreign Function Interface for Python calling C code
|
Summary: Foreign Function Interface for Python calling C code
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://cffi.readthedocs.org
|
URL: https://cffi.readthedocs.org
|
||||||
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/c/cffi/cffi-%{version}.tar.gz
|
||||||
Source1: python-cffi-rpmlintrc
|
Source1: python-cffi-rpmlintrc
|
||||||
Patch1: https://foss.heptapod.net/pypy/cffi/-/commit/8a3c2c816d789639b49d3ae867213393ed7abdff.patch
|
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pycparser}
|
BuildRequires: %{python_module pycparser}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module py}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: %{python_module setuptools}
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
@@ -49,18 +47,20 @@ is to provide a convenient and reliable way of calling C code from Python.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pytest_arch -W ignore::UserWarning c/ testing/
|
%pytest_arch -W ignore::UserWarning src/c/ testing/
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md doc/source/*.rst doc/misc/*.rst
|
%doc README.md doc/source/*.rst doc/misc/*.rst
|
||||||
%{python_sitearch}/*
|
%{python_sitearch}/cffi
|
||||||
|
%{python_sitearch}/_cffi_backend.*.so
|
||||||
|
%{python_sitearch}/cffi-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user