New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doctests don't run with PURE_PYTHON=1 on CPython #13
Comments
Also convert test_contained.py doctests to real tests for ease of addition and debugging #13.
What's happening is that # persistent/__init__.py
PURE_PYTHON = os.environ.get('PURE_PYTHON')
if not PURE_PYTHON:
try:
from persistent.cPersistence import Persistent
try:
from zope.container._zope_container_contained import ContainedProxyBase
from zope.container._zope_container_contained import getProxiedObject
from zope.container._zope_container_contained import setProxiedObject
except ImportError: # PyPy
from zope.container._proxy import py_getProxiedObject as getProxiedObject
from zope.container._proxy import py_setProxiedObject as setProxiedObject
from zope.container._proxy import PyContainedProxyBase as ContainedProxyBase With the Distributing binary wheels on PyPI probably exacerbates this sort of problem. This can be fixed pretty easily in contained.py by doing the same thing that from zope.container._proxy import py_getProxiedObject as getProxiedObject
from zope.container._proxy import py_setProxiedObject as setProxiedObject
from zope.container._proxy import PyContainedProxyBase as ContainedProxyBase
if not os.getenv('PURE_PYTHON'):
try:
from zope.container._zope_container_contained import ContainedProxyBase
except ImportError: # PyPy
pass
else:
from zope.container._zope_container_contained import getProxiedObject
from zope.container._zope_container_contained import setProxiedObject |
There are a number of failures, many of them seem to have to do with
IPersistent
not being implemented anymore:Another one possibly has to do with mixing C and Python implementations:
The text was updated successfully, but these errors were encountered: