Resolve C++ nullptr issues and move away from deprecated C API usages in relation to #31424 - #32065
Resolve C++ nullptr issues and move away from deprecated C API usages in relation to #31424#32065clin1234 wants to merge 7 commits into
Conversation
|
Thank you for opening your first PR into Matplotlib! If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks. We also ask that you please finish addressing any review comments on this PR and wait for it to be merged (or closed) before opening a new one, as it can be a valuable learning experience to go through the review process. You can also join us on discourse chat for real-time discussion. For details on testing, writing docs, and our review process, please see the developer guide. We strive to be a welcoming and open project. Please follow our Code of Conduct. |
6e1ed1d to
03e3c94
Compare
a44a307 to
2ed73b3
Compare
7095fc2 to
6b1521a
Compare
|
Much of this conflicts with #30291 and ft2font-shared_ptr; it wasn't merged for 3.11 because pybind11 v3 was deemed too new at the time. |
86ac426 to
18ebea2
Compare
Would you be willing to rebase your tf2font-shared_ptr branch onto my PR branch? Afaik, you haven't made a PR from that shared_ptr branch yet |
18ebea2 to
c713f7e
Compare
|
Given that this is doing a bunch of different things it seemed easier to review it commit-by-commit, but a number of the commits either stack or are later reverted. @clin1234 Is it possible to squash this down so the reverted commits are fully dropped and the commits that stack (like adding missing |
Would you prefer that I squash all commits within this PR to a single one? |
Can you aim for 3-4 commits that each do one self-contained thing? That will make it much easier to review. |
d446b0c to
49482e9
Compare
506d46e to
09ff143
Compare
In particular: * ranged-for in `ft_glyph_warn` * PyErr_GetRaisedException and PyErr_SetRaisedException replaces PyErr_Fetch and PyErr_Restore * `PyFT2Font_init` returns a std::unique_ptr<PyFT2Font> * Make face_index within PyFT2Font_init FT_ULong
In particular: * Return descriptive error if FT2Image can't be constructed * Fully initialize FT_Outline_Funcs * Use `THROW_FT_ERROR` in place of bare std::runtime_error
09ff143 to
01dcacc
Compare
|
@tacaswell Done |
PR summary
Attempt to fix (most) trivial C++ bugs found in #31424 during a sprint in SciPy 2026.