Avoid the use of deprecated aliases. For example, assertEquals(),
failUnless(), and assert_(). The newer common and idiomatic names are
available on all Python versions supported by the psycopg2 library.
Helps keep the library in line with upstream idioms and keeps psycopg2's
use of unittest more future proof.
Helps avoid deprecation warnings when Python is run with warnings
enabled.
For a complete list of deprecated TestCase aliases, see:
https://docs.python.org/3/library/unittest.html#deprecated-aliases
The syntax "except Exception, exc:" is deprecated. All Python versions
supported by psycopg2 support the newer, modern syntax. Forward
compatible with future Python versions.
Recent Sphinx versions seem overly aggressive in autodetecting python,
or I just didn't notice the errors, so be explicit in what language to
use with code examples.
Every point has an example and all the example show wrong/correct. Nice
rhythm.
Among the improvements, added point saying explicitly "thou shall not
quote placeholders". Quoted placeholders will just fail except in the
most contrived cases (a statement raising an exception with all the
strings except with the attack ones...), and an example in the following
section explicitly notes "no quotes", but apparenty someone still thinks
this is not documented enough? (see issue #611) so let's just write it
plain and clear into the list of commandments.
The service is deprecated in favour of RTD. There is also no more way to
upload redirects there, so #581 cannot be fixed.
Official docs are on http://initd.org/psycopg/docs/
It was registered as side effect of an excessive definition that got
cleaned up in 338dbe70a6.
Looking at other removed redundant type oids, this was the only one
missing from the `string_types` map.
Close#578.
Should close#558, but I'm curious to know if a number is returned
for interval < 1 day too (which wouldn't trigger the overflow, but will
finish parsing with part=0).