Opened 12 years ago

Closed 12 years ago

#18692 closed Bug (fixed)

Django 1.3.2 breaks Python 2.4 compatibility

Reported by: Christian Hammond Owned by: nobody
Component: HTTP handling Version: 1.3
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The recent URL scheme restriction change assumes Python 2.5+ accessors for the parsed URI information. Specifically, it's looking up parsed.scheme, which isn't available in Python 2.4. Instead, it should be accessing it as a tuple.

The traceback below shows what's happening.

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/views/generic/simple.py", line 57, in redirect_to
    return klass(url % kwargs)
  File "/usr/lib/python2.4/site-packages/Django-1.3.2-py2.4.egg/django/http/__init__.py", line 645, in __init__
    if parsed.scheme and parsed.scheme not in self.allowed_schemes:
AttributeError: 'tuple' object has no attribute 'scheme'

Change History (2)

comment:1 by Jannis Leidel, 12 years ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

comment:2 by Florian Apolloner <florian@…>, 12 years ago

Resolution: fixed
Status: newclosed

In [d0d5dc6cd76f01c8a71b677357ad2f702cb54416]:

[1.3.x] Fixed #18692 -- Restored python 2.4 compatibility.

Thanks to chipx86 for the report.

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