Skip to content

Commit

Permalink
Drop AC_PURE_PYTHON.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 16, 2022
1 parent 64cebce commit 224efad
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CHANGES.rst
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions buildout.cfg
Expand Up @@ -7,8 +7,6 @@ parts = interpreter test coverage

[versions]
AccessControl =
RestrictedPython =
Acquisition = 4.10

[interpreter]
recipe = zc.recipe.egg
Expand Down
7 changes: 2 additions & 5 deletions src/AccessControl/Implementation.py
Expand Up @@ -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():
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Expand Up @@ -21,7 +21,6 @@ deps =
skip_install = true
setenv =
PURE_PYTHON=1
AC_PURE_PYTHON=1

[testenv:coverage]
basepython = python3
Expand Down

0 comments on commit 224efad

Please sign in to comment.