From: Denis Laxalde Date: Thu, 8 Jun 2023 11:38:44 +0000 (+0200) Subject: docs: remove outdated comments in PrepareManager's docstrings X-Git-Tag: 3.1.10~16^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36d5635037a89ad2489af3f33b7d7162227698d9;p=thirdparty%2Fpsycopg.git 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.) --- 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