[issue22915] sax.parser cannot get xml data from a subprocess pipe

R. David Murray report at bugs.python.org
Sat Nov 22 03:29:52 CET 2014


R. David Murray added the comment:

I've looked at the sax code, and this does indeed have the same root cause: in python2 a dummy string was used for the 'name' attribute of io objects that are based on file descriptors, whereas in python3 the name is the integer value of the file descriptor.  In test_sax we can see getSystemId being tested that it returns a filename (see test_expat_locator_withinfo).

The fix should be analogous to the issue 21044 fix: check that 'name' is a string and if not don't use it.  I'm marking this as easy; hopefully someone will want to tackle figuring out exactly where in the code it needs to be fixed and adding tests for it.

----------
keywords: +easy

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22915>
_______________________________________


More information about the Python-bugs-list mailing list