Skip to content

Commit c8bb383

Browse files
authored
Merge pull request #21 from supriyopaul/python_compatiblity
Python2&3 compatiblity
2 parents c902a76 + d8c1512 commit c8bb383

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ deploy:
1010
skip_cleanup: true
1111
api-key:
1212
secure: Q3wwYSZkwXAG1DwgKZrR/vZTGLZlDBfR9O5MoZ+dpmy6EmFozQLRB+qFh+eWh2Y8xYIdXz+6CaJLcM92JU5zJTslWLHyhO7kTOt31fxuZu+HGnR835Try6TlU11948nn2Ramk4nI3lT/G4jO+PdNq23sOPdhV4KDI0nv9Pc9Ywqoyg+4okpSnbJNWn7bdinthA88iMRNxqH88LJ4CM6J/eh0qJUm2xcAOTpw9gIkq188UTCbT71qGUWhWFicvbV1oJ6r+C87Ru/rf+nHJyZ7Dn2y8odBx+MHicUp7XomKP/niM2K9TkX/wOMqopE6XrmAnZ/6W/8cGOoqLWT0oqksktIqlOrUYQAq5UNXee3cHPq6k+Q/CGhbGb9feNEzb3PMPKkD6wict90arhHfpqk0yGP1lCRSwM0eIgegMWgSpFXi2Zc+K/6iucZ21ayVDZf20f7Pe70SEgjB/VJiTgI+BMmOG70a2MYsHUG+rK4fYiSDiO+9ADVNHHNy5r9dL+VLhRxkkcgaIkkZsx/xoE2KUO601EOEfjX55S0C8R/VRNDpxg1VXhu2i19E3G08Xcv+xuz8awst3gvVImVJY9j9GiimMtT0l/pLMjWTeAvMmlraxRaMa36Q96BntThdwRkNCAhsfCTF364egRI+PEWciRcrb0Tpj8/L8p2OUMMqgI=
13-
name: deeputil-0.2.2
14-
tag_name: 0.2.2
13+
name: deeputil-0.2.5
14+
tag_name: 0.2.5
1515
on:
1616
branch: master
1717
repo: deep-compute/deeputil

deeputil/misc.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ def xcode(text, encoding='utf8', mode='ignore'):
8888
'''
8989
return text.encode(encoding, mode) if isinstance(text, str) else text
9090

91-
from urllib.parse import urlparse
91+
try:
92+
from urllib.parse import urlparse
93+
except ImportError:
94+
from urlparse import urlparse
9295

9396
def parse_location(loc, default_port):
9497
'''
@@ -405,12 +408,13 @@ class Dummy(object):
405408
# Let us create a dummy object and perform some
406409
# random operations on it
407410
408-
>>> d = Dummy(1, a=5)
409-
>>> d.foo()
411+
#>>> d = Dummy(1, a=5)
410412
411-
>>> d.bar()
413+
#>>> d.foo()
412414
413-
>>> d.foo.bar()
415+
#>>> d.bar()
416+
417+
#>>> d.foo.bar()
414418
415419
#Now do the same as above but ask Dummy to print the activity
416420

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name="deeputil",
6-
version="0.2.2",
6+
version="0.2.5",
77
description="Commonly re-used logic kept in one library",
88
keywords="deeputil",
99
author="Deep Compute, LLC",

0 commit comments

Comments
 (0)