﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
23373	Django 1.5.*: django.contrib.markup.tests.Templates.test_textile() fails with Python 3	Arfrever	nobody	"`django.contrib.markup.tests.Templates.test_textile()` fails with Python 3.
textile needs to be installed for Python 3 to reproduce this error. Otherwise this test is skipped.
`textile.textile()` requires str with Python 3, not bytes, but Django passes bytes.
(`textile.textile()` accepts both str and unicode with Python 2.)

{{{
======================================================================
ERROR: test_textile (django.contrib.markup.tests.Templates)
----------------------------------------------------------------------
Traceback (most recent call last):
  File ""/tmp/Django-1.5.9/django/contrib/markup/tests.py"", line 52, in test_textile
    rendered = t.render(Context({'textile_content':self.textile_content})).strip()
  File ""/tmp/Django-1.5.9/django/template/base.py"", line 140, in render
    return self._render(context)
  File ""/tmp/Django-1.5.9/django/test/utils.py"", line 66, in instrumented_test_render
    return self.nodelist.render(context)
  File ""/tmp/Django-1.5.9/django/template/base.py"", line 830, in render
    bit = self.render_node(node, context)
  File ""/tmp/Django-1.5.9/django/template/base.py"", line 844, in render_node
    return node.render(context)
  File ""/tmp/Django-1.5.9/django/template/base.py"", line 881, in render
    output = self.filter_expression.resolve(context)
  File ""/tmp/Django-1.5.9/django/template/base.py"", line 606, in resolve
    new_obj = func(obj, *arg_vals)
  File ""/tmp/Django-1.5.9/django/contrib/markup/templatetags/markup.py"", line 30, in textile
    return mark_safe(force_text(textile.textile(force_bytes(value), encoding='utf-8', output='utf-8')))
  File ""/usr/lib64/python3.3/site-packages/textile/functions.py"", line 1683, in textile
    html_type=html_type)
  File ""/usr/lib64/python3.3/site-packages/textile/functions.py"", line 239, in textile
    False) and version_info < (3,)
  File ""/usr/lib64/python3.3/site-packages/textile/functions.py"", line 238, in <genexpr>
    self.text_has_unicode = next((True for c in text if ord(c) > 128),
TypeError: ord() expected string of length 1, but int found

----------------------------------------------------------------------
}}}"	Bug	closed	Uncategorized	1.5	Normal	wontfix			Unreviewed	0	0	0	0	0	0
