Opened 13 years ago

Closed 10 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: master
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


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."


...[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:

Change History (2)

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

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 10 years ago by Alex Gaynor

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