diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9cbf379..8f898e4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -233,7 +233,7 @@ jobs: python -m coverage run -p -m zope.testrunner --test-path=src --auto-color --auto-progress - name: Run tests without C extensions run: | - PURE_PYTHON=1 AC_PURE_PYTHON=1 python -m coverage run -p -m zope.testrunner --test-path=src --auto-color --auto-progress + PURE_PYTHON=1 python -m coverage run -p -m zope.testrunner --test-path=src --auto-color --auto-progress - name: Report Coverage run: | coverage combine diff --git a/CHANGES.rst b/CHANGES.rst index f6a7e9e..e481d49 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,8 +8,8 @@ For changes before version 3.0, see ``HISTORY.rst``. - Provide ``AccessControl.get_safe_globals`` to facilitate safe use. -- Use ``AC_PURE_PYTHON`` as switch to enable python implementation as default. - This should not be used except for tests and debugging. +- Honor ``PURE_PYTHON`` environment variable to enable python implementation + during runtime. 5.2 (2021-07-30) diff --git a/buildout.cfg b/buildout.cfg index c257d43..afbc7c2 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -7,8 +7,6 @@ parts = interpreter test coverage [versions] AccessControl = -RestrictedPython = -Acquisition = 4.10 [interpreter] recipe = zc.recipe.egg diff --git a/src/AccessControl/Implementation.py b/src/AccessControl/Implementation.py index 973a082..638a5a0 100644 --- a/src/AccessControl/Implementation.py +++ b/src/AccessControl/Implementation.py @@ -29,11 +29,8 @@ import os -# We cannot use `PURE_PYTHON` as this would be propagated to `ExtensionClass` -# and `Acquisition`. Due to restrictions of python implementation concerning -# proxies it is not possible to run all with pure python and we influence only -# the AccessControl implementation here. -CAPI = not int(os.environ.get('AC_PURE_PYTHON', '0')) +PURE_PYTHON = int(os.environ.get('PURE_PYTHON', '0')) +CAPI = not PURE_PYTHON def getImplementationName(): diff --git a/tox.ini b/tox.ini index 3ea6fcf..8f8fe65 100644 --- a/tox.ini +++ b/tox.ini @@ -21,7 +21,6 @@ deps = skip_install = true setenv = PURE_PYTHON=1 - AC_PURE_PYTHON=1 [testenv:coverage] basepython = python3