summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-10 22:16:23 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2018-10-10 22:16:23 +0100
commit9c905741da4b9d141e5cc51f65ec15c5d7abb7c4 (patch)
tree6cd9b84e03252da09be7322a68eb35131789b153
parent2e823273d669a9f4737a047b980cc5d60dd6f244 (diff)
parent5010a65d77117987a241124379e19dcd10938a50 (diff)
downloadpsycopg2-9c905741da4b9d141e5cc51f65ec15c5d7abb7c4.tar.gz
Merge branch 'https'
-rw-r--r--.appveyor.yml4
-rw-r--r--LICENSE2
-rw-r--r--NEWS2
-rw-r--r--doc/src/advanced.rst20
-rw-r--r--doc/src/conf.py6
-rw-r--r--doc/src/connection.rst46
-rw-r--r--doc/src/cursor.rst16
-rw-r--r--doc/src/errorcodes.rst2
-rw-r--r--doc/src/extensions.rst22
-rw-r--r--doc/src/extras.rst12
-rw-r--r--doc/src/faq.rst12
-rw-r--r--doc/src/index.rst6
-rw-r--r--doc/src/install.rst12
-rw-r--r--doc/src/module.rst6
-rw-r--r--doc/src/usage.rst36
-rw-r--r--lib/__init__.py6
-rw-r--r--lib/errorcodes.py2
-rw-r--r--lib/extensions.py2
-rw-r--r--lib/extras.py6
-rw-r--r--lib/tz.py2
-rw-r--r--psycopg/diagnostics_type.c2
-rw-r--r--psycopg/green.h2
-rw-r--r--psycopg/pqpath.c2
-rw-r--r--psycopg/typecast_binary.c4
-rwxr-xr-xscripts/make_errorcodes.py2
-rw-r--r--setup.py2
-rwxr-xr-xtests/test_cursor.py2
-rwxr-xr-xtests/test_quote.py4
-rw-r--r--tests/testutils.py2
29 files changed, 122 insertions, 122 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index d85d3ef..a2d9c34 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -12,7 +12,7 @@ environment:
matrix:
# 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: "64"}
- {PYVER: "34", PYTHON_ARCH: "32"}
@@ -82,7 +82,7 @@ init:
- "%PYTHON%\\python -c \"import sys; print('64bit: ' + str(sys.maxsize > 2**32))\""
# 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%"
# Fix problem with VS2008 Express and 64bit builds
diff --git a/LICENSE b/LICENSE
index 8974d77..9029e70 100644
--- a/LICENSE
+++ b/LICENSE
@@ -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
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
diff --git a/NEWS b/NEWS
index 5e2b1cd..d3f4cfd 100644
--- a/NEWS
+++ b/NEWS
@@ -364,7 +364,7 @@ Other changes:
- Dropped support for Python 2.4. Please use Psycopg 2.4.x if you need it.
- `~psycopg2.errorcodes` map updated to PostgreSQL 9.2.
- 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
diff --git a/doc/src/advanced.rst b/doc/src/advanced.rst
index 724cb28..62873e7 100644
--- a/doc/src/advanced.rst
+++ b/doc/src/advanced.rst
@@ -156,7 +156,7 @@ geometric type:
.. |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::
@@ -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.
.. |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: 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
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| 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
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
resources about the topic.
-.. _coroutine: http://en.wikipedia.org/wiki/Coroutine
+.. _coroutine: https://en.wikipedia.org/wiki/Coroutine
.. _greenlet: https://pypi.org/project/greenlet/
-.. _green threads: http://en.wikipedia.org/wiki/Green_threads
-.. _Eventlet: http://eventlet.net/
+.. _green threads: https://en.wikipedia.org/wiki/Green_threads
+.. _Eventlet: https://eventlet.net/
.. _gevent: http://www.gevent.org/
-.. _SQLAlchemy: http://www.sqlalchemy.org/
+.. _SQLAlchemy: https://www.sqlalchemy.org/
.. _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::
@@ -536,7 +536,7 @@ Server version 9.4 adds a new feature called *Logical Replication*.
- 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
diff --git a/doc/src/conf.py b/doc/src/conf.py
index 867afb7..fa22a91 100644
--- a/doc/src/conf.py
+++ b/doc/src/conf.py
@@ -116,12 +116,12 @@ todo_include_todos = False
rst_epilog = """
.. |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:
- 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)`
"""
diff --git a/doc/src/connection.rst b/doc/src/connection.rst
index f6e3f4a..bd192d6 100644
--- a/doc/src/connection.rst
+++ b/doc/src/connection.rst
@@ -198,7 +198,7 @@ The ``connection`` class
.. seealso:: the |PREPARE TRANSACTION|_ PostgreSQL command.
.. |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::
@@ -224,7 +224,7 @@ The ``connection`` class
.. seealso:: the |COMMIT PREPARED|_ PostgreSQL command.
.. |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::
@@ -246,7 +246,7 @@ The ``connection`` class
.. seealso:: the |ROLLBACK PREPARED|_ PostgreSQL command.
.. |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::
@@ -267,7 +267,7 @@ The ``connection`` class
transactions initiated by a program using such driver should be
unpacked correctly.
- .. __: http://jdbc.postgresql.org/
+ .. __: https://jdbc.postgresql.org/
Xids returned by `!tpc_recover()` also have extra attributes
`~psycopg2.extensions.Xid.prepared`, `~psycopg2.extensions.Xid.owner`,
@@ -277,7 +277,7 @@ The ``connection`` class
.. seealso:: the |pg_prepared_xacts|_ system view.
.. |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| 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
@@ -325,10 +325,10 @@ The ``connection`` class
available for recover.
.. |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`
- .. __: 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
@@ -366,7 +366,7 @@ The ``connection`` class
`autocommit` attribute.
.. _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.
The parameters *isolation_level*, *readonly* and *deferrable* also
@@ -376,11 +376,11 @@ The ``connection`` class
|default_transaction_read_only|__, |default_transaction_deferrable|__.
.. |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`
- .. __: 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`
- .. __: 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.
@@ -388,7 +388,7 @@ The ``connection`` class
of the transaction parameters in the server.
.. |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
@@ -534,7 +534,7 @@ The ``connection`` class
is the encoding defined by the database. It should be one of the
`characters set supported by PostgreSQL`__
- .. __: http://www.postgresql.org/docs/current/static/multibyte.html
+ .. __: https://www.postgresql.org/docs/current/static/multibyte.html
.. index::
@@ -568,7 +568,7 @@ The ``connection`` class
configuration parameters`__ such as ``log_statement``,
``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
@@ -612,7 +612,7 @@ The ``connection`` class
.. seealso:: libpq docs for `PQhost()`__ for details.
- .. __: http://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQHOST
+ .. __: https://www.postgresql.org/docs/current/static/libpq-status.html#LIBPQ-PQHOST
.. versionadded:: 2.8.0
@@ -630,7 +630,7 @@ The ``connection`` class
.. 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
@@ -651,7 +651,7 @@ The ``connection`` class
.. 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
@@ -674,7 +674,7 @@ The ``connection`` class
.. 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
@@ -691,7 +691,7 @@ The ``connection`` class
.. 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::
@@ -706,7 +706,7 @@ The ``connection`` class
.. 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
@@ -724,7 +724,7 @@ The ``connection`` class
.. 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
@@ -761,7 +761,7 @@ The ``connection`` class
`~psycopg2.extensions.lobject` to be instantiated.
.. |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:
diff --git a/doc/src/cursor.rst b/doc/src/cursor.rst
index 5a6935e..057ccbf 100644
--- a/doc/src/cursor.rst
+++ b/doc/src/cursor.rst
@@ -67,10 +67,10 @@ The ``cursor`` class
|execute*|_ methods yet.
.. |pg_type| replace:: :sql:`pg_type`
- .. _pg_type: http://www.postgresql.org/docs/current/static/catalog-pg-type.html
- .. _PQgetlength: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQGETLENGTH
- .. _PQfsize: http://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
+ .. _pg_type: https://www.postgresql.org/docs/current/static/catalog-pg-type.html
+ .. _PQgetlength: https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQGETLENGTH
+ .. _PQfsize: https://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQFSIZE
+ .. _NUMERIC: https://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-NUMERIC-DECIMAL
.. |NUMERIC| replace:: :sql:`NUMERIC`
.. versionchanged:: 2.4
@@ -129,7 +129,7 @@ The ``cursor`` class
backward scroll (see the |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::
@@ -430,10 +430,10 @@ The ``cursor`` class
more flexibility.
.. |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`
- .. __: http://www.postgresql.org/docs/current/static/sql-insert.html
+ .. __: https://www.postgresql.org/docs/current/static/sql-insert.html
.. attribute:: query
@@ -620,7 +620,7 @@ The ``cursor`` class
...
.. |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
diff --git a/doc/src/errorcodes.rst b/doc/src/errorcodes.rst
index ab49afb..510d0f2 100644
--- a/doc/src/errorcodes.rst
+++ b/doc/src/errorcodes.rst
@@ -39,7 +39,7 @@ From PostgreSQL documentation:
.. 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:
diff --git a/doc/src/extensions.rst b/doc/src/extensions.rst
index 14a18ed..5bcc26f 100644
--- a/doc/src/extensions.rst
+++ b/doc/src/extensions.rst
@@ -94,7 +94,7 @@ introspection etc.
The method uses the efficient |lo_export|_ libpq function.
.. |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)
@@ -125,7 +125,7 @@ introspection etc.
libpq function.
.. |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
@@ -427,8 +427,8 @@ details.
Used by Psycopg when adapting or casting unicode strings. See
:ref:`unicode-handling`.
- .. __: http://www.postgresql.org/docs/current/static/multibyte.html
- .. __: http://docs.python.org/library/codecs.html#standard-encodings
+ .. __: https://www.postgresql.org/docs/current/static/multibyte.html
+ .. __: https://docs.python.org/library/codecs.html#standard-encodings
@@ -494,7 +494,7 @@ Other functions
.. 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)
@@ -528,7 +528,7 @@ Other functions
`connection URIs`__ are only supported from libpq 9.2). Raise
`~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::
@@ -542,7 +542,7 @@ Other functions
.. 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)
@@ -556,7 +556,7 @@ Other functions
.. 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)
@@ -641,7 +641,7 @@ methods. The level can be set to one of the following constants:
.. seealso:: `Read Committed Isolation Level`__ in PostgreSQL
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
@@ -665,7 +665,7 @@ methods. The level can be set to one of the following constants:
.. seealso:: `Repeatable Read Isolation Level`__ in PostgreSQL
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
@@ -684,7 +684,7 @@ methods. The level can be set to one of the following constants:
.. 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
diff --git a/doc/src/extras.rst b/doc/src/extras.rst
index 15f35e8..e911782 100644
--- a/doc/src/extras.rst
+++ b/doc/src/extras.rst
@@ -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
to JSON and to parse data from the database.
-.. _JSON: http://www.json.org/
+.. _JSON: https://www.json.org/
.. |pgjson| replace:: :sql:`json`
.. |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
the `Json` adapter::
@@ -664,7 +664,7 @@ can be enabled using the `register_hstore()` function.
.. |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.
.. |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::
@@ -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()`.
.. |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
@@ -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
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
(checking if an element is within the range). They can be tested for
diff --git a/doc/src/faq.rst b/doc/src/faq.rst
index 5824d2b..432e994 100644
--- a/doc/src/faq.rst
+++ b/doc/src/faq.rst
@@ -40,7 +40,7 @@ I receive the error *current transaction is aborted, commands ignored until end
PostgreSQL supports nested transactions using the |SAVEPOINT|_ command).
.. |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:
@@ -184,8 +184,8 @@ Transferring binary data from PostgreSQL 9.0 doesn't work.
session before reading binary data;
- upgrade the libpq library on the client to at least 9.0.
- .. __: http://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/datatype-binary.html
+ .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
.. _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.
.. |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:
@@ -332,5 +332,5 @@ Psycopg raises *ImportError: cannot import name tz* on import in mod_wsgi / ASP,
use the WSGIPythonEggs__ directive.
.. _egg: http://peak.telecommunity.com/DevCenter/PythonEggs
- .. __: http://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache
- .. __: http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIPythonEggs
+ .. __: https://stackoverflow.com/questions/2192323/what-is-the-python-egg-cache-python-egg-cache
+ .. __: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIPythonEggs.html
diff --git a/doc/src/index.rst b/doc/src/index.rst
index 7ae073d..ecf9c38 100644
--- a/doc/src/index.rst
+++ b/doc/src/index.rst
@@ -24,9 +24,9 @@ Psycopg 2 is both Unicode and Python 3 friendly.
.. _Psycopg: http://initd.org/psycopg/
-.. _PostgreSQL: http://www.postgresql.org/
-.. _Python: http://www.python.org/
-.. _libpq: http://www.postgresql.org/docs/current/static/libpq.html
+.. _PostgreSQL: https://www.postgresql.org/
+.. _Python: https://www.python.org/
+.. _libpq: https://www.postgresql.org/docs/current/static/libpq.html
.. rubric:: Contents
diff --git a/doc/src/install.rst b/doc/src/install.rst
index f4b00ec..34845b0 100644
--- a/doc/src/install.rst
+++ b/doc/src/install.rst
@@ -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
mature as the C implementation yet.
-.. _PostgreSQL: http://www.postgresql.org/
-.. _Python: http://www.python.org/
-.. _libpq: http://www.postgresql.org/docs/current/static/libpq.html
-.. _CPython: http://en.wikipedia.org/wiki/CPython
-.. _Ctypes: http://docs.python.org/library/ctypes.html
+.. _PostgreSQL: https://www.postgresql.org/
+.. _Python: https://www.python.org/
+.. _libpq: https://www.postgresql.org/docs/current/static/libpq.html
+.. _CPython: https://en.wikipedia.org/wiki/CPython
+.. _Ctypes: https://docs.python.org/library/ctypes.html
.. __: 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: https://pypi.org/project/psycopg2-binary/
-.. _wheel: http://pythonwheels.com/
+.. _wheel: https://pythonwheels.com/
.. note::
diff --git a/doc/src/module.rst b/doc/src/module.rst
index 1c99825..034c7bb 100644
--- a/doc/src/module.rst
+++ b/doc/src/module.rst
@@ -50,11 +50,11 @@ The module interface respects the standard defined in the |DBAPI|_.
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
connections factory can be specified. It should be a callable object
diff --git a/doc/src/usage.rst b/doc/src/usage.rst
index 335ebf3..e9416e3 100644
--- a/doc/src/usage.rst
+++ b/doc/src/usage.rst
@@ -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
memo and hang it onto your desk.
-.. _SQL injection: http://en.wikipedia.org/wiki/SQL_injection
-.. __: http://xkcd.com/327/
+.. _SQL injection: https://en.wikipedia.org/wiki/SQL_injection
+.. __: https://xkcd.com/327/
Psycopg can `automatically convert Python objects to and from SQL
literals`__: using this feature your code will be more robust and
@@ -372,7 +372,7 @@ converted into `!Decimal`.
This of course may imply a loss of precision.
.. 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::
@@ -412,8 +412,8 @@ defined on the database connection (the `PostgreSQL encoding`__, available in
>>> cur.execute("INSERT INTO test (num, data) VALUES (%s,%s);", (74, u))
-.. __: http://www.postgresql.org/docs/current/static/multibyte.html
-.. __: http://docs.python.org/library/codecs.html#standard-encodings
+.. __: https://www.postgresql.org/docs/current/static/multibyte.html
+.. __: https://docs.python.org/library/codecs.html
When reading data from the database, in Python 2 the strings returned are
usually 8 bit `!str` objects encoded in the database client encoding::
@@ -486,7 +486,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)
or `!memoryview` (in Python 3).
-.. __: http://www.python.org/dev/peps/pep-3118/
+.. __: https://www.python.org/dev/peps/pep-3118/
.. versionchanged:: 2.4
only strings were supported before.
@@ -515,8 +515,8 @@ or `!memoryview` (in Python 3).
server configuration file or in the client session (using a query such as
``SET bytea_output TO escape;``) before receiving binary data.
- .. __: http://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/datatype-binary.html
+ .. __: https://www.postgresql.org/docs/current/static/runtime-config-client.html#GUC-BYTEA-OUTPUT
.. index::
@@ -548,7 +548,7 @@ the same way::
"SELECT '38 days 6027.425337 seconds';"
.. 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::
@@ -643,7 +643,7 @@ Python lists are converted into PostgreSQL :sql:`ARRAY`\ s::
Furthermore :sql:`ANY` can also work with empty lists, whereas :sql:`IN ()`
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::
@@ -867,7 +867,7 @@ lifetime extends well after `~connection.commit()`, calling
.. |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
@@ -897,7 +897,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
*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
:ref:`green-support` for further details.
@@ -941,7 +941,7 @@ Please refer to the documentation of the single methods for details and
examples.
.. |COPY| replace:: :sql:`COPY`
-.. __: http://www.postgresql.org/docs/current/static/sql-copy.html
+.. __: https://www.postgresql.org/docs/current/static/sql-copy.html
@@ -958,7 +958,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
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
`~psycopg2.extensions.lobject` class. Objects are generated using the
@@ -969,9 +969,9 @@ Psycopg large object support efficient import/export with file system files
using the |lo_import|_ and |lo_export|_ libpq functions.
.. |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: 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
added support for large objects greated than 2GB. Note that the support is
@@ -1035,5 +1035,5 @@ transactions produced by a Java program.
For further details see the documentation for the above methods.
-.. __: http://www.opengroup.org/bookstore/catalog/c193.htm
-.. __: http://jdbc.postgresql.org/
+.. __: https://publications.opengroup.org/c193
+.. __: https://jdbc.postgresql.org/
diff --git a/lib/__init__.py b/lib/__init__.py
index cbec98f..b88d59c 100644
--- a/lib/__init__.py
+++ b/lib/__init__.py
@@ -8,8 +8,8 @@ small and fast, and stable as a rock.
Homepage: http://initd.org/projects/psycopg2
-.. _PostgreSQL: http://www.postgresql.org/
-.. _Python: http://www.python.org/
+.. _PostgreSQL: https://www.postgresql.org/
+.. _Python: https://www.python.org/
:Groups:
* `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
# 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.
diff --git a/lib/errorcodes.py b/lib/errorcodes.py
index b8742f5..99a6ecd 100644
--- a/lib/errorcodes.py
+++ b/lib/errorcodes.py
@@ -26,7 +26,7 @@ This module contains symbolic names for all PostgreSQL error codes.
#
# Based on:
#
-# http://www.postgresql.org/docs/current/static/errcodes-appendix.html
+# https://www.postgresql.org/docs/current/static/errcodes-appendix.html
#
diff --git a/lib/extensions.py b/lib/extensions.py
index 3661e6c..3111d41 100644
--- a/lib/extensions.py
+++ b/lib/extensions.py
@@ -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
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
#
diff --git a/lib/extras.py b/lib/extras.py
index 024d7f3..af59d2f 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -404,7 +404,7 @@ class NamedTupleCursor(_cursor):
class LoggingConnection(_connection):
"""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):
@@ -638,8 +638,8 @@ class ReplicationCursor(_replicationCursor):
class UUID_adapter(object):
"""Adapt Python's uuid.UUID__ type to PostgreSQL's uuid__.
- .. __: http://docs.python.org/library/uuid.html
- .. __: http://www.postgresql.org/docs/current/static/datatype-uuid.html
+ .. __: https://docs.python.org/library/uuid.html
+ .. __: https://www.postgresql.org/docs/current/static/datatype-uuid.html
"""
def __init__(self, uuid):
diff --git a/lib/tz.py b/lib/tz.py
index d593175..97f3857 100644
--- a/lib/tz.py
+++ b/lib/tz.py
@@ -44,7 +44,7 @@ class FixedOffsetTimezone(datetime.tzinfo):
offset and name that instance will be returned. This saves memory and
improves comparability.
- .. __: http://docs.python.org/library/datetime.html#datetime-tzinfo
+ .. __: https://docs.python.org/library/datetime.html
"""
_name = None
_offset = ZERO
diff --git a/psycopg/diagnostics_type.c b/psycopg/diagnostics_type.c
index 03fd07c..13e545f 100644
--- a/psycopg/diagnostics_type.c
+++ b/psycopg/diagnostics_type.c
@@ -162,7 +162,7 @@ static const char diagnosticsType_doc[] =
"Please refer to the `PostgreSQL documentation`__ for the meaning of all"
" the attributes.\n\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"
".. __: PQresultErrorField_\n";
diff --git a/psycopg/green.h b/psycopg/green.h
index 4057ff7..7d95f9c 100644
--- a/psycopg/green.h
+++ b/psycopg/green.h
@@ -48,7 +48,7 @@ extern "C" {
"See `~psycopg2.extras.wait_select()` for an example of a wait callback\n" \
"implementation.\n" \
"\n" \
-".. _Eventlet: http://eventlet.net/\n" \
+".. _Eventlet: https://eventlet.net/\n" \
".. _gevent: http://www.gevent.org/\n"
HIDDEN PyObject *psyco_set_wait_callback(PyObject *self, PyObject *obj);
diff --git a/psycopg/pqpath.c b/psycopg/pqpath.c
index 204a6b0..de2b9ba 100644
--- a/psycopg/pqpath.c
+++ b/psycopg/pqpath.c
@@ -79,7 +79,7 @@ strip_severity(const char *msg)
/* Returns the Python exception corresponding to an SQLSTATE error
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 *
exception_from_sqlstate(const char *sqlstate)
{
diff --git a/psycopg/typecast_binary.c b/psycopg/typecast_binary.c
index e4839da..8226d3f 100644
--- a/psycopg/typecast_binary.c
+++ b/psycopg/typecast_binary.c
@@ -212,7 +212,7 @@ static const char hex_lut[128] = {
/* Parse a bytea output buffer encoded in 'hex' format.
*
* 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'.
* 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.
*
* 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'.
* Return a new buffer allocated by PyMem_Malloc and set 'sizeout' to its size.
diff --git a/scripts/make_errorcodes.py b/scripts/make_errorcodes.py
index aa5e4cd..d85e6b8 100755
--- a/scripts/make_errorcodes.py
+++ b/scripts/make_errorcodes.py
@@ -130,7 +130,7 @@ def parse_errors_sgml(url):
return classes, errors
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 = \
"http://git.postgresql.org/gitweb/?p=postgresql.git;a=blob_plain;" \
diff --git a/setup.py b/setup.py
index 0241e24..463e65f 100644
--- a/setup.py
+++ b/setup.py
@@ -47,7 +47,7 @@ try:
except ImportError:
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.
PSYCOPG_VERSION = '2.8.dev0'
diff --git a/tests/test_cursor.py b/tests/test_cursor.py
index af44f9e..37110db 100755
--- a/tests/test_cursor.py
+++ b/tests/test_cursor.py
@@ -504,7 +504,7 @@ class CursorTests(ConnectingTestCase):
def test_bad_subclass(self):
# check that we get an error message instead of a segfault
# for badly written subclasses.
- # see http://stackoverflow.com/questions/22019341/
+ # see https://stackoverflow.com/questions/22019341/
class StupidCursor(psycopg2.extensions.cursor):
def __init__(self, *args, **kwargs):
# I am stupid so not calling superclass init
diff --git a/tests/test_quote.py b/tests/test_quote.py
index fad6cee..ee72350 100755
--- a/tests/test_quote.py
+++ b/tests/test_quote.py
@@ -46,8 +46,8 @@ class QuotingTestCase(ConnectingTestCase):
The tests also check that no warning is raised ('escape_string_warning'
should be on).
- http://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/sql-syntax-lexical.html#SQL-SYNTAX-STRINGS
+ https://www.postgresql.org/docs/current/static/runtime-config-compatible.html
"""
def test_string(self):
data = """some data with \t chars
diff --git a/tests/testutils.py b/tests/testutils.py
index 3bb72e2..11138f0 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -50,7 +50,7 @@ else:
# Silence warnings caused by the stubbornness of the Python unittest
# maintainers
-# http://bugs.python.org/issue9424
+# https://bugs.python.org/issue9424
if (not hasattr(unittest.TestCase, 'assert_')
or unittest.TestCase.assert_ is not unittest.TestCase.assertTrue):
# mavaff...