Author: Armin Rigo <[email protected]>
Branch:
Changeset: r86858:c224171fc33e
Date: 2016-09-04 13:37 +0200
http://bitbucket.org/pypy/pypy/changeset/c224171fc33e/
Log: import cffi/cb6147abe7af
diff --git a/lib_pypy/cffi/backend_ctypes.py b/lib_pypy/cffi/backend_ctypes.py
--- a/lib_pypy/cffi/backend_ctypes.py
+++ b/lib_pypy/cffi/backend_ctypes.py
@@ -1009,6 +1009,12 @@
myref is not None and myref is other())
def __ne__(self, other):
return not (self == other)
+ def __hash__(self):
+ try:
+ return self._hash
+ except AttributeError:
+ self._hash = hash(self())
+ return self._hash
self._weakref_cache_ref = {}, MyRef
weak_cache, MyRef = self._weakref_cache_ref
diff --git a/pypy/module/test_lib_pypy/cffi_tests/cffi0/test_zintegration.py
b/pypy/module/test_lib_pypy/cffi_tests/cffi0/test_zintegration.py
--- a/pypy/module/test_lib_pypy/cffi_tests/cffi0/test_zintegration.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/cffi0/test_zintegration.py
@@ -154,7 +154,10 @@
from cffi.setuptools_ext import _set_py_limited_api
try:
import setuptools
- orig_version = setuptools.__version__
+ except ImportError as e:
+ py.test.skip(str(e))
+ orig_version = setuptools.__version__
+ try:
setuptools.__version__ = '26.0.0'
from setuptools import Extension
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit