-
Notifications
You must be signed in to change notification settings - Fork 6
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
Question on usage of PURE_PYTHON
#283
Comments
This is an issue with the package in question, in this case AccessControl, and should be filed there. Clearly, any test that considers the environment variable to have a truth value when it is set to a string |
Thank you for clarifying, this was also my impression. I'll take care of fixing in AccessControl now by using I looked through https://github.com/search?q=org%3Azopefoundation+PURE_PYTHON+language%3APython&type=code&p=2&l=Python , |
Setting to 0 should be equivalent to not setting the variable. Refs zopefoundation/meta#283
Setting to 0 should be equivalent to not setting the variable. Refs zopefoundation/meta#283
Setting to 0 should be equivalent to not setting the variable. Refs zopefoundation/meta#283
Setting to 0 should be equivalent to not setting the variable. Refs zopefoundation/meta#283
PROBLEM REPORT or QUESTION
It's not clear to me what is the "convention" over using
PURE_PYTHON
.The github actions are generated with
PURE_PYTHON=1
set only for "Run tests with C extensions" step:meta/config/c-code/tests.yml.j2
Line 300 in e07f139
The tox.ini is generated to set environment variable
PURE_PYTHON=1
for "pure" cases andPURE_PYTHON=0
for "non pure"meta/config/c-code/tox.ini.j2
Line 3 in e07f139
Some code, for example testZopeSecurityPolicy from AccessControl just check
os.environ.get('PURE_PYTHON')
, which is true in python ifPURE_PYTHON
is set to"0"
.In some other places, for example this zope.index test use
int(os.environ.get('PURE_PYTHON', '0'))
.What I did:
Run AccessControl tests with
tox -e py
What I expect to happen:
C code and python code to be tested
What actually happened:
Only python code is tested because of
os.environ.get('PURE_PYTHON')
What version of Python and Zope/Addons I am using:
N/A
I'm not sure what is the best fix, probably packages can be changed to use
int(os.environ.get('PURE_PYTHON', '0'))
everywhere ?The text was updated successfully, but these errors were encountered: