summaryrefslogtreecommitdiffstats
path: root/Lib/xml/sax/expatreader.py
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 #11159: SAX parser now supports unicode file names.Serhiy Storchaka2013-02-021-1/+4
|
* #4490 Fix sample code run by "python -m xml.sax.xmlreader"Amaury Forgeot d'Arc2009-06-221-3/+3
|
* #2503 make singletons compared with "is" not == or !=Benjamin Peterson2008-03-291-1/+1
| | | | Thanks to Wummel for the patch
* expunge the xmlcore changes:Fred Drake2006-07-291-0/+414
| | | | | | | | | | | | | | | | | | | 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-141-414/+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
|
* Swap public and system ID in start_doctype_decl. Fixes #780300.Martin v. Löwis2004-05-061-1/+1
|
* Get rid of many apply() calls.Guido van Rossum2003-02-271-1/+1
|
* 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.
* 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-311-4/+3
|
* 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.
* 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.
* 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.
* Re-indent.Martin v. Löwis2001-01-271-4/+4
|
* Synchronize with PyXML 1.10Martin v. Löwis2001-01-271-7/+25
| | | | | Break cycle involving expat parser in close(). Add lex handler support to SAX2 pyexpat
* Make reindent.py happy (lots of trailing whitespace removed).Fred Drake2000-10-231-19/+19
|
* Fixed a bug that caused namespace names to be reported as lists ratherLars Gustäbel2000-10-191-0/+2
| | | | than tuples.
* Fixed minor problem with reset().Lars Gustäbel2000-10-141-1/+2
|
* _exceptions: Format a missing system id as <unknown>.Martin v. Löwis2000-10-091-1/+2
| | | | expatreader: Use the error handler instead of raising exception directly.
* Don't report a final chunk for an external entity parser.Martin v. Löwis2000-10-061-1/+0
|
* Move translation from expat.error to SAXParseException into feed, so thatMartin v. Löwis2000-10-061-17/+19
| | | | | | | | | | callers of feed will get a SAXException. In close, feed the last chunk first before calling endDocument, so that the parser may report errors before the end of the document. Don't do anything in a nested parser. Don't call endDocument in parse; that will be called in close. Use self._source for finding the SystemID; XML_GetBase will be cleared in case of an error.
* Add SAXReaderNotAvailable, and use it to distinguish between anMartin v. Löwis2000-10-061-1/+4
| | | | ImportError, and a missing driver.
* Use string functions instead of methods to allow sharing this module with PyXMLMartin v. Löwis2000-09-291-3/+5
|
* Find feature names in handler.Martin v. Löwis2000-09-241-3/+3
|
* Fixed another bug.Lars Gustäbel2000-09-241-1/+0
|
* Improvements to doco strings.Lars Gustäbel2000-09-241-4/+7
| | | | Tiny bug fix to expatreader.py (endDocument was only called after errors).
* Added EntityResolver and DTDHandler (patch 101631) with test cases.Lars Gustäbel2000-09-241-16/+18
|
* Added back the InputSource class (patch 101630).Lars Gustäbel2000-09-241-13/+9
|
* Updated to final Attributes interface (patch 101632).Lars Gustäbel2000-09-241-4/+17
|
* Updated to new *NS signatures (patch 101573).Lars Gustäbel2000-09-241-25/+25
|
* Conform more closely with the Python style guide.Fred Drake2000-09-231-11/+11
|
* Use the public name for the Expat parser; "pyexpat" is deprecated.Fred Drake2000-09-231-11/+7
|
* fix indentation in one docstringSkip Montanaro2000-07-061-1/+1
|
* Used original SAX handling form.Paul Prescod2000-07-041-11/+10
|
* Paul Prescod <paul@prescod.net>:Fred Drake2000-06-291-0/+204
SAX interfaces for Python.