Skip to content

Commit eab41a6

Browse files
committed
docs: Replace psycopg2 URLs
1 parent 436556a commit eab41a6

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/python/style_guide.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,11 +216,11 @@ Maintenance
216216

217217
Maintainers can find improper formatting with these regular expressions. Test directories and Sphinx ``conf.py`` files can be ignored, if needed.
218218

219-
- Unnamed placeholders, except for log messages, ``strftime()``, `psycopg2.extras.execute_values() <https://www.psycopg.org/docs/extras.html#psycopg2.extras.execute_values>`__ and common false positives (e.g. ``%`` in ``SECRET_KEY`` default value):
219+
- Unnamed placeholders, except for log messages, ``strftime()``, `Cursor.executemany() <https://www.psycopg.org/psycopg3/docs/api/cursors.html#psycopg.Cursor.executemany>`__ and common false positives (e.g. ``%`` in ``SECRET_KEY`` default value):
220220

221221
.. code-block:: none
222222
223-
(?<!info)(?<!debug|error)(?<!getenv)(?<!warning)(?<!critical|strftime)(?<!exception)(?<!execute_values)\((\n( *['"#].*)?)* *['"].*?%[^( ]
223+
(?<!info)(?<!debug|error)(?<!getenv)(?<!warning)(?<!critical|strftime)(?<!exception)(?<!executemany)\((\n( *['"#].*)?)* *['"].*?%[^( ]
224224
225225
- Named placeholders, except for translation strings and :ref:`SQL statements<sql-statements>`:
226226

docs/services/postgresql.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Identify the client
3030
Database administrators need to identify the sources of queries, in order to notify developers of inefficient queries or alert users whose queries will be interrupted by maintenance. For example:
3131

3232
- Django applications set the `application_name <https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-APPLICATION-NAME>`__ query string parameter in the PostgreSQL `connection URI <https://www.postgresql.org/docs/current/libpq-connect.html#id-1.7.3.8.3.6>`__, or use a service-specific user
33-
- Kingfisher Summarize uses the `psycopg2 <https://www.psycopg.org/docs/>`__ package, and adds ``/* kingfisher-summarize {identifier} */`` as a comment to expensive queries
33+
- Kingfisher Summarize uses the `psycopg <https://www.psycopg.org/psycopg3/docs/>`__ package, and adds ``/* kingfisher-summarize {identifier} */`` as a comment to expensive queries
3434
- Kingfisher Colab uses the `ipython-sql <https://pypi.org/project/ipython-sql/>`__ package, and adds the Google Colaboratory notebook URL as a comment to all queries
3535

3636
Define tables

docs/services/rabbitmq.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Database commits
8585

8686
If the consumer callback performs database operations, then all database operations before each message publication should be performed in a transaction. This ensures that, if the database operations fail and the incoming message is not acknowledged, then they have a chance to succeed when that message is redelivered, since no partial work had been committed. This guidance applies to *each* message publication, so that work is committed before the related message is published for further processing.
8787

88-
The message publication should not be within the transaction block, if using a ``with`` statement with `psycopg2 <https://www.psycopg.org/docs/usage.html#with-statement>`__ or `Django <https://docs.djangoproject.com/en/5.2/topics/db/transactions/#django.db.transaction.atomic>`__. This ensures that the commit completes (e.g. without integrity errors), before a message is published for further processing.
88+
The message publication should not be within the transaction block, if using a ``with`` statement with `psycopg <https://www.psycopg.org/psycopg3/docs/basic/transactions.html#transaction-contexts>`__ or `Django <https://docs.djangoproject.com/en/5.2/topics/db/transactions/#django.db.transaction.atomic>`__. This ensures that the commit completes (e.g. without integrity errors), before a message is published for further processing.
8989

9090
.. _rabbitmq-acknowledgment:
9191

0 commit comments

Comments
 (0)