Skip to content

Commit aac4940

Browse files
committed
Use warnings module to warn when psycopg2 is not installed
1 parent 03a7354 commit aac4940

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

postgis/geometry.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import warnings
2+
13
try:
24
# Do not make psycopg2 a requirement.
35
from psycopg2.extensions import ISQLQuote
46
except ImportError:
5-
print('psycopg2 not installed')
7+
warnings.warn('psycopg2 not installed', ImportWarning)
68

79

810
from .ewkb import Reader, Typed, Writer

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def list_modules(dirname):
4646
cmdclass = {'build_ext': build_ext}
4747

4848

49-
VERSION = (1, 0, 3)
49+
VERSION = (1, 0, 4)
5050

5151
setup(
5252
name='postgis',

0 commit comments

Comments
 (0)