From 660e7fb538f36c47120c4660350b89cc7346a2cc Mon Sep 17 00:00:00 2001 From: Denis Laxalde Date: Thu, 8 Jun 2023 13:38:44 +0200 Subject: [PATCH] docs: remove outdated comments in PrepareManager's docstrings PrepareManager's methods maybe_add_to_cache() and validate() are said to only be used in pipeline mode, but this is wrong as can be seen in BaseCursor._maybe_prepare_gen(). (Comments are probably a left-over from a prior implementation of the pipeline mode.) --- psycopg/psycopg/_preparing.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/psycopg/psycopg/_preparing.py b/psycopg/psycopg/_preparing.py index f60c0cbb3..6b08f6bbc 100644 --- a/psycopg/psycopg/_preparing.py +++ b/psycopg/psycopg/_preparing.py @@ -125,8 +125,6 @@ class PrepareManager: If a new entry has been added, return its key. Return None otherwise (meaning the query is already in cache or cache is not enabled). - - Note: This method is only called in pipeline mode. """ # don't do anything if prepared statements are disabled if self.prepare_threshold is None: @@ -163,8 +161,6 @@ class PrepareManager: """Validate cached entry with 'key' by checking query 'results'. Possibly return a command to perform maintenance on database side. - - Note: this method is only called in pipeline mode. """ if self._should_discard(prep, results): return -- 2.47.3