Fixed #31212 -- Updated psycopg links to HTTPS and new location.
This commit is contained in:
parent
32166a9f7c
commit
958977f662
|
@ -1,7 +1,7 @@
|
||||||
"""
|
"""
|
||||||
PostgreSQL database backend for Django.
|
PostgreSQL database backend for Django.
|
||||||
|
|
||||||
Requires psycopg 2: http://initd.org/projects/psycopg2
|
Requires psycopg 2: https://www.psycopg.org/
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
|
@ -230,7 +230,7 @@ class DatabaseOperations(BaseDatabaseOperations):
|
||||||
return ['DISTINCT'], []
|
return ['DISTINCT'], []
|
||||||
|
|
||||||
def last_executed_query(self, cursor, sql, params):
|
def last_executed_query(self, cursor, sql, params):
|
||||||
# http://initd.org/psycopg/docs/cursor.html#cursor.query
|
# https://www.psycopg.org/docs/cursor.html#cursor.query
|
||||||
# The query attribute is a Psycopg extension to the DB API 2.0.
|
# The query attribute is a Psycopg extension to the DB API 2.0.
|
||||||
if cursor.query is not None:
|
if cursor.query is not None:
|
||||||
return cursor.query.decode()
|
return cursor.query.decode()
|
||||||
|
|
|
@ -141,7 +141,7 @@ pygments_style = 'trac'
|
||||||
intersphinx_mapping = {
|
intersphinx_mapping = {
|
||||||
'python': ('https://docs.python.org/3/', None),
|
'python': ('https://docs.python.org/3/', None),
|
||||||
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
'sphinx': ('https://www.sphinx-doc.org/en/master/', None),
|
||||||
'psycopg2': ('http://initd.org/psycopg/docs/', None),
|
'psycopg2': ('https://www.psycopg.org/docs/', None),
|
||||||
}
|
}
|
||||||
|
|
||||||
# Python's docs don't change every week.
|
# Python's docs don't change every week.
|
||||||
|
|
|
@ -17,7 +17,7 @@ Alternately, you can `build from source`_. Consult the platform-specific
|
||||||
instructions if you are on :ref:`macos` or :ref:`windows`.
|
instructions if you are on :ref:`macos` or :ref:`windows`.
|
||||||
|
|
||||||
.. _PostGIS: https://postgis.net/
|
.. _PostGIS: https://postgis.net/
|
||||||
.. _psycopg2: http://initd.org/psycopg/
|
.. _psycopg2: https://www.psycopg.org/
|
||||||
.. _PostGIS requirements: https://postgis.net/docs/postgis_installation.html#install_requirements
|
.. _PostGIS requirements: https://postgis.net/docs/postgis_installation.html#install_requirements
|
||||||
.. _build from source: https://postgis.net/docs/postgis_installation.html#install_short_version
|
.. _build from source: https://postgis.net/docs/postgis_installation.html#install_short_version
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ PostgreSQL notes
|
||||||
Django supports PostgreSQL 9.5 and higher. `psycopg2`_ 2.5.4 or higher is
|
Django supports PostgreSQL 9.5 and higher. `psycopg2`_ 2.5.4 or higher is
|
||||||
required, though the latest release is recommended.
|
required, though the latest release is recommended.
|
||||||
|
|
||||||
.. _psycopg2: http://initd.org/psycopg/
|
.. _psycopg2: https://www.psycopg.org/
|
||||||
|
|
||||||
PostgreSQL connection settings
|
PostgreSQL connection settings
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
|
@ -368,9 +368,9 @@ the transaction. For the intended use cases (mail notifications, Celery tasks,
|
||||||
etc.), this should be fine. If it's not (if your follow-up action is so
|
etc.), this should be fine. If it's not (if your follow-up action is so
|
||||||
critical that its failure should mean the failure of the transaction itself),
|
critical that its failure should mean the failure of the transaction itself),
|
||||||
then you don't want to use the :func:`on_commit` hook. Instead, you may want
|
then you don't want to use the :func:`on_commit` hook. Instead, you may want
|
||||||
`two-phase commit`_ such as the `psycopg Two-Phase Commit protocol support`_
|
`two-phase commit`_ such as the :ref:`psycopg Two-Phase Commit protocol support
|
||||||
and the `optional Two-Phase Commit Extensions in the Python DB-API
|
<psycopg2:tpc>` and the `optional Two-Phase Commit Extensions in the Python
|
||||||
specification`_.
|
DB-API specification`_.
|
||||||
|
|
||||||
Callbacks are not run until autocommit is restored on the connection following
|
Callbacks are not run until autocommit is restored on the connection following
|
||||||
the commit (because otherwise any queries done in a callback would open an
|
the commit (because otherwise any queries done in a callback would open an
|
||||||
|
@ -387,7 +387,6 @@ autocommit is disabled and you are not within an atomic block will result in an
|
||||||
error.
|
error.
|
||||||
|
|
||||||
.. _two-phase commit: https://en.wikipedia.org/wiki/Two-phase_commit_protocol
|
.. _two-phase commit: https://en.wikipedia.org/wiki/Two-phase_commit_protocol
|
||||||
.. _psycopg Two-Phase Commit protocol support: http://initd.org/psycopg/docs/usage.html#tpc
|
|
||||||
.. _optional Two-Phase Commit Extensions in the Python DB-API specification: https://www.python.org/dev/peps/pep-0249/#optional-two-phase-commit-extensions
|
.. _optional Two-Phase Commit Extensions in the Python DB-API specification: https://www.python.org/dev/peps/pep-0249/#optional-two-phase-commit-extensions
|
||||||
|
|
||||||
Use in tests
|
Use in tests
|
||||||
|
|
|
@ -111,7 +111,7 @@ database queries, Django will need permission to create a test database.
|
||||||
.. _PostgreSQL: https://www.postgresql.org/
|
.. _PostgreSQL: https://www.postgresql.org/
|
||||||
.. _MariaDB: https://mariadb.org/
|
.. _MariaDB: https://mariadb.org/
|
||||||
.. _MySQL: https://www.mysql.com/
|
.. _MySQL: https://www.mysql.com/
|
||||||
.. _psycopg2: http://initd.org/psycopg/
|
.. _psycopg2: https://www.psycopg.org/
|
||||||
.. _SQLite: https://www.sqlite.org/
|
.. _SQLite: https://www.sqlite.org/
|
||||||
.. _cx_Oracle: https://oracle.github.io/python-cx_Oracle/
|
.. _cx_Oracle: https://oracle.github.io/python-cx_Oracle/
|
||||||
.. _Oracle: https://www.oracle.com/
|
.. _Oracle: https://www.oracle.com/
|
||||||
|
|
Loading…
Reference in New Issue