summaryrefslogtreecommitdiff
path: root/lib/extras.py
diff options
context:
space:
mode:
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-10-11 04:55:09 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2016-10-11 04:55:09 +0100
commit51aa166d5219bf6bcda1f68f33399c930113a1f1 (patch)
treed9504de513e795a5132db605440c76407ba42906 /lib/extras.py
parent05627ac0f9e519c52014185b48a782f8669e6843 (diff)
parent643ba70bad0f19a68c06ec95de2691c28e060e48 (diff)
downloadpsycopg2-51aa166d5219bf6bcda1f68f33399c930113a1f1.tar.gz
Merge branch 'networking-improvement'
Diffstat (limited to 'lib/extras.py')
-rw-r--r--lib/extras.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/extras.py b/lib/extras.py
index fe74d38..5c4f5d2 100644
--- a/lib/extras.py
+++ b/lib/extras.py
@@ -59,6 +59,10 @@ from psycopg2._range import ( # noqa
register_range, RangeAdapter, RangeCaster)
+# Expose ipaddress-related objects
+from psycopg2._ipaddress import register_ipaddress # noqa
+
+
class DictCursorBase(_cursor):
"""Base class for all dict-like cursors."""
@@ -686,6 +690,11 @@ def register_inet(oid=None, conn_or_curs=None):
:param conn_or_curs: where to register the typecaster. If not specified,
register it globally.
"""
+ import warnings
+ warnings.warn(
+ "the inet adapter is deprecated, it's not very useful",
+ DeprecationWarning)
+
if not oid:
oid1 = 869
oid2 = 1041