diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-02-17 10:56:06 +0200 |
---|---|---|
committer | Matti Picus <matti.picus@gmail.com> | 2021-02-17 10:56:06 +0200 |
commit | 7029874c42f485f86ff1a353593ea526d963bef4 (patch) | |
tree | 7fad0b986ce3c44d189039d019abf66cc918dc60 | |
parent | skip test on 32-bit (diff) | |
download | pypy-7029874c42f485f86ff1a353593ea526d963bef4.tar.gz pypy-7029874c42f485f86ff1a353593ea526d963bef4.tar.bz2 pypy-7029874c42f485f86ff1a353593ea526d963bef4.zip |
update to cffi 1.14.5 (using pypy/tool/import_cffi.py and manually fixing too)
-rw-r--r-- | extra_tests/cffi_tests/test_c.py | 16 | ||||
-rw-r--r-- | lib_pypy/cffi.egg-info/PKG-INFO | 2 | ||||
-rw-r--r-- | lib_pypy/cffi/__init__.py | 4 | ||||
-rw-r--r-- | lib_pypy/cffi/_embedding.h | 2 | ||||
-rw-r--r-- | pypy/module/_cffi_backend/__init__.py | 2 | ||||
-rw-r--r-- | pypy/module/_cffi_backend/test/_backend_test_c.py | 2 |
6 files changed, 21 insertions, 7 deletions
diff --git a/extra_tests/cffi_tests/test_c.py b/extra_tests/cffi_tests/test_c.py index d039edf00d..69ad15eb6c 100644 --- a/extra_tests/cffi_tests/test_c.py +++ b/extra_tests/cffi_tests/test_c.py @@ -17,7 +17,7 @@ from _cffi_backend import __version__ # ____________________________________________________________ import sys -assert __version__ == "1.14.4", ("This test_c.py file is for testing a version" +assert __version__ == "1.14.5", ("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,): @@ -3974,6 +3974,20 @@ def test_from_buffer_types(): with pytest.raises(ValueError): release(pv[0]) +def test_issue483(): + BInt = new_primitive_type("int") + BIntP = new_pointer_type(BInt) + BIntA = new_array_type(BIntP, None) + lst = list(range(25)) + bytestring = bytearray(buffer(newp(BIntA, lst))[:] + b'XYZ') + p1 = from_buffer(BIntA, bytestring) # int[] + assert len(buffer(p1)) == 25 * size_of_int() + assert sizeof(p1) == 25 * size_of_int() + # + p2 = from_buffer(BIntP, bytestring) + assert sizeof(p2) == size_of_ptr() + assert len(buffer(p2)) == size_of_int() # first element only, by default + def test_memmove(): Short = new_primitive_type("short") ShortA = new_array_type(new_pointer_type(Short), None) diff --git a/lib_pypy/cffi.egg-info/PKG-INFO b/lib_pypy/cffi.egg-info/PKG-INFO index feeda7171d..5213c44c54 100644 --- a/lib_pypy/cffi.egg-info/PKG-INFO +++ b/lib_pypy/cffi.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: cffi -Version: 1.14.4 +Version: 1.14.5 Summary: Foreign Function Interface for Python calling C code. Home-page: http://cffi.readthedocs.org Author: Armin Rigo, Maciej Fijalkowski diff --git a/lib_pypy/cffi/__init__.py b/lib_pypy/cffi/__init__.py index 644dea74c1..b79c21f91d 100644 --- a/lib_pypy/cffi/__init__.py +++ b/lib_pypy/cffi/__init__.py @@ -5,8 +5,8 @@ from .api import FFI from .error import CDefError, FFIError, VerificationError, VerificationMissing from .error import PkgConfigError -__version__ = "1.14.4" -__version_info__ = (1, 14, 4) +__version__ = "1.14.5" +__version_info__ = (1, 14, 5) # 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 --git a/lib_pypy/cffi/_embedding.h b/lib_pypy/cffi/_embedding.h index cae179acb1..c36d79342d 100644 --- a/lib_pypy/cffi/_embedding.h +++ b/lib_pypy/cffi/_embedding.h @@ -224,7 +224,7 @@ static int _cffi_initialize_python(void) if (f != NULL && f != Py_None) { PyFile_WriteString("\nFrom: " _CFFI_MODULE_NAME - "\ncompiled with cffi version: 1.14.4" + "\ncompiled with cffi version: 1.14.5" "\n_cffi_backend module: ", f); modules = PyImport_GetModuleDict(); mod = PyDict_GetItemString(modules, "_cffi_backend"); diff --git a/pypy/module/_cffi_backend/__init__.py b/pypy/module/_cffi_backend/__init__.py index 43fc4a2ac4..0a028af448 100644 --- a/pypy/module/_cffi_backend/__init__.py +++ b/pypy/module/_cffi_backend/__init__.py @@ -1 +1 @@ -VERSION = "1.14.4" +VERSION = "1.14.5" diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py b/pypy/module/_cffi_backend/test/_backend_test_c.py index cd1e648917..ae93e126de 100644 --- a/pypy/module/_cffi_backend/test/_backend_test_c.py +++ b/pypy/module/_cffi_backend/test/_backend_test_c.py @@ -1,7 +1,7 @@ # ____________________________________________________________ import sys -assert __version__ == "1.14.4", ("This test_c.py file is for testing a version" +assert __version__ == "1.14.5", ("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,): |