Opened 17 years ago

Closed 14 years ago

#5297 closed (wontfix)

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

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

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
)

Change History (2)

comment:1 by Simon G. <dev@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by Alex Gaynor, 14 years ago

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top