web/request.py
changeset 10672 f6f425a54a8d
parent 10671 e08102f45237
child 10690 c6290d727c0c
equal deleted inserted replaced
10671:e08102f45237 10672:f6f425a54a8d
    26 from calendar import timegm
    26 from calendar import timegm
    27 from datetime import date, datetime
    27 from datetime import date, datetime
    28 from warnings import warn
    28 from warnings import warn
    29 from io import BytesIO
    29 from io import BytesIO
    30 
    30 
    31 from six import string_types
    31 from six import text_type, string_types
    32 from six.moves import http_client
    32 from six.moves import http_client
    33 from six.moves.urllib.parse import urlsplit, quote as urlquote
    33 from six.moves.urllib.parse import urlsplit, quote as urlquote
    34 from six.moves.http_cookies import SimpleCookie
    34 from six.moves.http_cookies import SimpleCookie
    35 
    35 
    36 from rql.utils import rqlvar_maker
    36 from rql.utils import rqlvar_maker
  1022             lang = 'en'
  1022             lang = 'en'
  1023         try:
  1023         try:
  1024             self.set_language(lang)
  1024             self.set_language(lang)
  1025         except KeyError:
  1025         except KeyError:
  1026             # this occurs usually during test execution
  1026             # this occurs usually during test execution
  1027             self._ = self.__ = unicode
  1027             self._ = self.__ = text_type
  1028             self.pgettext = lambda x, y: unicode(y)
  1028             self.pgettext = lambda x, y: text_type(y)
  1029 
  1029 
  1030     entity_metas = _cnx_func('entity_metas')
  1030     entity_metas = _cnx_func('entity_metas')
  1031     source_defs = _cnx_func('source_defs')
  1031     source_defs = _cnx_func('source_defs')
  1032     get_shared_data = _cnx_func('get_shared_data')
  1032     get_shared_data = _cnx_func('get_shared_data')
  1033     set_shared_data = _cnx_func('set_shared_data')
  1033     set_shared_data = _cnx_func('set_shared_data')