Skip to content

Commit

Permalink
PURE_PYTHON conditional import
Browse files Browse the repository at this point in the history
  • Loading branch information
tschorr authored and pbauer committed Jan 30, 2017
1 parent bd14125 commit b555781
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Persistence/__init__.py
Expand Up @@ -15,7 +15,12 @@

from ExtensionClass import Base, Base_getattro
import persistent
from persistent.persistence import _SPECIAL_NAMES

PURE_PYTHON = os.environ.get('PURE_PYTHON')
if PURE_PYTHON:
from persistent.persistence import _SPECIAL_NAMES
else:
_SPECIAL_NAMES = set()

# persistent supports the C API on both Python 2 and 3, but it can
# be disabled or depend on the Python implementation (e.g. PyPy).
Expand Down

0 comments on commit b555781

Please sign in to comment.