Skip to content
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

Merge master into enh/cython-port #294

Merged
merged 498 commits into from May 29, 2016
Merged

Conversation

jvkersch
Copy link
Contributor

Does nothing but merge master into the enh/cython-port branch.

rahulporuri and others added 22 commits March 24, 2016 13:52
changed download_url in setup.py to point to github repo
Passing in None will trigger a check for kwargs == NULL in
methodobject.c:PyCFunction_Call, causing a TypeError on the
Cython side ("TypeError: _name_default() takes no keyword arguments")
Cython fills in tp_dictoffset with 0, since a cdef class has no __dict__
by default. This is a problem for PyObject_GenericGetAttr, which
consults this member to find the object's dict during attribute lookup.
When the call to PyObject_GenericGetAttr fails for an attribute lookup,
NULL is returned and PyErr is set. When getattr_python finishes, None is
returned and Python terminates, since attribute lookup resulted in an
value (None) but with the error flag set.

Perhaps there's a better way of "raising" the exception on the Python
side, but the only way I could get this to work was by clearing the
error, and manually re-raising it in Cython.
PR #124 switched the use of the deprecated .set method to .trait_set,
since the former is not defined on the Cython side. However, a later
commit undid that change, causing the tests to fail.
The `value` object may be unhashable, in which case a TypeError is
raised. In the original C implementation this was done with a
PyDict_GetItem(..., value) == NULL, but whereas PyDict_GetItem swallows
all errors, we need to be more careful.
The C implementation has a method validate() and a property
validate. To support both on the Cython side I renamed the property to
validate_ and implemented the method.
__delattr__ now calls _internal_setattr with a special NullObject value
to indicate delete. This mimics the C implementation and the code to
handle the NullObject case was already there.
@dpinte
Copy link
Member

dpinte commented May 29, 2016

@jvkersch it sounds like this one will be be merged into enh/cython-port once tests will be done.

@dpinte dpinte merged commit 1e9e043 into enh/cython-port May 29, 2016
@dpinte dpinte deleted the enh/cython-merge-master branch May 29, 2016 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet