ThirdParty/Pygments/pygments/lexers/_postgres_builtins.py

branch
Py2 comp.
changeset 2669
11a6696ff868
parent 2525
8b507a9a2d40
child 3145
a9de05d4a22f
diff -r e5115553185a -r 11a6696ff868 ThirdParty/Pygments/pygments/lexers/_postgres_builtins.py
--- a/ThirdParty/Pygments/pygments/lexers/_postgres_builtins.py	Sun Apr 21 20:30:56 2013 +0200
+++ b/ThirdParty/Pygments/pygments/lexers/_postgres_builtins.py	Thu May 23 19:58:41 2013 +0200
@@ -10,9 +10,13 @@
 """
 
 from __future__ import unicode_literals    # __IGNORE_WARNING__
+try:
+    str = unicode   # __IGNORE_WARNING__
+    import urllib2 as request
+except (NameError):
+    import urllib.request as request    # __IGNORE_WARNING__
 
 import re
-import urllib.request, urllib.parse, urllib.error
 
 # One man's constant is another man's variable.
 SOURCE_URL = 'https://github.com/postgres/postgres/raw/master'
@@ -99,7 +103,7 @@
     return dt
 
 def fetch(url):
-    return urllib.request.urlopen(url)
+    return request.urlopen(url)
 
 def update_consts(filename, constname, content):
     f = open(filename)

eric ide

mercurial