Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-cffi for openSUSE:Factory checked in at 2021-07-21 19:05:26 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-cffi (Old) and /work/SRC/openSUSE:Factory/.python-cffi.new.2632 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-cffi" Wed Jul 21 19:05:26 2021 rev:36 rq:906722 version:1.14.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-cffi/python-cffi.changes 2021-02-16 22:34:03.497461613 +0100 +++ /work/SRC/openSUSE:Factory/.python-cffi.new.2632/python-cffi.changes 2021-07-21 19:05:27.351195131 +0200 @@ -1,0 +2,6 @@ +Fri Jul 16 19:47:06 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 1.14.6: + * Revert "grovel: detect :float and :double in the :auto type" + +------------------------------------------------------------------- Old: ---- cffi-1.14.5.tar.gz New: ---- cffi-1.14.6.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-cffi.spec ++++++ --- /var/tmp/diff_new_pack.p8OtIB/_old 2021-07-21 19:05:27.919196118 +0200 +++ /var/tmp/diff_new_pack.p8OtIB/_new 2021-07-21 19:05:27.919196118 +0200 @@ -18,7 +18,7 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-cffi -Version: 1.14.5 +Version: 1.14.6 Release: 0 Summary: Foreign Function Interface for Python calling C code License: MIT ++++++ cffi-1.14.5.tar.gz -> cffi-1.14.6.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/PKG-INFO new/cffi-1.14.6/PKG-INFO --- old/cffi-1.14.5/PKG-INFO 2021-02-11 20:54:42.634946800 +0100 +++ new/cffi-1.14.6/PKG-INFO 2021-07-09 04:24:26.348591000 +0200 @@ -1,23 +1,11 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: cffi -Version: 1.14.5 +Version: 1.14.6 Summary: Foreign Function Interface for Python calling C code. Home-page: http://cffi.readthedocs.org Author: Armin Rigo, Maciej Fijalkowski Author-email: python-c...@googlegroups.com License: MIT -Description: - CFFI - ==== - - Foreign Function Interface for Python calling C code. - Please see the `Documentation <http://cffi.readthedocs.org/>`_. - - Contact - ------- - - `Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_ - Platform: UNKNOWN Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 @@ -32,3 +20,18 @@ Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: License :: OSI Approved :: MIT License +License-File: LICENSE + + +CFFI +==== + +Foreign Function Interface for Python calling C code. +Please see the `Documentation <http://cffi.readthedocs.org/>`_. + +Contact +------- + +`Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_ + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/c/_cffi_backend.c new/cffi-1.14.6/c/_cffi_backend.c --- old/cffi-1.14.5/c/_cffi_backend.c 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/c/_cffi_backend.c 2021-07-09 04:24:19.000000000 +0200 @@ -2,7 +2,7 @@ #include <Python.h> #include "structmember.h" -#define CFFI_VERSION "1.14.5" +#define CFFI_VERSION "1.14.6" #ifdef MS_WIN32 #include <windows.h> @@ -180,6 +180,10 @@ # define Py_SET_REFCNT(obj, val) (Py_REFCNT(obj) = (val)) #endif +#if PY_VERSION_HEX >= 0x03080000 +# define USE_WRITEUNRAISABLEMSG +#endif + /************************************************************/ /* base type flag: exactly one of the following: */ @@ -4516,14 +4520,18 @@ if (PyUnicode_Check(s)) { s = PyUnicode_AsUTF8String(s); - if (s == NULL) + if (s == NULL) { + PyMem_Free(filename_or_null); return NULL; + } *p_temp = s; } #endif *p_printable_filename = PyText_AsUTF8(s); - if (*p_printable_filename == NULL) + if (*p_printable_filename == NULL) { + PyMem_Free(filename_or_null); return NULL; + } } if ((flags & (RTLD_NOW | RTLD_LAZY)) == 0) flags |= RTLD_NOW; @@ -4536,6 +4544,7 @@ #endif handle = dlopen(filename_or_null, flags); + PyMem_Free(filename_or_null); #ifdef MS_WIN32 got_handle: @@ -5849,7 +5858,7 @@ char *buffer; cif_description_t *cif_descr; struct funcbuilder_s funcbuffer; - ffi_status status = -1; + ffi_status status = (ffi_status)-1; funcbuffer.nb_bytes = 0; funcbuffer.bufferp = NULL; @@ -5884,7 +5893,7 @@ } #endif - if (status == -1) { + if (status == (ffi_status)-1) { status = ffi_prep_cif(&cif_descr->cif, fabi, funcbuffer.nargs, funcbuffer.rtype, funcbuffer.atypes); } @@ -6061,6 +6070,43 @@ char *extra_error_line) { /* like PyErr_WriteUnraisable(), but write a full traceback */ +#ifdef USE_WRITEUNRAISABLEMSG + + /* PyErr_WriteUnraisable actually writes the full traceback anyway + from Python 3.4, but we can't really get the formatting of the + custom text to be what we want. We can do better from Python + 3.8 by calling the new _PyErr_WriteUnraisableMsg(). + Luckily it's also Python 3.8 that adds new functionality that + people might want: the new sys.unraisablehook(). + */ + PyObject *s; + int first_char; + assert(objdescr != NULL && objdescr[0] != 0); /* non-empty */ + first_char = objdescr[0]; + if (first_char >= 'A' && first_char <= 'Z') + first_char += 'a' - 'A'; /* lower() the very first character */ + if (extra_error_line == NULL) + extra_error_line = ""; + + if (obj != NULL) + s = PyUnicode_FromFormat("%c%s%R%s", + first_char, objdescr + 1, obj, extra_error_line); + else + s = PyUnicode_FromFormat("%c%s%s", + first_char, objdescr + 1, extra_error_line); + + PyErr_Restore(t, v, tb); + if (s != NULL) { + _PyErr_WriteUnraisableMsg(PyText_AS_UTF8(s), NULL); + Py_DECREF(s); + } + else + PyErr_WriteUnraisable(obj); /* best effort */ + PyErr_Clear(); + +#else + + /* version for Python 2.7 and < 3.8 */ PyObject *f; #if PY_MAJOR_VERSION >= 3 /* jump through hoops to ensure the tb is attached to v, on Python 3 */ @@ -6085,6 +6131,8 @@ Py_XDECREF(t); Py_XDECREF(v); Py_XDECREF(tb); + +#endif } static void general_invoke_callback(int decode_args_from_libffi, @@ -6134,7 +6182,11 @@ goto error; if (convert_from_object_fficallback(result, SIGNATURE(1), py_res, decode_args_from_libffi) < 0) { +#ifdef USE_WRITEUNRAISABLEMSG + extra_error_line = ", trying to convert the result back to C"; +#else extra_error_line = "Trying to convert the result back to C:\n"; +#endif goto error; } done: @@ -6186,10 +6238,16 @@ _my_PyErr_WriteUnraisable(exc1, val1, tb1, "From cffi callback ", py_ob, extra_error_line); +#ifdef USE_WRITEUNRAISABLEMSG + _my_PyErr_WriteUnraisable(exc2, val2, tb2, + "during handling of the above exception by 'onerror'", + NULL, NULL); +#else extra_error_line = ("\nDuring the call to 'onerror', " "another exception occurred:\n\n"); _my_PyErr_WriteUnraisable(exc2, val2, tb2, NULL, NULL, extra_error_line); +#endif _cffi_stop_error_capture(ecap); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/c/ffi_obj.c new/cffi-1.14.6/c/ffi_obj.c --- old/cffi-1.14.5/c/ffi_obj.c 2021-02-05 01:53:47.000000000 +0100 +++ new/cffi-1.14.6/c/ffi_obj.c 2021-07-09 04:24:19.000000000 +0200 @@ -1070,10 +1070,10 @@ if (res != NULL) { tup = PyTuple_Pack(2, Py_True, res); if (tup == NULL || PyDict_SetItem(cache, tag, tup) < 0) { - Py_XDECREF(tup); Py_DECREF(res); res = NULL; } + Py_XDECREF(tup); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/c/test_c.py new/cffi-1.14.6/c/test_c.py --- old/cffi-1.14.5/c/test_c.py 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/c/test_c.py 2021-07-09 04:24:19.000000000 +0200 @@ -17,7 +17,7 @@ # ____________________________________________________________ import sys -assert __version__ == "1.14.5", ("This test_c.py file is for testing a version" +assert __version__ == "1.14.6", ("This test_c.py file is for testing a version" " of cffi that differs from the one that we" " get from 'import _cffi_backend'") if sys.version_info < (3,): @@ -1331,7 +1331,9 @@ except ImportError: import io as cStringIO # Python 3 import linecache - def matches(istr, ipattern): + def matches(istr, ipattern, ipattern38): + if sys.version_info >= (3, 8): + ipattern = ipattern38 str, pattern = istr, ipattern while '$' in pattern: i = pattern.index('$') @@ -1364,6 +1366,8 @@ try: linecache.getline = lambda *args: 'LINE' # hack: speed up PyPy tests sys.stderr = cStringIO.StringIO() + if hasattr(sys, '__unraisablehook__'): # work around pytest + sys.unraisablehook = sys.__unraisablehook__ # on recent CPythons assert f(100) == 300 assert sys.stderr.getvalue() == '' assert f(10000) == -42 @@ -1375,6 +1379,14 @@ 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 @@ -1383,6 +1395,12 @@ From cffi callback <function$Zcb1 at 0x$>: Trying to convert the result back to C: 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 @@ -1420,11 +1438,24 @@ During the call to 'onerror', another exception occurred: 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() seen = "not a list" # this makes the oops() function crash assert ff(bigvalue) == -42 + # the $ after the AttributeError message are for the suggestions that + # will be added in Python 3.10 assert matches(sys.stderr.getvalue(), """\ From cffi callback <function$Zcb1 at 0x$>: Trying to convert the result back to C: @@ -1435,7 +1466,18 @@ Traceback (most recent call last): File "$", line $, in oops $ -AttributeError: 'str' object has no attribute 'append' +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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/cffi/__init__.py new/cffi-1.14.6/cffi/__init__.py --- old/cffi-1.14.5/cffi/__init__.py 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/cffi/__init__.py 2021-07-09 04:24:19.000000000 +0200 @@ -5,8 +5,8 @@ from .error import CDefError, FFIError, VerificationError, VerificationMissing from .error import PkgConfigError -__version__ = "1.14.5" -__version_info__ = (1, 14, 5) +__version__ = "1.14.6" +__version_info__ = (1, 14, 6) # The verifier module file names are based on the CRC32 of a string that # contains the following version number. It may be older than __version__ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/cffi/_cffi_errors.h new/cffi-1.14.6/cffi/_cffi_errors.h --- old/cffi-1.14.5/cffi/_cffi_errors.h 2021-02-05 00:50:00.000000000 +0100 +++ new/cffi-1.14.6/cffi/_cffi_errors.h 2021-07-09 04:24:19.000000000 +0200 @@ -54,6 +54,8 @@ " of.write(x)\n" " except: pass\n" " self.buf += x\n" + " def flush(self):\n" + " pass\n" "fl = FileLike()\n" "fl.buf = ''\n" "of = sys.stderr\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/cffi/_embedding.h new/cffi-1.14.6/cffi/_embedding.h --- old/cffi-1.14.5/cffi/_embedding.h 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/cffi/_embedding.h 2021-07-09 04:24:19.000000000 +0200 @@ -224,7 +224,7 @@ if (f != NULL && f != Py_None) { PyFile_WriteString("\nFrom: " _CFFI_MODULE_NAME - "\ncompiled with cffi version: 1.14.5" + "\ncompiled with cffi version: 1.14.6" "\n_cffi_backend module: ", f); modules = PyImport_GetModuleDict(); mod = PyDict_GetItemString(modules, "_cffi_backend"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/cffi/verifier.py new/cffi-1.14.6/cffi/verifier.py --- old/cffi-1.14.5/cffi/verifier.py 2021-02-05 00:50:00.000000000 +0100 +++ new/cffi-1.14.6/cffi/verifier.py 2021-07-09 04:24:19.000000000 +0200 @@ -50,7 +50,8 @@ if tag: raise TypeError("can't specify both 'modulename' and 'tag'") else: - key = '\x00'.join([sys.version[:3], __version_verifier_modules__, + key = '\x00'.join(['%d.%d' % sys.version_info[:2], + __version_verifier_modules__, preamble, flattened_kwds] + ffi._cdefsources) if sys.version_info >= (3,): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/cffi.egg-info/PKG-INFO new/cffi-1.14.6/cffi.egg-info/PKG-INFO --- old/cffi-1.14.5/cffi.egg-info/PKG-INFO 2021-02-11 20:54:42.000000000 +0100 +++ new/cffi-1.14.6/cffi.egg-info/PKG-INFO 2021-07-09 04:24:26.000000000 +0200 @@ -1,23 +1,11 @@ -Metadata-Version: 1.1 +Metadata-Version: 2.1 Name: cffi -Version: 1.14.5 +Version: 1.14.6 Summary: Foreign Function Interface for Python calling C code. Home-page: http://cffi.readthedocs.org Author: Armin Rigo, Maciej Fijalkowski Author-email: python-c...@googlegroups.com License: MIT -Description: - CFFI - ==== - - Foreign Function Interface for Python calling C code. - Please see the `Documentation <http://cffi.readthedocs.org/>`_. - - Contact - ------- - - `Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_ - Platform: UNKNOWN Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 @@ -32,3 +20,18 @@ Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: License :: OSI Approved :: MIT License +License-File: LICENSE + + +CFFI +==== + +Foreign Function Interface for Python calling C code. +Please see the `Documentation <http://cffi.readthedocs.org/>`_. + +Contact +------- + +`Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_ + + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/doc/source/conf.py new/cffi-1.14.6/doc/source/conf.py --- old/cffi-1.14.5/doc/source/conf.py 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/doc/source/conf.py 2021-07-09 04:24:19.000000000 +0200 @@ -47,7 +47,7 @@ # The short X.Y version. version = '1.14' # The full version, including alpha/beta/rc tags. -release = '1.14.5' +release = '1.14.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/doc/source/goals.rst new/cffi-1.14.6/doc/source/goals.rst --- old/cffi-1.14.5/doc/source/goals.rst 2021-02-05 01:53:47.000000000 +0100 +++ new/cffi-1.14.6/doc/source/goals.rst 2021-07-09 04:24:19.000000000 +0200 @@ -55,8 +55,8 @@ Comments and bugs ----------------- -The best way to contact us is on the IRC ``#pypy`` channel of -``irc.freenode.net``. Feel free to discuss matters either there or in +The best way to contact us is on the IRC ``#cffi`` or ``#pypy`` channels of +``irc.libera.chat``. Feel free to discuss matters either there or in the `mailing list`_. Please report to the `issue tracker`_ any bugs. As a general rule, when there is a design issue to resolve, we pick the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/doc/source/installation.rst new/cffi-1.14.6/doc/source/installation.rst --- old/cffi-1.14.5/doc/source/installation.rst 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/doc/source/installation.rst 2021-07-09 04:24:19.000000000 +0200 @@ -52,11 +52,11 @@ * https://pypi.python.org/pypi/cffi -* Checksums of the "source" package version 1.14.5: +* Checksums of the "source" package version 1.14.6: - MD5: ... - - SHA: ... + - SHA1: ... - SHA256: ... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/doc/source/whatsnew.rst new/cffi-1.14.6/doc/source/whatsnew.rst --- old/cffi-1.14.5/doc/source/whatsnew.rst 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/doc/source/whatsnew.rst 2021-07-09 04:24:19.000000000 +0200 @@ -2,6 +2,17 @@ What's New ====================== +v1.14.6 +======= + +* Test fixes for CPython 3.10.0b3 + +* Support for `sys.unraisablehook()` on Python >= 3.8 + +* Fix two minor memory leaks (thanks Sebastian!) + +* Like many projects that had an IRC channel on freenode, we moved it to + ``irc.libera.chat``. v1.14.5 ======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/setup.py new/cffi-1.14.6/setup.py --- old/cffi-1.14.5/setup.py 2021-02-11 18:41:21.000000000 +0100 +++ new/cffi-1.14.6/setup.py 2021-07-09 04:24:19.000000000 +0200 @@ -56,7 +56,7 @@ tries to compile C code. (Hints: on OS/X 10.8, for errors about -mno-fused-madd see http://stackoverflow.com/questions/22313407/ Otherwise, see https://wiki.python.org/moin/CompLangPython or - the IRC channel #python on irc.freenode.net.) + the IRC channel #python on irc.libera.chat.) Trying to continue anyway. If you are trying to install CFFI from a build done in a different context, you can ignore this warning. @@ -187,7 +187,7 @@ `Mailing list <https://groups.google.com/forum/#!forum/python-cffi>`_ """, - version='1.14.5', + version='1.14.6', packages=['cffi'] if cpython else [], package_data={'cffi': ['_cffi_include.h', 'parse_c_type.h', '_embedding.h', '_cffi_errors.h']} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/testing/cffi0/test_function.py new/cffi-1.14.6/testing/cffi0/test_function.py --- old/cffi-1.14.5/testing/cffi0/test_function.py 2021-02-05 01:53:47.000000000 +0100 +++ new/cffi-1.14.6/testing/cffi0/test_function.py 2021-07-09 04:24:19.000000000 +0200 @@ -5,7 +5,7 @@ import ctypes.util from cffi.backend_ctypes import CTypesBackend from testing.udir import udir -from testing.support import FdWriteCapture +from testing.support import FdWriteCapture, StdErrCapture from .backend_tests import needs_dlopen_none try: @@ -227,13 +227,9 @@ def cb(): return returnvalue fptr = ffi.callback("void(*)(void)", cb) - old_stderr = sys.stderr - try: - sys.stderr = StringIO() + with StdErrCapture() as f: returned = fptr() - printed = sys.stderr.getvalue() - finally: - sys.stderr = old_stderr + printed = f.getvalue() assert returned is None if returnvalue is None: assert printed == '' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/testing/cffi1/test_recompiler.py new/cffi-1.14.6/testing/cffi1/test_recompiler.py --- old/cffi-1.14.5/testing/cffi1/test_recompiler.py 2021-02-05 01:53:47.000000000 +0100 +++ new/cffi-1.14.6/testing/cffi1/test_recompiler.py 2021-07-09 04:24:19.000000000 +0200 @@ -1669,9 +1669,10 @@ with StdErrCapture() as f: res = lib.bar(321) assert res is None - assert f.getvalue() == ( - "From cffi callback %r:\n" % (bar,) + - "Trying to convert the result back to C:\n" + msg = f.getvalue() + assert "rom cffi callback %r" % (bar,) in msg + assert "rying to convert the result back to C:\n" in msg + assert msg.endswith( "TypeError: callback with the return type 'void' must return None\n") def test_extern_python_redefine(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cffi-1.14.5/testing/support.py new/cffi-1.14.6/testing/support.py --- old/cffi-1.14.5/testing/support.py 2021-02-05 00:50:00.000000000 +0100 +++ new/cffi-1.14.6/testing/support.py 2021-07-09 04:24:19.000000000 +0200 @@ -33,9 +33,14 @@ from io import StringIO self.old_stderr = sys.stderr sys.stderr = f = StringIO() + if hasattr(sys, '__unraisablehook__'): # work around pytest + self.old_unraisablebook = sys.unraisablehook # on recent CPythons + sys.unraisablehook = sys.__unraisablehook__ return f def __exit__(self, *args): sys.stderr = self.old_stderr + if hasattr(self, 'old_unraisablebook'): + sys.unraisablehook = self.old_unraisablebook class FdWriteCapture(object):