summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30264: ExpatParser now closes the source (#1476)Victor Stinner2017-05-051-3/+22
| | | | | | | ExpatParser.parse() of xml.sax.xmlreader now closes the source: close the file object or the urllib object if source is a string (not an open file-like object). Add test_parse_close_source() unit test.
* Issue #24125: Saved error's line and column numbers when an error is occuredSerhiy Storchaka2015-05-061-2/+13
| | | | during closing expatreader. Fixed a regression introduced in issue #23865.
* Issue #23865: close() methods in multiple modules now are idempotent and moreSerhiy Storchaka2015-04-101-6/+8
| | | | | robust at shutdown. If needs to release multiple resources, they are released even if errors are occured.
* Issue #21990: Cleanup unnecessary inner class definition in saxutils.Raymond Hettinger2014-07-251-5/+8
|
* Issue #17606: Fixed support of encoded byte strings in the XMLGeneratorSerhiy Storchaka2013-05-121-2/+6
| | | | | characters() and ignorableWhitespace() methods. Original patch by Sebastian Ortiz Vasquez.
* Issue #1470548: Do not buffer XMLGenerator output.Serhiy Storchaka2013-02-251-3/+7
| | | | Add test for fragment producing with XMLGenerator.
* Issue #1470548: XMLGenerator now works with UTF-16 and UTF-32 encodings.Serhiy Storchaka2013-02-101-33/+49
|
* Issue #11159: SAX parser now supports unicode file names.Serhiy Storchaka2013-02-022-6/+27
|
* Issue #16714: use 'raise' exceptions, don't 'throw'.Andrew Svetlov2012-12-182-4/+4
| | | | Patch by Serhiy Storchaka.
* Merged revisions 85858 via svnmerge fromAntoine Pitrou2010-10-271-0/+6
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85858 | antoine.pitrou | 2010-10-27 20:33:30 +0200 (mer., 27 oct. 2010) | 5 lines Issue #5027: The standard `xml` namespace is now understood by xml.sax.saxutils.XMLGenerator as being bound to http://www.w3.org/XML/1998/namespace. Patch by Troy J. Farrell. ........
* issue#6442 use in operator instead of has_keyJack Diederich2010-02-231-1/+1
|
* replace has_key with 'in' operatorBenjamin Peterson2009-10-091-1/+1
|
* #4490 Fix sample code run by "python -m xml.sax.xmlreader"Amaury Forgeot d'Arc2009-06-221-3/+3
|
* Remove dict.has_key() usage in xml.sax to silence warnings under -3.Brett Cannon2008-08-042-4/+4
|
* #2503 make singletons compared with "is" not == or !=Benjamin Peterson2008-03-291-1/+1
| | | | Thanks to Wummel for the patch
* Patch 1463026: Support default namespace in XMLGenerator.Martin v. Löwis2007-02-121-16/+19
| | | | Fixes #847665. Will backport.
* expunge the xmlcore changes:Fred Drake2006-07-296-0/+1675
| | | | | | | | | | | | | | | | | | | 41667, 41668 - initial switch to xmlcore 47044 - mention of xmlcore in What's New 50687 - mention of xmlcore in the library reference re-apply xmlcore changes to xml: 41674 - line ending changes (re-applied manually), directory props 41677 - add cElementTree wrapper 41678 - PSF licensing for etree 41812 - whitespace normalization 42724 - fix svn:eol-style settings 43681, 43682 - remove Python version-compatibility cruft from minidom 46773 - fix encoding of \r\n\t in attr values in saxutils 47269 - added XMLParser alias for cElementTree compatibility additional tests were added in Lib/test/test_sax.py that failed with the xmlcore changes; these relate to SF bugs #1511497, #1513611
* move the xml package implementation to xmlcore, and adjust the tests toFred Drake2005-12-146-1673/+0
| | | | | test that package, not the xmlcore/PyXML switcheroo fiasco in the xml module/package
* [Bug #1281032] Pass encoding from the input source to pyexpat's ParserCreate()Andrew M. Kuchling2005-12-041-2/+3
|
* fix XMLFilterBase.resolveEntity() so the caller gets the resultFred Drake2005-02-031-1/+1
| | | | (PyXML bug #1112052)
* when only using half of the return value of os.path.split(), useFred Drake2004-10-201-1/+1
| | | | os.path.dirname() or os.path.basename() instead
* SF bug #902037: relative on-disk SYSTEM id handling is incorrectRaymond Hettinger2004-10-201-4/+5
| | | | | | (Contributed by Bob Ippolito.) backport candidate.
* Whitespace normalization, via reindent.py.Tim Peters2004-07-181-2/+2
|
* fix documentation for ContentHandler.ignorableWhitespace()Fred Drake2004-05-061-4/+1
| | | | (closes SF bug #881707)
* Consider output encoding in XMLGenerator. Fixes #938076.Martin v. Löwis2004-05-061-13/+28
| | | | Backported to 2.3.
* Properly delegate startElementNS in saxutils.XMLFilterBase. Fixes #936637.Martin v. Löwis2004-05-061-1/+1
| | | | Backported to 2.3.
* Swap public and system ID in start_doctype_decl. Fixes #780300.Martin v. Löwis2004-05-061-1/+1
|
* commit the portion of PyXML patch #919008 that is relevant to theFred Drake2004-03-201-2/+7
| | | | | | | standard library: str() of xml.sax.SAXParseException should not fail if the line and/or column number returned by the locator are None (tests added)
* Whitespace normalization.Tim Peters2003-04-242-2/+2
|
* Get rid of many apply() calls.Guido van Rossum2003-02-271-1/+1
|
* SF patch 672098: Three __contains__ implementationsRaymond Hettinger2003-01-301-0/+3
| | | | Contributed by Jp Calderone.
* Merge with PyXML 1.28:Martin v. Löwis2003-01-251-22/+71
| | | | | | | | | | | | | | | | | Wrap a lot of long lines. Clean up a handler for expat.error. If a lexical handler is set, make sure we call the startDTD() and endDTD(). If the lexical handler is unset (by setting it to None), remove the handlers from the underlying pyexpat parser object. Closes SF bug #485584. In namespaces mode, make sure we set up the qnames dictionary correctly for the AttributesNSImpl instance passed to the start-element-handler. Closes SF bug #563399. Support skippedEntity. Fixes #665486.
* Minor simplification.Fred Drake2002-10-281-2/+1
|
* Really do replacement of & last to avoid bad interactions between &Fred Drake2002-10-281-2/+2
| | | | replacement and replacements based on the entities parameter.
* Avoid calling __dict_replace() if we don't need to -- the call is muchFred Drake2002-10-281-8/+10
| | | | | more expensive than just doing to work needed, and these things seem to always turn into a bottleneck eventually.
* Patch #613256: Add nescape method to xml.sax.saxutils.Martin v. Löwis2002-10-261-6/+26
|
* Merge from PyXML:Martin v. Löwis2002-06-301-2/+26
| | | | | | [1.3] Added documentation of the namespace URI for elements with no namespace. [1.4] New property http://www.python.org/sax/properties/encoding. [1.5] Support optional string interning in pyexpat.
* Fix spacing.Martin v. Löwis2002-06-301-1/+1
|
* Merge changes from PyXML:Martin v. Löwis2002-06-301-13/+76
| | | | | | | | | | | | | | | | | | | | [1.15] Added understanding of the feature_validation, feature_external_pes, and feature_string_interning features. Added support for the feature_external_ges feature. Added support for the property_xml_string property. [1.16] Made it recognize the namespace prefixes feature. [1.17] removed erroneous first line [1.19] Support optional string interning in pyexpat. [1.21] Restore compatibility with versions of Python that did not support weak references. These do not get the cyclic reference fix, but they will continue to work as they did before. [1.22] Activate entity processing unless standalone.
* Use more string methods, remove import stringNeal Norwitz2002-05-312-7/+6
|
* Not sure why the regression test missed this, but the PyXML tests caught it.Fred Drake2002-04-041-1/+1
| | | | We should get attributes from the right object.
* Avoid creating circular references between the ExpatParser and theFred Drake2002-04-041-1/+38
| | | | | | | ContentHandler. While GC will eventually clean up, it can take longer than normal for applications that create a lot of strings (or other immutables) rather without creating many containers. This closes SF bug #535474.
* Make sure XMLGenerator uses quoteattr() instead of escape() to quoteFred Drake2001-08-071-2/+2
| | | | | | | attribute values. Just using escape() can (and always has) led to broken XML being generated. This makes sure it always produces the right thing. This actually closes SF bug #440351.
* Add dead imports of modules that are "magically" imported.Martin v. Löwis2001-07-311-0/+5
|
* Get the whitespace right!Fred Drake2001-07-301-3/+3
|
* Ugly fix used when pyexpat is not available.Jeremy Hylton2001-07-301-0/+3
| | | | | | | | | | If pyexpat is not available and more than one attempt is made to load an expat-based xml parser, an empty xml.parser.expat module will be created. This empty module will confuse xml.sax.expatreader into thinking that pyexpat is available. The ugly fix is to verify that the expat module actually defines the names that are imported from pyexpat.
* Added function xml.sax.saxutils.quoteattr().Fred Drake2001-07-191-0/+21
| | | | This closes SF bug #440351. It should not be moved to Python 2.1.1.
* Synchronize with 1.13 of PyXML:Martin v. Löwis2001-06-171-6/+28
| | | | | | Allow application to set a new content handler and lex_prop handler during parsing. Closes bug #433761. Small hack to make expat be ignored in Jython.
* Previous check-in was by mistake, undo it.Martin v. Löwis2001-06-071-1/+3
|
* Patch #416220: Fix misplaced paren.Martin v. Löwis2001-06-071-3/+1
|