Opened 2 years ago

Closed 2 years ago

#23373 closed Bug (wontfix)

Django 1.5.*: django.contrib.markup.tests.Templates.test_textile() fails with Python 3

Reported by: Arfrever Owned by: nobody
Component: Uncategorized Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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/", line 52, in test_textile
    rendered = t.render(Context({'textile_content':self.textile_content})).strip()
  File "/tmp/Django-1.5.9/django/template/", line 140, in render
    return self._render(context)
  File "/tmp/Django-1.5.9/django/test/", line 66, in instrumented_test_render
    return self.nodelist.render(context)
  File "/tmp/Django-1.5.9/django/template/", line 830, in render
    bit = self.render_node(node, context)
  File "/tmp/Django-1.5.9/django/template/", line 844, in render_node
    return node.render(context)
  File "/tmp/Django-1.5.9/django/template/", line 881, in render
    output = self.filter_expression.resolve(context)
  File "/tmp/Django-1.5.9/django/template/", line 606, in resolve
    new_obj = func(obj, *arg_vals)
  File "/tmp/Django-1.5.9/django/contrib/markup/templatetags/", 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/", line 1683, in textile
  File "/usr/lib64/python3.3/site-packages/textile/", line 239, in textile
    False) and version_info < (3,)
  File "/usr/lib64/python3.3/site-packages/textile/", 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


Change History (1)

comment:1 Changed 2 years ago by Tim Graham

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: wontfix
Status: newclosed

Sorry, we're not going to fix this as Django 1.5 is currently receiving only security updates and will be unsupported when 1.7 is released shortly.

Note: See TracTickets for help on using tickets.
Back to Top