From 0e9253a2fca72787c2a85115f7844205ddffbf57 Mon Sep 17 00:00:00 2001 From: Hyunjee Kim Date: Thu, 31 Jan 2019 10:30:28 +0900 Subject: [PATCH] Imported Upstream version 3.1.1 Change-Id: I771d55791f86224676fe845b09683106e96829e3 Signed-off-by: Hyunjee Kim --- CHANGES.txt | 21 + PKG-INFO | 24 +- doc/FAQ.txt | 116 +- doc/build.txt | 2 +- doc/html/FAQ.html | 113 +- doc/html/api.html | 4 +- doc/html/api/abc.ABCMeta-class.html | 2 +- doc/html/api/api-objects.txt | 80 +- doc/html/api/class-tree.html | 11 +- doc/html/api/deprecated-index.html | 12 +- doc/html/api/exceptions.AssertionError-class.html | 2 +- doc/html/api/help.html | 2 +- doc/html/api/identifier-index-A.html | 2 +- doc/html/api/identifier-index-B.html | 2 +- doc/html/api/identifier-index-C.html | 53 +- doc/html/api/identifier-index-D.html | 2 +- doc/html/api/identifier-index-E.html | 197 +- doc/html/api/identifier-index-F.html | 2 +- doc/html/api/identifier-index-G.html | 2 +- doc/html/api/identifier-index-H.html | 2 +- doc/html/api/identifier-index-I.html | 2 +- doc/html/api/identifier-index-J.html | 2 +- doc/html/api/identifier-index-K.html | 2 +- doc/html/api/identifier-index-L.html | 2 +- doc/html/api/identifier-index-M.html | 44 +- doc/html/api/identifier-index-N.html | 2 +- doc/html/api/identifier-index-O.html | 2 +- doc/html/api/identifier-index-P.html | 81 +- doc/html/api/identifier-index-Q.html | 2 +- doc/html/api/identifier-index-R.html | 195 +- doc/html/api/identifier-index-S.html | 425 +- doc/html/api/identifier-index-T.html | 2084 +-- doc/html/api/identifier-index-U.html | 2 +- doc/html/api/identifier-index-V.html | 54 +- doc/html/api/identifier-index-W.html | 2 +- doc/html/api/identifier-index-X.html | 2 +- doc/html/api/identifier-index-Y.html | 2 +- doc/html/api/identifier-index-Z.html | 2 +- doc/html/api/identifier-index-_.html | 1282 +- doc/html/api/identifier-index.html | 2 +- doc/html/api/lxml-module.html | 2 +- doc/html/api/lxml-pysrc.html | 2 +- doc/html/api/lxml.ElementInclude-module.html | 2 +- doc/html/api/lxml.ElementInclude-pysrc.html | 5 +- ...xml.ElementInclude.FatalIncludeError-class.html | 2 +- doc/html/api/lxml.builder-module.html | 2 +- doc/html/api/lxml.builder-pysrc.html | 14 +- doc/html/api/lxml.builder.ElementMaker-class.html | 2 +- doc/html/api/lxml.cssselect-module.html | 2 +- doc/html/api/lxml.cssselect-pysrc.html | 6 +- doc/html/api/lxml.cssselect.CSSSelector-class.html | 2 +- .../lxml.cssselect.LxmlHTMLTranslator-class.html | 2 +- .../api/lxml.cssselect.LxmlTranslator-class.html | 2 +- doc/html/api/lxml.doctestcompare-module.html | 2 +- doc/html/api/lxml.doctestcompare-pysrc.html | 2 +- ...ml.doctestcompare.LHTMLOutputChecker-class.html | 2 +- ...xml.doctestcompare.LXMLOutputChecker-class.html | 2 +- .../lxml.doctestcompare._RestoreChecker-class.html | 2 +- doc/html/api/lxml.etree-module.html | 35 +- .../api/lxml.etree.AncestorsIterator-class.html | 2 +- ...ree.AttributeBasedElementClassLookup-class.html | 2 +- doc/html/api/lxml.etree.C14NError-class.html | 2 +- doc/html/api/lxml.etree.CDATA-class.html | 43 +- doc/html/api/lxml.etree.CommentBase-class.html | 2 +- .../lxml.etree.CustomElementClassLookup-class.html | 2 +- doc/html/api/lxml.etree.DTD-class.html | 2 +- doc/html/api/lxml.etree.DTDError-class.html | 2 +- doc/html/api/lxml.etree.DTDParseError-class.html | 2 +- .../api/lxml.etree.DTDValidateError-class.html | 2 +- doc/html/api/lxml.etree.DocInfo-class.html | 2 +- doc/html/api/lxml.etree.DocumentInvalid-class.html | 2 +- .../api/lxml.etree.ETCompatXMLParser-class.html | 40 +- doc/html/api/lxml.etree.ETXPath-class.html | 2 +- doc/html/api/lxml.etree.ElementBase-class.html | 2 +- .../api/lxml.etree.ElementChildIterator-class.html | 2 +- .../api/lxml.etree.ElementClassLookup-class.html | 2 +- ...lxml.etree.ElementDefaultClassLookup-class.html | 2 +- ...lxml.etree.ElementDepthFirstIterator-class.html | 2 +- ...ml.etree.ElementNamespaceClassLookup-class.html | 2 +- .../api/lxml.etree.ElementTextIterator-class.html | 2 +- doc/html/api/lxml.etree.EntityBase-class.html | 2 +- doc/html/api/lxml.etree.Error-class.html | 2 +- doc/html/api/lxml.etree.ErrorDomains-class.html | 2 +- doc/html/api/lxml.etree.ErrorLevels-class.html | 2 +- doc/html/api/lxml.etree.ErrorTypes-class.html | 2 +- ...xml.etree.FallbackElementClassLookup-class.html | 2 +- doc/html/api/lxml.etree.HTMLParser-class.html | 36 +- doc/html/api/lxml.etree.LxmlError-class.html | 2 +- .../api/lxml.etree.LxmlRegistryError-class.html | 2 +- doc/html/api/lxml.etree.LxmlSyntaxError-class.html | 2 +- .../lxml.etree.NamespaceRegistryError-class.html | 2 +- doc/html/api/lxml.etree.PIBase-class.html | 2 +- doc/html/api/lxml.etree.ParseError-class.html | 2 +- ....etree.ParserBasedElementClassLookup-class.html | 2 +- doc/html/api/lxml.etree.ParserError-class.html | 2 +- doc/html/api/lxml.etree.PyErrorLog-class.html | 2 +- .../lxml.etree.PythonElementClassLookup-class.html | 2 +- doc/html/api/lxml.etree.QName-class.html | 2 +- doc/html/api/lxml.etree.RelaxNG-class.html | 2 +- doc/html/api/lxml.etree.RelaxNGError-class.html | 2 +- .../api/lxml.etree.RelaxNGErrorTypes-class.html | 2 +- .../api/lxml.etree.RelaxNGParseError-class.html | 2 +- .../api/lxml.etree.RelaxNGValidateError-class.html | 2 +- doc/html/api/lxml.etree.Resolver-class.html | 2 +- doc/html/api/lxml.etree.Schematron-class.html | 2 +- doc/html/api/lxml.etree.SchematronError-class.html | 2 +- .../api/lxml.etree.SchematronParseError-class.html | 2 +- .../lxml.etree.SchematronValidateError-class.html | 2 +- .../api/lxml.etree.SerialisationError-class.html | 2 +- .../api/lxml.etree.SiblingsIterator-class.html | 2 +- doc/html/api/lxml.etree.TreeBuilder-class.html | 2 +- doc/html/api/lxml.etree.XInclude-class.html | 2 +- doc/html/api/lxml.etree.XIncludeError-class.html | 2 +- doc/html/api/lxml.etree.XMLParser-class.html | 36 +- doc/html/api/lxml.etree.XMLSchema-class.html | 2 +- doc/html/api/lxml.etree.XMLSchemaError-class.html | 2 +- .../api/lxml.etree.XMLSchemaParseError-class.html | 2 +- .../lxml.etree.XMLSchemaValidateError-class.html | 2 +- doc/html/api/lxml.etree.XMLSyntaxError-class.html | 2 +- doc/html/api/lxml.etree.XPath-class.html | 2 +- .../lxml.etree.XPathDocumentEvaluator-class.html | 2 +- .../lxml.etree.XPathElementEvaluator-class.html | 2 +- doc/html/api/lxml.etree.XPathError-class.html | 2 +- doc/html/api/lxml.etree.XPathEvalError-class.html | 2 +- .../api/lxml.etree.XPathFunctionError-class.html | 2 +- .../api/lxml.etree.XPathResultError-class.html | 2 +- .../api/lxml.etree.XPathSyntaxError-class.html | 2 +- doc/html/api/lxml.etree.XSLT-class.html | 2 +- .../api/lxml.etree.XSLTAccessControl-class.html | 2 +- doc/html/api/lxml.etree.XSLTApplyError-class.html | 2 +- doc/html/api/lxml.etree.XSLTError-class.html | 2 +- doc/html/api/lxml.etree.XSLTExtension-class.html | 2 +- .../api/lxml.etree.XSLTExtensionError-class.html | 2 +- doc/html/api/lxml.etree.XSLTParseError-class.html | 2 +- doc/html/api/lxml.etree.XSLTSaveError-class.html | 2 +- doc/html/api/lxml.etree._Attrib-class.html | 2 +- doc/html/api/lxml.etree._BaseErrorLog-class.html | 2 +- doc/html/api/lxml.etree._BaseParser-class.html | 436 - doc/html/api/lxml.etree._Comment-class.html | 2 +- doc/html/api/lxml.etree._Document-class.html | 2 +- doc/html/api/lxml.etree._DomainErrorLog-class.html | 2 +- doc/html/api/lxml.etree._Element-class.html | 2 +- .../api/lxml.etree._ElementIterator-class.html | 2 +- .../lxml.etree._ElementMatchIterator-class.html | 2 +- .../api/lxml.etree._ElementStringResult-class.html | 2 +- .../api/lxml.etree._ElementTagMatcher-class.html | 2 +- doc/html/api/lxml.etree._ElementTree-class.html | 2 +- .../lxml.etree._ElementUnicodeResult-class.html | 2 +- doc/html/api/lxml.etree._Entity-class.html | 2 +- doc/html/api/lxml.etree._ErrorLog-class.html | 2 +- doc/html/api/lxml.etree._FeedParser-class.html | 34 +- doc/html/api/lxml.etree._IDDict-class.html | 2 +- doc/html/api/lxml.etree._ListErrorLog-class.html | 2 +- doc/html/api/lxml.etree._LogEntry-class.html | 2 +- .../lxml.etree._ProcessingInstruction-class.html | 2 +- .../api/lxml.etree._RotatingErrorLog-class.html | 2 +- .../api/lxml.etree._SaxParserTarget-class.html | 2 +- .../api/lxml.etree._TargetParserResult-class.html | 2 +- doc/html/api/lxml.etree._Validator-class.html | 2 +- .../api/lxml.etree._XPathEvaluatorBase-class.html | 2 +- ...xml.etree._XSLTProcessingInstruction-class.html | 2 +- doc/html/api/lxml.etree._XSLTResultTree-class.html | 2 +- doc/html/api/lxml.etree.iterparse-class.html | 30 +- doc/html/api/lxml.etree.iterwalk-class.html | 2 +- doc/html/api/lxml.etree.xmlfile-class.html | 2 +- doc/html/api/lxml.html-module.html | 2 +- doc/html/api/lxml.html-pysrc.html | 38 +- doc/html/api/lxml.html.CheckboxGroup-class.html | 2 +- doc/html/api/lxml.html.CheckboxValues-class.html | 2 +- doc/html/api/lxml.html.ElementSoup-module.html | 2 +- doc/html/api/lxml.html.ElementSoup-pysrc.html | 6 +- doc/html/api/lxml.html.FieldsDict-class.html | 6 +- doc/html/api/lxml.html.FormElement-class.html | 2 +- doc/html/api/lxml.html.HTMLParser-class.html | 40 +- doc/html/api/lxml.html.HtmlComment-class.html | 2 +- doc/html/api/lxml.html.HtmlElement-class.html | 2 +- .../lxml.html.HtmlElementClassLookup-class.html | 2 +- doc/html/api/lxml.html.HtmlEntity-class.html | 2 +- doc/html/api/lxml.html.HtmlMixin-class.html | 2 +- .../lxml.html.HtmlProcessingInstruction-class.html | 2 +- doc/html/api/lxml.html.InputElement-class.html | 2 +- doc/html/api/lxml.html.InputGetter-class.html | 2 +- doc/html/api/lxml.html.InputMixin-class.html | 2 +- doc/html/api/lxml.html.LabelElement-class.html | 2 +- .../api/lxml.html.MultipleSelectOptions-class.html | 2 +- doc/html/api/lxml.html.RadioGroup-class.html | 2 +- doc/html/api/lxml.html.SelectElement-class.html | 2 +- doc/html/api/lxml.html.TextareaElement-class.html | 2 +- doc/html/api/lxml.html.XHTMLParser-class.html | 40 +- doc/html/api/lxml.html._MethodFunc-class.html | 2 +- doc/html/api/lxml.html.builder-module.html | 2 +- doc/html/api/lxml.html.builder-pysrc.html | 8 +- doc/html/api/lxml.html.clean-module.html | 2 +- doc/html/api/lxml.html.clean-pysrc.html | 13 +- doc/html/api/lxml.html.clean.Cleaner-class.html | 2 +- doc/html/api/lxml.html.defs-module.html | 2 +- doc/html/api/lxml.html.defs-pysrc.html | 2 +- doc/html/api/lxml.html.diff-module.html | 6 +- doc/html/api/lxml.html.diff-pysrc.html | 808 +- doc/html/api/lxml.html.diff.DEL_END-class.html | 2 +- doc/html/api/lxml.html.diff.DEL_START-class.html | 2 +- ...html.diff.InsensitiveSequenceMatcher-class.html | 2 +- doc/html/api/lxml.html.diff.NoDeletes-class.html | 2 +- doc/html/api/lxml.html.diff.href_token-class.html | 2 +- doc/html/api/lxml.html.diff.tag_token-class.html | 2 +- doc/html/api/lxml.html.diff.token-class.html | 2 +- doc/html/api/lxml.html.formfill-module.html | 2 +- doc/html/api/lxml.html.formfill-pysrc.html | 10 +- ...ml.html.formfill.DefaultErrorCreator-class.html | 2 +- .../api/lxml.html.formfill.FormNotFound-class.html | 2 +- doc/html/api/lxml.html.html5parser-module.html | 2 +- doc/html/api/lxml.html.html5parser-pysrc.html | 8 +- .../lxml.html.html5parser.HTMLParser-class.html | 2 +- .../lxml.html.html5parser.XHTMLParser-class.html | 2 +- doc/html/api/lxml.html.soupparser-module.html | 2 +- doc/html/api/lxml.html.soupparser-pysrc.html | 41 +- doc/html/api/lxml.html.usedoctest-module.html | 2 +- doc/html/api/lxml.html.usedoctest-pysrc.html | 2 +- doc/html/api/lxml.includes-module.html | 2 +- doc/html/api/lxml.includes-pysrc.html | 2 +- doc/html/api/lxml.isoschematron-module.html | 2 +- doc/html/api/lxml.isoschematron-pysrc.html | 9 +- .../api/lxml.isoschematron.Schematron-class.html | 2 +- doc/html/api/lxml.objectify-module.html | 4 +- doc/html/api/lxml.objectify.BoolElement-class.html | 2 +- .../api/lxml.objectify.ElementMaker-class.html | 2 +- .../api/lxml.objectify.FloatElement-class.html | 2 +- doc/html/api/lxml.objectify.IntElement-class.html | 2 +- doc/html/api/lxml.objectify.LongElement-class.html | 2 +- doc/html/api/lxml.objectify.NoneElement-class.html | 2 +- .../api/lxml.objectify.NumberElement-class.html | 2 +- doc/html/api/lxml.objectify.ObjectPath-class.html | 2 +- ...xml.objectify.ObjectifiedDataElement-class.html | 2 +- .../lxml.objectify.ObjectifiedElement-class.html | 2 +- ...bjectify.ObjectifyElementClassLookup-class.html | 2 +- doc/html/api/lxml.objectify.PyType-class.html | 2 +- .../api/lxml.objectify.StringElement-class.html | 2 +- doc/html/api/lxml.pyclasslookup-module.html | 2 +- doc/html/api/lxml.pyclasslookup-pysrc.html | 2 +- doc/html/api/lxml.sax-module.html | 2 +- doc/html/api/lxml.sax-pysrc.html | 17 +- .../lxml.sax.ElementTreeContentHandler-class.html | 2 +- .../api/lxml.sax.ElementTreeProducer-class.html | 2 +- doc/html/api/lxml.sax.SaxError-class.html | 2 +- doc/html/api/lxml.tests-module.html | 2 +- doc/html/api/lxml.tests-pysrc.html | 2 +- doc/html/api/lxml.tests.common_imports-module.html | 2 +- doc/html/api/lxml.tests.common_imports-pysrc.html | 6 +- ....tests.common_imports.HelperTestCase-class.html | 4 +- ...l.tests.common_imports.LargeFileLike-class.html | 2 +- ....common_imports.LargeFileLikeUnicode-class.html | 2 +- ...l.tests.common_imports.SillyFileLike-class.html | 2 +- doc/html/api/lxml.tests.test_builder-module.html | 2 +- doc/html/api/lxml.tests.test_builder-pysrc.html | 2 +- ...l.tests.test_builder.BuilderTestCase-class.html | 2 +- .../api/lxml.tests.test_classlookup-module.html | 10 +- .../api/lxml.tests.test_classlookup-pysrc.html | 676 +- ...test_classlookup.ClassLookupTestCase-class.html | 2 +- ...tests.test_classlookup.ProxyTestCase-class.html | 456 + doc/html/api/lxml.tests.test_css-module.html | 2 +- doc/html/api/lxml.tests.test_css-pysrc.html | 2 +- .../api/lxml.tests.test_css.CSSTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_dtd-module.html | 2 +- doc/html/api/lxml.tests.test_dtd-pysrc.html | 5 +- ...lxml.tests.test_dtd.ETreeDtdTestCase-class.html | 2 +- .../api/lxml.tests.test_elementtree-module.html | 2 +- .../api/lxml.tests.test_elementtree-pysrc.html | 959 +- ...est_elementtree.CElementTreeTestCase-class.html | 2 +- ...tests.test_elementtree.ETreeTestCase-class.html | 6 +- ...test_elementtree.ElementTreeTestCase-class.html | 2 +- ....test_elementtree._ETreeTestCaseBase-class.html | 2 +- doc/html/api/lxml.tests.test_errors-module.html | 2 +- doc/html/api/lxml.tests.test_errors-pysrc.html | 2 +- ...lxml.tests.test_errors.ErrorTestCase-class.html | 6 +- doc/html/api/lxml.tests.test_etree-module.html | 2 +- doc/html/api/lxml.tests.test_etree-pysrc.html | 5249 ++++--- ...l.tests.test_etree.ETreeC14NTestCase-class.html | 2 +- ...l.tests.test_etree.ETreeErrorLogTest-class.html | 6 +- ...l.tests.test_etree.ETreeOnlyTestCase-class.html | 6 +- ....tests.test_etree.ETreeWriteTestCase-class.html | 2 +- ...sts.test_etree.ETreeXIncludeTestCase-class.html | 2 +- ...ts.test_etree.ElementIncludeTestCase-class.html | 2 +- ...l.tests.test_etree._XIncludeTestCase-class.html | 2 +- .../api/lxml.tests.test_htmlparser-module.html | 2 +- doc/html/api/lxml.tests.test_htmlparser-pysrc.html | 38 +- ...s.test_htmlparser.HtmlParserTestCase-class.html | 6 +- ...lxml.tests.test_incremental_xmlfile-module.html | 2 +- .../lxml.tests.test_incremental_xmlfile-pysrc.html | 11 +- ...ental_xmlfile.BytesIOXmlFileTestCase-class.html | 2 +- ...mlfile.SimpleFileLikeXmlFileTestCase-class.html | 2 +- ...leLikeXmlFileTestCase.SimpleFileLike-class.html | 2 +- ...remental_xmlfile.TempXmlFileTestCase-class.html | 2 +- ...emental_xmlfile._XmlFileTestCaseBase-class.html | 2 +- doc/html/api/lxml.tests.test_io-module.html | 2 +- doc/html/api/lxml.tests.test_io-pysrc.html | 2 +- .../lxml.tests.test_io.ETreeIOTestCase-class.html | 6 +- ....tests.test_io.ElementTreeIOTestCase-class.html | 2 +- .../lxml.tests.test_io._IOTestCaseBase-class.html | 2 +- .../api/lxml.tests.test_isoschematron-module.html | 2 +- .../api/lxml.tests.test_isoschematron-pysrc.html | 56 +- ...chematron.ETreeISOSchematronTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_nsclasses-module.html | 2 +- doc/html/api/lxml.tests.test_nsclasses-pysrc.html | 5 +- ...lasses.ETreeNamespaceClassesTestCase-class.html | 2 +- ...NamespaceClassesTestCase.bluff_class-class.html | 2 +- ...mespaceClassesTestCase.default_class-class.html | 2 +- ...eNamespaceClassesTestCase.maeh_class-class.html | 2 +- doc/html/api/lxml.tests.test_objectify-module.html | 2 +- doc/html/api/lxml.tests.test_objectify-pysrc.html | 16 +- ...sts.test_objectify.ObjectifyTestCase-class.html | 6 +- .../api/lxml.tests.test_pyclasslookup-module.html | 2 +- .../api/lxml.tests.test_pyclasslookup-pysrc.html | 11 +- ..._pyclasslookup.PyClassLookupTestCase-class.html | 6 +- doc/html/api/lxml.tests.test_relaxng-module.html | 2 +- doc/html/api/lxml.tests.test_relaxng-pysrc.html | 5 +- ...ts.test_relaxng.ETreeRelaxNGTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_sax-module.html | 2 +- doc/html/api/lxml.tests.test_sax-pysrc.html | 2 +- ...lxml.tests.test_sax.ETreeSaxTestCase-class.html | 2 +- .../api/lxml.tests.test_schematron-module.html | 2 +- doc/html/api/lxml.tests.test_schematron-pysrc.html | 2 +- ...t_schematron.ETreeSchematronTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_threading-module.html | 2 +- doc/html/api/lxml.tests.test_threading-pysrc.html | 24 +- ...est_threading.ThreadPipelineTestCase-class.html | 6 +- ...ipelineTestCase.ParseAndExtendWorker-class.html | 2 +- ...g.ThreadPipelineTestCase.ParseWorker-class.html | 2 +- ...ThreadPipelineTestCase.ReverseWorker-class.html | 2 +- ....ThreadPipelineTestCase.RotateWorker-class.html | 2 +- ...readPipelineTestCase.SerialiseWorker-class.html | 2 +- ...eading.ThreadPipelineTestCase.Worker-class.html | 2 +- ...sts.test_threading.ThreadingTestCase-class.html | 6 +- doc/html/api/lxml.tests.test_unicode-module.html | 2 +- doc/html/api/lxml.tests.test_unicode-pysrc.html | 2 +- ...l.tests.test_unicode.UnicodeTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_xmlschema-module.html | 2 +- doc/html/api/lxml.tests.test_xmlschema-pysrc.html | 154 +- ...hema.ETreeXMLSchemaResolversTestCase-class.html | 2 +- ...emaResolversTestCase.simple_resolver-class.html | 2 +- ...est_xmlschema.ETreeXMLSchemaTestCase-class.html | 2 +- .../api/lxml.tests.test_xpathevaluator-module.html | 4 +- .../api/lxml.tests.test_xpathevaluator-pysrc.html | 2 +- ...hevaluator.ETreeETXPathClassTestCase-class.html | 2 +- ...athevaluator.ETreeXPathClassTestCase-class.html | 2 +- ...athevaluator.ETreeXPathExsltTestCase-class.html | 2 +- ...st_xpathevaluator.ETreeXPathTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_xslt-module.html | 2 +- doc/html/api/lxml.tests.test_xslt-pysrc.html | 1236 +- ...l.tests.test_xslt.ETreeEXSLTTestCase-class.html | 2 +- ...est_xslt.ETreeXSLTExtElementTestCase-class.html | 2 +- ...s.test_xslt.ETreeXSLTExtFuncTestCase-class.html | 2 +- ...ml.tests.test_xslt.ETreeXSLTTestCase-class.html | 2 +- ...lxml.tests.test_xslt.Py3XSLTTestCase-class.html | 2 +- doc/html/api/lxml.usedoctest-module.html | 2 +- doc/html/api/lxml.usedoctest-pysrc.html | 2 +- doc/html/api/module-tree.html | 2 +- doc/html/api/redirect.html | 2 +- doc/html/api/str-class.html | 2 +- doc/html/api/toc-everything.html | 6 +- doc/html/api/toc-lxml.etree-module.html | 3 - .../toc-lxml.tests.test_classlookup-module.html | 3 +- doc/html/api/xml.etree.ElementTree-module.html | 14 +- doc/html/api/xml.etree.ElementTree-pysrc.html | 274 +- .../api/xml.etree.ElementTree.Element-class.html | 2 +- .../xml.etree.ElementTree.ElementTree-class.html | 2 +- .../xml.etree.ElementTree.ParseError-class.html | 2 +- .../api/xml.etree.ElementTree.QName-class.html | 2 +- .../xml.etree.ElementTree.TreeBuilder-class.html | 2 +- .../api/xml.etree.ElementTree.XMLParser-class.html | 2 +- ...etree.ElementTree._IterParseIterator-class.html | 2 +- ...etree.ElementTree._SimpleElementPath-class.html | 2 +- doc/html/build.html | 6 +- doc/html/capi.html | 4 +- .../{changes-3.1.0.html => changes-3.1.1.html} | 523 +- doc/html/compatibility.html | 4 +- doc/html/credits.html | 4 +- doc/html/cssselect.html | 4 +- doc/html/element_classes.html | 4 +- doc/html/elementsoup.html | 4 +- doc/html/extensions.html | 4 +- doc/html/html5parser.html | 4 +- doc/html/index.html | 13 +- doc/html/installation.html | 4 +- doc/html/intro.html | 4 +- doc/html/lxml-source-howto.html | 4 +- doc/html/lxmlhtml.html | 4 +- doc/html/objectify.html | 4 +- doc/html/parsing.html | 6 +- doc/html/performance.html | 4 +- doc/html/resolvers.html | 4 +- doc/html/sax.html | 4 +- doc/html/sitemap.html | 2 +- doc/html/tutorial.html | 24 +- doc/html/validation.html | 4 +- doc/html/xpathxslt.html | 4 +- doc/main.txt | 10 +- doc/parsing.txt | 2 +- doc/s5/lxml-ep2008.html | 21 +- doc/tutorial.txt | 24 +- setup.py | 1 + src/lxml/apihelpers.pxi | 61 +- src/lxml/docloader.pxi | 6 +- src/lxml/extensions.pxi | 12 +- src/lxml/html/__init__.py | 2 +- src/lxml/includes/lxml-version.h | 2 +- src/lxml/iterparse.pxi | 2 +- src/lxml/lxml.etree.c | 13540 ++++++++++--------- src/lxml/lxml.etree.h | 6 +- src/lxml/lxml.etree.pyx | 13 +- src/lxml/lxml.objectify.c | 4915 +++---- src/lxml/lxml.objectify.pyx | 16 +- src/lxml/objectpath.pxi | 4 +- src/lxml/parser.pxi | 36 +- src/lxml/python.pxd | 7 - src/lxml/readonlytree.pxi | 3 +- src/lxml/serializer.pxi | 20 +- src/lxml/tests/test_classlookup.py | 50 +- src/lxml/tests/test_etree.py | 2 +- src/lxml/xpath.pxi | 9 +- version.txt | 2 +- 420 files changed, 18087 insertions(+), 17763 deletions(-) delete mode 100644 doc/html/api/lxml.etree._BaseParser-class.html create mode 100644 doc/html/api/lxml.tests.test_classlookup.ProxyTestCase-class.html rename doc/html/{changes-3.1.0.html => changes-3.1.1.html} (99%) diff --git a/CHANGES.txt b/CHANGES.txt index 85321b7..2ce0ab3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,27 @@ lxml changelog ============== +3.1.1 (2013-03-29) +================== + +Features added +-------------- + +Bugs fixed +---------- + +* LP#1160386: Write access to ``lxml.html.FormElement.fields`` raised + an AttributeError in Py3. + +* Illegal memory access during cleanup in incremental xmlfile writer. + +Other changes +------------- + +* The externally useless class ``lxml.etree._BaseParser`` was removed + from the module dict. + + 3.1.0 (2013-02-10) ================== diff --git a/PKG-INFO b/PKG-INFO index a5f938e..5357cb8 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,12 +1,12 @@ Metadata-Version: 1.1 Name: lxml -Version: 3.1.0 +Version: 3.1.1 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. Home-page: http://lxml.de/ Author: lxml dev team Author-email: lxml-dev@lxml.de License: UNKNOWN -Download-URL: http://pypi.python.org/packages/source/l/lxml/lxml-3.1.0.tar.gz +Download-URL: http://pypi.python.org/packages/source/l/lxml/lxml-3.1.1.tar.gz Description: lxml is a Pythonic, mature binding for the libxml2 and libxslt libraries. It provides safe and convenient access to these libraries using the ElementTree API. @@ -37,32 +37,26 @@ Description: lxml is a Pythonic, mature binding for the libxml2 and libxslt libr as soon as a maintenance branch has been established. Note that this requires Cython to be installed at an appropriate version for the build. - 3.1.0 (2013-02-10) + 3.1.1 (2013-03-29) ================== Features added -------------- - * GH#89: lxml.html.clean allows overriding the set of attributes that it - considers 'safe'. Patch by Francis Devereux. - Bugs fixed ---------- - * LP#1104370: ``copy.copy(el.attrib)`` raised an exception. It now returns - a copy of the attributes as a plain Python dict. - - * GH#95: When used with namespace prefixes, the ``el.find*()`` methods - always used the first namespace mapping that was provided for each - path expression instead of using the one that was actually passed - in for the current run. + * LP#1160386: Write access to ``lxml.html.FormElement.fields`` raised + an AttributeError in Py3. - * LP#1092521, GH#91: Fix undefined C symbol in Python runtimes compiled - without threading support. Patch by Ulrich Seidl. + * Illegal memory access during cleanup in incremental xmlfile writer. Other changes ------------- + * The externally useless class ``lxml.etree._BaseParser`` was removed + from the module dict. + Platform: UNKNOWN diff --git a/doc/FAQ.txt b/doc/FAQ.txt index f6814fe..ec1ec78 100644 --- a/doc/FAQ.txt +++ b/doc/FAQ.txt @@ -52,7 +52,8 @@ ElementTree_. 6.4 Why can't I just delete parents or clear the root node in iterparse()? 6.5 How do I output null characters in XML text? 6.6 Is lxml vulnerable to XML bombs? - 6.7 Can lxml parse from file objects opened in unicode mode? + 6.7 How do I configure lxml safely as a web-service endpoint? + 6.8 Can lxml parse from file objects opened in unicode mode? 7 XPath and Document Traversal 7.1 What are the ``findall()`` and ``xpath()`` methods on Element(Tree)? 7.2 Why doesn't ``findall()`` support full XPath expressions? @@ -875,22 +876,42 @@ library`_ recipe page. Why can't lxml parse my XML from unicode strings? ------------------------------------------------- -lxml can read Python unicode strings and even tries to support them if libxml2 -does not. However, if the unicode string declares an XML encoding internally +First of all, XML is explicitly defined as a stream of bytes. It's not +Unicode text. Take a look at the `XML specification`_, it's all about byte +sequences and how to map them to text and structure. That leads to rule +number one: do not decode your XML data yourself. That's a part of the +work of an XML parser, and it does it very well. Just pass it your data as +a plain byte stream, it will always do the right thing, by specification. + +This also includes not opening XML files in text mode. Make sure you always +use binary mode, or, even better, pass the file path into lxml's ``parse()`` +function to let it do the file opening, reading and closing itself. This +is the most simple and most efficient way to do it. + +That being said, lxml can read Python unicode strings and even tries to +support them if libxml2 does not. This is because there is one valid use +case for parsing XML from text strings: literal XML fragments in source +code. + +However, if the unicode string declares an XML encoding internally (````), parsing is bound to fail, as this encoding is -most likely not the real encoding used in Python unicode. The same is true -for HTML unicode strings that contain charset meta tags, although the problems -may be more subtle here. The libxml2 HTML parser may not be able to parse the -meta tags in broken HTML and may end up ignoring them, so even if parsing -succeeds, later handling may still fail with character encoding errors. +almost certainly not the real encoding used in Python unicode. The same is +true for HTML unicode strings that contain charset meta tags, although the +problems may be more subtle here. The libxml2 HTML parser may not be able +to parse the meta tags in broken HTML and may end up ignoring them, so even +if parsing succeeds, later handling may still fail with character encoding +errors. Therefore, parsing HTML from unicode strings is a much saner thing +to do than parsing XML from unicode strings. Note that Python uses different encodings for unicode on different platforms, so even specifying the real internal unicode encoding is not portable between Python interpreters. Don't do it. -Python unicode strings with XML data or HTML data that carry encoding -information are broken. lxml will not parse them. You must provide parsable -data in a valid encoding. +Python unicode strings with XML data that carry encoding information are +broken. lxml will not parse them. You must provide parsable data in a +valid encoding. + +.. _`XML specification`: http://www.w3.org/TR/REC-xml/ What is the difference between str(xslt(doc)) and xslt(doc).write() ? @@ -946,6 +967,79 @@ enabled by default. Note that libxml2 versions of the 2.6 series do not restrict their parser and are therefore vulnerable to DoS attacks. +Note also that these "hard limits" may still be high enough to +allow for excessive resource usage in a given use case. They are +compile time modifiable, so building your own library versions will +allow you to change the limits to your own needs. Also see the next +question. + + +How do I use lxml safely as a web-service endpoint? +--------------------------------------------------- + +XML based web-service endpoints are generally subject to several +types of attacks if they allow some kind of untrusted input. +From the point of view of the underlying XML tool, the most +obvious attacks try to send a relatively small amount of data +that induces a comparatively large resource consumption on the +receiver side. + +First of all, make sure network access is not enabled for the XML +parser that you use for parsing untrusted content and that it is +not configured to load external DTDs. Otherwise, attackers can +try to trick the parser into an attempt to load external resources +that are overly slow or impossible to retrieve, thus wasting time +and other valuable resources on your server such as socket +connections. Note that you can register your own document loader +in lxml, which allows for fine-grained control over any read access +to resources. + +Some of the most famous excessive content expansion attacks +use XML entity references. Luckily, entity expansion is mostly +useless for the data commonly sent through web services and +can simply be disabled, which rules out several types of +denial of service attacks at once. Consequently, version +1.2 of the SOAP standard explicitly disallows entity references +in the XML stream. + +To disable entity expansion, use an XML parser that is configured +with the option ``resolve_entities=False``. Then, after (or +while) parsing the document, use ``root.iter(etree.Entity)`` to +recursively search for entity references. If it contains any, +reject the entire input document with a suitable error response. +In lxml 3.x, you can also use the new DTD introspection API to +apply your own restrictions on input documents. + +Another attack to consider is compression bombs. If you allow +compressed input into your web service, attackers can try to send +well forged highly repetitive and thus very well compressing input +that unpacks into a very large XML document in your server's main +memory, potentially a thousand times larger than the compressed +input data. + +As a counter measure, either disable compressed input for your +web server, at least for untrusted sources, or use incremental +parsing with ``iterparse()`` instead of parsing the whole input +document into memory in one shot. That allows you to enforce +suitable limits on the input by applying semantic checks that +detect and prevent an illegitimate use of your service. If +possible, you can also use this to reduce the amount of data +that you need to keep in memory while parsing the document, +thus further reducing the possibility of an attacker to trick +your system into excessive resource usage. + +Finally, please be aware that XPath suffers from the same +vulnerability as SQL when it comes to content injection. The +obvious fix is to not build any XPath expressions via string +formatting or concatenation when the parameters may come from +untrusted sources, and instead use XPath variables, which +safely expose their values to the evaluation engine. + +The defusedxml_ package comes with an example setup and a wrapper +API for lxml that applies certain counter measures internally. + +.. _defusedxml: https://bitbucket.org/tiran/defusedxml + Can lxml parse from file objects opened in unicode/text mode? ------------------------------------------------------------- diff --git a/doc/build.txt b/doc/build.txt index 6085251..a2fa3d7 100644 --- a/doc/build.txt +++ b/doc/build.txt @@ -42,7 +42,7 @@ developer sources (e.g. to test a bug fix that has not been release yet) or if you want to be an lxml developer, then you do need a working Cython installation. You can use pip_ to install it:: - pip install "Cython>=0.17.3" + pip install "Cython>=0.18" lxml currently requires Cython 0.17.3, later release versions should work as well. diff --git a/doc/html/FAQ.html b/doc/html/FAQ.html index df29f4c..ff1300a 100644 --- a/doc/html/FAQ.html +++ b/doc/html/FAQ.html @@ -10,7 +10,7 @@
-

lxml FAQ - Frequently Asked Questions

+

lxml FAQ - Frequently Asked Questions

Frequently asked questions on lxml. See also the notes on compatibility to ElementTree.

@@ -63,14 +63,15 @@
  • Why can't I just delete parents or clear the root node in iterparse()?
  • How do I output null characters in XML text?
  • Is lxml vulnerable to XML bombs?
  • -
  • Can lxml parse from file objects opened in unicode/text mode?
  • +
  • How do I use lxml safely as a web-service endpoint?
  • +
  • Can lxml parse from file objects opened in unicode/text mode?
  • -
  • XPath and Document Traversal @@ -711,20 +712,35 @@ library recipe page.

  • Why can't lxml parse my XML from unicode strings?

    -

    lxml can read Python unicode strings and even tries to support them if libxml2 -does not. However, if the unicode string declares an XML encoding internally +

    First of all, XML is explicitly defined as a stream of bytes. It's not +Unicode text. Take a look at the XML specification, it's all about byte +sequences and how to map them to text and structure. That leads to rule +number one: do not decode your XML data yourself. That's a part of the +work of an XML parser, and it does it very well. Just pass it your data as +a plain byte stream, it will always do the right thing, by specification.

    +

    This also includes not opening XML files in text mode. Make sure you always +use binary mode, or, even better, pass the file path into lxml's parse() +function to let it do the file opening, reading and closing itself. This +is the most simple and most efficient way to do it.

    +

    That being said, lxml can read Python unicode strings and even tries to +support them if libxml2 does not. This is because there is one valid use +case for parsing XML from text strings: literal XML fragments in source +code.

    +

    However, if the unicode string declares an XML encoding internally (<?xml encoding="..."?>), parsing is bound to fail, as this encoding is -most likely not the real encoding used in Python unicode. The same is true -for HTML unicode strings that contain charset meta tags, although the problems -may be more subtle here. The libxml2 HTML parser may not be able to parse the -meta tags in broken HTML and may end up ignoring them, so even if parsing -succeeds, later handling may still fail with character encoding errors.

    +almost certainly not the real encoding used in Python unicode. The same is +true for HTML unicode strings that contain charset meta tags, although the +problems may be more subtle here. The libxml2 HTML parser may not be able +to parse the meta tags in broken HTML and may end up ignoring them, so even +if parsing succeeds, later handling may still fail with character encoding +errors. Therefore, parsing HTML from unicode strings is a much saner thing +to do than parsing XML from unicode strings.

    Note that Python uses different encodings for unicode on different platforms, so even specifying the real internal unicode encoding is not portable between Python interpreters. Don't do it.

    -

    Python unicode strings with XML data or HTML data that carry encoding -information are broken. lxml will not parse them. You must provide parsable -data in a valid encoding.

    +

    Python unicode strings with XML data that carry encoding information are +broken. lxml will not parse them. You must provide parsable data in a +valid encoding.

    What is the difference between str(xslt(doc)) and xslt(doc).write() ?

    @@ -767,6 +783,67 @@ trusted documents. All lxml versions will leave these restrictions enabled by default.

    Note that libxml2 versions of the 2.6 series do not restrict their parser and are therefore vulnerable to DoS attacks.

    +

    Note also that these "hard limits" may still be high enough to +allow for excessive resource usage in a given use case. They are +compile time modifiable, so building your own library versions will +allow you to change the limits to your own needs. Also see the next +question.

    +
    +
    +

    How do I use lxml safely as a web-service endpoint?

    +

    XML based web-service endpoints are generally subject to several +types of attacks if they allow some kind of untrusted input. +From the point of view of the underlying XML tool, the most +obvious attacks try to send a relatively small amount of data +that induces a comparatively large resource consumption on the +receiver side.

    +

    First of all, make sure network access is not enabled for the XML +parser that you use for parsing untrusted content and that it is +not configured to load external DTDs. Otherwise, attackers can +try to trick the parser into an attempt to load external resources +that are overly slow or impossible to retrieve, thus wasting time +and other valuable resources on your server such as socket +connections. Note that you can register your own document loader +in lxml, which allows for fine-grained control over any read access +to resources.

    +

    Some of the most famous excessive content expansion attacks +use XML entity references. Luckily, entity expansion is mostly +useless for the data commonly sent through web services and +can simply be disabled, which rules out several types of +denial of service attacks at once. Consequently, version +1.2 of the SOAP standard explicitly disallows entity references +in the XML stream.

    +

    To disable entity expansion, use an XML parser that is configured +with the option resolve_entities=False. Then, after (or +while) parsing the document, use root.iter(etree.Entity) to +recursively search for entity references. If it contains any, +reject the entire input document with a suitable error response. +In lxml 3.x, you can also use the new DTD introspection API to +apply your own restrictions on input documents.

    +

    Another attack to consider is compression bombs. If you allow +compressed input into your web service, attackers can try to send +well forged highly repetitive and thus very well compressing input +that unpacks into a very large XML document in your server's main +memory, potentially a thousand times larger than the compressed +input data.

    +

    As a counter measure, either disable compressed input for your +web server, at least for untrusted sources, or use incremental +parsing with iterparse() instead of parsing the whole input +document into memory in one shot. That allows you to enforce +suitable limits on the input by applying semantic checks that +detect and prevent an illegitimate use of your service. If +possible, you can also use this to reduce the amount of data +that you need to keep in memory while parsing the document, +thus further reducing the possibility of an attacker to trick +your system into excessive resource usage.

    +

    Finally, please be aware that XPath suffers from the same +vulnerability as SQL when it comes to content injection. The +obvious fix is to not build any XPath expressions via string +formatting or concatenation when the parameters may come from +untrusted sources, and instead use XPath variables, which +safely expose their values to the evaluation engine.

    +

    The defusedxml package comes with an example setup and a wrapper +API for lxml that applies certain counter measures internally.

    Can lxml parse from file objects opened in unicode/text mode?

    @@ -838,7 +915,7 @@ map it to your namespace. See also the question above.

    diff --git a/doc/html/api.html b/doc/html/api.html index 7e911b3..9f6b07d 100644 --- a/doc/html/api.html +++ b/doc/html/api.html @@ -8,7 +8,7 @@
    -

    APIs specific to lxml.etree

    +

    APIs specific to lxml.etree

    lxml.etree tries to follow established APIs wherever possible. Sometimes, however, the need to expose a feature in an easy way led to the invention of a @@ -450,7 +450,7 @@ example:

    diff --git a/doc/html/api/abc.ABCMeta-class.html b/doc/html/api/abc.ABCMeta-class.html index 7c2f1b7..7041388 100644 --- a/doc/html/api/abc.ABCMeta-class.html +++ b/doc/html/api/abc.ABCMeta-class.html @@ -426,7 +426,7 @@ even via super()).

    @@ -184,7 +178,7 @@ - @@ -109,7 +109,7 @@ (in FieldsDict) - @@ -117,15 +117,15 @@ (in NumberElement) - + - @@ -133,7 +133,7 @@ (in NumberElement) - @@ -141,63 +141,63 @@ (in ElementMaker) - + - + - + - + - + - + - + - @@ -205,7 +205,7 @@ (in XPathDocumentEvaluator) - @@ -213,7 +213,7 @@ (in XPathElementEvaluator) - @@ -221,7 +221,7 @@ (in XSLT) - @@ -229,453 +229,453 @@ (in _MethodFunc) - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - @@ -683,1245 +683,1231 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - - + - + - + - + - + - + - + - + - + - - + - + - + - - + - + - + - + - + - + - + - + - + - + - + - + - + - - + - + - + - + - + - + - + - - + - + - + - + - + - - + - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + - - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + - - + + - - + + + + + + + - - + - + - + - - + + + + + + - - + + - - - + - - + - - + - - + - - - + - - + - - + - - + - - + - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + - - + + - - + + - - + + - - + + - - + + - - + - - + + - - + +
    @@ -1957,7 +1943,7 @@