Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Convert path extension to pybind11#27087
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
13aa334
tobf16ee0
CompareGiven the scope of these changes, what is the best way to review these? |
I think commit-by-commit is not bad, or maybe I should split out the first commit from the remaining ones, as those are all fairly small. But I also think we maybe should wait for#26050, which I want to get back to reviewing, and I don't want to cause some undue rebasing for the contributor. |
story645 commentedOct 27, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I kinda told him I'd finish that one up for him b/c he had to go do other things, so I'll probably be the one rebasing. I was trying to get in the xkcd PR first (but scratch that, it probably makes more sense to get sketch seed in and then update xkcd) since that would also cause a rebase and touches some of the same code paths. |
I should have some time available in a week or two to help review pybind11/C++ changes, if help is required? |
@ianthomas23 I was waiting for#26050 to make it easier for the new contributor, but as@story645 says she will take care of it, I've rebased this PR and fixed the conflicts. |
6a2f2b4
tocd0e236
Compare@QuLogic Reviewing this is on my todo list, hopefully within the next week. Feel free to ping me if I forget. |
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.
Just a few comments and style issues.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
static py::tuple | ||
Py_cleanup_path(mpl::PathIterator path, agg::trans_affine trans, bool remove_nans, | ||
agg::rect_d clip_rect, e_snap_mode snap_mode, double stroke_width, | ||
std::optional<bool> simplify, bool return_curves, SketchParams sketch) |
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.
First use ofstd::optional
in mpl, nice!
Uh oh!
There was an error while loading.Please reload this page.
static PyObject *Py_is_sorted_and_has_non_nan(PyObject *self, PyObject *obj) | ||
static bool | ||
Py_is_sorted_and_has_non_nan(py::object obj) | ||
{ | ||
bool result; | ||
PyArrayObject *array = (PyArrayObject *)PyArray_CheckFromAny( |
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.
I think it should be possible to usepybind11
for this, similar toimage_resample
, and then we could remove theimport_array
lower down. But I'm happy to put this off to a future PR.
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.
I thought I had tried this, but I can't find a stash for it. There are still a few othernumpy::array_view
in this file though, so I think removing just this one won't mean removingimport_array
?
For those other calls, we still need to get Agg closer to pybind11, and then we can do the NumPy API removal, so I think I'll wait on this one.
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.
Sure.
Uh oh!
There was an error while loading.Please reload this page.
This looks good to me, just needs a second review now. |
acb4947
todbc6cea
CompareI've found thatpybind11 can do the copy to |
Uh oh!
There was an error while loading.Please reload this page.
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 tests pass, but we should merge the cgywin PR first.
OK, looks like Cygwin is also happy, so I'll merge. |
PR summary
Another part of#23846, but waiting for some other refactoring PRs to be ready.
PR checklist