From ca707081f736c9bc0ab0a7de6c7e219d60051509 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 9 May 2024 17:20:57 -0400 Subject: [PATCH 1/2] remove Step.closeout --- src/stpipe/step.py | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/stpipe/step.py b/src/stpipe/step.py index fff9aea6..e59958ed 100644 --- a/src/stpipe/step.py +++ b/src/stpipe/step.py @@ -1157,41 +1157,6 @@ def _make_output_path( output_dir = expandvars(expanduser(output_dir)) return join(output_dir, basename) - def closeout(self, to_close=None, to_del=None): - """Close out step processing - - Parameters - ---------- - to_close : [object(, ...)] - List of objects with a `close` method to execute - The objects will also be deleted - - to_del : [object(, ...)] - List of objects to simply delete - - Notes - ----- - Other operations, such as forced garbage collection - will also be done. - """ - if to_close is None: - to_close = [] - if to_del is None: - to_del = [] - to_del += to_close - for item in to_close: - try: - if hasattr(item, "close"): - item.close() - except Exception as exception: # noqa: PERF203 - self.log.debug('Could not close "%s"Reason:\n%s', item, exception) - for item in to_del: - try: - del item - except NameError as error: # noqa: PERF203 - self.log.debug("An error has occurred: %s", error) - gc.collect() - @classmethod def _datamodels_open(cls, init, **kwargs): """ From 531f752ba057a699763f238b8da6f737718349c1 Mon Sep 17 00:00:00 2001 From: Brett Date: Thu, 9 May 2024 17:22:11 -0400 Subject: [PATCH 2/2] add changelog --- CHANGES.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 4d2c70c5..b544ea4b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,3 +1,8 @@ +0.6.0 (unreleased) +================== + +- Remove unused ``Step.closeout`` [#152] + 0.5.2 (2024-03-21) ==================