]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
style: more care in the docstring mentioning sync/async versions of the code
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Sun, 8 Oct 2023 09:55:58 +0000 (11:55 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 11 Oct 2023 21:45:39 +0000 (23:45 +0200)
psycopg/psycopg/_copy.py
psycopg/psycopg/_copy_async.py
psycopg/psycopg/connection.py
psycopg/psycopg/connection_async.py
psycopg_pool/psycopg_pool/null_pool.py
psycopg_pool/psycopg_pool/null_pool_async.py
psycopg_pool/psycopg_pool/pool.py
psycopg_pool/psycopg_pool/pool_async.py
psycopg_pool/psycopg_pool/sched.py
psycopg_pool/psycopg_pool/sched_async.py
tools/async_to_sync.py

index 57133891d79b5a40761885e485f88dd6ea352deb..28d85eb35d1f7f54a395aac4f48dc591ad027afa 100644 (file)
@@ -2,7 +2,7 @@
 # from the original file '_copy_async.py'
 # DO NOT CHANGE! Change the original file instead.
 """
-Psycopg Copy and related objects.
+Objects to support the COPY protocol (sync version).
 """
 
 # Copyright (C) 2023 The Psycopg Team
index 248335300df165f56e33d62116a5bfeea41538b9..5f66dbf2986141a9befd16aefa53afa8a7a771be 100644 (file)
@@ -1,5 +1,5 @@
 """
-Psycopg AsyncCopy and related objects.
+Objects to support the COPY protocol (async version).
 """
 
 # Copyright (C) 2023 The Psycopg Team
index 37086cc04acfd814c097067022e3054665e89ccd..a5adf2a92b540816f7c3417ca5ceb2479a2146fe 100644 (file)
@@ -2,7 +2,7 @@
 # from the original file 'connection_async.py'
 # DO NOT CHANGE! Change the original file instead.
 """
-psycopg async connection objects
+Psycopg connection object (sync version)
 """
 
 # Copyright (C) 2020 The Psycopg Team
index 70fa198e85dd573075e033e657074369a9765ad0..862a1ebe04008ea095b3b0a45a78607d8a9e2383 100644 (file)
@@ -1,5 +1,5 @@
 """
-psycopg async connection objects
+Psycopg connection object (async version)
 """
 
 # Copyright (C) 2020 The Psycopg Team
index f8cdb9f5512e3ae26eb6c5fe4fd2a6e73df09b1e..1ffeceae4807f9732028c50b0635a48431b28b6d 100644 (file)
@@ -2,7 +2,7 @@
 # from the original file 'null_pool_async.py'
 # DO NOT CHANGE! Change the original file instead.
 """
-Psycopg null connection pool module.
+Psycopg null connection pool module (sync version).
 """
 
 # Copyright (C) 2022 The Psycopg Team
index bc3931c984144f715021d296738c8015f32ee451..8db9ca7ae2ef2f70b22d1cc627722f9d16168b23 100644 (file)
@@ -1,5 +1,5 @@
 """
-Psycopg null connection pool module.
+Psycopg null connection pool module (async version).
 """
 
 # Copyright (C) 2022 The Psycopg Team
index f96eab00e86ef9bee871cec919ea67c020884c16..f2fab5d265b7a78143e818b11a795792070fc730 100644 (file)
@@ -2,7 +2,7 @@
 # from the original file 'pool_async.py'
 # DO NOT CHANGE! Change the original file instead.
 """
-Psycopg connection pool module.
+Psycopg connection pool module (sync version).
 """
 
 # Copyright (C) 2021 The Psycopg Team
index aa34df36bb7568f97e270b1c9b78961d0ffb8fc9..cbafa9c858ac99b48e0ff7faa5fa29692aacfa33 100644 (file)
@@ -1,5 +1,5 @@
 """
-Psycopg connection pool module.
+Psycopg connection pool module (async version).
 """
 
 # Copyright (C) 2021 The Psycopg Team
index 6b36f4b6cbcefcf1af6e8beecc19f0337eee59c8..58cadc36df1f499fcfadef0ff36dcf38f5750071 100644 (file)
@@ -2,12 +2,12 @@
 # from the original file 'sched_async.py'
 # DO NOT CHANGE! Change the original file instead.
 """
-A minimal scheduler to schedule tasks to run in the future.
+A minimal scheduler to schedule tasks to run in the future (sync version).
 
 Inspired to the standard library `sched.scheduler`, but designed for
-multi-thread usage from the ground up, not as an afterthought. Tasks can be scheduled in
-front of the one currently running and `Scheduler.run()` can be left running
-without any tasks scheduled.
+multi-thread usage from the ground up, not as an afterthought. Tasks can be
+scheduled in front of the one currently running and `Scheduler.run()` can be
+left running without any tasks scheduled.
 
 Tasks are called "Task", not "Event", here, because we actually make use of
 `[threading/asyncio].Event` and the two would be confusing.
index d69a0b0a3b1705dbc1506aa8d962786744ef92e0..c9fdbad79c90944e94a33c4a7015caf9470cb547 100644 (file)
@@ -1,5 +1,5 @@
 """
-A minimal scheduler to schedule tasks to run in the future.
+A minimal scheduler to schedule tasks to run in the future (async version).
 
 Inspired to the standard library `sched.scheduler`, but designed for
 multi-thread usage from the ground up, not as an afterthought. Tasks can be
index 02758d391ef0710acb30dd09d0c2168dfc315d33..7b949d137b6e2b1fd5760dfec584db16fc6e6124 100755 (executable)
@@ -241,6 +241,7 @@ class RenameAsyncToSync(ast.NodeTransformer):
             and isinstance(body[0].value.value, str)
         ):
             body[0].value.value = body[0].value.value.replace("Async", "")
+            body[0].value.value = body[0].value.value.replace("(async", "(sync")
 
     def visit_Call(self, node: ast.Call) -> ast.AST:
         if isinstance(node.func, ast.Name) and node.func.id == "TypeVar":