Skip to content

Commit

Permalink
replaced ipaddr with ipaddress.py (backported from py3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilvalle committed Dec 3, 2016
1 parent 0b8ecea commit 637579f
Show file tree
Hide file tree
Showing 5 changed files with 2,434 additions and 1,936 deletions.
2 changes: 2 additions & 0 deletions gluon/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import cgi
import cookielib
from xmlrpclib import ProtocolError
from gluon.contrib import ipaddress
BytesIO = StringIO
reduce = reduce
hashlib_md5 = hashlib.md5
Expand Down Expand Up @@ -97,6 +98,7 @@ def to_native(obj, charset='utf8', errors='strict'):
from http import cookiejar as cookielib
from xmlrpc.client import ProtocolError
import html # warning, this is the python3 module and not the web2py html module
import ipaddress
hashlib_md5 = lambda s: hashlib.md5(bytes(s, 'utf8'))
iterkeys = lambda d: iter(d.keys())
itervalues = lambda d: iter(d.values())
Expand Down
Loading

0 comments on commit 637579f

Please sign in to comment.