From 62c4a3ba359b30fc20facc1f8f9482975ee22b60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= Date: Mon, 30 Sep 2024 05:40:49 +0000 Subject: [PATCH] Respect ``PURE_PYTHON`` environment variable set to ``0`` --- CHANGES.rst | 2 ++ src/zope/proxy/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index cb909c7..63ce8dc 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,8 @@ 6.1 (unreleased) ================ +- Respect ``PURE_PYTHON`` environment variable set to ``0``. + 6.0 (2024-09-17) ================ diff --git a/src/zope/proxy/__init__.py b/src/zope/proxy/__init__.py index b2366ab..e195dc1 100644 --- a/src/zope/proxy/__init__.py +++ b/src/zope/proxy/__init__.py @@ -480,7 +480,7 @@ def py_removeAllProxies(obj): _c_available = False -if 'PURE_PYTHON' not in os.environ: +if not int(os.environ.get('PURE_PYTHON', '0')): try: # pragma: no cover from zope.proxy._zope_proxy_proxy import ProxyBase as _c_available except ImportError: