1
0
Fork 0
forked from github/pelican
pelican-theme/pelican
W. Trevor King d2a221c899 contents: Encode Unicode locales for Python 2 in Page.__init__
Python 2.7 chokes on Unicode locales:

  $ python2.7
  >>> import locale
  >>> locale.setlocale(locale.LC_ALL, u'ja_JP.utf8')
  Traceback (most recent call last):
    ...
  ValueError: too many values to unpack

With the addition of:

  from __future__ import unicode_literals

to tests/test_contents.py in:

  commit bebb94c15b
  Author: W. Trevor King <wking@tremily.us>
  Date:   Tue Jan 15 22:50:58 2013 -0500

    test_contents.py: Add URLWrapper comparison tests

the locale strings in TestPage.test_datetime are interpreted as
Unicode.  Rather than fixing the encoding there, this patch updates
Page to handle Unicode locales automatically.
2013-01-17 09:49:03 -05:00
..
plugins Annotate py3k code when needed. 2013-01-11 18:55:04 +01:00
themes Strip tags from title in simple index. Fixes #612 2012-12-02 16:10:11 -08:00
tools Annotate py3k code when needed. 2013-01-11 18:55:04 +01:00
__init__.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
contents.py contents: Encode Unicode locales for Python 2 in Page.__init__ 2013-01-17 09:49:03 -05:00
generators.py contents: Add rich comparisons to URLWrapper for easy sorting 2013-01-15 22:51:53 -05:00
log.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
paginator.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
readers.py Annotate py3k code when needed. 2013-01-11 18:55:04 +01:00
rstdirectives.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
server.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
settings.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
signals.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
utils.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00
writers.py Port pelican to python 3. 2013-01-11 03:20:09 +01:00