This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Fix a NameError in xml.dom.minidom
Type: behavior Stage:
Components: Library (Lib) Versions: Python 3.4, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: rhettinger Nosy List: Claudiu.Popa, python-dev, rhettinger
Priority: normal Keywords: patch

Created on 2014-06-15 21:05 by Claudiu.Popa, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
minidom.patch Claudiu.Popa, 2014-06-15 21:05 review
Messages (4)
msg220673 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-15 21:05
Hi. This patch fixes a NameError found in xml.dom.minidom. Here's an example for reproducing it:


from xml.dom import minidom
dom = minidom.parseString("<a>1</a>")
pi = dom.createProcessingInstruction('xml-stylesheet',
                                     'type="text/xsl" href="mystyle.xslt"')
pi.nodeValue = "4"

with output:


Traceback (most recent call last):
  File "a.py", line 5, in <module>
    pi.nodeValue = "4"
  File "C:\Python34\lib\xml\dom\minidom.py", line 979, in _set_nodeValue
    self.data = data
NameError: name 'data' is not defined
msg220681 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-06-15 21:50
New changeset ca33faa214ab by Raymond Hettinger in branch '3.4':
Issue #21774: Fix incorrect variable in xml.dom.minidom
http://hg.python.org/cpython/rev/ca33faa214ab
msg220682 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2014-06-15 21:54
Thanks for the patch.

I'm curious how did you notice this?
msg220683 - (view) Author: PCManticore (Claudiu.Popa) * (Python triager) Date: 2014-06-15 22:01
My pleasure. I run Pylint from time to time over stdlib in order to find false positives for Pylint and in the process I stumble across these type of bugs.
History
Date User Action Args
2022-04-11 14:58:04adminsetgithub: 65973
2014-06-15 22:01:21Claudiu.Popasetmessages: + msg220683
2014-06-15 21:54:59rhettingersetstatus: open -> closed
resolution: fixed
messages: + msg220682

versions: + Python 3.4
2014-06-15 21:50:46python-devsetnosy: + python-dev
messages: + msg220681
2014-06-15 21:37:45rhettingersetassignee: rhettinger

nosy: + rhettinger
2014-06-15 21:05:11Claudiu.Popacreate