Code

Opened 7 years ago

Closed 4 years ago

#5297 closed (wontfix)

Backwards incompatibility introduced in [5091]: obj.has_key(x) -> x in obj

Reported by: jdunck Owned by: nobody
Component: Template system Version: master
Severity: Keywords:
Cc: Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

In [5091], Django was changed to favor "key in container" rather than "container.has_key(key)".

This inadvertantly introduced a backwards incompatibility.

"
...[I]f you have PyXML installed for all the extra
goodies that supplies, that is transparently into the xml.* namespace
(via _xmlplus) ... in that case, AttributesImpl is missing a feature."

and

"
...[P]ushing an instance of xml.sax.xmlreader.AttributesImpl onto
my Context..., no matter what the value... is, what's passed to
xml.sax.xmlreader.AttributesImpl is int(0).

This was causing a KeyError in template attribute lookup.
"

On July 17, Malcolm said he'd back out the affecting changes, but it hasn't been done.

This should either be backed out or noted as an incompatibility. And it'd be nice if PyXML were fixed. :)

(See thread for more detail:
http://groups.google.com/group/django-developers/browse_thread/thread/2ae80a504fa31d81/87b693ce3e52fcf2
)

Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by Simon G. <dev@…>

  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 4 years ago by Alex

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

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.