From 5900315b85d9516ff30ec6bbde422c8a9f322dbd Mon Sep 17 00:00:00 2001
From: Joachim Ungar <joachim.ungar@gmail.com>
Date: Fri, 5 Jul 2024 14:20:01 +0200
Subject: [PATCH] don't quietly catch error, but exclude recent memray versions

---
 mapchete/processing/profilers/memory.py | 5 +----
 pyproject.toml                          | 4 ++--
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/mapchete/processing/profilers/memory.py b/mapchete/processing/profilers/memory.py
index 80e53c60..fe1f3b0b 100644
--- a/mapchete/processing/profilers/memory.py
+++ b/mapchete/processing/profilers/memory.py
@@ -124,9 +124,6 @@ def __exit__(self, *args):
             if self.output_file:
                 copy(self._temp_file, self.output_file, overwrite=True)
         finally:
-            try:
-                self._exit_stack.__exit__(*args)
-            except Exception as exc:  # pragma: no cover
-                logger.error(exc)
+            self._exit_stack.__exit__(*args)
             # we need to set this to None, so MemoryTracker can be serialized
             self._memray_tracker = None
diff --git a/pyproject.toml b/pyproject.toml
index a737aac6..c01d251e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -57,7 +57,7 @@ complete = [
     "fsspec[http,s3]>=2023.12.0",
     "lxml",
     "matplotlib",
-    "memray",
+    "memray!=1.13.1,!=1.13.2,!=1.13.3",
     "pystac[urllib3]>=1.8.2",
     "requests",
     "rtree",
@@ -74,7 +74,7 @@ http = [
     "requests",
 ]
 profiling = [
-    "memray",
+    "memray!=1.13.1,!=1.13.2,!=1.13.3",
     "tilebench"
 ]
 s3 = [