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.

Author damien
Recipients ajaksu2, akuchling, damien, exarkun, loewis, pboddie, vdupras
Date 2009-02-03.22:42:59
SpamBayes Score 3.5668309e-06
Marked as misclassified No
Message-id <1233700981.04.0.764705170054.issue2124@psf.upfronthosting.co.za>
In-reply-to
Content
I just discovered another really fun wrinkle in this.

Let's say I want to have my entity resolver return a reference to my 
local copy of a DTD.  I write:

    source = xml.sax.InputSource()
    source.setPublicId(publicId)
    source.setSystemId(systemId)
    source.setCharacterStream(file(path_to_local_copy))
    return source

This will appear to work.

However, the parser will still silently fetch the DTD over the network!  
I needed to call source.setByteStream()--character streams are silently 
ignored.

I'd never have noticed this if I hadn't used strace on my process and 
noticed a slew of recvfrom() calls that shouldn't have been there.
History
Date User Action Args
2009-02-03 22:43:01damiensetrecipients: + damien, loewis, akuchling, pboddie, exarkun, ajaksu2, vdupras
2009-02-03 22:43:01damiensetmessageid: <1233700981.04.0.764705170054.issue2124@psf.upfronthosting.co.za>
2009-02-03 22:43:00damienlinkissue2124 messages
2009-02-03 22:42:59damiencreate