From 12ed05ba1d4688fd04d6e3f4863b0955980591ff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:05:47 +0000 Subject: [PATCH 1/2] Initial plan From 128a2921420ceff1dd29d453dca5bde331e3004d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 7 Jan 2026 13:09:59 +0000 Subject: [PATCH 2/2] Fix duplicate substitution definitions in docstrings Co-authored-by: jason810496 <68415893+jason810496@users.noreply.github.com> --- pgmq_sqlalchemy/queue.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/pgmq_sqlalchemy/queue.py b/pgmq_sqlalchemy/queue.py index 29fba87..33daa30 100644 --- a/pgmq_sqlalchemy/queue.py +++ b/pgmq_sqlalchemy/queue.py @@ -198,9 +198,6 @@ async def create_queue_async( commit: bool = True, ) -> None: """ - .. _unlogged_table: https://www.postgresql.org/docs/current/sql-createtable.html#SQL-CREATETABLE-UNLOGGED - .. |unlogged_table| replace:: **UNLOGGED TABLE** - **Create a new queue.** * if ``unlogged`` is ``True``, the queue will be created as an |unlogged_table|_ . @@ -287,9 +284,6 @@ async def create_partitioned_queue_async( ) -> None: """Create a new **partitioned** queue. - .. _pgmq_partitioned_queue: https://github.com/tembo-io/pgmq?tab=readme-ov-file#partitioned-queues - .. |pgmq_partitioned_queue| replace:: **PGMQ: Partitioned Queues** - .. code-block:: python # Numeric partitioning (by msg_id) @@ -414,9 +408,6 @@ async def drop_queue_async( ) -> bool: """Drop a queue. - .. _drop_queue_method: ref:`pgmq_sqlalchemy.PGMQueue.drop_queue` - .. |drop_queue_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.drop_queue` - .. code-block:: python await pgmq_client.drop_queue_async('my_queue') @@ -700,12 +691,6 @@ async def read_async( commit: bool = True, ) -> Optional[Message]: """ - .. _for_update_skip_locked: https://www.postgresql.org/docs/current/sql-select.html#SQL-FOR-UPDATE-SHARE - .. |for_update_skip_locked| replace:: **FOR UPDATE SKIP LOCKED** - - .. _read_method: ref:`pgmq_sqlalchemy.PGMQueue.read` - .. |read_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read` - Read a message from the queue. Returns: @@ -929,10 +914,6 @@ async def read_with_poll_async( ) -> Optional[List[Message]]: """ - .. _read_with_poll_method: ref:`pgmq_sqlalchemy.PGMQueue.read_with_poll` - .. |read_with_poll_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.read_with_poll` - - | Read messages from a queue with long-polling. | | When the queue is empty, the function block at most ``max_poll_seconds`` seconds. @@ -1074,9 +1055,6 @@ async def set_vt_async( commit: bool = True, ) -> Optional[Message]: """ - .. _set_vt_method: ref:`pgmq_sqlalchemy.PGMQueue.set_vt` - .. |set_vt_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.set_vt` - Set the visibility timeout for a message. Args: @@ -1231,9 +1209,6 @@ async def delete_async( """ Delete a message from the queue. - .. _delete_method: ref:`pgmq_sqlalchemy.PGMQueue.delete` - .. |delete_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete` - * Raises an error if the ``queue_name`` does not exist. * Returns ``True`` if the message is deleted successfully. * If the message does not exist, returns ``False``. @@ -1296,9 +1271,6 @@ async def delete_batch_async( """ Delete a batch of messages from the queue. - .. _delete_batch_method: ref:`pgmq_sqlalchemy.PGMQueue.delete_batch` - .. |delete_batch_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.delete_batch` - .. note:: | Instead of return `bool` like |delete_method|_, | |delete_batch_method|_ will return a list of ``msg_id`` that are successfully deleted. @@ -1364,10 +1336,6 @@ async def archive_async( """ Archive a message from a queue. - .. _archive_method: ref:`pgmq_sqlalchemy.PGMQueue.archive` - .. |archive_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.archive` - - * Message will be deleted from the queue and moved to the archive table. * Will be deleted from ``pgmq.q_`` and be inserted into the ``pgmq.a_`` table. * raises an error if the ``queue_name`` does not exist. @@ -1614,12 +1582,6 @@ async def metrics_all_async( ) -> Optional[List[QueueMetrics]]: """ - .. _read_committed_isolation_level: https://www.postgresql.org/docs/current/transaction-iso.html#XACT-READ-COMMITTED - .. |read_committed_isolation_level| replace:: **READ COMMITTED** - - .. _metrics_all_method: ref:`pgmq_sqlalchemy.PGMQueue.metrics_all` - .. |metrics_all_method| replace:: :py:meth:`~pgmq_sqlalchemy.PGMQueue.metrics_all` - Get metrics for all queues. Returns: