Skip to content

Commit eafbf48

Browse files
author
Jonathan Como
committed
Use python 3 compatible urlparse library
1 parent a85ece9 commit eafbf48

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

flask_testing/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@
2020
except ImportError:
2121
import unittest
2222

23-
from urlparse import urlparse
23+
try:
24+
from urllib.parse import urlparse
25+
except ImportError:
26+
# Python 2 urlparse fallback
27+
from urlparse import urlparse
2428

2529
from werkzeug import cached_property
2630

0 commit comments

Comments
 (0)