-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add the ability to force use of C extensions. #132
Conversation
if (!TimeStamp) | ||
{ | ||
PyObject* ts_module; | ||
ts_module = PyImport_ImportModule("persistent._timestamp"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This had to move from module initialization time because it created a cycle.
Note that it's importing the C version only now.
Also note the new error handling at the end (if !TimeStamp
). That turned out to be a problem that resulted in a SystemError
at one point; that shouldn't be possible now that we're getting the C implementation, however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff is too big for me right now, but I skimmed some of it
4192cd3
to
67e410f
Compare
Rebased on master. |
TravisCI is green now (after restarting some jobs). Is there still something that needs to be done? |
Awaiting review. |
I still don't have the energy for reviewing this, sorry! |
Same here, sorry, too. |
I found a way to make the diff much smaller and simpler by avoiding the need to rename |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- Let an empty value of PURE_PYTHON mean the same thing as it did before (no preference) - Add tests for the functions that handle PURE_PYTHON - Clean up imports in various places - Add more tests for C TimeStamp hash code. - Add some comments.
With PURE_PYTHON=0, like in zope.interface.
Also always require all three extensions. This solves mysterious issues you can get if you wind up mixing and matching (#124).
Fixes #131
Add travis and tox tests for this.