Prefer https:// URLs when available

This commit is contained in:
Jon Dufresne 2018-09-22 18:54:55 -07:00
parent 6b6b1a6e8d
commit b07e34e0b8
29 changed files with 121 additions and 121 deletions

View File

@ -12,7 +12,7 @@ environment:
matrix: matrix:
# For Python versions available on Appveyor, see # For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python # https://www.appveyor.com/docs/build-environment/
- {PYVER: "27", PYTHON_ARCH: "32"} - {PYVER: "27", PYTHON_ARCH: "32"}
- {PYVER: "27", PYTHON_ARCH: "64"} - {PYVER: "27", PYTHON_ARCH: "64"}
- {PYVER: "34", PYTHON_ARCH: "32"} - {PYVER: "34", PYTHON_ARCH: "32"}
@ -82,7 +82,7 @@ init:
- "%PYTHON%\\python -c \"import sys; print('64bit: ' + str(sys.maxsize > 2**32))\"" - "%PYTHON%\\python -c \"import sys; print('64bit: ' + str(sys.maxsize > 2**32))\""
# Get & Install NASM # Get & Install NASM
#- curl -L -o nasminst.exe http://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-installer-x64.exe && start /wait nasminst.exe /S #- curl -L -o nasminst.exe https://www.nasm.us/pub/nasm/releasebuilds/2.12.02/win64/nasm-2.12.02-installer-x64.exe && start /wait nasminst.exe /S
#- SET PATH="C:\Program Files (x86)\nasm;%PATH%" #- SET PATH="C:\Program Files (x86)\nasm;%PATH%"
# Fix problem with VS2008 Express and 64bit builds # Fix problem with VS2008 Express and 64bit builds

View File

@ -25,7 +25,7 @@ statement from all source files in the program, then also delete it here.
You should have received a copy of the GNU Lesser General Public License You should have received a copy of the GNU Lesser General Public License
along with psycopg2 (see the doc/ directory.) along with psycopg2 (see the doc/ directory.)
If not, see <http://www.gnu.org/licenses/>. If not, see <https://www.gnu.org/licenses/>.
Alternative licenses Alternative licenses

2
NEWS
View File

@ -357,7 +357,7 @@ Other changes:
- Dropped support for Python 2.4. Please use Psycopg 2.4.x if you need it. - Dropped support for Python 2.4. Please use Psycopg 2.4.x if you need it.
- `~psycopg2.errorcodes` map updated to PostgreSQL 9.2. - `~psycopg2.errorcodes` map updated to PostgreSQL 9.2.
- Dropped Zope adapter from source repository. ZPsycopgDA now has its own - Dropped Zope adapter from source repository. ZPsycopgDA now has its own
project at <http://github.com/psycopg/ZPsycopgDA>. project at <https://github.com/psycopg/ZPsycopgDA>.
What's new in psycopg 2.4.6 What's new in psycopg 2.4.6

View File

@ -156,7 +156,7 @@ geometric type:
.. |point| replace:: :sql:`point` .. |point| replace:: :sql:`point`
.. _point: http://www.postgresql.org/docs/current/static/datatype-geometric.html#DATATYPE-GEOMETRIC .. _point: https://www.postgresql.org/docs/current/static/datatype-geometric.html#DATATYPE-GEOMETRIC
The above function call results in the SQL command:: The above function call results in the SQL command::
@ -259,9 +259,9 @@ documentation), you should keep the connection in `~connection.autocommit`
mode if you wish to receive or send notifications in a timely manner. mode if you wish to receive or send notifications in a timely manner.
.. |LISTEN| replace:: :sql:`LISTEN` .. |LISTEN| replace:: :sql:`LISTEN`
.. _LISTEN: http://www.postgresql.org/docs/current/static/sql-listen.html .. _LISTEN: https://www.postgresql.org/docs/current/static/sql-listen.html
.. |NOTIFY| replace:: :sql:`NOTIFY` .. |NOTIFY| replace:: :sql:`NOTIFY`
.. _NOTIFY: http://www.postgresql.org/docs/current/static/sql-notify.html .. _NOTIFY: https://www.postgresql.org/docs/current/static/sql-notify.html
Notifications are received after every query execution. If the user is Notifications are received after every query execution. If the user is
interested in receiving notifications but not in performing any query, the interested in receiving notifications but not in performing any query, the
@ -375,7 +375,7 @@ completely non-blocking connection attempt: see the libpq documentation for
|PQconnectStart|_. |PQconnectStart|_.
.. |PQconnectStart| replace:: `!PQconnectStart()` .. |PQconnectStart| replace:: `!PQconnectStart()`
.. _PQconnectStart: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNECTSTARTPARAMS .. _PQconnectStart: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNECTSTARTPARAMS
The same loop should be also used to perform nonblocking queries: after The same loop should be also used to perform nonblocking queries: after
sending a query via `~cursor.execute()` or `~cursor.callproc()`, call sending a query via `~cursor.execute()` or `~cursor.callproc()`, call
@ -484,14 +484,14 @@ psycopg2 scope, as the callback can be tied to the libraries' implementation
details. You can check the `psycogreen`_ project for further informations and details. You can check the `psycogreen`_ project for further informations and
resources about the topic. resources about the topic.
.. _coroutine: http://en.wikipedia.org/wiki/Coroutine .. _coroutine: https://en.wikipedia.org/wiki/Coroutine
.. _greenlet: https://pypi.org/project/greenlet/ .. _greenlet: https://pypi.org/project/greenlet/
.. _green threads: http://en.wikipedia.org/wiki/Green_threads .. _green threads: https://en.wikipedia.org/wiki/Green_threads
.. _Eventlet: http://eventlet.net/ .. _Eventlet: https://eventlet.net/
.. _gevent: http://www.gevent.org/ .. _gevent: http://www.gevent.org/
.. _SQLAlchemy: http://www.sqlalchemy.org/ .. _SQLAlchemy: https://www.sqlalchemy.org/
.. _psycogreen: http://bitbucket.org/dvarrazzo/psycogreen/ .. _psycogreen: http://bitbucket.org/dvarrazzo/psycogreen/
.. __: http://www.postgresql.org/docs/current/static/libpq-async.html .. __: https://www.postgresql.org/docs/current/static/libpq-async.html
.. warning:: .. warning::
@ -536,7 +536,7 @@ Server version 9.4 adds a new feature called *Logical Replication*.
- PostgreSQL `Streaming Replication Protocol`__ - PostgreSQL `Streaming Replication Protocol`__
.. __: http://www.postgresql.org/docs/current/static/protocol-replication.html .. __: https://www.postgresql.org/docs/current/static/protocol-replication.html
Logical replication Quick-Start Logical replication Quick-Start

View File

@ -116,12 +116,12 @@ todo_include_todos = False
rst_epilog = """ rst_epilog = """
.. |DBAPI| replace:: DB API 2.0 .. |DBAPI| replace:: DB API 2.0
.. _DBAPI: http://www.python.org/dev/peps/pep-0249/ .. _DBAPI: https://www.python.org/dev/peps/pep-0249/
.. _transaction isolation level: .. _transaction isolation level:
http://www.postgresql.org/docs/current/static/transaction-iso.html https://www.postgresql.org/docs/current/static/transaction-iso.html
.. _mx.DateTime: http://www.egenix.com/products/python/mxBase/mxDateTime/ .. _mx.DateTime: https://www.egenix.com/products/python/mxBase/mxDateTime/
.. |MVCC| replace:: :abbr:`MVCC (Multiversion concurrency control)` .. |MVCC| replace:: :abbr:`MVCC (Multiversion concurrency control)`
""" """

View File

@ -198,7 +198,7 @@ The ``connection`` class
.. seealso:: the |PREPARE TRANSACTION|_ PostgreSQL command. .. seealso:: the |PREPARE TRANSACTION|_ PostgreSQL command.
.. |PREPARE TRANSACTION| replace:: :sql:`PREPARE TRANSACTION` .. |PREPARE TRANSACTION| replace:: :sql:`PREPARE TRANSACTION`
.. _PREPARE TRANSACTION: http://www.postgresql.org/docs/current/static/sql-prepare-transaction.html .. _PREPARE TRANSACTION: https://www.postgresql.org/docs/current/static/sql-prepare-transaction.html
.. index:: .. index::
@ -224,7 +224,7 @@ The ``connection`` class
.. seealso:: the |COMMIT PREPARED|_ PostgreSQL command. .. seealso:: the |COMMIT PREPARED|_ PostgreSQL command.
.. |COMMIT PREPARED| replace:: :sql:`COMMIT PREPARED` .. |COMMIT PREPARED| replace:: :sql:`COMMIT PREPARED`
.. _COMMIT PREPARED: http://www.postgresql.org/docs/current/static/sql-commit-prepared.html .. _COMMIT PREPARED: https://www.postgresql.org/docs/current/static/sql-commit-prepared.html
.. index:: .. index::
@ -246,7 +246,7 @@ The ``connection`` class
.. seealso:: the |ROLLBACK PREPARED|_ PostgreSQL command. .. seealso:: the |ROLLBACK PREPARED|_ PostgreSQL command.
.. |ROLLBACK PREPARED| replace:: :sql:`ROLLBACK PREPARED` .. |ROLLBACK PREPARED| replace:: :sql:`ROLLBACK PREPARED`
.. _ROLLBACK PREPARED: http://www.postgresql.org/docs/current/static/sql-rollback-prepared.html .. _ROLLBACK PREPARED: https://www.postgresql.org/docs/current/static/sql-rollback-prepared.html
.. index:: .. index::
@ -267,7 +267,7 @@ The ``connection`` class
transactions initiated by a program using such driver should be transactions initiated by a program using such driver should be
unpacked correctly. unpacked correctly.
.. __: http://jdbc.postgresql.org/ .. __: https://jdbc.postgresql.org/
Xids returned by `!tpc_recover()` also have extra attributes Xids returned by `!tpc_recover()` also have extra attributes
`~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`, `~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`,
@ -277,7 +277,7 @@ The ``connection`` class
.. seealso:: the |pg_prepared_xacts|_ system view. .. seealso:: the |pg_prepared_xacts|_ system view.
.. |pg_prepared_xacts| replace:: `pg_prepared_xacts` .. |pg_prepared_xacts| replace:: `pg_prepared_xacts`
.. _pg_prepared_xacts: http://www.postgresql.org/docs/current/static/view-pg-prepared-xacts.html .. _pg_prepared_xacts: https://www.postgresql.org/docs/current/static/view-pg-prepared-xacts.html
@ -309,7 +309,7 @@ The ``connection`` class
|PQcancel|_. |PQcancel|_.
.. |PQcancel| replace:: `!PQcancel()` .. |PQcancel| replace:: `!PQcancel()`
.. _PQcancel: http://www.postgresql.org/docs/current/static/libpq-cancel.html#LIBPQ-PQCANCEL .. _PQcancel: https://www.postgresql.org/docs/current/static/libpq-cancel.html#LIBPQ-PQCANCEL
.. versionadded:: 2.3 .. versionadded:: 2.3
@ -325,10 +325,10 @@ The ``connection`` class
available for recover. available for recover.
.. |RESET| replace:: :sql:`RESET` .. |RESET| replace:: :sql:`RESET`
.. _RESET: http://www.postgresql.org/docs/current/static/sql-reset.html .. _RESET: https://www.postgresql.org/docs/current/static/sql-reset.html
.. |SET SESSION AUTHORIZATION| replace:: :sql:`SET SESSION AUTHORIZATION` .. |SET SESSION AUTHORIZATION| replace:: :sql:`SET SESSION AUTHORIZATION`
.. __: http://www.postgresql.org/docs/current/static/sql-set-session-authorization.html .. __: https://www.postgresql.org/docs/current/static/sql-set-session-authorization.html
.. versionadded:: 2.0.12 .. versionadded:: 2.0.12
@ -366,7 +366,7 @@ The ``connection`` class
`autocommit` attribute. `autocommit` attribute.
.. _isolation level: .. _isolation level:
http://www.postgresql.org/docs/current/static/transaction-iso.html https://www.postgresql.org/docs/current/static/transaction-iso.html
Arguments set to `!None` (the default for all) will not be changed. Arguments set to `!None` (the default for all) will not be changed.
The parameters *isolation_level*, *readonly* and *deferrable* also The parameters *isolation_level*, *readonly* and *deferrable* also
@ -376,11 +376,11 @@ The ``connection`` class
|default_transaction_read_only|__, |default_transaction_deferrable|__. |default_transaction_read_only|__, |default_transaction_deferrable|__.
.. |default_transaction_isolation| replace:: :sql:`default_transaction_isolation` .. |default_transaction_isolation| replace:: :sql:`default_transaction_isolation`
.. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-ISOLATION .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-ISOLATION
.. |default_transaction_read_only| replace:: :sql:`default_transaction_read_only` .. |default_transaction_read_only| replace:: :sql:`default_transaction_read_only`
.. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-READ-ONLY
.. |default_transaction_deferrable| replace:: :sql:`default_transaction_deferrable` .. |default_transaction_deferrable| replace:: :sql:`default_transaction_deferrable`
.. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-DEFAULT-TRANSACTION-DEFERRABLE
The function must be invoked with no transaction in progress. The function must be invoked with no transaction in progress.
@ -388,7 +388,7 @@ The ``connection`` class
of the transaction parameters in the server. of the transaction parameters in the server.
.. |SET TRANSACTION| replace:: :sql:`SET TRANSACTION` .. |SET TRANSACTION| replace:: :sql:`SET TRANSACTION`
.. _SET TRANSACTION: http://www.postgresql.org/docs/current/static/sql-set-transaction.html .. _SET TRANSACTION: https://www.postgresql.org/docs/current/static/sql-set-transaction.html
.. versionadded:: 2.4.2 .. versionadded:: 2.4.2
@ -534,7 +534,7 @@ The ``connection`` class
is the encoding defined by the database. It should be one of the is the encoding defined by the database. It should be one of the
`characters set supported by PostgreSQL`__ `characters set supported by PostgreSQL`__
.. __: http://www.postgresql.org/docs/current/static/multibyte.html .. __: https://www.postgresql.org/docs/current/static/multibyte.html
.. index:: .. index::
@ -568,7 +568,7 @@ The ``connection`` class
configuration parameters`__ such as ``log_statement``, configuration parameters`__ such as ``log_statement``,
``client_min_messages``, ``log_min_duration_statement`` etc. ``client_min_messages``, ``log_min_duration_statement`` etc.
.. __: http://www.postgresql.org/docs/current/static/runtime-config-logging.html .. __: https://www.postgresql.org/docs/current/static/runtime-config-logging.html
.. attribute:: notifies .. attribute:: notifies
@ -612,7 +612,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQbackendPID()`__ for details. .. seealso:: libpq docs for `PQbackendPID()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQBACKENDPID .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQBACKENDPID
.. versionadded:: 2.0.8 .. versionadded:: 2.0.8
@ -633,7 +633,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQparameterStatus()`__ for details. .. seealso:: libpq docs for `PQparameterStatus()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPARAMETERSTATUS .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPARAMETERSTATUS
.. versionadded:: 2.0.12 .. versionadded:: 2.0.12
@ -656,7 +656,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQconninfo()`__ for details. .. seealso:: libpq docs for `PQconninfo()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFO .. __: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFO
.. versionadded:: 2.7 .. versionadded:: 2.7
@ -673,7 +673,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQtransactionStatus()`__ for details. .. seealso:: libpq docs for `PQtransactionStatus()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQTRANSACTIONSTATUS .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQTRANSACTIONSTATUS
.. index:: .. index::
@ -688,7 +688,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQprotocolVersion()`__ for details. .. seealso:: libpq docs for `PQprotocolVersion()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPROTOCOLVERSION .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQPROTOCOLVERSION
.. versionadded:: 2.0.12 .. versionadded:: 2.0.12
@ -706,7 +706,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQserverVersion()`__ for details. .. seealso:: libpq docs for `PQserverVersion()`__ for details.
.. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQSERVERVERSION .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQSERVERVERSION
.. versionadded:: 2.0.12 .. versionadded:: 2.0.12
@ -743,7 +743,7 @@ The ``connection`` class
`~psycopg2.extensions.lobject` to be instantiated. `~psycopg2.extensions.lobject` to be instantiated.
.. |lo_import| replace:: `!lo_import()` .. |lo_import| replace:: `!lo_import()`
.. _lo_import: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT .. _lo_import: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT
Available values for *mode* are: Available values for *mode* are:

View File

@ -67,10 +67,10 @@ The ``cursor`` class
|execute*|_ methods yet. |execute*|_ methods yet.
.. |pg_type| replace:: :sql:`pg_type` .. |pg_type| replace:: :sql:`pg_type`
.. _pg_type: http://www.postgresql.org/docs/current/static/catalog-pg-type.html .. _pg_type: https://www.postgresql.org/docs/current/static/catalog-pg-type.html
.. _PQgetlength: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQGETLENGTH .. _PQgetlength: https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQGETLENGTH
.. _PQfsize: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQFSIZE .. _PQfsize: https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQFSIZE
.. _NUMERIC: http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL .. _NUMERIC: https://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL
.. |NUMERIC| replace:: :sql:`NUMERIC` .. |NUMERIC| replace:: :sql:`NUMERIC`
.. versionchanged:: 2.4 .. versionchanged:: 2.4
@ -129,7 +129,7 @@ The ``cursor`` class
backward scroll (see the |declare-notes|__). backward scroll (see the |declare-notes|__).
.. |declare-notes| replace:: :sql:`DECLARE` notes .. |declare-notes| replace:: :sql:`DECLARE` notes
.. __: http://www.postgresql.org/docs/current/static/sql-declare.html#SQL-DECLARE-NOTES .. __: https://www.postgresql.org/docs/current/static/sql-declare.html#SQL-DECLARE-NOTES
.. note:: .. note::
@ -430,10 +430,10 @@ The ``cursor`` class
more flexibility. more flexibility.
.. |CREATE-TABLE| replace:: :sql:`CREATE TABLE` .. |CREATE-TABLE| replace:: :sql:`CREATE TABLE`
.. __: http://www.postgresql.org/docs/current/static/sql-createtable.html .. __: https://www.postgresql.org/docs/current/static/sql-createtable.html
.. |INSERT-RETURNING| replace:: :sql:`INSERT ... RETURNING` .. |INSERT-RETURNING| replace:: :sql:`INSERT ... RETURNING`
.. __: http://www.postgresql.org/docs/current/static/sql-insert.html .. __: https://www.postgresql.org/docs/current/static/sql-insert.html
.. attribute:: query .. attribute:: query
@ -620,7 +620,7 @@ The ``cursor`` class
... ...
.. |COPY| replace:: :sql:`COPY` .. |COPY| replace:: :sql:`COPY`
.. __: http://www.postgresql.org/docs/current/static/sql-copy.html .. __: https://www.postgresql.org/docs/current/static/sql-copy.html
.. versionadded:: 2.0.6 .. versionadded:: 2.0.6

View File

@ -39,7 +39,7 @@ From PostgreSQL documentation:
.. seealso:: `PostgreSQL Error Codes table`__ .. seealso:: `PostgreSQL Error Codes table`__
.. __: http://www.postgresql.org/docs/current/static/errcodes-appendix.html#ERRCODES-TABLE .. __: https://www.postgresql.org/docs/current/static/errcodes-appendix.html#ERRCODES-TABLE
An example of the available constants defined in the module: An example of the available constants defined in the module:

View File

@ -94,7 +94,7 @@ introspection etc.
The method uses the efficient |lo_export|_ libpq function. The method uses the efficient |lo_export|_ libpq function.
.. |lo_export| replace:: `!lo_export()` .. |lo_export| replace:: `!lo_export()`
.. _lo_export: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-EXPORT .. _lo_export: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-EXPORT
.. method:: seek(offset, whence=0) .. method:: seek(offset, whence=0)
@ -125,7 +125,7 @@ introspection etc.
libpq function. libpq function.
.. |lo_truncate| replace:: `!lo_truncate()` .. |lo_truncate| replace:: `!lo_truncate()`
.. _lo_truncate: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE .. _lo_truncate: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE
.. versionadded:: 2.2.0 .. versionadded:: 2.2.0
@ -423,8 +423,8 @@ details.
Used by Psycopg when adapting or casting unicode strings. See Used by Psycopg when adapting or casting unicode strings. See
:ref:`unicode-handling`. :ref:`unicode-handling`.
.. __: http://www.postgresql.org/docs/current/static/multibyte.html .. __: https://www.postgresql.org/docs/current/static/multibyte.html
.. __: http://docs.python.org/library/codecs.html#standard-encodings .. __: https://docs.python.org/library/codecs.html#standard-encodings
@ -490,7 +490,7 @@ Other functions
.. seealso:: libpq docs for `PQlibVersion()`__. .. seealso:: libpq docs for `PQlibVersion()`__.
.. __: http://www.postgresql.org/docs/current/static/libpq-misc.html#LIBPQ-PQLIBVERSION .. __: https://www.postgresql.org/docs/current/static/libpq-misc.html#LIBPQ-PQLIBVERSION
.. function:: make_dsn(dsn=None, \*\*kwargs) .. function:: make_dsn(dsn=None, \*\*kwargs)
@ -524,7 +524,7 @@ Other functions
`connection URIs`__ are only supported from libpq 9.2). Raise `connection URIs`__ are only supported from libpq 9.2). Raise
`~psycopg2.ProgrammingError` if the *dsn* is not valid. `~psycopg2.ProgrammingError` if the *dsn* is not valid.
.. __: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING .. __: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
Example:: Example::
@ -538,7 +538,7 @@ Other functions
.. seealso:: libpq docs for `PQconninfoParse()`__. .. seealso:: libpq docs for `PQconninfoParse()`__.
.. __: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFOPARSE .. __: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PQCONNINFOPARSE
.. function:: quote_ident(str, scope) .. function:: quote_ident(str, scope)
@ -552,7 +552,7 @@ Other functions
.. seealso:: libpq docs for `PQescapeIdentifier()`__ .. seealso:: libpq docs for `PQescapeIdentifier()`__
.. __: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQESCAPEIDENTIFIER .. __: https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQESCAPEIDENTIFIER
.. method:: encrypt_password(password, user, scope=None, algorithm=None) .. method:: encrypt_password(password, user, scope=None, algorithm=None)
@ -637,7 +637,7 @@ methods. The level can be set to one of the following constants:
.. seealso:: `Read Committed Isolation Level`__ in PostgreSQL .. seealso:: `Read Committed Isolation Level`__ in PostgreSQL
documentation. documentation.
.. __: http://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-READ-COMMITTED .. __: https://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-READ-COMMITTED
.. data:: ISOLATION_LEVEL_REPEATABLE_READ .. data:: ISOLATION_LEVEL_REPEATABLE_READ
@ -661,7 +661,7 @@ methods. The level can be set to one of the following constants:
.. seealso:: `Repeatable Read Isolation Level`__ in PostgreSQL .. seealso:: `Repeatable Read Isolation Level`__ in PostgreSQL
documentation. documentation.
.. __: http://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-REPEATABLE-READ .. __: https://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-REPEATABLE-READ
.. data:: ISOLATION_LEVEL_SERIALIZABLE .. data:: ISOLATION_LEVEL_SERIALIZABLE
@ -680,7 +680,7 @@ methods. The level can be set to one of the following constants:
.. seealso:: `Serializable Isolation Level`__ in PostgreSQL documentation. .. seealso:: `Serializable Isolation Level`__ in PostgreSQL documentation.
.. __: http://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-SERIALIZABLE .. __: https://www.postgresql.org/docs/current/static/transaction-iso.html#XACT-SERIALIZABLE
.. data:: ISOLATION_LEVEL_DEFAULT .. data:: ISOLATION_LEVEL_DEFAULT

View File

@ -542,10 +542,10 @@ fields to JSON) you can use the `register_json()` function.
The Python :py:mod:`json` module is used by default to convert Python objects The Python :py:mod:`json` module is used by default to convert Python objects
to JSON and to parse data from the database. to JSON and to parse data from the database.
.. _JSON: http://www.json.org/ .. _JSON: https://www.json.org/
.. |pgjson| replace:: :sql:`json` .. |pgjson| replace:: :sql:`json`
.. |jsonb| replace:: :sql:`jsonb` .. |jsonb| replace:: :sql:`jsonb`
.. _pgjson: http://www.postgresql.org/docs/current/static/datatype-json.html .. _pgjson: https://www.postgresql.org/docs/current/static/datatype-json.html
In order to pass a Python object to the database as query argument you can use In order to pass a Python object to the database as query argument you can use
the `Json` adapter:: the `Json` adapter::
@ -664,7 +664,7 @@ can be enabled using the `register_hstore()` function.
.. |hstore| replace:: :sql:`hstore` .. |hstore| replace:: :sql:`hstore`
.. _hstore: http://www.postgresql.org/docs/current/static/hstore.html .. _hstore: https://www.postgresql.org/docs/current/static/hstore.html
@ -686,7 +686,7 @@ after a table row type) into a Python named tuple, or into a regular tuple if
:py:func:`collections.namedtuple` is not found. :py:func:`collections.namedtuple` is not found.
.. |CREATE TYPE| replace:: :sql:`CREATE TYPE` .. |CREATE TYPE| replace:: :sql:`CREATE TYPE`
.. _CREATE TYPE: http://www.postgresql.org/docs/current/static/sql-createtype.html .. _CREATE TYPE: https://www.postgresql.org/docs/current/static/sql-createtype.html
.. doctest:: .. doctest::
@ -800,7 +800,7 @@ PostgreSQL |range|_ types. Builtin |range| types are supported out-of-the-box;
user-defined |range| types can be adapted using `register_range()`. user-defined |range| types can be adapted using `register_range()`.
.. |range| replace:: :sql:`range` .. |range| replace:: :sql:`range`
.. _range: http://www.postgresql.org/docs/current/static/rangetypes.html .. _range: https://www.postgresql.org/docs/current/static/rangetypes.html
.. autoclass:: Range .. autoclass:: Range
@ -809,7 +809,7 @@ user-defined |range| types can be adapted using `register_range()`.
features: it doesn't perform normalization and doesn't implement all the features: it doesn't perform normalization and doesn't implement all the
operators__ supported by the database. operators__ supported by the database.
.. __: http://www.postgresql.org/docs/current/static/functions-range.html#RANGE-OPERATORS-TABLE .. __: https://www.postgresql.org/docs/current/static/functions-range.html#RANGE-OPERATORS-TABLE
`!Range` objects are immutable, hashable, and support the ``in`` operator `!Range` objects are immutable, hashable, and support the ``in`` operator
(checking if an element is within the range). They can be tested for (checking if an element is within the range). They can be tested for

View File

@ -40,7 +40,7 @@ I receive the error *current transaction is aborted, commands ignored until end
PostgreSQL supports nested transactions using the |SAVEPOINT|_ command). PostgreSQL supports nested transactions using the |SAVEPOINT|_ command).
.. |SAVEPOINT| replace:: :sql:`SAVEPOINT` .. |SAVEPOINT| replace:: :sql:`SAVEPOINT`
.. _SAVEPOINT: http://www.postgresql.org/docs/current/static/sql-savepoint.html .. _SAVEPOINT: https://www.postgresql.org/docs/current/static/sql-savepoint.html
.. _faq-transaction-aborted-multiprocess: .. _faq-transaction-aborted-multiprocess:
@ -184,8 +184,8 @@ Transferring binary data from PostgreSQL 9.0 doesn't work.
session before reading binary data; session before reading binary data;
- upgrade the libpq library on the client to at least 9.0. - upgrade the libpq library on the client to at least 9.0.
.. __: http://www.postgresql.org/docs/current/static/datatype-binary.html .. __: https://www.postgresql.org/docs/current/static/datatype-binary.html
.. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
.. _faq-array: .. _faq-array:
@ -318,7 +318,7 @@ I can't compile `!psycopg2`: the compiler says *error: libpq-fe.h: No such file
:program:`pg_config` at install time and the libpq at runtime. :program:`pg_config` at install time and the libpq at runtime.
.. |lo_truncate| replace:: `!lo_truncate()` .. |lo_truncate| replace:: `!lo_truncate()`
.. _lo_truncate: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE .. _lo_truncate: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-TRUNCATE
.. _faq-import-mod_wsgi: .. _faq-import-mod_wsgi:
@ -332,5 +332,5 @@ Psycopg raises *ImportError: cannot import name tz* on import in mod_wsgi / ASP,
use the WSGIPythonEggs__ directive. use the WSGIPythonEggs__ directive.
.. _egg: http://peak.telecommunity.com/DevCenter/PythonEggs .. _egg: http://peak.telecommunity.com/DevCenter/PythonEggs
.. __: http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache .. __: https://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache
.. __: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonEggs .. __: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIPythonEggs.html

View File

@ -24,9 +24,9 @@ Psycopg 2 is both Unicode and Python 3 friendly.
.. _Psycopg: http://initd.org/psycopg/ .. _Psycopg: http://initd.org/psycopg/
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
.. _Python: http://www.python.org/ .. _Python: https://www.python.org/
.. _libpq: http://www.postgresql.org/docs/current/static/libpq.html .. _libpq: https://www.postgresql.org/docs/current/static/libpq.html
.. rubric:: Contents .. rubric:: Contents

View File

@ -12,11 +12,11 @@ to use Psycopg on a different Python implementation (PyPy, Jython, IronPython)
there is an experimental `porting of Psycopg for Ctypes`__, but it is not as there is an experimental `porting of Psycopg for Ctypes`__, but it is not as
mature as the C implementation yet. mature as the C implementation yet.
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
.. _Python: http://www.python.org/ .. _Python: https://www.python.org/
.. _libpq: http://www.postgresql.org/docs/current/static/libpq.html .. _libpq: https://www.postgresql.org/docs/current/static/libpq.html
.. _CPython: http://en.wikipedia.org/wiki/CPython .. _CPython: https://en.wikipedia.org/wiki/CPython
.. _Ctypes: http://docs.python.org/library/ctypes.html .. _Ctypes: https://docs.python.org/library/ctypes.html
.. __: https://github.com/mvantellingen/psycopg2-ctypes .. __: https://github.com/mvantellingen/psycopg2-ctypes
@ -152,7 +152,7 @@ using something like ``pip install -U pip``), then you can run:
.. __: PyPI-binary_ .. __: PyPI-binary_
.. _PyPI-binary: https://pypi.org/project/psycopg2-binary/ .. _PyPI-binary: https://pypi.org/project/psycopg2-binary/
.. _wheel: http://pythonwheels.com/ .. _wheel: https://pythonwheels.com/
.. note:: .. note::

View File

@ -50,11 +50,11 @@ The module interface respects the standard defined in the |DBAPI|_.
using `environment variables`__. using `environment variables`__.
.. __: .. __:
.. _connstring: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING .. _connstring: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
.. __: .. __:
.. _connparams: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS .. _connparams: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-PARAMKEYWORDS
.. __: .. __:
.. _connenvvars: http://www.postgresql.org/docs/current/static/libpq-envars.html .. _connenvvars: https://www.postgresql.org/docs/current/static/libpq-envars.html
Using the *connection_factory* parameter a different class or Using the *connection_factory* parameter a different class or
connections factory can be specified. It should be a callable object connections factory can be specified. It should be a callable object

View File

@ -198,8 +198,8 @@ called `SQL injection`_ and is known to be one of the most widespread forms of
attack to database servers. Before continuing, please print `this page`__ as a attack to database servers. Before continuing, please print `this page`__ as a
memo and hang it onto your desk. memo and hang it onto your desk.
.. _SQL injection: http://en.wikipedia.org/wiki/SQL_injection .. _SQL injection: https://en.wikipedia.org/wiki/SQL_injection
.. __: http://xkcd.com/327/ .. __: https://xkcd.com/327/
Psycopg can `automatically convert Python objects to and from SQL Psycopg can `automatically convert Python objects to and from SQL
literals`__: using this feature your code will be more robust and literals`__: using this feature your code will be more robust and
@ -351,7 +351,7 @@ converted into `!Decimal`.
This of course may imply a loss of precision. This of course may imply a loss of precision.
.. seealso:: `PostgreSQL numeric types .. seealso:: `PostgreSQL numeric types
<http://www.postgresql.org/docs/current/static/datatype-numeric.html>`__ <https://www.postgresql.org/docs/current/static/datatype-numeric.html>`__
.. index:: .. index::
@ -391,8 +391,8 @@ defined on the database connection (the `PostgreSQL encoding`__, available in
>>> cur.execute("INSERT INTO test (num, data) VALUES (%s,%s);", (74, u)) >>> cur.execute("INSERT INTO test (num, data) VALUES (%s,%s);", (74, u))
.. __: http://www.postgresql.org/docs/current/static/multibyte.html .. __: https://www.postgresql.org/docs/current/static/multibyte.html
.. __: http://docs.python.org/library/codecs.html#standard-encodings .. __: https://docs.python.org/library/codecs.html
When reading data from the database, in Python 2 the strings returned are When reading data from the database, in Python 2 the strings returned are
usually 8 bit `!str` objects encoded in the database client encoding:: usually 8 bit `!str` objects encoded in the database client encoding::
@ -465,7 +465,7 @@ type `!str`). Any object implementing the `Revised Buffer Protocol`__ should
be usable as binary type. Received data is returned as `!buffer` (in Python 2) be usable as binary type. Received data is returned as `!buffer` (in Python 2)
or `!memoryview` (in Python 3). or `!memoryview` (in Python 3).
.. __: http://www.python.org/dev/peps/pep-3118/ .. __: https://www.python.org/dev/peps/pep-3118/
.. versionchanged:: 2.4 .. versionchanged:: 2.4
only strings were supported before. only strings were supported before.
@ -494,8 +494,8 @@ or `!memoryview` (in Python 3).
server configuration file or in the client session (using a query such as server configuration file or in the client session (using a query such as
``SET bytea_output TO escape;``) before receiving binary data. ``SET bytea_output TO escape;``) before receiving binary data.
.. __: http://www.postgresql.org/docs/current/static/datatype-binary.html .. __: https://www.postgresql.org/docs/current/static/datatype-binary.html
.. __: http://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
.. index:: .. index::
@ -527,7 +527,7 @@ the same way::
"SELECT '38 days 6027.425337 seconds';" "SELECT '38 days 6027.425337 seconds';"
.. seealso:: `PostgreSQL date/time types .. seealso:: `PostgreSQL date/time types
<http://www.postgresql.org/docs/current/static/datatype-datetime.html>`__ <https://www.postgresql.org/docs/current/static/datatype-datetime.html>`__
.. index:: .. index::
@ -622,7 +622,7 @@ Python lists are converted into PostgreSQL :sql:`ARRAY`\ s::
Furthermore :sql:`ANY` can also work with empty lists, whereas :sql:`IN ()` Furthermore :sql:`ANY` can also work with empty lists, whereas :sql:`IN ()`
is a SQL syntax error. is a SQL syntax error.
.. __: http://www.postgresql.org/docs/current/static/functions-subquery.html#FUNCTIONS-SUBQUERY-ANY-SOME .. __: https://www.postgresql.org/docs/current/static/functions-subquery.html#FUNCTIONS-SUBQUERY-ANY-SOME
.. note:: .. note::
@ -846,7 +846,7 @@ lifetime extends well after `~connection.commit()`, calling
.. |DECLARE| replace:: :sql:`DECLARE` .. |DECLARE| replace:: :sql:`DECLARE`
.. _DECLARE: http://www.postgresql.org/docs/current/static/sql-declare.html .. _DECLARE: https://www.postgresql.org/docs/current/static/sql-declare.html
@ -876,7 +876,7 @@ forked processes`__, so when using a module such as `multiprocessing` or a
forking web deploy method such as FastCGI make sure to create the connections forking web deploy method such as FastCGI make sure to create the connections
*after* the fork. *after* the fork.
.. __: http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNECT .. __: https://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNECT
Connections shouldn't be shared either by different green threads: see Connections shouldn't be shared either by different green threads: see
:ref:`green-support` for further details. :ref:`green-support` for further details.
@ -920,7 +920,7 @@ Please refer to the documentation of the single methods for details and
examples. examples.
.. |COPY| replace:: :sql:`COPY` .. |COPY| replace:: :sql:`COPY`
.. __: http://www.postgresql.org/docs/current/static/sql-copy.html .. __: https://www.postgresql.org/docs/current/static/sql-copy.html
@ -937,7 +937,7 @@ access to user data that is stored in a special large-object structure. They
are useful with data values too large to be manipulated conveniently as a are useful with data values too large to be manipulated conveniently as a
whole. whole.
.. __: http://www.postgresql.org/docs/current/static/largeobjects.html .. __: https://www.postgresql.org/docs/current/static/largeobjects.html
Psycopg allows access to the large object using the Psycopg allows access to the large object using the
`~psycopg2.extensions.lobject` class. Objects are generated using the `~psycopg2.extensions.lobject` class. Objects are generated using the
@ -948,9 +948,9 @@ Psycopg large object support efficient import/export with file system files
using the |lo_import|_ and |lo_export|_ libpq functions. using the |lo_import|_ and |lo_export|_ libpq functions.
.. |lo_import| replace:: `!lo_import()` .. |lo_import| replace:: `!lo_import()`
.. _lo_import: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT .. _lo_import: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-IMPORT
.. |lo_export| replace:: `!lo_export()` .. |lo_export| replace:: `!lo_export()`
.. _lo_export: http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-EXPORT .. _lo_export: https://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-EXPORT
.. versionchanged:: 2.6 .. versionchanged:: 2.6
added support for large objects greated than 2GB. Note that the support is added support for large objects greated than 2GB. Note that the support is
@ -1014,5 +1014,5 @@ transactions produced by a Java program.
For further details see the documentation for the above methods. For further details see the documentation for the above methods.
.. __: http://www.opengroup.org/bookstore/catalog/c193.htm .. __: https://publications.opengroup.org/c193
.. __: http://jdbc.postgresql.org/ .. __: https://jdbc.postgresql.org/

View File

@ -8,8 +8,8 @@ small and fast, and stable as a rock.
Homepage: http://initd.org/projects/psycopg2 Homepage: http://initd.org/projects/psycopg2
.. _PostgreSQL: http://www.postgresql.org/ .. _PostgreSQL: https://www.postgresql.org/
.. _Python: http://www.python.org/ .. _Python: https://www.python.org/
:Groups: :Groups:
* `Connections creation`: connect * `Connections creation`: connect
@ -43,7 +43,7 @@ Homepage: http://initd.org/projects/psycopg2
# Note: the first internal import should be _psycopg, otherwise the real cause # Note: the first internal import should be _psycopg, otherwise the real cause
# of a failed loading of the C module may get hidden, see # of a failed loading of the C module may get hidden, see
# http://archives.postgresql.org/psycopg/2011-02/msg00044.php # https://archives.postgresql.org/psycopg/2011-02/msg00044.php
# Import the DBAPI-2.0 stuff into top-level module. # Import the DBAPI-2.0 stuff into top-level module.

View File

@ -26,7 +26,7 @@ This module contains symbolic names for all PostgreSQL error codes.
# #
# Based on: # Based on:
# #
# http://www.postgresql.org/docs/current/static/errcodes-appendix.html # https://www.postgresql.org/docs/current/static/errcodes-appendix.html
# #

View File

@ -8,7 +8,7 @@ This module holds all the extensions to the DBAPI-2.0 provided by psycopg.
- `adapt()` -- exposes the PEP-246_ compatible adapting mechanism used - `adapt()` -- exposes the PEP-246_ compatible adapting mechanism used
by psycopg to adapt Python types to PostgreSQL ones by psycopg to adapt Python types to PostgreSQL ones
.. _PEP-246: http://www.python.org/peps/pep-0246.html .. _PEP-246: https://www.python.org/dev/peps/pep-0246/
""" """
# psycopg/extensions.py - DBAPI-2.0 extensions specific to psycopg # psycopg/extensions.py - DBAPI-2.0 extensions specific to psycopg
# #

View File

@ -404,7 +404,7 @@ class NamedTupleCursor(_cursor):
class LoggingConnection(_connection): class LoggingConnection(_connection):
"""A connection that logs all queries to a file or logger__ object. """A connection that logs all queries to a file or logger__ object.
.. __: http://docs.python.org/library/logging.html .. __: https://docs.python.org/library/logging.html
""" """
def initialize(self, logobj): def initialize(self, logobj):
@ -638,8 +638,8 @@ class ReplicationCursor(_replicationCursor):
class UUID_adapter(object): class UUID_adapter(object):
"""Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__. """Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__.
.. __: http://docs.python.org/library/uuid.html .. __: https://docs.python.org/library/uuid.html
.. __: http://www.postgresql.org/docs/current/static/datatype-uuid.html .. __: https://www.postgresql.org/docs/current/static/datatype-uuid.html
""" """
def __init__(self, uuid): def __init__(self, uuid):

View File

@ -44,7 +44,7 @@ class FixedOffsetTimezone(datetime.tzinfo):
offset and name that instance will be returned. This saves memory and offset and name that instance will be returned. This saves memory and
improves comparability. improves comparability.
.. __: http://docs.python.org/library/datetime.html#datetime-tzinfo .. __: https://docs.python.org/library/datetime.html
""" """
_name = None _name = None
_offset = ZERO _offset = ZERO

View File

@ -152,7 +152,7 @@ static const char diagnosticsType_doc[] =
"Please refer to the `PostgreSQL documentation`__ for the meaning of all" "Please refer to the `PostgreSQL documentation`__ for the meaning of all"
" the attributes.\n\n" " the attributes.\n\n"
".. |PQresultErrorField| replace:: `!PQresultErrorField()`\n" ".. |PQresultErrorField| replace:: `!PQresultErrorField()`\n"
".. _PQresultErrorField: http://www.postgresql.org/docs/current/static/" ".. _PQresultErrorField: https://www.postgresql.org/docs/current/static/"
"libpq-exec.html#LIBPQ-PQRESULTERRORFIELD\n" "libpq-exec.html#LIBPQ-PQRESULTERRORFIELD\n"
".. __: PQresultErrorField_\n"; ".. __: PQresultErrorField_\n";

View File

@ -48,7 +48,7 @@ extern "C" {
"See `~psycopg2.extras.wait_select()` for an example of a wait callback\n" \ "See `~psycopg2.extras.wait_select()` for an example of a wait callback\n" \
"implementation.\n" \ "implementation.\n" \
"\n" \ "\n" \
".. _Eventlet: http://eventlet.net/\n" \ ".. _Eventlet: https://eventlet.net/\n" \
".. _gevent: http://www.gevent.org/\n" ".. _gevent: http://www.gevent.org/\n"
HIDDEN PyObject *psyco_set_wait_callback(PyObject *self, PyObject *obj); HIDDEN PyObject *psyco_set_wait_callback(PyObject *self, PyObject *obj);

View File

@ -79,7 +79,7 @@ strip_severity(const char *msg)
/* Returns the Python exception corresponding to an SQLSTATE error /* Returns the Python exception corresponding to an SQLSTATE error
code. A list of error codes can be found at: code. A list of error codes can be found at:
http://www.postgresql.org/docs/current/static/errcodes-appendix.html */ https://www.postgresql.org/docs/current/static/errcodes-appendix.html */
BORROWED static PyObject * BORROWED static PyObject *
exception_from_sqlstate(const char *sqlstate) exception_from_sqlstate(const char *sqlstate)
{ {

View File

@ -212,7 +212,7 @@ static const char hex_lut[128] = {
/* Parse a bytea output buffer encoded in 'hex' format. /* Parse a bytea output buffer encoded in 'hex' format.
* *
* the format is described in * the format is described in
* http://www.postgresql.org/docs/current/static/datatype-binary.html * https://www.postgresql.org/docs/current/static/datatype-binary.html
* *
* Parse the buffer in 'bufin', whose length is 'sizein'. * Parse the buffer in 'bufin', whose length is 'sizein'.
* Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size. * Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size.
@ -262,7 +262,7 @@ exit:
/* Parse a bytea output buffer encoded in 'escape' format. /* Parse a bytea output buffer encoded in 'escape' format.
* *
* the format is described in * the format is described in
* http://www.postgresql.org/docs/current/static/datatype-binary.html * https://www.postgresql.org/docs/current/static/datatype-binary.html
* *
* Parse the buffer in 'bufin', whose length is 'sizein'. * Parse the buffer in 'bufin', whose length is 'sizein'.
* Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size. * Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size.

View File

@ -130,7 +130,7 @@ def parse_errors_sgml(url):
return classes, errors return classes, errors
errors_sgml_url = \ errors_sgml_url = \
"http://www.postgresql.org/docs/%s/static/errcodes-appendix.html" "https://www.postgresql.org/docs/%s/static/errcodes-appendix.html"
errors_txt_url = \ errors_txt_url = \
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;" \ "http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;" \

View File

@ -47,7 +47,7 @@ try:
except ImportError: except ImportError:
import ConfigParser as configparser import ConfigParser as configparser
# Take a look at http://www.python.org/dev/peps/pep-0440/ # Take a look at https://www.python.org/dev/peps/pep-0440/
# for a consistent versioning pattern. # for a consistent versioning pattern.
PSYCOPG_VERSION = '2.8.dev0' PSYCOPG_VERSION = '2.8.dev0'

View File

@ -504,7 +504,7 @@ class CursorTests(ConnectingTestCase):
def test_bad_subclass(self): def test_bad_subclass(self):
# check that we get an error message instead of a segfault # check that we get an error message instead of a segfault
# for badly written subclasses. # for badly written subclasses.
# see http://stackoverflow.com/questions/22019341/ # see https://stackoverflow.com/questions/22019341/
class StupidCursor(psycopg2.extensions.cursor): class StupidCursor(psycopg2.extensions.cursor):
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
# I am stupid so not calling superclass init # I am stupid so not calling superclass init

View File

@ -46,8 +46,8 @@ class QuotingTestCase(ConnectingTestCase):
The tests also check that no warning is raised ('escape_string_warning' The tests also check that no warning is raised ('escape_string_warning'
should be on). should be on).
http://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS https://www.postgresql.org/docs/current/static/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS
http://www.postgresql.org/docs/current/static/runtime-config-compatible.html https://www.postgresql.org/docs/current/static/runtime-config-compatible.html
""" """
def test_string(self): def test_string(self):
data = """some data with \t chars data = """some data with \t chars

View File

@ -50,7 +50,7 @@ else:
# Silence warnings caused by the stubbornness of the Python unittest # Silence warnings caused by the stubbornness of the Python unittest
# maintainers # maintainers
# http://bugs.python.org/issue9424 # https://bugs.python.org/issue9424
if (not hasattr(unittest.TestCase, 'assert_') if (not hasattr(unittest.TestCase, 'assert_')
or unittest.TestCase.assert_ is not unittest.TestCase.assertTrue): or unittest.TestCase.assert_ is not unittest.TestCase.assertTrue):
# mavaff... # mavaff...