Code

Opened 2 years ago

Closed 2 years ago

#18692 closed Bug (fixed)

Django 1.3.2 breaks Python 2.4 compatibility

Reported by: chipx86 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'

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by jezdez

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Severity changed from Normal to Release blocker
  • Triage Stage changed from Unreviewed to Accepted

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

  • Resolution set to fixed
  • Status changed from new to closed

In [d0d5dc6cd76f01c8a71b677357ad2f702cb54416]:

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

Thanks to chipx86 for the report.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.