removed gluon/contrib/translitcodec because of backward compatibility issues and because it breaks Pypy

This commit is contained in:
mdipierro
2014-03-15 10:54:48 -05:00
parent d7a42d8445
commit c1e797fe24
7 changed files with 1 additions and 2550 deletions
-2
View File
@@ -21,7 +21,6 @@ import unicodedata
from cStringIO import StringIO
from gluon.utils import simple_hash, web2py_uuid, DIGEST_ALG_BY_SIZE
from gluon.dal import FieldVirtual, FieldMethod
# from gluon.contrib import translitcodec
regex_isint = re.compile('^[+-]?\d+$')
@@ -2521,7 +2520,6 @@ def urlify(s, maxlen=80, keep_underscores=False):
s = s.decode('utf-8') # to unicode
s = s.lower() # to lowercase
s = unicodedata.normalize('NFKD', s) # replace special characters
# s = s.encode('translit/long') # (proposed change to above line breaks Pypy)
s = s.encode('ascii', 'ignore') # encode as ASCII
s = re.sub('&\w+?;', '', s) # strip html entities
if keep_underscores: