Fix Version/s: None
Sprint:DRP F16-1, DRP F16-2
Team:Data Release Production
While wrapping these packages, pay particular attention to exception translation (see Jim's bullet point 3: https://jira.lsstcorp.org/browse/RFC-182?focusedCommentId=48644&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-48644).
|Field||Original Value||New Value|
|Status||To Do [ 10001 ]||In Progress [ 3 ]|
Now passes all pex_exception unit tests, except for those that depend on deriving from Python Exception. So this has to be looked at next.
|Watchers||John Swinbank, Pim Schellart [ John Swinbank, Pim Schellart ]||Jim Bosch, John Swinbank, Pim Schellart [ Jim Bosch, John Swinbank, Pim Schellart ]|
|Summary||Wrap base, pex_exceptions, utils with pybind11||Wrap pex_exceptions with pybind11|
Reduced scope to be just pex_exceptions for easier review.
Now passes all unit tests with just pybind11 wrappers.
Uses a similar workaround as with Swig to have a pure Python wrapper take care of deriving from Python Exception.
Includes a new convenience function python::declare_exception to register custom exception types in other packages (similar in functionality to what we provided with the Swig %declareException macro).
This all works in concert with the new exception translator support added to Python as part of
|Reviewers||Andy Salnikov, Jim Bosch [ salnikov, jbosch ]|
|Status||In Progress [ 3 ]||In Review [ 10004 ]|
|Sprint||DRP F16-1 [ 225 ]||TCAMS 2016_03, DRP F16-1 [ 209, 225 ]|
|Sprint||TCAMS 2016_03, DRP F16-1 [ 209, 225 ]||DRP F16-1, DRP F16-2 [ 225, 231 ]|
Pim, I finished my review, all comments are on PR. This is the first time I had to look at pex_exceptions, and I was a bit confused by multi-level wrapping. I'm still not sure I understand everything so some of my comments may be nonsense.
Thanks for all your helpful suggestions. Definitely not nonsense I will try to clean things up a bit. I ported over too much of the direct Python API stuff from the Swig solution. This can be done much nicer with pybind11 RAII indeed.
Merged (onto epic branch instead of master) after implementing comments.
|Resolution||Done [ 10000 ]|
|Status||In Review [ 10004 ]||Done [ 10002 ]|
|Component/s||pex_exceptions [ 10728 ]|
|Component/s||base [ 10716 ]|
DM-6591design complete and reviewed. Can now use this design to try to wrap pex_exceptions.