-
Notifications
You must be signed in to change notification settings - Fork 54
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
Enable support for cython 3 #227
Conversation
0427ec5
to
9b60806
Compare
Edit: Everything is cast to |
This will need to run with Cython 0.29.* and 3+. Does it? |
It is supposed to and does on my system. |
This works for me (builds and tests pass, except any pre-existing issues like #237 and #238) on Fedora Linux Rawhide as well. (I did also test it with Cython 0.29.35 for completeness.) I’ll probably go ahead and apply this as a downstream patch in Rawhide, since this is one of a handful of packages that still needs Cython 0.29, and we’d like to stop maintaining that compat package sooner rather than later. |
_x = np.zeros((n,), dtype=DTYPEd) | ||
|
||
for i in range(n): | ||
_x[i] = x[i] |
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.
How will these new lines raise a CyIpoptEvalutionError
? It isn't clear why you've moved them in this try/except.
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.
Ah, the bare except clause was hidden by github.
I've gone through this and I don't see any issues with the changes. Thanks. |
Thank you for the merge. |
This is an attempt to fix #211:
noexpect
with exceptions being handled (stored) internallytry
/expect
block is used in the callbacks, where code outside of the blocks should not throw (only stack allocations)