#23373: Django 1.5.*: django.contrib.markup.tests.Templates.test_textile() fails
with Python 3
-------------------------------+--------------------
Reporter: Arfrever | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
`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
----------------------------------------------------------------------
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/23373>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.05da54861f5c8d13f296a469d700c5af%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.