diff --git a/python/lsst/pipe/tasks/fit_multiband.py b/python/lsst/pipe/tasks/fit_multiband.py index e70cb7280..9225f9759 100644 --- a/python/lsst/pipe/tasks/fit_multiband.py +++ b/python/lsst/pipe/tasks/fit_multiband.py @@ -22,7 +22,7 @@ __all__ = ["CatalogExposure", "CatalogExposureConfig", ] from functools import cached_property -from pydantic import Field +from pydantic import Field, ConfigDict from pydantic.dataclasses import dataclass import lsst.afw.image as afwImage @@ -30,8 +30,7 @@ import lsst.daf.butler as dafButler -class CatalogExposureConfig: - arbitrary_types_allowed = True +CatalogExposureConfig = ConfigDict(arbitrary_types_allowed=True) @dataclass(frozen=True, kw_only=True, config=CatalogExposureConfig) diff --git a/tests/test_calibrateImage.py b/tests/test_calibrateImage.py index a4db76eba..ed6d4092a 100644 --- a/tests/test_calibrateImage.py +++ b/tests/test_calibrateImage.py @@ -310,7 +310,7 @@ def setUp(self): detector = 42 # Create a and populate a test butler for runQuantum tests. - self.repo_path = tempfile.TemporaryDirectory() + self.repo_path = tempfile.TemporaryDirectory(ignore_cleanup_errors=True) self.repo = butlerTests.makeTestRepo(self.repo_path.name) # dataIds for fake data @@ -366,7 +366,7 @@ def setUp(self): self.butler.put(afwTable.SimpleCatalog(), "ps1_pv3_3pi_20170110", self.htm_id) def tearDown(self): - del self.repo_path # this removes the temporary directory + self.repo_path.cleanup() def test_runQuantum(self): task = CalibrateImageTask()