api: first draft for removing nativespec from ImageBuf#4482
api: first draft for removing nativespec from ImageBuf#4482bfraboni wants to merge 5 commits intoAcademySoftwareFoundation:mainfrom
Conversation
Signed-off-by: Basile Fraboni <basile.fraboni@gmail.com>
Signed-off-by: Basile Fraboni <basile.fraboni@gmail.com>
Signed-off-by: Basile Fraboni <basile.fraboni@gmail.com>
Signed-off-by: Basile Fraboni <basile.fraboni@gmail.com>
| const ImageSpec& nativespec() const; | ||
| TypeDesc file_format() const; | ||
| /// Same as the above for channel specific formats. | ||
| std::vector<TypeDesc> file_channelformats() const; |
There was a problem hiding this comment.
Not sure how much it matters, but do you think returning a vector is good here? As opposed to returning a const vector& or a cspan<TypeDesc>? (But those are only options it's stored somewhere in the IB and we can make a stable reference to it.
| .def("spec", &ImageBuf::spec, | ||
| py::return_value_policy::reference_internal) | ||
| .def("nativespec", &ImageBuf::nativespec, | ||
| .def("file_format", &ImageBuf::file_format, |
There was a problem hiding this comment.
I think here, like with C++, for back compatibility we'll want to preserve a nativespec() call, even if it does something different than before.
|
I think this is going in the right direction. Looks like failed tests? And you need a DCO? |
|
Just a remind that there are some pending items to finish this |
|
@lgritz apologies for the delay. I'll get back to this task soon (on the side but not with a high priority because it is API breaking), and see how I can fix the failing tests. I have more experience now that I know how to run and debug them. |
Second half of API changes to remove
nativespecfromImageCacheandImageBuffor issue: #4436nativespec()from the ImageBuf API but this creates a bunch of problems I have not answers for inImageBuf::read