Skip to content

Commit

Permalink
Ensure that pex_exceptions is imported for afw.fits and afw.geom
Browse files Browse the repository at this point in the history
Without this it is not possible to "import lsst.afw.fits"
because the FitsError is not translated to python.
Tests passed previously in afw because other parts of afw were importing
pex_exceptions.
  • Loading branch information
timj committed Jan 30, 2023
1 parent 87b8406 commit 189dbdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/lsst/afw/fits/_fits.cc
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ void declareFitsModule(lsst::utils::python::WrapperCollection &wrappers) {
} // namespace
PYBIND11_MODULE(_fits, mod) {
lsst::utils::python::WrapperCollection wrappers(mod, "lsst.afw.fits");
wrappers.addSignatureDependency("lsst.pex.exceptions");
wrappers.addInheritanceDependency("lsst.pex.exceptions");
wrappers.addSignatureDependency("lsst.daf.base");
// FIXME: after afw.image pybind wrappers are converted
//wrappers.addSignatureDependency("lsst.afw.image");
Expand Down
2 changes: 1 addition & 1 deletion python/lsst/afw/geom/_polygon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void declarePolygon(lsst::utils::python::WrapperCollection &wrappers) {
}
} // namespace
void wrapPolygon(lsst::utils::python::WrapperCollection &wrappers) {
wrappers.addSignatureDependency("lsst.pex.exceptions");
wrappers.addInheritanceDependency("lsst.pex.exceptions");
wrappers.addInheritanceDependency("lsst.afw.typehandling");
wrappers.addSignatureDependency("lsst.afw.table.io");
wrappers.wrapException<SinglePolygonException, pex::exceptions::RuntimeError>("SinglePolygonException",
Expand Down

0 comments on commit 189dbdf

Please sign in to comment.