From 860bf97f6ef2666b726291d0be35b12f937951e2 Mon Sep 17 00:00:00 2001 From: geisserml Date: Thu, 19 Dec 2024 00:00:02 +0100 Subject: [PATCH] Revert "Clarify `Cannot close object; library is destroyed` condition" This reverts commit ff2ff4bd519e9b44bfe3182cff052d893bd442e0. --- src/pypdfium2/internal/bases.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pypdfium2/internal/bases.py b/src/pypdfium2/internal/bases.py index af34c30a0..010e11112 100644 --- a/src/pypdfium2/internal/bases.py +++ b/src/pypdfium2/internal/bases.py @@ -37,7 +37,7 @@ def _close_template(close_func, raw, obj_repr, state, parent, *args, **kwargs): os.write(sys.stderr.fileno(), f"Close ({desc}) {obj_repr}\n".encode()) if not LIBRARY_AVAILABLE: - os.write(sys.stderr.fileno(), f"-> Cannot close object; library is destroyed. This may happen on process exit, but should not during runtime.\n".encode()) + os.write(sys.stderr.fileno(), f"-> Cannot close object, library is destroyed. This may cause a memory leak!\n".encode()) return assert (parent is None) or not parent._tree_closed()