-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Fix Cython 0.28 build break of qhull.pyx #8581
Conversation
This presumably fails on earlier Cython versions?
|
Surprisingly no. Cythonization of modified |
It does fail on Travis though with |
If so,
```
try:
foo.__doc__ = bar.__doc__
except AttributeError:
foo.__func__.__doc__ = bar.__func__.__doc__
```
probably works on all Cython versions.
|
Can you please also revert gh-8566 in this same PR so that we can see
that it actually works.
|
scipy/spatial/qhull.pyx
Outdated
@@ -2353,7 +2362,7 @@ class ConvexHull(_QhullUser): | |||
self._vertices = np.unique(self.simplices) | |||
return self._vertices | |||
|
|||
ConvexHull.add_points.__func__.__doc__ = _QhullUser._add_points.__doc__ | |||
_set_docs(ConvexHull.add_points, _QhullUser._add_points.__doc__) |
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 second argument should not have .__doc__
.
scipy/spatial/qhull.pyx
Outdated
Delaunay.add_points.__func__.__doc__ = _QhullUser._add_points.__doc__ | ||
# Set docstring for foo to docstring of bar, working around change in Cython 0.28 | ||
# See https://github.com/scipy/scipy/pull/8581 | ||
def _set_docs(foo, bar): |
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.
dst, src
, not foo, bar
probably.
And maybe _copy_docs.
Fixes cython/cython#2154 while maintaining ability to use Cython 0.27.3 and earlier
a679e3d
to
7c4d744
Compare
All builds were green. I squashed all changes of |
LGTM. This looks like a safe fix - I'd like to take it along for 1.0.1; an incompatibility with latest Cython is annoying. @pv sound okay? |
Should be safe afaik
|
Merged. Thanks @oleksandr-pavlyk, @pv! |
backported to 1.0.x in 5d7a2c7 |
Fixes build break reported in cython/cython#2154
Fixes #8562