]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
docs: remove outdated comments in PrepareManager's docstrings
authorDenis Laxalde <denis.laxalde@dalibo.com>
Thu, 8 Jun 2023 11:38:44 +0000 (13:38 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Mon, 12 Jun 2023 20:24:34 +0000 (22:24 +0200)
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

index f60c0cbb3c19785a905965c54aa118dab60d0b4b..6b08f6bbca79211cad61ec50c259619d86c1cc66 100644 (file)
@@ -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