From 8a683df87e640764a03bfdbf4d7e671156e8b61c Mon Sep 17 00:00:00 2001 From: JinWang An Date: Wed, 30 Dec 2020 10:15:15 +0900 Subject: [PATCH] Imported Upstream version 4.3.2 --- CHANGES.txt | 22 + Makefile | 2 +- PKG-INFO | 15 +- doc/html/FAQ.html | 4 +- doc/html/api.html | 4 +- doc/html/api/abc.ABCMeta-class.html | 2 +- doc/html/api/api-objects.txt | 40 +- doc/html/api/class-tree.html | 2 +- .../api/cssselect.parser.SelectorError-class.html | 2 +- ...cssselect.parser.SelectorSyntaxError-class.html | 2 +- .../api/cssselect.xpath.ExpressionError-class.html | 2 +- doc/html/api/cssselect.xpath.XPathExpr-class.html | 2 +- doc/html/api/deprecated-index.html | 2 +- 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 | 2 +- doc/html/api/identifier-index-D.html | 2 +- doc/html/api/identifier-index-E.html | 2 +- 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 | 2 +- doc/html/api/identifier-index-N.html | 2 +- doc/html/api/identifier-index-O.html | 2 +- doc/html/api/identifier-index-P.html | 2 +- doc/html/api/identifier-index-Q.html | 2 +- doc/html/api/identifier-index-R.html | 2 +- doc/html/api/identifier-index-S.html | 2 +- doc/html/api/identifier-index-T.html | 1629 +-- doc/html/api/identifier-index-U.html | 2 +- doc/html/api/identifier-index-V.html | 2 +- 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 | 83 +- 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 | 2 +- ...xml.ElementInclude.FatalIncludeError-class.html | 2 +- doc/html/api/lxml.builder-module.html | 10 +- doc/html/api/lxml.builder-pysrc.html | 2 +- doc/html/api/lxml.builder.ElementMaker-class.html | 2 +- doc/html/api/lxml.cssselect-module.html | 2 +- doc/html/api/lxml.cssselect-pysrc.html | 2 +- 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 | 22 +- .../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 | 2 +- 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 | 2 +- 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 | 2 +- doc/html/api/lxml.etree.HTMLPullParser-class.html | 2 +- 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 | 2 +- doc/html/api/lxml.etree.XMLPullParser-class.html | 2 +- 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._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 | 2 +- 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 | 8 +- .../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.htmlfile-class.html | 2 +- doc/html/api/lxml.etree.iterparse-class.html | 2 +- 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 | 2 +- doc/html/api/lxml.html.CheckboxGroup-class.html | 2 +- doc/html/api/lxml.html.CheckboxValues-class.html | 2 +- doc/html/api/lxml.html.Classes-class.html | 2 +- doc/html/api/lxml.html.ElementSoup-module.html | 2 +- doc/html/api/lxml.html.ElementSoup-pysrc.html | 2 +- doc/html/api/lxml.html.FieldsDict-class.html | 2 +- doc/html/api/lxml.html.FormElement-class.html | 2 +- doc/html/api/lxml.html.HTMLParser-class.html | 2 +- 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 | 2 +- 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 | 2 +- doc/html/api/lxml.html.clean-module.html | 2 +- doc/html/api/lxml.html.clean-pysrc.html | 2 +- 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 | 2 +- doc/html/api/lxml.html.diff-pysrc.html | 2 +- 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 | 2 +- ...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 | 2 +- .../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 | 2 +- .../api/lxml.html.soupparser._PseudoTag-class.html | 2 +- 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 | 2 +- .../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 | 10 +- doc/html/api/lxml.sax-pysrc.html | 2 +- .../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 | 2 +- ....tests.common_imports.HelperTestCase-class.html | 2 +- ...l.tests.common_imports.LargeFileLike-class.html | 2 +- ....common_imports.LargeFileLikeUnicode-class.html | 2 +- ...l.tests.common_imports.SillyFileLike-class.html | 2 +- .../lxml.tests.common_imports.skipif-class.html | 2 +- .../api/lxml.tests.dummy_http_server-module.html | 2 +- .../api/lxml.tests.dummy_http_server-pysrc.html | 2 +- ...mmy_http_server.HTTPRequestCollector-class.html | 2 +- ...ml.tests.dummy_http_server.WebServer-class.html | 2 +- ...ts.dummy_http_server._RequestHandler-class.html | 2 +- doc/html/api/lxml.tests.selftest-module.html | 2 +- doc/html/api/lxml.tests.selftest-pysrc.html | 2 +- doc/html/api/lxml.tests.selftest2-module.html | 2 +- doc/html/api/lxml.tests.selftest2-pysrc.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 | 2 +- .../api/lxml.tests.test_classlookup-pysrc.html | 2 +- ...test_classlookup.ClassLookupTestCase-class.html | 2 +- ...tests.test_classlookup.ProxyTestCase-class.html | 2 +- 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 +- .../api/lxml.tests.test_doctestcompare-module.html | 2 +- .../api/lxml.tests.test_doctestcompare-pysrc.html | 2 +- ...st_doctestcompare.DoctestCompareTest-class.html | 2 +- ...tests.test_doctestcompare.DummyInput-class.html | 2 +- doc/html/api/lxml.tests.test_dtd-module.html | 2 +- doc/html/api/lxml.tests.test_dtd-pysrc.html | 2 +- ...lxml.tests.test_dtd.ETreeDtdTestCase-class.html | 2 +- .../api/lxml.tests.test_elementpath-module.html | 2 +- .../api/lxml.tests.test_elementpath-pysrc.html | 2 +- ...elementpath.EtreeElementPathTestCase-class.html | 2 +- .../api/lxml.tests.test_elementtree-module.html | 2 +- .../api/lxml.tests.test_elementtree-pysrc.html | 10781 +++++++------- ...est_elementtree.CElementTreeTestCase-class.html | 9 +- ...s.test_elementtree.ETreePullTestCase-class.html | 2 +- ...tests.test_elementtree.ETreeTestCase-class.html | 9 +- ...test_elementtree.ElementTreeTestCase-class.html | 9 +- ....test_elementtree._ETreeTestCaseBase-class.html | 60 +- ....test_elementtree._XMLPullParserTest-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 | 2 +- doc/html/api/lxml.tests.test_etree-module.html | 2 +- doc/html/api/lxml.tests.test_etree-pysrc.html | 2 +- ...l.tests.test_etree.ETreeC14NTestCase-class.html | 2 +- ...l.tests.test_etree.ETreeErrorLogTest-class.html | 2 +- ...l.tests.test_etree.ETreeOnlyTestCase-class.html | 2 +- ....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.XMLPullParserTest-class.html | 2 +- ...l.tests.test_etree._XIncludeTestCase-class.html | 2 +- .../lxml.tests.test_external_document-module.html | 2 +- .../lxml.tests.test_external_document-pysrc.html | 2 +- ...al_document.ExternalDocumentTestCase-class.html | 2 +- .../api/lxml.tests.test_htmlparser-module.html | 2 +- doc/html/api/lxml.tests.test_htmlparser-pysrc.html | 2 +- ...s.test_htmlparser.HtmlParserTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_http_io-module.html | 2 +- doc/html/api/lxml.tests.test_http_io-pysrc.html | 2 +- ...ml.tests.test_http_io.HttpIOTestCase-class.html | 2 +- ...lxml.tests.test_incremental_xmlfile-module.html | 2 +- .../lxml.tests.test_incremental_xmlfile-pysrc.html | 2 +- ...emental_xmlfile.AsyncXmlFileTestCase-class.html | 2 +- ...ental_xmlfile.BytesIOXmlFileTestCase-class.html | 2 +- ...incremental_xmlfile.HtmlFileTestCase-class.html | 2 +- ...mlfile.SimpleFileLikeXmlFileTestCase-class.html | 2 +- ...leLikeXmlFileTestCase.SimpleFileLike-class.html | 2 +- ...ntal_xmlfile.TempPathXmlFileTestCase-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 | 2 +- ....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 | 2 +- ...chematron.ETreeISOSchematronTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_nsclasses-module.html | 2 +- doc/html/api/lxml.tests.test_nsclasses-pysrc.html | 2 +- ...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 | 2 +- ...sts.test_objectify.ObjectifyTestCase-class.html | 2 +- .../api/lxml.tests.test_pyclasslookup-module.html | 2 +- .../api/lxml.tests.test_pyclasslookup-pysrc.html | 2 +- ..._pyclasslookup.PyClassLookupTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_relaxng-module.html | 2 +- doc/html/api/lxml.tests.test_relaxng-pysrc.html | 2 +- ...ts.test_relaxng.ETreeRelaxNGTestCase-class.html | 2 +- ....test_relaxng.RelaxNGCompactTestCase-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 +- ...l.tests.test_sax.NSPrefixSaxTestCase-class.html | 2 +- ....tests.test_sax.SimpleContentHandler-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 | 2 +- ...est_threading.ThreadPipelineTestCase-class.html | 2 +- ...ipelineTestCase.ParseAndExtendWorker-class.html | 6 +- ...ipelineTestCase.ParseAndInjectWorker-class.html | 6 +- ...g.ThreadPipelineTestCase.ParseWorker-class.html | 6 +- ...ThreadPipelineTestCase.ReverseWorker-class.html | 2 +- ....ThreadPipelineTestCase.RotateWorker-class.html | 2 +- ...readPipelineTestCase.SerialiseWorker-class.html | 2 +- ...ding.ThreadPipelineTestCase.Validate-class.html | 2 +- ...eading.ThreadPipelineTestCase.Worker-class.html | 2 +- ...sts.test_threading.ThreadingTestCase-class.html | 2 +- doc/html/api/lxml.tests.test_unicode-module.html | 2 +- doc/html/api/lxml.tests.test_unicode-pysrc.html | 2 +- ...tests.test_unicode.EncodingsTestCase-class.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 | 2 +- ...hema.ETreeXMLSchemaResolversTestCase-class.html | 2 +- ...emaResolversTestCase.simple_resolver-class.html | 2 +- ...est_xmlschema.ETreeXMLSchemaTestCase-class.html | 2 +- .../api/lxml.tests.test_xpathevaluator-module.html | 2 +- .../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 | 2 +- ...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/mimetools.Message-class.html | 2 +- doc/html/api/module-tree.html | 2 +- doc/html/api/str-class.html | 2 +- doc/html/api/xml.etree.ElementTree-module.html | 2 +- doc/html/api/xml.etree.ElementTree-pysrc.html | 2 +- .../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 | 4 +- doc/html/capi.html | 4 +- .../{changes-4.3.1.html => changes-4.3.2.html} | 796 +- 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 | 4 +- doc/html/performance.html | 4 +- doc/html/resolvers.html | 4 +- doc/html/sax.html | 4 +- doc/html/sitemap.html | 2 +- doc/html/tutorial.html | 4 +- doc/html/validation.html | 4 +- doc/html/xpathxslt.html | 4 +- doc/main.txt | 10 +- src/lxml.egg-info/PKG-INFO | 15 +- src/lxml.egg-info/SOURCES.txt | 2 +- src/lxml/_elementpath.c | 23 +- src/lxml/apihelpers.pxi | 4 +- src/lxml/builder.c | 23 +- src/lxml/dtd.pxi | 372 +- src/lxml/etree.c | 14549 ++++++++++--------- src/lxml/etree.h | 8 +- src/lxml/etree.pyx | 253 +- src/lxml/etree_api.h | 2 +- src/lxml/extensions.pxi | 42 +- src/lxml/html/clean.c | 29 +- src/lxml/html/diff.c | 29 +- src/lxml/includes/lxml-version.h | 2 +- src/lxml/iterparse.pxi | 24 +- src/lxml/lxml.etree.h | 8 +- src/lxml/lxml.etree_api.h | 2 +- src/lxml/objectify.c | 3834 ++--- src/lxml/objectify.pyx | 67 +- src/lxml/parser.pxi | 38 +- src/lxml/proxy.pxi | 32 +- src/lxml/readonlytree.pxi | 138 +- src/lxml/sax.c | 23 +- src/lxml/tests/test_elementtree.py | 63 +- src/lxml/xinclude.pxi | 8 +- src/lxml/xmlerror.pxi | 102 +- src/lxml/xpath.pxi | 16 +- src/lxml/xslt.pxi | 30 +- version.txt | 2 +- 464 files changed, 17445 insertions(+), 16717 deletions(-) rename doc/html/{changes-4.3.1.html => changes-4.3.2.html} (99%) diff --git a/CHANGES.txt b/CHANGES.txt index 544041b..0b1aa71 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,12 +2,34 @@ lxml changelog ============== +4.3.2 (2019-02-29) +================== + +Bugs fixed +---------- + +* Crash in 4.3.1 when appending a child subtree with certain text nodes. + +Other changes +------------- + +* Built with Cython 0.29.6. + + 4.3.1 (2019-02-08) ================== +Bugs fixed +---------- + * LP#1814522: Crash when appending a child subtree that contains unsubstituted entity references. +Other changes +------------- + +* Built with Cython 0.29.5. + 4.3.0 (2019-01-04) ================== diff --git a/Makefile b/Makefile index 161fa4b..8e7112d 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ wheel_manylinux: wheel_manylinux64 wheel_manylinux32 wheel_manylinux32 wheel_manylinux64: dist/lxml-$(LXMLVERSION).tar.gz time docker run --rm -t \ -v $(shell pwd):/io \ - -e CFLAGS="-O3 -g1 -mtune=generic -pipe -fPIC -flto" \ + -e CFLAGS="-O3 -g1 -march=core2 -pipe -fPIC -flto" \ -e LDFLAGS="$(LDFLAGS) -flto" \ -e LIBXML2_VERSION="$(MANYLINUX_LIBXML2_VERSION)" \ -e LIBXSLT_VERSION="$(MANYLINUX_LIBXSLT_VERSION)" \ diff --git a/PKG-INFO b/PKG-INFO index d4074f1..0b90e60 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lxml -Version: 4.3.1 +Version: 4.3.2 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. Home-page: http://lxml.de/ Author: lxml dev team @@ -38,11 +38,18 @@ 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. - 4.3.1 (2019-02-08) + 4.3.2 (2019-02-29) ================== - * LP#1814522: Crash when appending a child subtree that contains unsubstituted - entity references. + Bugs fixed + ---------- + + * Crash in 4.3.1 when appending a child subtree with certain text nodes. + + Other changes + ------------- + + * Built with Cython 0.29.6. diff --git a/doc/html/FAQ.html b/doc/html/FAQ.html index fa14bae..4baab77 100644 --- a/doc/html/FAQ.html +++ b/doc/html/FAQ.html @@ -26,7 +26,7 @@ function hide_menu() {
-

lxml FAQ - Frequently Asked Questions

+

lxml FAQ - Frequently Asked Questions

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

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

diff --git a/doc/html/api.html b/doc/html/api.html index 9d66ca2..1022f04 100644 --- a/doc/html/api.html +++ b/doc/html/api.html @@ -24,7 +24,7 @@ function hide_menu() {
-

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 @@ -530,7 +530,7 @@ example:

diff --git a/doc/html/api/abc.ABCMeta-class.html b/doc/html/api/abc.ABCMeta-class.html index 01db2c2..e15e3d6 100644 --- a/doc/html/api/abc.ABCMeta-class.html +++ b/doc/html/api/abc.ABCMeta-class.html @@ -427,7 +427,7 @@ even via super()).

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 TABLE
(in lxml.html.builder) -test_fromstringlist_single()
+test_generator_close_continues_closing()
+(in _XmlFileTestCaseBase) +test_setslice_all()
(in _ETreeTestCaseBase) -test_setslice_all_empty_reversed()
-(in ETreeOnlyTestCase) table_tags
(in lxml.html.defs) -test_generator_close_continues_closing()
-(in _XmlFileTestCaseBase) -test_setslice_all_replace()
+test_getchildren()
+(in _ETreeTestCaseBase) +test_setslice_all_empty()
(in _ETreeTestCaseBase) @@ -117,15 +117,15 @@ (in _Comment) test_getiterator()
(in _ETreeTestCaseBase) -test_setslice_all_replace_reversed()
-(in _ETreeTestCaseBase) +test_setslice_all_empty_reversed()
+(in ETreeOnlyTestCase) tag
(in _Element) test_getiterator_empty()
(in _ETreeTestCaseBase) -test_setslice_all_replace_reversed_ns1()
+test_setslice_all_replace()
(in _ETreeTestCaseBase) @@ -133,7 +133,7 @@ (in _Entity) test_getiterator_filter()
(in _ETreeTestCaseBase) -test_setslice_all_replace_reversed_ns2()
+test_setslice_all_replace_reversed()
(in _ETreeTestCaseBase) @@ -141,31 +141,31 @@ (in _ProcessingInstruction) test_getiterator_filter_all()
(in _ETreeTestCaseBase) -test_setslice_complete()
-(in ObjectifyTestCase) +test_setslice_all_replace_reversed_ns1()
+(in _ETreeTestCaseBase) tag
(in Element) test_getiterator_filter_all_comment_pi()
(in ETreeOnlyTestCase) -test_setslice_elements()
-(in ObjectifyTestCase) +test_setslice_all_replace_reversed_ns2()
+(in _ETreeTestCaseBase) tag()
(in lxml.tests.test_xpathevaluator) test_getiterator_filter_comment()
(in _ETreeTestCaseBase) -test_setslice_empty()
-(in _ETreeTestCaseBase) +test_setslice_complete()
+(in ObjectifyTestCase) tag_compare()
(in LXMLOutputChecker) test_getiterator_filter_element()
(in ETreeOnlyTestCase) -test_setslice_empty()
+test_setslice_elements()
(in ObjectifyTestCase) @@ -173,7 +173,7 @@ (in lxml.tests.test_xpathevaluator) test_getiterator_filter_entities()
(in ETreeOnlyTestCase) -test_setslice_end()
+test_setslice_empty()
(in _ETreeTestCaseBase) @@ -181,63 +181,63 @@ (in lxml.html.diff) test_getiterator_filter_local_name()
(in ETreeOnlyTestCase) -test_setslice_end_exact()
-(in _ETreeTestCaseBase) +test_setslice_empty()
+(in ObjectifyTestCase) tags
(in lxml.html.defs) test_getiterator_filter_multiple()
(in ETreeOnlyTestCase) -test_setslice_insert()
-(in ObjectifyTestCase) +test_setslice_end()
+(in _ETreeTestCaseBase) tail
(in _Element) test_getiterator_filter_multiple_tuple()
(in ETreeOnlyTestCase) -test_setslice_insert_neg()
-(in ObjectifyTestCase) +test_setslice_end_exact()
+(in _ETreeTestCaseBase) tail
(in Element) test_getiterator_filter_namespace()
(in ETreeOnlyTestCase) -test_setslice_negative()
-(in _ETreeTestCaseBase) +test_setslice_insert()
+(in ObjectifyTestCase) target
(in _ProcessingInstruction) test_getiterator_filter_pi()
(in _ETreeTestCaseBase) -test_setslice_negative2()
-(in _ETreeTestCaseBase) +test_setslice_insert_neg()
+(in ObjectifyTestCase) TBODY
(in lxml.html.builder) test_getiterator_filter_with_text()
(in _ETreeTestCaseBase) -test_setslice_partial()
-(in ObjectifyTestCase) +test_setslice_negative()
+(in _ETreeTestCaseBase) TD
(in lxml.html.builder) test_getiterator_with_text()
(in _ETreeTestCaseBase) -test_setslice_partial_allneg()
-(in ObjectifyTestCase) +test_setslice_negative2()
+(in _ETreeTestCaseBase) tearDown()
(in HelperTestCase) test_getnext()
(in ETreeOnlyTestCase) -test_setslice_partial_neg()
+test_setslice_partial()
(in ObjectifyTestCase) @@ -245,7 +245,7 @@ (in ClassLookupTestCase) test_getparent()
(in ETreeOnlyTestCase) -test_setslice_partial_wrong_length()
+test_setslice_partial_allneg()
(in ObjectifyTestCase) @@ -253,31 +253,31 @@ (in HtmlParserTestCase) test_getprevious()
(in ETreeOnlyTestCase) -test_setslice_single()
-(in _ETreeTestCaseBase) +test_setslice_partial_neg()
+(in ObjectifyTestCase) tearDown()
(in TempPathXmlFileTestCase) test_getroottree()
(in ETreeOnlyTestCase) -test_setslice_step()
-(in ETreeOnlyTestCase) +test_setslice_partial_wrong_length()
+(in ObjectifyTestCase) tearDown()
(in _XmlFileTestCaseBase) test_getslice()
(in _ETreeTestCaseBase) -test_setslice_step_negative()
-(in ETreeOnlyTestCase) +test_setslice_single()
+(in _ETreeTestCaseBase) tearDown()
(in _IOTestCaseBase) test_getslice_complete()
(in ObjectifyTestCase) -test_setslice_step_negative2()
+test_setslice_step()
(in ETreeOnlyTestCase) @@ -285,7 +285,7 @@ (in ETreeNamespaceClassesTestCase) test_getslice_negative()
(in _ETreeTestCaseBase) -test_setslice_step_overrun()
+test_setslice_step_negative()
(in ETreeOnlyTestCase) @@ -293,23 +293,23 @@ (in ObjectifyTestCase) test_getslice_partial()
(in ObjectifyTestCase) -test_setslice_tail()
-(in _ETreeTestCaseBase) +test_setslice_step_negative2()
+(in ETreeOnlyTestCase) tearDown()
(in PyClassLookupTestCase) test_getslice_partial_neg()
(in ObjectifyTestCase) -test_shallowcopy()
-(in _ETreeTestCaseBase) +test_setslice_step_overrun()
+(in ETreeOnlyTestCase) temp_install()
(in lxml.doctestcompare) test_getslice_step()
(in _ETreeTestCaseBase) -test_shallowcopy_elementtree()
+test_setslice_tail()
(in _ETreeTestCaseBase) @@ -317,7 +317,7 @@ (in lxml.tests.test_incremental_xmlfile) test_getslice_text()
(in _ETreeTestCaseBase) -test_simple()
+test_shallowcopy()
(in _ETreeTestCaseBase) @@ -325,39 +325,39 @@ (in lxml.tests.test_incremental_xmlfile) test_html5_doctype()
(in HtmlParserTestCase) -test_simple_xml()
-(in _XMLPullParserTest) +test_shallowcopy_elementtree()
+(in _ETreeTestCaseBase) test__str()
(in UnicodeTestCase) test_html_base()
(in ETreeOnlyTestCase) -test_simple_xml_with_ns()
-(in _XMLPullParserTest) +test_simple()
+(in _ETreeTestCaseBase) test_addattr()
(in ObjectifyTestCase) test_html_base_tag()
(in ETreeOnlyTestCase) -test_sourceline_element()
-(in ETreeOnlyTestCase) +test_simple_xml()
+(in _XMLPullParserTest) test_addattr_element()
(in ObjectifyTestCase) test_HTML_base_url_docinfo()
(in ETreeOnlyTestCase) -test_sourceline_iterparse_end()
-(in ETreeOnlyTestCase) +test_simple_xml_with_ns()
+(in _XMLPullParserTest) test_addattr_list()
(in ObjectifyTestCase) test_html_decl()
(in ETreeDtdTestCase) -test_sourceline_iterparse_start()
+test_sourceline_element()
(in ETreeOnlyTestCase) @@ -365,7 +365,7 @@ (in ETreeOnlyTestCase) test_html_element_name_colon()
(in HtmlParserTestCase) -test_sourceline_parse()
+test_sourceline_iterparse_end()
(in ETreeOnlyTestCase) @@ -373,7 +373,7 @@ (in ETreeOnlyTestCase) test_html_element_name_empty()
(in HtmlParserTestCase) -test_sourceline_XML()
+test_sourceline_iterparse_start()
(in ETreeOnlyTestCase) @@ -381,7 +381,7 @@ (in ETreeOnlyTestCase) test_html_element_name_quote()
(in HtmlParserTestCase) -test_standalone()
+test_sourceline_parse()
(in ETreeOnlyTestCase) @@ -389,39 +389,39 @@ (in ETreeOnlyTestCase) test_html_element_name_space()
(in HtmlParserTestCase) -test_standard_lookup()
-(in ObjectifyTestCase) +test_sourceline_XML()
+(in ETreeOnlyTestCase) test_addnext_noops()
(in ETreeOnlyTestCase) test_html_feed_parser()
(in HtmlParserTestCase) -test_str()
-(in ObjectifyTestCase) +test_standalone()
+(in ETreeOnlyTestCase) test_addnext_pi()
(in ETreeOnlyTestCase) test_html_feed_parser_chunky()
(in HtmlParserTestCase) -test_strip_attributes()
-(in ETreeOnlyTestCase) +test_standard_lookup()
+(in ObjectifyTestCase) test_addnext_root()
(in ETreeOnlyTestCase) test_html_feed_parser_more_tags()
(in HtmlParserTestCase) -test_strip_attributes_ns()
-(in ETreeOnlyTestCase) +test_str()
+(in ObjectifyTestCase) test_addnext_root_comment()
(in ETreeOnlyTestCase) test_html_file_error()
(in HtmlParserTestCase) -test_strip_elements()
+test_strip_attributes()
(in ETreeOnlyTestCase) @@ -429,7 +429,7 @@ (in ETreeOnlyTestCase) test_html_fromstring_target_exceptions()
(in HtmlParserTestCase) -test_strip_elements_ns()
+test_strip_attributes_ns()
(in ETreeOnlyTestCase) @@ -437,7 +437,7 @@ (in ETreeOnlyTestCase) test_html_ids()
(in HtmlParserTestCase) -test_strip_tags()
+test_strip_elements()
(in ETreeOnlyTestCase) @@ -445,7 +445,7 @@ (in ETreeOnlyTestCase) test_html_ids_no_collect_ids()
(in HtmlParserTestCase) -test_strip_tags_and_remove()
+test_strip_elements_ns()
(in ETreeOnlyTestCase) @@ -453,7 +453,7 @@ (in ETreeOnlyTestCase) test_html_iterparse()
(in HtmlParserTestCase) -test_strip_tags_doc_style()
+test_strip_tags()
(in ETreeOnlyTestCase) @@ -461,7 +461,7 @@ (in ETreeOnlyTestCase) test_html_iterparse_broken()
(in HtmlParserTestCase) -test_strip_tags_ns()
+test_strip_tags_and_remove()
(in ETreeOnlyTestCase) @@ -469,7 +469,7 @@ (in ETreeOnlyTestCase) test_html_iterparse_broken_no_recover()
(in HtmlParserTestCase) -test_strip_tags_pi_comment()
+test_strip_tags_doc_style()
(in ETreeOnlyTestCase) @@ -477,7 +477,7 @@ (in ETreeOnlyTestCase) test_html_iterparse_file()
(in HtmlParserTestCase) -test_strip_tags_pi_comment_all()
+test_strip_tags_ns()
(in ETreeOnlyTestCase) @@ -485,23 +485,23 @@ (in ETreeOnlyTestCase) test_html_iterparse_start()
(in HtmlParserTestCase) -test_sub_data_element_nsmap_custom()
-(in ObjectifyTestCase) +test_strip_tags_pi_comment()
+(in ETreeOnlyTestCase) test_addprevious_root_pi()
(in ETreeOnlyTestCase) test_html_iterparse_stop_short()
(in HtmlParserTestCase) -test_sub_data_element_nsmap_custom_prefixes()
-(in ObjectifyTestCase) +test_strip_tags_pi_comment_all()
+(in ETreeOnlyTestCase) test_anonymous_namespace()
(in _XmlFileTestCaseBase) test_html_parser_target_doctype_empty()
(in HtmlParserTestCase) -test_sub_data_element_nsmap_default()
+test_sub_data_element_nsmap_custom()
(in ObjectifyTestCase) @@ -509,7 +509,7 @@ (in ETreeOnlyTestCase) test_html_parser_target_doctype_html()
(in HtmlParserTestCase) -test_sub_data_element_nsmap_empty()
+test_sub_data_element_nsmap_custom_prefixes()
(in ObjectifyTestCase) @@ -517,7 +517,7 @@ (in ETreeOnlyTestCase) test_html_parser_target_doctype_html_full()
(in HtmlParserTestCase) -test_sub_element_nsmap_custom()
+test_sub_data_element_nsmap_default()
(in ObjectifyTestCase) @@ -525,7 +525,7 @@ (in AsyncXmlFileTestCase) test_html_parser_target_exceptions()
(in HtmlParserTestCase) -test_sub_element_nsmap_custom_prefixes()
+test_sub_data_element_nsmap_empty()
(in ObjectifyTestCase) @@ -533,7 +533,7 @@ (in AsyncXmlFileTestCase) test_html_parser_target_tag()
(in HtmlParserTestCase) -test_sub_element_nsmap_default()
+test_sub_element_nsmap_custom()
(in ObjectifyTestCase) @@ -541,7 +541,7 @@ (in _ETreeTestCaseBase) test_html_prefix_nsmap()
(in ETreeOnlyTestCase) -test_sub_element_nsmap_empty()
+test_sub_element_nsmap_custom_prefixes()
(in ObjectifyTestCase) @@ -549,31 +549,31 @@ (in ETreeOnlyTestCase) test_html_subelement_name_colon()
(in HtmlParserTestCase) -test_subelement()
-(in _ETreeTestCaseBase) +test_sub_element_nsmap_default()
+(in ObjectifyTestCase) test_attrib_as_attrib()
(in _ETreeTestCaseBase) test_html_subelement_name_empty()
(in HtmlParserTestCase) -test_subelement_attribute_invalid()
-(in ETreeOnlyTestCase) +test_sub_element_nsmap_empty()
+(in ObjectifyTestCase) test_attrib_clear()
(in _ETreeTestCaseBase) test_html_subelement_name_quote()
(in HtmlParserTestCase) -test_subelement_name_colon()
-(in ETreeOnlyTestCase) +test_subelement()
+(in _ETreeTestCaseBase) test_attrib_copy()
(in _ETreeTestCaseBase) test_html_subelement_name_space()
(in HtmlParserTestCase) -test_subelement_name_empty()
+test_subelement_attribute_invalid()
(in ETreeOnlyTestCase) @@ -581,7 +581,7 @@ (in _ETreeTestCaseBase) test_htmlparser
(in lxml.tests) -test_subelement_name_quote()
+test_subelement_name_colon()
(in ETreeOnlyTestCase) @@ -589,7 +589,7 @@ (in _ETreeTestCaseBase) test_http_client()
(in HttpIOTestCase) -test_subelement_name_space()
+test_subelement_name_empty()
(in ETreeOnlyTestCase) @@ -597,7 +597,7 @@ (in _ETreeTestCaseBase) test_http_client_404()
(in HttpIOTestCase) -test_subelement_nsmap()
+test_subelement_name_quote()
(in ETreeOnlyTestCase) @@ -605,23 +605,23 @@ (in _ETreeTestCaseBase) test_http_client_gzip()
(in HttpIOTestCase) -test_subelement_reference()
-(in _ETreeTestCaseBase) +test_subelement_name_space()
+(in ETreeOnlyTestCase) test_attrib_order()
(in ETreeOnlyTestCase) test_http_io
(in lxml.tests) -test_subelement_with_attributes()
-(in _ETreeTestCaseBase) +test_subelement_nsmap()
+(in ETreeOnlyTestCase) test_attrib_pop()
(in _ETreeTestCaseBase) test_ietf_decl()
(in ETreeDtdTestCase) -test_subelement_with_attributes_ns()
+test_subelement_reference()
(in _ETreeTestCaseBase) @@ -629,227 +629,243 @@ (in _ETreeTestCaseBase) test_ietf_decl()
(in HtmlParserTestCase) -test_subtree_copy_thread()
-(in ThreadingTestCase) +test_subelement_with_attributes()
+(in _ETreeTestCaseBase) test_attrib_pop_empty_default()
(in _ETreeTestCaseBase) test_illegal_utf8()
(in EncodingsTestCase) -test_suite()
-(in lxml.tests.test_builder) +test_subelement_with_attributes_ns()
+(in _ETreeTestCaseBase) test_attrib_pop_invalid_args()
(in _ETreeTestCaseBase) test_illegal_utf8_recover()
(in EncodingsTestCase) -test_suite()
-(in lxml.tests.test_classlookup) +test_subtree_copy_thread()
+(in ThreadingTestCase) test_attrib_pop_unknown()
(in _ETreeTestCaseBase) test_include_paths()
(in ETreeOnlyTestCase) -test_suite()
-(in lxml.tests.test_css) +test_suite()
+(in lxml.tests.test_builder) test_attrib_set_clear()
(in _ETreeTestCaseBase) test_incremental_xmlfile
(in lxml.tests) -test_suite()
-(in lxml.tests.test_doctestcompare) +test_suite()
+(in lxml.tests.test_classlookup) test_attribute()
(in _XmlFileTestCaseBase) test_index()
(in ETreeOnlyTestCase) -test_suite()
-(in lxml.tests.test_dtd) +test_suite()
+(in lxml.tests.test_css) test_attribute_based_lookup()
(in ClassLookupTestCase) test_insert()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_elementpath) +test_suite()
+(in lxml.tests.test_doctestcompare) test_attribute_contains()
(in _ETreeTestCaseBase) test_insert_beyond_index()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_elementtree) +test_suite()
+(in lxml.tests.test_dtd) test_attribute_extra()
(in _XmlFileTestCaseBase) test_insert_name_interning()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_errors) +test_suite()
+(in lxml.tests.test_elementpath) test_attribute_extra_duplicate()
(in _XmlFileTestCaseBase) test_insert_negative()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_etree) +test_suite()
+(in lxml.tests.test_elementtree) test_attribute_gets_namespace_prefix_on_merge()
(in ETreeOnlyTestCase) test_insert_tail()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_external_document) +test_suite()
+(in lxml.tests.test_errors) test_attribute_gets_namespace_prefix_on_merge_with_nons()
(in ETreeOnlyTestCase) test_internal_dtds()
(in ETreeDtdTestCase) -test_suite()
-(in lxml.tests.test_htmlparser) +test_suite()
+(in lxml.tests.test_etree) test_attribute_has_key()
(in ETreeOnlyTestCase) test_invalid_decl_1()
(in ETreeDtdTestCase) -test_suite()
-(in lxml.tests.test_http_io) +test_suite()
+(in lxml.tests.test_external_document) test_attribute_items()
(in _ETreeTestCaseBase) test_invalid_decl_2()
(in ETreeDtdTestCase) -test_suite()
-(in lxml.tests.test_incremental_xmlfile) - +test_suite()
+(in lxml.tests.test_htmlparser) + test_attribute_items2()
(in _ETreeTestCaseBase) test_io
(in lxml.tests) -test_suite()
-(in lxml.tests.test_io) +test_suite()
+(in lxml.tests.test_http_io) test_attribute_items_ns()
(in _ETreeTestCaseBase) test_iselement()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_isoschematron) +test_suite()
+(in lxml.tests.test_incremental_xmlfile) test_attribute_iterator()
(in _ETreeTestCaseBase) test_isoschematron
(in lxml.tests) -test_suite()
-(in lxml.tests.test_nsclasses) +test_suite()
+(in lxml.tests.test_io) test_attribute_keeps_namespace_prefix_on_merge()
(in ETreeOnlyTestCase) test_iter()
(in _ETreeTestCaseBase) -test_suite()
-(in lxml.tests.test_objectify) +test_suite()
+(in lxml.tests.test_isoschematron) test_attribute_keeps_namespace_prefix_on_merge_with_nons()
(in ETreeOnlyTestCase) +test_iter_remove_tail()
+(in _ETreeTestCaseBase) +test_suite()
+(in lxml.tests.test_nsclasses) + + +test_attribute_keys()
+(in _ETreeTestCaseBase) test_iterancestors()
(in ETreeOnlyTestCase) +test_suite()
+(in lxml.tests.test_objectify) + + +test_attribute_keys2()
+(in _ETreeTestCaseBase) +test_iterancestors_tag()
+(in ETreeOnlyTestCase) test_suite()
(in lxml.tests.test_pyclasslookup) -test_attribute_keys()
+test_attribute_keys_ns()
(in _ETreeTestCaseBase) -test_iterancestors_tag()
+test_iterancestors_tag_multiple()
(in ETreeOnlyTestCase) test_suite()
(in lxml.tests.test_relaxng) -test_attribute_keys2()
+test_attribute_manipulation()
+(in _ETreeTestCaseBase) +test_iteration()
(in _ETreeTestCaseBase) -test_iterancestors_tag_multiple()
-(in ETreeOnlyTestCase) test_suite()
(in lxml.tests.test_sax) -test_attribute_keys_ns()
+test_attribute_namespace_roundtrip()
(in _ETreeTestCaseBase) -test_iteration()
+test_iteration_clear_tail()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_schematron) -test_attribute_manipulation()
+test_attribute_namespace_roundtrip_replaced()
(in _ETreeTestCaseBase) -test_iteration_crash()
+test_iteration_del_child()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_threading) -test_attribute_namespace_roundtrip()
-(in _ETreeTestCaseBase) -test_iteration_del_child()
+test_attribute_quoting()
+(in HtmlFileTestCase) +test_iteration_double()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_unicode) -test_attribute_namespace_roundtrip_replaced()
-(in _ETreeTestCaseBase) -test_iteration_double()
+test_attribute_quoting_unicode()
+(in HtmlFileTestCase) +test_iteration_empty()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_xmlschema) -test_attribute_quoting()
-(in HtmlFileTestCase) -test_iteration_empty()
+test_attribute_set()
+(in _ETreeTestCaseBase) +test_iteration_reversed()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_xpathevaluator) -test_attribute_quoting_unicode()
-(in HtmlFileTestCase) -test_iteration_reversed()
+test_attribute_set()
+(in ETreeOnlyTestCase) +test_iteration_set_tail_empty()
(in _ETreeTestCaseBase) test_suite()
(in lxml.tests.test_xslt) -test_attribute_set()
-(in _ETreeTestCaseBase) +test_attribute_set_invalid()
+(in ETreeOnlyTestCase) test_iteration_subelement()
(in _ETreeTestCaseBase) test_tag_reset_ns()
(in _ETreeTestCaseBase) -test_attribute_set()
+test_attribute_set_nonstring()
(in ETreeOnlyTestCase) test_iteration_text_only()
(in _ETreeTestCaseBase) @@ -857,23 +873,23 @@ (in _ETreeTestCaseBase) -test_attribute_set_invalid()
-(in ETreeOnlyTestCase) +test_attribute_str()
+(in _ETreeTestCaseBase) test_iterchildren()
(in ETreeOnlyTestCase) test_tag_str_subclass()
(in _ETreeTestCaseBase) -test_attribute_set_nonstring()
-(in ETreeOnlyTestCase) +test_attribute_update_attrib()
+(in _ETreeTestCaseBase) test_iterchildren_reversed()
(in ETreeOnlyTestCase) test_tag_write()
(in _ETreeTestCaseBase) -test_attribute_str()
+test_attribute_update_dict()
(in _ETreeTestCaseBase) test_iterchildren_tag()
(in ETreeOnlyTestCase) @@ -881,7 +897,7 @@ (in DoctestCompareTest) -test_attribute_update_attrib()
+test_attribute_update_iter()
(in _ETreeTestCaseBase) test_iterchildren_tag_multiple()
(in ETreeOnlyTestCase) @@ -889,7 +905,7 @@ (in DoctestCompareTest) -test_attribute_update_dict()
+test_attribute_update_sequence()
(in _ETreeTestCaseBase) test_iterchildren_tag_multiple_posarg()
(in ETreeOnlyTestCase) @@ -897,7 +913,7 @@ (in _ETreeTestCaseBase) -test_attribute_update_iter()
+test_attribute_values()
(in _ETreeTestCaseBase) test_iterchildren_tag_multiple_reversed()
(in ETreeOnlyTestCase) @@ -905,15 +921,15 @@ (in _ETreeTestCaseBase) -test_attribute_update_sequence()
-(in _ETreeTestCaseBase) +test_attribute_values()
+(in ETreeOnlyTestCase) test_iterchildren_tag_posarg()
(in ETreeOnlyTestCase) test_tail_append()
(in _ETreeTestCaseBase) -test_attribute_values()
+test_attribute_values_ns()
(in _ETreeTestCaseBase) test_iterchildren_tag_reversed()
(in ETreeOnlyTestCase) @@ -921,15 +937,15 @@ (in _ETreeTestCaseBase) -test_attribute_values()
-(in ETreeOnlyTestCase) +test_attribute_xmlns_move()
+(in _ETreeTestCaseBase) test_iterdescendants()
(in ETreeOnlyTestCase) test_tail_set_none()
(in _ETreeTestCaseBase) -test_attribute_values_ns()
+test_attributes_get()
(in _ETreeTestCaseBase) test_iterdescendants_tag()
(in ETreeOnlyTestCase) @@ -937,31 +953,31 @@ (in _ETreeTestCaseBase) -test_attribute_xmlns_move()
-(in _ETreeTestCaseBase) +test_bad_element()
+(in ErrorTestCase) test_iterdescendants_tag_multiple()
(in ETreeOnlyTestCase) test_tail_str_subclass()
(in _ETreeTestCaseBase) -test_attributes_get()
-(in _ETreeTestCaseBase) +test_boolean_attribute()
+(in HtmlParserTestCase) test_iterparse()
(in _ETreeTestCaseBase) test_text()
(in _ETreeTestCaseBase) -test_bad_element()
-(in ErrorTestCase) +test_boolean_attribute_round_trip()
+(in HtmlParserTestCase) test_iterparse_attrib_ns()
(in _ETreeTestCaseBase) test_text_empty()
(in _ETreeTestCaseBase) -test_boolean_attribute()
+test_boolean_attribute_xml_adds_empty_string()
(in HtmlParserTestCase) test_iterparse_broken()
(in ETreeOnlyTestCase) @@ -969,79 +985,79 @@ (in _ETreeTestCaseBase) -test_boolean_attribute_round_trip()
-(in HtmlParserTestCase) +test_buffering()
+(in TempPathXmlFileTestCase) test_iterparse_broken_multi_recover()
(in ETreeOnlyTestCase) test_text_escape_out()
(in _ETreeTestCaseBase) -test_boolean_attribute_xml_adds_empty_string()
-(in HtmlParserTestCase) +test_buffering()
+(in _XmlFileTestCaseBase) test_iterparse_broken_recover()
(in ETreeOnlyTestCase) test_text_escape_tostring()
(in _ETreeTestCaseBase) -test_buffering()
-(in TempPathXmlFileTestCase) +test_build_from_xpath_result()
+(in BuilderTestCase) test_iterparse_cdata()
(in _ETreeTestCaseBase) test_text_other()
(in _ETreeTestCaseBase) -test_buffering()
-(in _XmlFileTestCaseBase) +test_build_tree()
+(in ObjectifyTestCase) test_iterparse_clear()
(in _ETreeTestCaseBase) test_text_str_subclass()
(in _ETreeTestCaseBase) -test_build_from_xpath_result()
-(in BuilderTestCase) +test_builder
+(in lxml.tests) test_iterparse_comments()
(in ETreeOnlyTestCase) test_thread_create_xslt()
(in ThreadingTestCase) -test_build_tree()
-(in ObjectifyTestCase) +test_byte_invalid()
+(in ETreeOnlyTestCase) test_iterparse_encoding_8bit_override()
(in ETreeOnlyTestCase) test_thread_error_log()
(in ThreadingTestCase) -test_builder
-(in lxml.tests) +test_byte_zero()
+(in ETreeOnlyTestCase) test_iterparse_encoding_error()
(in ETreeOnlyTestCase) test_thread_mix()
(in ThreadingTestCase) -test_byte_invalid()
-(in ETreeOnlyTestCase) +test_c14n()
+(in ETreeC14NTestCase) test_iterparse_file()
(in _ETreeTestCaseBase) test_thread_pipeline_global_parse()
(in ThreadPipelineTestCase) -test_byte_zero()
-(in ETreeOnlyTestCase) +test_c14n_element_tostring_exclusive()
+(in ETreeC14NTestCase) test_iterparse_file_dtd_end()
(in ETreeDtdTestCase) test_thread_pipeline_thread_parse()
(in ThreadPipelineTestCase) -test_c14n()
+test_c14n_element_tostring_with_comments()
(in ETreeC14NTestCase) test_iterparse_file_dtd_start()
(in ETreeDtdTestCase) @@ -1049,7 +1065,7 @@ (in ThreadingTestCase) -test_c14n_element_tostring_exclusive()
+test_c14n_exclusive()
(in ETreeC14NTestCase) test_iterparse_getiterator()
(in _ETreeTestCaseBase) @@ -1057,7 +1073,7 @@ (in ThreadingTestCase) -test_c14n_element_tostring_with_comments()
+test_c14n_file()
(in ETreeC14NTestCase) test_iterparse_incomplete()
(in _ETreeTestCaseBase) @@ -1065,7 +1081,7 @@ (in ThreadingTestCase) -test_c14n_exclusive()
+test_c14n_file_gzip()
(in ETreeC14NTestCase) test_iterparse_keep_cdata()
(in ETreeOnlyTestCase) @@ -1073,7 +1089,7 @@ (in ThreadingTestCase) -test_c14n_file()
+test_c14n_gzip()
(in ETreeC14NTestCase) test_iterparse_large()
(in _ETreeTestCaseBase) @@ -1081,7 +1097,7 @@ (in lxml.tests) -test_c14n_file_gzip()
+test_c14n_tostring_exclusive()
(in ETreeC14NTestCase) test_iterparse_move_elements()
(in _ETreeTestCaseBase) @@ -1089,7 +1105,7 @@ (in EtreeElementPathTestCase) -test_c14n_gzip()
+test_c14n_tostring_inclusive_ns_prefixes()
(in ETreeC14NTestCase) test_iterparse_pis()
(in ETreeOnlyTestCase) @@ -1097,7 +1113,7 @@ (in EtreeElementPathTestCase) -test_c14n_tostring_exclusive()
+test_c14n_tostring_with_comments()
(in ETreeC14NTestCase) test_iterparse_remove_comments()
(in ETreeOnlyTestCase) @@ -1105,7 +1121,7 @@ (in _ETreeTestCaseBase) -test_c14n_tostring_inclusive_ns_prefixes()
+test_c14n_with_comments()
(in ETreeC14NTestCase) test_iterparse_start()
(in _ETreeTestCaseBase) @@ -1113,47 +1129,47 @@ (in _ETreeTestCaseBase) -test_c14n_tostring_with_comments()
-(in ETreeC14NTestCase) +test_c_api()
+(in ETreeOnlyTestCase) test_iterparse_start_end()
(in _ETreeTestCaseBase) test_tostring_element_tail()
(in _ETreeTestCaseBase) -test_c14n_with_comments()
-(in ETreeC14NTestCase) +test_cache()
+(in EtreeElementPathTestCase) test_iterparse_strip()
(in ETreeOnlyTestCase) test_tostring_method_html()
(in _ETreeTestCaseBase) -test_c_api()
-(in ETreeOnlyTestCase) +test_cdata()
+(in BuilderTestCase) test_iterparse_tag()
(in ETreeOnlyTestCase) test_tostring_method_html_with_tail()
(in ETreeOnlyTestCase) -test_cache()
-(in EtreeElementPathTestCase) +test_cdata()
+(in ETreeOnlyTestCase) test_iterparse_tag_all()
(in ETreeOnlyTestCase) test_tostring_method_text()
(in _ETreeTestCaseBase) -test_cdata()
-(in BuilderTestCase) +test_cdata_errors()
+(in ETreeOnlyTestCase) test_iterparse_tag_ns()
(in ETreeOnlyTestCase) test_tostring_method_text_encoding()
(in ETreeOnlyTestCase) -test_cdata()
+test_cdata_parser()
(in ETreeOnlyTestCase) test_iterparse_tag_ns_all()
(in ETreeOnlyTestCase) @@ -1161,15 +1177,15 @@ (in ETreeOnlyTestCase) -test_cdata_errors()
-(in ETreeOnlyTestCase) +test_cdata_solo()
+(in BuilderTestCase) test_iterparse_tag_ns_empty()
(in ETreeOnlyTestCase) test_tostring_none()
(in ETreeOnlyTestCase) -test_cdata_parser()
+test_cdata_tail()
(in ETreeOnlyTestCase) test_iterparse_tag_ns_empty_all()
(in ETreeOnlyTestCase) @@ -1177,15 +1193,15 @@ (in ETreeOnlyTestCase) -test_cdata_solo()
-(in BuilderTestCase) +test_cdata_type()
+(in ETreeOnlyTestCase) test_iterparse_tree_comments()
(in ETreeOnlyTestCase) test_tostring_standalone()
(in ETreeOnlyTestCase) -test_cdata_tail()
+test_cdata_xpath()
(in ETreeOnlyTestCase) test_iterparse_utf16_bom()
(in _IOTestCaseBase) @@ -1193,23 +1209,23 @@ (in ETreeOnlyTestCase) -test_cdata_type()
-(in ETreeOnlyTestCase) +test_change_pytype_attribute()
+(in ObjectifyTestCase) test_iterparse_utf8_bom()
(in _IOTestCaseBase) test_tostring_unicode()
(in ETreeOnlyTestCase) -test_cdata_xpath()
-(in ETreeOnlyTestCase) +test_child()
+(in ObjectifyTestCase) test_itersiblings()
(in ETreeOnlyTestCase) test_tostring_unicode_element()
(in ETreeOnlyTestCase) -test_change_pytype_attribute()
+test_child_addattr()
(in ObjectifyTestCase) test_itersiblings_tag()
(in ETreeOnlyTestCase) @@ -1217,7 +1233,7 @@ (in ETreeOnlyTestCase) -test_child()
+test_child_getattr()
(in ObjectifyTestCase) test_itersiblings_tag_multiple()
(in ETreeOnlyTestCase) @@ -1225,7 +1241,7 @@ (in ETreeOnlyTestCase) -test_child_addattr()
+test_child_getattr_empty_ns()
(in ObjectifyTestCase) test_itertext()
(in _ETreeTestCaseBase) @@ -1233,7 +1249,7 @@ (in ETreeOnlyTestCase) -test_child_getattr()
+test_child_index()
(in ObjectifyTestCase) test_itertext_child()
(in _ETreeTestCaseBase) @@ -1241,7 +1257,7 @@ (in ETreeOnlyTestCase) -test_child_getattr_empty_ns()
+test_child_index_neg()
(in ObjectifyTestCase) test_iterwalk()
(in ETreeOnlyTestCase) @@ -1249,7 +1265,7 @@ (in ETreeOnlyTestCase) -test_child_index()
+test_child_iter()
(in ObjectifyTestCase) test_iterwalk_attrib_ns()
(in ETreeOnlyTestCase) @@ -1257,7 +1273,7 @@ (in ETreeOnlyTestCase) -test_child_index_neg()
+test_child_len()
(in ObjectifyTestCase) test_iterwalk_clear()
(in ETreeOnlyTestCase) @@ -1265,7 +1281,7 @@ (in ETreeOnlyTestCase) -test_child_iter()
+test_child_nonexistant()
(in ObjectifyTestCase) test_iterwalk_end_skip()
(in ETreeOnlyTestCase) @@ -1273,7 +1289,7 @@ (in ETreeOnlyTestCase) -test_child_len()
+test_child_ns_nons()
(in ObjectifyTestCase) test_iterwalk_getiterator()
(in ETreeOnlyTestCase) @@ -1281,7 +1297,7 @@ (in ETreeOnlyTestCase) -test_child_nonexistant()
+test_child_set_ro()
(in ObjectifyTestCase) test_iterwalk_ns_skip()
(in ETreeOnlyTestCase) @@ -1289,7 +1305,7 @@ (in _IOTestCaseBase) -test_child_ns_nons()
+test_class_lookup()
(in ObjectifyTestCase) test_iterwalk_start()
(in ETreeOnlyTestCase) @@ -1297,39 +1313,39 @@ (in _IOTestCaseBase) -test_child_set_ro()
-(in ObjectifyTestCase) +test_class_lookup_reentry()
+(in ClassLookupTestCase) test_iterwalk_start_end()
(in ETreeOnlyTestCase) test_treebuilder()
(in _ETreeTestCaseBase) -test_class_lookup()
-(in ObjectifyTestCase) +test_class_lookup_type_mismatch()
+(in ClassLookupTestCase) test_iterwalk_start_end_skip()
(in ETreeOnlyTestCase) test_treebuilder_target()
(in _ETreeTestCaseBase) -test_class_lookup_reentry()
-(in ClassLookupTestCase) +test_class_parse_filename()
+(in _IOTestCaseBase) test_iterwalk_start_end_tags()
(in ETreeOnlyTestCase) test_type_bool()
(in ObjectifyTestCase) -test_class_lookup_type_mismatch()
-(in ClassLookupTestCase) +test_class_parse_filename_remove_previous()
+(in _IOTestCaseBase) test_iterwalk_start_end_tags_with_root()
(in ETreeOnlyTestCase) test_type_bool_cmp()
(in ObjectifyTestCase) -test_class_parse_filename()
+test_class_parse_fileobject()
(in _IOTestCaseBase) test_iterwalk_start_tags()
(in ETreeOnlyTestCase) @@ -1337,7 +1353,7 @@ (in ObjectifyTestCase) -test_class_parse_filename_remove_previous()
+test_class_parse_unamed_fileobject()
(in _IOTestCaseBase) test_iterwalk_tag()
(in ETreeOnlyTestCase) @@ -1345,39 +1361,39 @@ (in ObjectifyTestCase) -test_class_parse_fileobject()
-(in _IOTestCaseBase) +test_classlookup
+(in lxml.tests) test_iterwalk_tag_all()
(in ETreeOnlyTestCase) test_type_float_precision()
(in ObjectifyTestCase) -test_class_parse_unamed_fileobject()
-(in _IOTestCaseBase) +test_clean_doctype()
+(in ETreeDtdTestCase) test_large_sourceline_XML()
(in ETreeOnlyTestCase) test_type_float_precision_consistency()
(in ObjectifyTestCase) -test_classlookup
-(in lxml.tests) +test_clear()
+(in _ETreeTestCaseBase) test_lookup()
(in PyClassLookupTestCase) test_type_int()
(in ObjectifyTestCase) -test_clean_doctype()
-(in ETreeDtdTestCase) +test_clear_sub()
+(in _ETreeTestCaseBase) test_lookup_attrib()
(in PyClassLookupTestCase) test_type_int_cmp()
(in ObjectifyTestCase) -test_clear()
+test_clear_tail()
(in _ETreeTestCaseBase) test_lookup_bool()
(in PyClassLookupTestCase) @@ -1385,15 +1401,15 @@ (in ObjectifyTestCase) -test_clear_sub()
-(in _ETreeTestCaseBase) +test_closing_out_of_order_in_error_case()
+(in _XmlFileTestCaseBase) test_lookup_get()
(in PyClassLookupTestCase) test_type_NoneType()
(in ObjectifyTestCase) -test_clear_tail()
+test_comment()
(in _ETreeTestCaseBase) test_lookup_get_default()
(in PyClassLookupTestCase) @@ -1401,7 +1417,7 @@ (in ObjectifyTestCase) -test_closing_out_of_order_in_error_case()
+test_comment()
(in _XmlFileTestCaseBase) test_lookup_getchildren()
(in PyClassLookupTestCase) @@ -1409,39 +1425,39 @@ (in ObjectifyTestCase) -test_comment()
-(in _ETreeTestCaseBase) +test_comment_base()
+(in ProxyTestCase) test_lookup_getitem()
(in PyClassLookupTestCase) test_type_str_as_complex()
(in ObjectifyTestCase) -test_comment()
-(in _XmlFileTestCaseBase) +test_comment_before_dtd()
+(in ETreeDtdTestCase) test_lookup_getitem_neg()
(in PyClassLookupTestCase) test_type_str_as_float()
(in ObjectifyTestCase) -test_comment_base()
-(in ProxyTestCase) +test_comment_empty()
+(in ETreeOnlyTestCase) test_lookup_getnext()
(in PyClassLookupTestCase) test_type_str_as_int()
(in ObjectifyTestCase) -test_comment_before_dtd()
-(in ETreeDtdTestCase) +test_comment_getitem_getslice()
+(in _ETreeTestCaseBase) test_lookup_getparent()
(in PyClassLookupTestCase) test_type_str_cmp()
(in ObjectifyTestCase) -test_comment_empty()
+test_comment_immutable()
(in ETreeOnlyTestCase) test_lookup_getprevious()
(in PyClassLookupTestCase) @@ -1449,15 +1465,15 @@ (in ObjectifyTestCase) -test_comment_getitem_getslice()
-(in _ETreeTestCaseBase) +test_comment_immutable_attrib()
+(in ETreeOnlyTestCase) test_lookup_getslice()
(in PyClassLookupTestCase) test_type_str_hash()
(in ObjectifyTestCase) -test_comment_immutable()
+test_comment_no_proxy_yet()
(in ETreeOnlyTestCase) test_lookup_iter_children()
(in PyClassLookupTestCase) @@ -1465,15 +1481,15 @@ (in ObjectifyTestCase) -test_comment_immutable_attrib()
-(in ETreeOnlyTestCase) +test_comment_nonsense()
+(in _ETreeTestCaseBase) test_lookup_iterchildren()
(in PyClassLookupTestCase) test_type_str_mod()
(in ObjectifyTestCase) -test_comment_no_proxy_yet()
+test_comment_parse_empty()
(in ETreeOnlyTestCase) test_lookup_iterchildren_tag()
(in PyClassLookupTestCase) @@ -1481,7 +1497,7 @@ (in ObjectifyTestCase) -test_comment_nonsense()
+test_comment_text()
(in _ETreeTestCaseBase) test_lookup_keep_ref_assertion()
(in PyClassLookupTestCase) @@ -1489,39 +1505,39 @@ (in ObjectifyTestCase) -test_comment_parse_empty()
-(in ETreeOnlyTestCase) +test_comment_whitespace()
+(in _ETreeTestCaseBase) test_lookup_len()
(in PyClassLookupTestCase) test_type_str_sequence()
(in ObjectifyTestCase) -test_comment_text()
-(in _ETreeTestCaseBase) +test_comments_fallback()
+(in PyClassLookupTestCase) test_lookup_prefix()
(in PyClassLookupTestCase) test_type_unregistered()
(in ObjectifyTestCase) -test_comment_whitespace()
-(in _ETreeTestCaseBase) +test_concurrent_attribute_names_in_dicts()
+(in ThreadingTestCase) test_lookup_sourceline()
(in PyClassLookupTestCase) test_type_ustr()
(in ObjectifyTestCase) -test_comments_fallback()
-(in PyClassLookupTestCase) +test_concurrent_class_lookup()
+(in ThreadingTestCase) test_lookup_tag()
(in PyClassLookupTestCase) test_type_ustr_add()
(in ObjectifyTestCase) -test_concurrent_attribute_names_in_dicts()
+test_concurrent_proxies()
(in ThreadingTestCase) test_lookup_tail()
(in PyClassLookupTestCase) @@ -1529,95 +1545,95 @@ (in ObjectifyTestCase) -test_concurrent_class_lookup()
-(in ThreadingTestCase) +test_countchildren()
+(in ObjectifyTestCase) test_lookup_text()
(in PyClassLookupTestCase) test_type_ustr_intliteral()
(in ObjectifyTestCase) -test_concurrent_proxies()
-(in ThreadingTestCase) +test_crash()
+(in _ETreeTestCaseBase) test_lookup_without_fallback()
(in ClassLookupTestCase) test_type_ustr_mul()
(in ObjectifyTestCase) -test_countchildren()
-(in ObjectifyTestCase) +test_create_element()
+(in ETreeNamespaceClassesTestCase) test_main_xslt_in_thread()
(in ThreadingTestCase) test_unescaped_script()
(in HtmlFileTestCase) -test_crash()
-(in _ETreeTestCaseBase) +test_create_element_default()
+(in ETreeNamespaceClassesTestCase) test_makeelement()
(in _ETreeTestCaseBase) test_unescaped_script_incremental()
(in HtmlFileTestCase) -test_create_element()
-(in ETreeNamespaceClassesTestCase) +test_create_from_partial_doc()
+(in ETreeXMLSchemaTestCase) test_merge_namespaced_subtree_as_slice()
(in _ETreeTestCaseBase) test_unicode
(in lxml.tests) -test_create_element_default()
-(in ETreeNamespaceClassesTestCase) +test_css
+(in lxml.tests) test_method_context_manager_misuse()
(in HtmlFileTestCase) test_unicode_attr()
(in UnicodeTestCase) -test_create_from_partial_doc()
-(in ETreeXMLSchemaTestCase) +test_cssselect()
+(in CSSTestCase) test_missing_attributes()
(in DoctestCompareTest) test_unicode_byte_invalid()
(in ETreeOnlyTestCase) -test_css
-(in lxml.tests) +test_custom_lookup()
+(in ClassLookupTestCase) test_missing_children()
(in DoctestCompareTest) test_unicode_byte_invalid_sequence()
(in ETreeOnlyTestCase) -test_cssselect()
-(in CSSTestCase) +test_custom_lookup_ns_fallback()
+(in ClassLookupTestCase) test_module_HTML()
(in HtmlParserTestCase) test_unicode_byte_zero()
(in ETreeOnlyTestCase) -test_custom_lookup()
-(in ClassLookupTestCase) +test_data_element_attrib_attributes_precedence()
+(in ObjectifyTestCase) test_module_HTML_access()
(in HtmlParserTestCase) test_unicode_comment()
(in UnicodeTestCase) -test_custom_lookup_ns_fallback()
-(in ClassLookupTestCase) +test_data_element_bool()
+(in ObjectifyTestCase) test_module_HTML_broken()
(in HtmlParserTestCase) test_unicode_ns_invalid()
(in UnicodeTestCase) -test_data_element_attrib_attributes_precedence()
+test_data_element_data_element_arg()
(in ObjectifyTestCase) test_module_HTML_cdata()
(in HtmlParserTestCase) @@ -1625,7 +1641,7 @@ (in UnicodeTestCase) -test_data_element_bool()
+test_data_element_data_element_arg_invalid_pytype()
(in ObjectifyTestCase) test_module_HTML_pretty_print()
(in HtmlParserTestCase) @@ -1633,7 +1649,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg()
+test_data_element_data_element_arg_invalid_xsi()
(in ObjectifyTestCase) test_module_HTML_unicode()
(in HtmlParserTestCase) @@ -1641,7 +1657,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_invalid_pytype()
+test_data_element_data_element_arg_pytype()
(in ObjectifyTestCase) test_module_parse_fileobject_error()
(in _IOTestCaseBase) @@ -1649,7 +1665,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_invalid_xsi()
+test_data_element_data_element_arg_pytype_none()
(in ObjectifyTestCase) test_module_parse_fileobject_late_error()
(in _IOTestCaseBase) @@ -1657,7 +1673,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_pytype()
+test_data_element_data_element_arg_pytype_xsitype()
(in ObjectifyTestCase) test_module_parse_fileobject_type_error()
(in _IOTestCaseBase) @@ -1665,7 +1681,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_pytype_none()
+test_data_element_data_element_arg_xsitype()
(in ObjectifyTestCase) test_module_parse_gzipobject()
(in _IOTestCaseBase) @@ -1673,7 +1689,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_pytype_xsitype()
+test_data_element_element_arg()
(in ObjectifyTestCase) test_module_parse_html()
(in HtmlParserTestCase) @@ -1681,7 +1697,7 @@ (in UnicodeTestCase) -test_data_element_data_element_arg_xsitype()
+test_data_element_float()
(in ObjectifyTestCase) test_module_parse_html_default_doctype()
(in HtmlParserTestCase) @@ -1689,7 +1705,7 @@ (in UnicodeTestCase) -test_data_element_element_arg()
+test_data_element_float_hash()
(in ObjectifyTestCase) test_module_parse_html_error()
(in HtmlParserTestCase) @@ -1697,7 +1713,7 @@ (in UnicodeTestCase) -test_data_element_float()
+test_data_element_float_hash_repr()
(in ObjectifyTestCase) test_module_parse_html_filelike()
(in HtmlParserTestCase) @@ -1705,7 +1721,7 @@ (in UnicodeTestCase) -test_data_element_float_hash()
+test_data_element_float_precision()
(in ObjectifyTestCase) test_module_parse_html_norecover()
(in HtmlParserTestCase) @@ -1713,7 +1729,7 @@ (in UnicodeTestCase) -test_data_element_float_hash_repr()
+test_data_element_int()
(in ObjectifyTestCase) test_module_parse_large_fileobject()
(in _IOTestCaseBase) @@ -1721,7 +1737,7 @@ (in UnicodeTestCase) -test_data_element_float_precision()
+test_data_element_int_hash()
(in ObjectifyTestCase) test_multiple_elementrees()
(in _ETreeTestCaseBase) @@ -1729,7 +1745,7 @@ (in UnicodeTestCase) -test_data_element_int()
+test_data_element_invalid_pytype()
(in ObjectifyTestCase) test_multiple_elementrees()
(in ETreeRelaxNGTestCase) @@ -1737,7 +1753,7 @@ (in UnicodeTestCase) -test_data_element_int_hash()
+test_data_element_invalid_xsi()
(in ObjectifyTestCase) test_multiple_elementrees()
(in ETreeXSLTTestCase) @@ -1745,7 +1761,7 @@ (in _XMLPullParserTest) -test_data_element_invalid_pytype()
+test_data_element_NoneType()
(in ObjectifyTestCase) test_namespace_cleanup()
(in ETreeOnlyTestCase) @@ -1753,7 +1769,7 @@ (in BuilderTestCase) -test_data_element_invalid_xsi()
+test_data_element_nsmap_custom()
(in ObjectifyTestCase) test_namespace_cleanup_attributes()
(in ETreeOnlyTestCase) @@ -1761,7 +1777,7 @@ (in EncodingsTestCase) -test_data_element_NoneType()
+test_data_element_nsmap_custom_prefixes()
(in ObjectifyTestCase) test_namespace_cleanup_deep()
(in ETreeOnlyTestCase) @@ -1769,7 +1785,7 @@ (in EncodingsTestCase) -test_data_element_nsmap_custom()
+test_data_element_nsmap_default()
(in ObjectifyTestCase) test_namespace_cleanup_deep_to_top()
(in ETreeOnlyTestCase) @@ -1777,7 +1793,7 @@ (in EncodingsTestCase) -test_data_element_nsmap_custom_prefixes()
+test_data_element_nsmap_empty()
(in ObjectifyTestCase) test_namespace_cleanup_keep_prefixes()
(in ETreeOnlyTestCase) @@ -1785,7 +1801,7 @@ (in EncodingsTestCase) -test_data_element_nsmap_default()
+test_data_element_pytype_none()
(in ObjectifyTestCase) test_namespace_cleanup_keep_prefixes_top()
(in ETreeOnlyTestCase) @@ -1793,7 +1809,7 @@ (in EncodingsTestCase) -test_data_element_nsmap_empty()
+test_data_element_pytype_none_compat()
(in ObjectifyTestCase) test_namespace_cleanup_many()
(in ETreeOnlyTestCase) @@ -1801,7 +1817,7 @@ (in EncodingsTestCase) -test_data_element_pytype_none()
+test_data_element_pytypes()
(in ObjectifyTestCase) test_namespace_lookup()
(in ClassLookupTestCase) @@ -1809,7 +1825,7 @@ (in EncodingsTestCase) -test_data_element_pytype_none_compat()
+test_data_element_str()
(in ObjectifyTestCase) test_namespace_nested_anonymous()
(in _XmlFileTestCaseBase) @@ -1817,7 +1833,7 @@ (in EncodingsTestCase) -test_data_element_pytypes()
+test_data_element_str_floatliteral()
(in ObjectifyTestCase) test_namespace_nested_nsmap()
(in _XmlFileTestCaseBase) @@ -1825,7 +1841,7 @@ (in ETreeXSLTExtFuncTestCase) -test_data_element_str()
+test_data_element_str_intliteral()
(in ObjectifyTestCase) test_namespace_nsmap()
(in _XmlFileTestCaseBase) @@ -1833,7 +1849,7 @@ (in ObjectifyTestCase) -test_data_element_str_floatliteral()
+test_data_element_unregistered()
(in ObjectifyTestCase) test_namespaces()
(in ETreeOnlyTestCase) @@ -1841,7 +1857,7 @@ (in ETreeOnlyTestCase) -test_data_element_str_intliteral()
+test_data_element_ustr()
(in ObjectifyTestCase) test_namespaces_after_serialize()
(in _ETreeTestCaseBase) @@ -1849,7 +1865,7 @@ (in HtmlFileTestCase) -test_data_element_unregistered()
+test_data_element_ustr_floatliteral()
(in ObjectifyTestCase) test_namespaces_copy_element()
(in ETreeOnlyTestCase) @@ -1857,7 +1873,7 @@ (in _ETreeTestCaseBase) -test_data_element_ustr()
+test_data_element_ustr_intliteral()
(in ObjectifyTestCase) test_namespaces_default()
(in ETreeOnlyTestCase) @@ -1865,7 +1881,7 @@ (in HtmlParserTestCase) -test_data_element_ustr_floatliteral()
+test_data_element_xsitypes()
(in ObjectifyTestCase) test_namespaces_default_and_attr()
(in ETreeOnlyTestCase) @@ -1873,7 +1889,7 @@ (in UnicodeTestCase) -test_data_element_ustr_intliteral()
+test_data_element_xsitypes_prefixed()
(in ObjectifyTestCase) test_namespaces_default_and_other()
(in ETreeOnlyTestCase) @@ -1881,7 +1897,7 @@ (in _ETreeTestCaseBase) -test_data_element_xsitypes()
+test_data_element_xsitypes_xsdprefixed()
(in ObjectifyTestCase) test_namespaces_default_copy_element()
(in ETreeOnlyTestCase) @@ -1889,7 +1905,7 @@ (in ETreeWriteTestCase) -test_data_element_xsitypes_prefixed()
+test_dataelement_xsi()
(in ObjectifyTestCase) test_namespaces_elementtree()
(in ETreeOnlyTestCase) @@ -1897,7 +1913,7 @@ (in ETreeIOTestCase) -test_data_element_xsitypes_xsdprefixed()
+test_dataelement_xsi_nsmap()
(in ObjectifyTestCase) test_namespaces_reuse_after_move()
(in ETreeOnlyTestCase) @@ -1905,7 +1921,7 @@ (in HtmlFileTestCase) -test_dataelement_xsi()
+test_dataelement_xsi_prefix_error()
(in ObjectifyTestCase) test_nested_default_namespace()
(in _XmlFileTestCaseBase) @@ -1913,7 +1929,7 @@ (in ETreeWriteTestCase) -test_dataelement_xsi_nsmap()
+test_date_element_efactory_tail()
(in ObjectifyTestCase) test_nested_default_namespace_and_other()
(in _XmlFileTestCaseBase) @@ -1921,7 +1937,7 @@ (in _XmlFileTestCaseBase) -test_dataelement_xsi_prefix_error()
+test_date_element_efactory_text()
(in ObjectifyTestCase) test_network_dtd()
(in HttpIOTestCase) @@ -1929,7 +1945,7 @@ (in _XmlFileTestCaseBase) -test_date_element_efactory_tail()
+test_deannotate()
(in ObjectifyTestCase) test_non_io_exception_continues_closing()
(in _XmlFileTestCaseBase) @@ -1937,23 +1953,23 @@ (in _ETreeTestCaseBase) -test_date_element_efactory_text()
-(in ObjectifyTestCase) +test_declaration_apos()
+(in ETreeDtdTestCase) test_ns_access()
(in _ETreeTestCaseBase) test_write_fail()
(in _ETreeTestCaseBase) -test_deannotate()
-(in ObjectifyTestCase) +test_declaration_escape_quote_pid()
+(in ETreeDtdTestCase) test_ns_access2()
(in _ETreeTestCaseBase) test_write_fails()
(in SimpleFileLikeXmlFileTestCase) -test_declaration_apos()
+test_declaration_quote_withoutpid()
(in ETreeDtdTestCase) test_ns_attr()
(in _ETreeTestCaseBase) @@ -1961,23 +1977,23 @@ (in ETreeWriteTestCase) -test_declaration_escape_quote_pid()
-(in ETreeDtdTestCase) +test_deepcopy()
+(in _ETreeTestCaseBase) test_ns_classes()
(in ETreeNamespaceClassesTestCase) test_write_file_gzip()
(in ETreeWriteTestCase) -test_declaration_quote_withoutpid()
-(in ETreeDtdTestCase) +test_deepcopy_append()
+(in _ETreeTestCaseBase) test_ns_decl_tostring()
(in _ETreeTestCaseBase) test_write_file_gzip_parse()
(in ETreeWriteTestCase) -test_deepcopy()
+test_deepcopy_comment()
(in _ETreeTestCaseBase) test_ns_decl_tostring_default()
(in _ETreeTestCaseBase) @@ -1985,7 +2001,7 @@ (in ETreeWriteTestCase) -test_deepcopy_append()
+test_deepcopy_elementtree()
(in _ETreeTestCaseBase) test_ns_decl_tostring_element()
(in _ETreeTestCaseBase) @@ -1993,31 +2009,31 @@ (in _IOTestCaseBase) -test_deepcopy_comment()
-(in _ETreeTestCaseBase) +test_deepcopy_elementtree_dtd()
+(in ETreeOnlyTestCase) test_ns_decl_tostring_root()
(in _ETreeTestCaseBase) test_write_gzip()
(in ETreeWriteTestCase) -test_deepcopy_elementtree()
-(in _ETreeTestCaseBase) +test_deepcopy_elementtree_pi()
+(in ETreeOnlyTestCase) test_ns_events()
(in _XMLPullParserTest) test_write_gzip_doctype()
(in ETreeWriteTestCase) -test_deepcopy_elementtree_dtd()
-(in ETreeOnlyTestCase) +test_deepcopy_namespaces()
+(in _ETreeTestCaseBase) test_ns_move()
(in _ETreeTestCaseBase) test_write_gzip_level()
(in ETreeWriteTestCase) -test_deepcopy_elementtree_pi()
+test_deepcopy_pi()
(in ETreeOnlyTestCase) test_ns_setting()
(in _ETreeTestCaseBase) @@ -2025,87 +2041,87 @@ (in _IOTestCaseBase) -test_deepcopy_namespaces()
-(in _ETreeTestCaseBase) +test_deepcopy_pi_dtd()
+(in ETreeOnlyTestCase) test_ns_tag_parse()
(in _ETreeTestCaseBase) test_write_method_html()
(in _ETreeTestCaseBase) -test_deepcopy_pi()
-(in ETreeOnlyTestCase) +test_deepcopy_subelement()
+(in _ETreeTestCaseBase) test_nsclasses
(in lxml.tests) test_write_method_text()
(in _ETreeTestCaseBase) -test_deepcopy_pi_dtd()
-(in ETreeOnlyTestCase) +test_deepcopy_tail()
+(in _ETreeTestCaseBase) test_nsmap_prefix_invalid()
(in ETreeOnlyTestCase) test_write_namespaced_element()
(in HtmlFileTestCase) -test_deepcopy_subelement()
-(in _ETreeTestCaseBase) +test_default_class_lookup()
+(in ClassLookupTestCase) test_object_path()
(in ObjectifyTestCase) test_xinclude()
(in _XIncludeTestCase) -test_deepcopy_tail()
-(in _ETreeTestCaseBase) +test_default_class_lookup_pull_parser()
+(in ClassLookupTestCase) test_object_path_addattr()
(in ObjectifyTestCase) test_xinclude_resolver()
(in _XIncludeTestCase) -test_default_class_lookup()
-(in ClassLookupTestCase) +test_default_namespace()
+(in _XmlFileTestCaseBase) test_object_path_addattr_create()
(in ObjectifyTestCase) test_xinclude_resolver_recursive()
(in _XIncludeTestCase) -test_default_class_lookup_pull_parser()
-(in ClassLookupTestCase) +test_default_parser_HTML_broken()
+(in HtmlParserTestCase) test_object_path_addattr_create_element()
(in ObjectifyTestCase) test_xinclude_text()
(in _XIncludeTestCase) -test_default_namespace()
-(in _XmlFileTestCaseBase) +test_default_tagname()
+(in ETreeNamespaceClassesTestCase) test_object_path_addattr_create_list()
(in ObjectifyTestCase) test_XML()
(in _ETreeTestCaseBase) -test_default_parser_HTML_broken()
-(in HtmlParserTestCase) +test_del_attribute_ns()
+(in _ETreeTestCaseBase) test_object_path_addattr_element()
(in ObjectifyTestCase) test_xml_base()
(in ETreeOnlyTestCase) -test_default_tagname()
-(in ETreeNamespaceClassesTestCase) +test_del_attribute_ns_parsed()
+(in _ETreeTestCaseBase) test_object_path_default_absolute()
(in ObjectifyTestCase) test_xml_base()
(in ObjectifyTestCase) -test_del_attribute_ns()
+test_del_insert()
(in _ETreeTestCaseBase) test_object_path_default_relative()
(in ObjectifyTestCase) @@ -2113,7 +2129,7 @@ (in ETreeOnlyTestCase) -test_del_attribute_ns_parsed()
+test_del_setitem()
(in _ETreeTestCaseBase) test_object_path_dot()
(in ObjectifyTestCase) @@ -2121,7 +2137,7 @@ (in ObjectifyTestCase) -test_del_insert()
+test_del_setslice()
(in _ETreeTestCaseBase) test_object_path_dot_list()
(in ObjectifyTestCase) @@ -2129,7 +2145,7 @@ (in ETreeOnlyTestCase) -test_del_setitem()
+test_delitem()
(in _ETreeTestCaseBase) test_object_path_dot_root()
(in ObjectifyTestCase) @@ -2137,7 +2153,7 @@ (in ObjectifyTestCase) -test_del_setslice()
+test_delitem_tail()
(in _ETreeTestCaseBase) test_object_path_dot_root_list()
(in ObjectifyTestCase) @@ -2145,7 +2161,7 @@ (in HtmlFileTestCase) -test_delitem()
+test_delslice()
(in _ETreeTestCaseBase) test_object_path_fail()
(in ObjectifyTestCase) @@ -2153,7 +2169,7 @@ (in HtmlFileTestCase) -test_delitem_tail()
+test_delslice_child_tail()
(in _ETreeTestCaseBase) test_object_path_fail_parse_empty()
(in ObjectifyTestCase) @@ -2161,7 +2177,7 @@ (in ETreeOnlyTestCase) -test_delslice()
+test_delslice_memory()
(in _ETreeTestCaseBase) test_object_path_fail_parse_empty_list()
(in ObjectifyTestCase) @@ -2169,7 +2185,7 @@ (in ObjectifyTestCase) -test_delslice_child_tail()
+test_delslice_negative1()
(in _ETreeTestCaseBase) test_object_path_hasattr()
(in ObjectifyTestCase) @@ -2177,7 +2193,7 @@ (in ETreeOnlyTestCase) -test_delslice_memory()
+test_delslice_negative2()
(in _ETreeTestCaseBase) test_object_path_index()
(in ObjectifyTestCase) @@ -2185,7 +2201,7 @@ (in ETreeOnlyTestCase) -test_delslice_negative1()
+test_delslice_step()
(in _ETreeTestCaseBase) test_object_path_index_fail_lookup()
(in ObjectifyTestCase) @@ -2193,7 +2209,7 @@ (in ETreeOnlyTestCase) -test_delslice_negative2()
+test_delslice_step_negative()
(in _ETreeTestCaseBase) test_object_path_index_fail_parse()
(in ObjectifyTestCase) @@ -2201,7 +2217,7 @@ (in _ETreeTestCaseBase) -test_delslice_step()
+test_delslice_step_negative2()
(in _ETreeTestCaseBase) test_object_path_index_list()
(in ObjectifyTestCase) @@ -2209,7 +2225,7 @@ (in lxml.tests) -test_delslice_step_negative()
+test_delslice_tail()
(in _ETreeTestCaseBase) test_object_path_list()
(in ObjectifyTestCase) @@ -2217,23 +2233,23 @@ (in ETreeXMLSchemaTestCase) -test_delslice_step_negative2()
-(in _ETreeTestCaseBase) +test_descendant_paths()
+(in ObjectifyTestCase) test_object_path_ns()
(in ObjectifyTestCase) test_xmlschema_comment_error()
(in ETreeXMLSchemaTestCase) -test_delslice_tail()
-(in _ETreeTestCaseBase) +test_descendant_paths_child()
+(in ObjectifyTestCase) test_object_path_ns_list()
(in ObjectifyTestCase) test_xmlschema_default_attributes()
(in ETreeXMLSchemaTestCase) -test_descendant_paths()
+test_descendant_paths_prefix()
(in ObjectifyTestCase) test_object_path_set()
(in ObjectifyTestCase) @@ -2241,47 +2257,47 @@ (in ETreeXMLSchemaTestCase) -test_descendant_paths_child()
-(in ObjectifyTestCase) +test_differing_attributes()
+(in DoctestCompareTest) test_object_path_set_create()
(in ObjectifyTestCase) test_xmlschema_error_log()
(in ETreeXMLSchemaTestCase) -test_descendant_paths_prefix()
-(in ObjectifyTestCase) +test_differing_tags()
+(in DoctestCompareTest) test_object_path_set_create_element()
(in ObjectifyTestCase) test_xmlschema_error_log_path()
(in ETreeXMLSchemaTestCase) -test_differing_attributes()
-(in DoctestCompareTest) +test_dir()
+(in ObjectifyTestCase) test_object_path_set_create_list()
(in ObjectifyTestCase) test_xmlschema_file()
(in ETreeXMLSchemaTestCase) -test_differing_tags()
-(in DoctestCompareTest) +test_docinfo_empty()
+(in ETreeOnlyTestCase) test_object_path_set_element()
(in ObjectifyTestCase) test_xmlschema_illegal_validation_error()
(in ETreeXMLSchemaTestCase) -test_dir()
-(in ObjectifyTestCase) +test_docinfo_name_only()
+(in ETreeOnlyTestCase) test_object_path_syntax()
(in ObjectifyTestCase) test_xmlschema_import_file()
(in ETreeXMLSchemaTestCase) -test_docinfo_empty()
+test_docinfo_public()
(in ETreeOnlyTestCase) test_objectify
(in lxml.tests) @@ -2289,7 +2305,7 @@ (in ETreeXMLSchemaTestCase) -test_docinfo_name_only()
+test_docinfo_system()
(in ETreeOnlyTestCase) test_open_namespaced_element()
(in HtmlFileTestCase) @@ -2297,15 +2313,15 @@ (in ETreeXMLSchemaTestCase) -test_docinfo_public()
-(in ETreeOnlyTestCase) +test_doctestcompare
+(in lxml.tests) test_parse_base_url_docinfo()
(in ETreeOnlyTestCase) test_xmlschema_iterparse()
(in ETreeXMLSchemaTestCase) -test_docinfo_system()
+test_doctype_name_only_roundtrip()
(in ETreeOnlyTestCase) test_parse_base_url_docinfo()
(in ObjectifyTestCase) @@ -2313,39 +2329,39 @@ (in ETreeXMLSchemaTestCase) -test_doctestcompare
-(in lxml.tests) +test_doctype_output_override()
+(in ETreeOnlyTestCase) test_parse_cdata()
(in _ETreeTestCaseBase) test_xmlschema_iterparse_incomplete()
(in ETreeXMLSchemaTestCase) -test_doctype_name_only_roundtrip()
-(in ETreeOnlyTestCase) +test_dtd
+(in lxml.tests) test_parse_encoding_8bit_explicit()
(in _ETreeTestCaseBase) test_xmlschema_nested_resolvers()
(in ETreeXMLSchemaResolversTestCase) -test_doctype_output_override()
-(in ETreeOnlyTestCase) +test_dtd()
+(in ETreeDtdTestCase) test_parse_encoding_8bit_explicit()
(in HtmlParserTestCase) test_xmlschema_parse()
(in ETreeXMLSchemaTestCase) -test_dtd
-(in lxml.tests) +test_dtd_api_internal()
+(in ETreeDtdTestCase) test_parse_encoding_8bit_override()
(in _ETreeTestCaseBase) test_xmlschema_parse_default_attributes()
(in ETreeXMLSchemaTestCase) -test_dtd()
+test_dtd_assertValid()
(in ETreeDtdTestCase) test_parse_encoding_8bit_override()
(in HtmlParserTestCase) @@ -2353,7 +2369,7 @@ (in ETreeXMLSchemaTestCase) -test_dtd_api_internal()
+test_dtd_attrs()
(in ETreeDtdTestCase) test_parse_error()
(in _ETreeTestCaseBase) @@ -2361,7 +2377,7 @@ (in ETreeXMLSchemaTestCase) -test_dtd_assertValid()
+test_dtd_broken()
(in ETreeDtdTestCase) test_parse_error_from_file()
(in _ETreeTestCaseBase) @@ -2369,7 +2385,7 @@ (in ETreeXMLSchemaResolversTestCase) -test_dtd_attrs()
+test_dtd_file()
(in ETreeDtdTestCase) test_parse_error_logging()
(in ETreeErrorLogTest) @@ -2377,7 +2393,7 @@ (in ETreeXMLSchemaResolversTestCase) -test_dtd_broken()
+test_dtd_internal()
(in ETreeDtdTestCase) test_parse_error_none()
(in _ETreeTestCaseBase) @@ -2385,7 +2401,7 @@ (in ETreeXMLSchemaResolversTestCase) -test_dtd_file()
+test_dtd_internal_invalid()
(in ETreeDtdTestCase) test_parse_file()
(in _ETreeTestCaseBase) @@ -2393,7 +2409,7 @@ (in ETreeXMLSchemaTestCase) -test_dtd_internal()
+test_dtd_invalid()
(in ETreeDtdTestCase) test_parse_file_dtd()
(in ETreeDtdTestCase) @@ -2401,7 +2417,7 @@ (in ETreeXMLSchemaTestCase) -test_dtd_internal_invalid()
+test_dtd_invalid_duplicate_id()
(in ETreeDtdTestCase) test_parse_file_encoding()
(in _ETreeTestCaseBase) @@ -2409,15 +2425,15 @@ (in ErrorTestCase) -test_dtd_invalid()
-(in ETreeDtdTestCase) +test_dtd_io()
+(in ETreeOnlyTestCase) test_parse_file_nonexistent()
(in _ETreeTestCaseBase) test_xpath_boolean()
(in ETreeXPathTestCase) -test_dtd_invalid_duplicate_id()
+test_dtd_parse_file_not_found()
(in ETreeDtdTestCase) test_parse_file_object()
(in _ETreeTestCaseBase) @@ -2425,15 +2441,15 @@ (in ETreeXPathTestCase) -test_dtd_io()
-(in ETreeOnlyTestCase) +test_dtd_parse_invalid()
+(in ETreeDtdTestCase) test_parse_file_object_encoding()
(in _ETreeTestCaseBase) test_xpath_class_prefix_error()
(in ETreeXPathTestCase) -test_dtd_parse_file_not_found()
+test_dtd_parse_valid()
(in ETreeDtdTestCase) test_parse_fileobject_unicode()
(in ETreeOnlyTestCase) @@ -2441,7 +2457,7 @@ (in ETreeXPathClassTestCase) -test_dtd_parse_invalid()
+test_dtd_parse_valid_file_url()
(in ETreeDtdTestCase) test_parse_parser_type_error()
(in ETreeOnlyTestCase) @@ -2449,7 +2465,7 @@ (in ETreeXPathClassTestCase) -test_dtd_parse_valid()
+test_dtd_parse_valid_relative()
(in ETreeDtdTestCase) test_parse_remove_comments()
(in ETreeOnlyTestCase) @@ -2457,7 +2473,7 @@ (in ETreeXPathClassTestCase) -test_dtd_parse_valid_file_url()
+test_dtd_parse_valid_relative_file_url()
(in ETreeDtdTestCase) test_parse_remove_pis()
(in ETreeOnlyTestCase) @@ -2465,7 +2481,7 @@ (in ETreeETXPathClassTestCase) -test_dtd_parse_valid_relative()
+test_dtd_stringio()
(in ETreeDtdTestCase) test_parse_stringio()
(in _ETreeTestCaseBase) @@ -2473,31 +2489,31 @@ (in ETreeXPathClassTestCase) -test_dtd_parse_valid_relative_file_url()
-(in ETreeDtdTestCase) +test_dump_none()
+(in ETreeOnlyTestCase) test_parse_stringio_base_url()
(in ETreeOnlyTestCase) test_xpath_context_node()
(in ETreeXPathTestCase) -test_dtd_stringio()
-(in ETreeDtdTestCase) +test_efactory_attrib()
+(in ObjectifyTestCase) test_parse_stringio_base_url()
(in ObjectifyTestCase) test_xpath_document_root()
(in ETreeXPathTestCase) -test_dump_none()
-(in ETreeOnlyTestCase) +test_efactory_bool()
+(in ObjectifyTestCase) test_parse_utf8_bom()
(in _IOTestCaseBase) test_xpath_elementtree_error()
(in ETreeXPathClassTestCase) -test_efactory_attrib()
+test_efactory_float()
(in ObjectifyTestCase) test_parse_with_encoding()
(in _ETreeTestCaseBase) @@ -2505,7 +2521,7 @@ (in ETreeXPathTestCase) -test_efactory_bool()
+test_efactory_int()
(in ObjectifyTestCase) test_parseid()
(in ETreeOnlyTestCase) @@ -2513,7 +2529,7 @@ (in ETreeXPathTestCase) -test_efactory_float()
+test_efactory_nested()
(in ObjectifyTestCase) test_parser_based_lookup()
(in ClassLookupTestCase) @@ -2521,7 +2537,7 @@ (in ETreeXPathTestCase) -test_efactory_int()
+test_efactory_none()
(in ObjectifyTestCase) test_parser_encoding()
(in ETreeOnlyTestCase) @@ -2529,7 +2545,7 @@ (in ETreeXPathTestCase) -test_efactory_nested()
+test_efactory_str()
(in ObjectifyTestCase) test_parser_encoding_unknown()
(in ETreeOnlyTestCase) @@ -2537,7 +2553,7 @@ (in ETreeXPathTestCase) -test_efactory_none()
+test_efactory_subtype()
(in ObjectifyTestCase) test_parser_input_mix()
(in HttpIOTestCase) @@ -2545,7 +2561,7 @@ (in ETreeXPathTestCase) -test_efactory_str()
+test_efactory_unicode()
(in ObjectifyTestCase) test_parser_target_attrib()
(in _ETreeTestCaseBase) @@ -2553,7 +2569,7 @@ (in ETreeXPathTestCase) -test_efactory_subtype()
+test_efactory_value_concatenation()
(in ObjectifyTestCase) test_parser_target_cdata()
(in ETreeOnlyTestCase) @@ -2561,79 +2577,79 @@ (in ETreeXPathExsltTestCase) -test_efactory_unicode()
-(in ObjectifyTestCase) +test_element()
+(in _ETreeTestCaseBase) test_parser_target_comment()
(in ETreeOnlyTestCase) test_xpath_exslt_functions_strings()
(in ETreeXPathExsltTestCase) -test_efactory_value_concatenation()
-(in ObjectifyTestCase) +test_element()
+(in _XmlFileTestCaseBase) test_parser_target_data()
(in _ETreeTestCaseBase) test_xpath_extensions()
(in ETreeXPathTestCase) -test_element()
-(in _ETreeTestCaseBase) +test_element_base()
+(in ProxyTestCase) test_parser_target_entity()
(in _ETreeTestCaseBase) test_xpath_extensions_error()
(in ETreeXPathTestCase) -test_element()
-(in _XmlFileTestCaseBase) +test_element_base_children()
+(in ProxyTestCase) test_parser_target_entity_unknown()
(in _ETreeTestCaseBase) test_xpath_extensions_mix()
(in ETreeXPathTestCase) -test_element_base()
-(in ProxyTestCase) +test_element_contains()
+(in _ETreeTestCaseBase) test_parser_target_error_in_close()
(in _ETreeTestCaseBase) test_xpath_extensions_nodes()
(in ETreeXPathTestCase) -test_element_base_children()
-(in ProxyTestCase) +test_element_creation()
+(in ETreeNamespaceClassesTestCase) test_parser_target_error_in_end()
(in _ETreeTestCaseBase) test_xpath_extensions_nodes_append()
(in ETreeXPathTestCase) -test_element_contains()
-(in _ETreeTestCaseBase) +test_element_cyclic_gc_none()
+(in ErrorTestCase) test_parser_target_error_in_start()
(in _ETreeTestCaseBase) test_xpath_extensions_nodes_append2()
(in ETreeXPathTestCase) -test_element_creation()
-(in ETreeNamespaceClassesTestCase) +test_element_indexing_negative()
+(in _ETreeTestCaseBase) test_parser_target_error_in_start_and_close()
(in _ETreeTestCaseBase) test_xpath_extensions_wrong_args()
(in ETreeXPathTestCase) -test_element_cyclic_gc_none()
-(in ErrorTestCase) +test_element_indexing_only_text()
+(in _ETreeTestCaseBase) test_parser_target_feed_exception()
(in ETreeOnlyTestCase) test_xpath_list_attribute()
(in ETreeXPathTestCase) -test_element_indexing_negative()
+test_element_indexing_with_text()
(in _ETreeTestCaseBase) test_parser_target_feed_no_id_dict()
(in ETreeOnlyTestCase) @@ -2641,7 +2657,7 @@ (in ETreeXPathTestCase) -test_element_indexing_only_text()
+test_element_indexing_with_text2()
(in _ETreeTestCaseBase) test_parser_target_fromstring_exception()
(in ETreeOnlyTestCase) @@ -2649,23 +2665,23 @@ (in ETreeXPathTestCase) -test_element_indexing_with_text()
-(in _ETreeTestCaseBase) +test_element_name_colon()
+(in ETreeOnlyTestCase) test_parser_target_pi()
(in ETreeOnlyTestCase) test_xpath_list_comment()
(in ETreeXPathTestCase) -test_element_indexing_with_text2()
-(in _ETreeTestCaseBase) +test_element_name_empty()
+(in ETreeOnlyTestCase) test_parser_target_property()
(in _ETreeTestCaseBase) test_xpath_list_elements()
(in ETreeXPathTestCase) -test_element_name_colon()
+test_element_name_quote()
(in ETreeOnlyTestCase) test_parser_target_recover()
(in ETreeOnlyTestCase) @@ -2673,7 +2689,7 @@ (in ETreeXPathTestCase) -test_element_name_empty()
+test_element_name_space()
(in ETreeOnlyTestCase) test_parser_target_tag()
(in _ETreeTestCaseBase) @@ -2681,7 +2697,7 @@ (in ETreeXPathTestCase) -test_element_name_quote()
+test_element_names()
(in ETreeOnlyTestCase) test_parser_version()
(in _ETreeTestCaseBase) @@ -2689,47 +2705,47 @@ (in ETreeXPathTestCase) -test_element_name_space()
-(in ETreeOnlyTestCase) +test_element_nested()
+(in _XmlFileTestCaseBase) test_pi()
(in _ETreeTestCaseBase) test_xpath_list_text_parent_no_smart_strings()
(in ETreeXPathTestCase) -test_element_names()
-(in ETreeOnlyTestCase) +test_element_nested_with_text()
+(in _XmlFileTestCaseBase) test_pi()
(in ETreeOnlyTestCase) test_xpath_list_unicode_text_parent()
(in ETreeXPathTestCase) -test_element_nested()
-(in _XmlFileTestCaseBase) +test_element_nsmap()
+(in ETreeOnlyTestCase) test_pi()
(in _XmlFileTestCaseBase) test_xpath_namespace()
(in ETreeXPathTestCase) -test_element_nested_with_text()
-(in _XmlFileTestCaseBase) +test_element_nsmap_custom()
+(in ObjectifyTestCase) test_pi_base()
(in ProxyTestCase) test_xpath_namespace_empty()
(in ETreeXPathTestCase) -test_element_nsmap()
-(in ETreeOnlyTestCase) +test_element_nsmap_custom_prefixes()
+(in ObjectifyTestCase) test_pi_nonsense()
(in _ETreeTestCaseBase) test_xpath_ns()
(in ETreeXPathTestCase) -test_element_nsmap_custom()
+test_element_nsmap_default()
(in ObjectifyTestCase) test_pi_parse()
(in ETreeOnlyTestCase) @@ -2737,7 +2753,7 @@ (in ETreeXPathTestCase) -test_element_nsmap_custom_prefixes()
+test_element_nsmap_empty()
(in ObjectifyTestCase) test_pi_pseudo_attributes_attrib()
(in ETreeOnlyTestCase) @@ -2745,31 +2761,31 @@ (in ETreeXPathTestCase) -test_element_nsmap_default()
-(in ObjectifyTestCase) +test_element_refcycle()
+(in ETreeOnlyTestCase) test_pi_pseudo_attributes_get()
(in ETreeOnlyTestCase) test_xpath_number()
(in ETreeXPathTestCase) -test_element_nsmap_empty()
-(in ObjectifyTestCase) -test_pickle()
+test_element_sax()
+(in ETreeSaxTestCase) +test_pickle()
(in ObjectifyTestCase) test_xpath_on_context_node()
(in ETreeXSLTExtFuncTestCase) -test_element_refcycle()
-(in ETreeOnlyTestCase) +test_element_sax_default_ns_prefix()
+(in NSPrefixSaxTestCase) test_pickle_boolelement()
(in ObjectifyTestCase) test_xpath_on_foreign_context_node()
(in ETreeXSLTExtFuncTestCase) -test_element_sax()
+test_element_sax_ns()
(in ETreeSaxTestCase) test_pickle_elementtree()
(in ObjectifyTestCase) @@ -2777,7 +2793,7 @@ (in ETreeXPathTestCase) -test_element_sax_default_ns_prefix()
+test_element_sax_ns_prefix()
(in NSPrefixSaxTestCase) test_pickle_floattelement()
(in ObjectifyTestCase) @@ -2785,31 +2801,31 @@ (in ETreeXPathTestCase) -test_element_sax_ns()
-(in ETreeSaxTestCase) +test_element_sax_twin_ns_prefix()
+(in NSPrefixSaxTestCase) test_pickle_intelement()
(in ObjectifyTestCase) test_xpath_text_from_other_document()
(in ETreeXPathTestCase) -test_element_sax_ns_prefix()
-(in NSPrefixSaxTestCase) +test_element_with_attributes()
+(in _ETreeTestCaseBase) test_pickle_noneelement()
(in ObjectifyTestCase) test_xpath_variables()
(in ETreeXPathTestCase) -test_element_sax_twin_ns_prefix()
-(in NSPrefixSaxTestCase) +test_element_with_attributes_extra()
+(in _ETreeTestCaseBase) test_pickle_strelement()
(in ObjectifyTestCase) test_xpath_variables_nodeset()
(in ETreeXPathTestCase) -test_element_with_attributes()
+test_element_with_attributes_extra_duplicate()
(in _ETreeTestCaseBase) test_prefix()
(in ETreeOnlyTestCase) @@ -2817,7 +2833,7 @@ (in lxml.tests) -test_element_with_attributes_extra()
+test_element_with_attributes_keywords()
(in _ETreeTestCaseBase) test_prefix_default_ns()
(in ETreeOnlyTestCase) @@ -2825,7 +2841,7 @@ (in ObjectifyTestCase) -test_element_with_attributes_extra_duplicate()
+test_element_with_attributes_ns()
(in _ETreeTestCaseBase) test_processinginstruction()
(in _ETreeTestCaseBase) @@ -2833,71 +2849,71 @@ (in ObjectifyTestCase) -test_element_with_attributes_keywords()
-(in _ETreeTestCaseBase) +test_element_write_empty()
+(in _XmlFileTestCaseBase) test_proxy_collect_siblings()
(in ETreeOnlyTestCase) test_xsinil_deannotate()
(in ObjectifyTestCase) -test_element_with_attributes_ns()
-(in _ETreeTestCaseBase) +test_element_write_text()
+(in _XmlFileTestCaseBase) test_proxy_collect_siblings_text()
(in ETreeOnlyTestCase) test_xsitype_deannotate()
(in ObjectifyTestCase) -test_element_write_empty()
-(in _XmlFileTestCaseBase) +test_elementpath
+(in lxml.tests) test_proxy_hashing()
(in ProxyTestCase) test_xslt
(in lxml.tests) -test_element_write_text()
-(in _XmlFileTestCaseBase) +test_elementtree
+(in lxml.tests) test_proxy_reuse()
(in ProxyTestCase) test_xslt()
(in ETreeXSLTTestCase) -test_elementpath
-(in lxml.tests) +test_ElementTree()
+(in _ETreeTestCaseBase) test_proxy_reuse_after_del_root()
(in ProxyTestCase) test_xslt_access_control_repr()
(in ETreeXSLTTestCase) -test_elementtree
-(in lxml.tests) +test_elementtree()
+(in _ETreeTestCaseBase) test_proxy_reuse_after_gc()
(in ProxyTestCase) test_xslt_apply_error_log()
(in ETreeXSLTTestCase) -test_ElementTree()
-(in _ETreeTestCaseBase) +test_elementtree_find_qname()
+(in ETreeOnlyTestCase) test_pull_from_simple_target()
(in XMLPullParserTest) test_xslt_broken()
(in ETreeXSLTTestCase) -test_elementtree()
-(in _ETreeTestCaseBase) +test_elementtree_findall_ns_qname()
+(in ETreeOnlyTestCase) test_pull_from_simple_target_start_end()
(in XMLPullParserTest) test_xslt_copy()
(in ETreeXSLTTestCase) -test_elementtree_find_qname()
+test_elementtree_findall_qname()
(in ETreeOnlyTestCase) test_pull_from_tree_builder()
(in XMLPullParserTest) @@ -2905,7 +2921,7 @@ (in ETreeXSLTTestCase) -test_elementtree_findall_ns_qname()
+test_elementtree_getelementpath()
(in ETreeOnlyTestCase) test_pull_from_tree_builder_subclass()
(in XMLPullParserTest) @@ -2913,7 +2929,7 @@ (in ETreeXSLTTestCase) -test_elementtree_findall_qname()
+test_elementtree_getelementpath_ns()
(in ETreeOnlyTestCase) test_pyannotate_empty()
(in ObjectifyTestCase) @@ -2921,87 +2937,87 @@ (in ETreeXSLTTestCase) -test_elementtree_getelementpath()
-(in ETreeOnlyTestCase) +test_elementtree_getiterator()
+(in _ETreeTestCaseBase) test_pyannotate_ignore_old()
(in ObjectifyTestCase) test_xslt_document_parse()
(in ETreeXSLTTestCase) -test_elementtree_getelementpath_ns()
-(in ETreeOnlyTestCase) +test_elementtree_getiterator_filter()
+(in _ETreeTestCaseBase) test_pyannotate_use_old()
(in ObjectifyTestCase) test_xslt_document_parse_allow()
(in ETreeXSLTTestCase) -test_elementtree_getiterator()
-(in _ETreeTestCaseBase) +test_elementtree_getpath()
+(in ETreeXPathTestCase) test_pyclasslookup
(in lxml.tests) test_xslt_document_parse_deny()
(in ETreeXSLTTestCase) -test_elementtree_getiterator_filter()
-(in _ETreeTestCaseBase) +test_elementtree_getpath_partial()
+(in ETreeXPathTestCase) test_pypy_proxy_collect()
(in ETreeOnlyTestCase) test_xslt_document_parse_deny_all()
(in ETreeXSLTTestCase) -test_elementtree_getpath()
-(in ETreeXPathTestCase) +test_elementtree_parser_target()
+(in _ETreeTestCaseBase) test_pytype_annotation()
(in ObjectifyTestCase) test_xslt_document_XML()
(in ETreeXSLTTestCase) -test_elementtree_getpath_partial()
-(in ETreeXPathTestCase) +test_elementtree_parser_target_type_error()
+(in ETreeOnlyTestCase) test_pytype_annotation_empty()
(in ObjectifyTestCase) test_xslt_document_XML_resolver()
(in ETreeXSLTTestCase) -test_elementtree_parser_target()
-(in _ETreeTestCaseBase) +test_empty_decl()
+(in ETreeDtdTestCase) test_pytype_annotation_use_old()
(in ObjectifyTestCase) test_xslt_elementtree_error()
(in ETreeXSLTTestCase) -test_elementtree_parser_target_type_error()
-(in ETreeOnlyTestCase) +test_empty_parse()
+(in ErrorTestCase) test_pytype_deannotate()
(in ObjectifyTestCase) test_xslt_empty()
(in ETreeXSLTTestCase) -test_empty_decl()
-(in ETreeDtdTestCase) +test_encoding()
+(in _ETreeTestCaseBase) test_pytype_xsitype_annotation()
(in ObjectifyTestCase) test_xslt_encoding()
(in ETreeXSLTTestCase) -test_empty_parse()
-(in ErrorTestCase) +test_encoding()
+(in _XmlFileTestCaseBase) test_qname()
(in _ETreeTestCaseBase) test_xslt_encoding_override()
(in ETreeXSLTTestCase) -test_encoding()
+test_encoding_8bit_latin1()
(in _ETreeTestCaseBase) test_qname_attrib()
(in _ETreeTestCaseBase) @@ -3009,15 +3025,15 @@ (in ETreeXSLTTestCase) -test_encoding()
-(in _XmlFileTestCaseBase) +test_encoding_8bit_parse_stringio()
+(in _ETreeTestCaseBase) test_qname_attrib_resolve()
(in _ETreeTestCaseBase) test_xslt_include()
(in ETreeXSLTTestCase) -test_encoding_8bit_latin1()
+test_encoding_8bit_xml()
(in _ETreeTestCaseBase) test_qname_attribute_getset()
(in _ETreeTestCaseBase) @@ -3025,7 +3041,7 @@ (in ETreeXSLTTestCase) -test_encoding_8bit_parse_stringio()
+test_encoding_exact()
(in _ETreeTestCaseBase) test_qname_attribute_resolve()
(in _ETreeTestCaseBase) @@ -3033,7 +3049,7 @@ (in ETreeXSLTTestCase) -test_encoding_8bit_xml()
+test_encoding_sub_tostring_default_encoding()
(in _ETreeTestCaseBase) test_qname_attribute_resolve_new()
(in _ETreeTestCaseBase) @@ -3041,7 +3057,7 @@ (in ETreeXSLTTestCase) -test_encoding_exact()
+test_encoding_tostring()
(in _ETreeTestCaseBase) test_qname_cmp()
(in _ETreeTestCaseBase) @@ -3049,7 +3065,7 @@ (in ETreeXSLTTestCase) -test_encoding_sub_tostring_default_encoding()
+test_encoding_tostring_default_encoding()
(in _ETreeTestCaseBase) test_qname_colon()
(in ETreeOnlyTestCase) @@ -3057,7 +3073,7 @@ (in ETreeXSLTTestCase) -test_encoding_tostring()
+test_encoding_tostring_sub()
(in _ETreeTestCaseBase) test_qname_element()
(in ETreeOnlyTestCase) @@ -3065,7 +3081,7 @@ (in ETreeXSLTTestCase) -test_encoding_tostring_default_encoding()
+test_encoding_tostring_sub_tail()
(in _ETreeTestCaseBase) test_qname_empty()
(in ETreeOnlyTestCase) @@ -3073,7 +3089,7 @@ (in ETreeXSLTTestCase) -test_encoding_tostring_sub()
+test_encoding_tostring_unknown()
(in _ETreeTestCaseBase) test_qname_namespace_localname()
(in ETreeOnlyTestCase) @@ -3081,15 +3097,15 @@ (in ETreeXSLTTestCase) -test_encoding_tostring_sub_tail()
-(in _ETreeTestCaseBase) +test_encoding_tostring_utf16()
+(in ETreeOnlyTestCase) test_qname_none()
(in ETreeOnlyTestCase) test_xslt_multiple_parameters()
(in ETreeXSLTTestCase) -test_encoding_tostring_unknown()
+test_encoding_utf8_bom()
(in _ETreeTestCaseBase) test_qname_space()
(in ETreeOnlyTestCase) @@ -3097,31 +3113,31 @@ (in ETreeXSLTTestCase) -test_encoding_tostring_utf16()
-(in ETreeOnlyTestCase) +test_encoding_write_default_encoding()
+(in _ETreeTestCaseBase) test_qname_text_resolve()
(in ETreeOnlyTestCase) test_xslt_parameter_invalid()
(in ETreeXSLTTestCase) -test_encoding_utf8_bom()
-(in _ETreeTestCaseBase) +test_entity_append()
+(in ETreeOnlyTestCase) test_register_namespace()
(in _ETreeTestCaseBase) test_xslt_parameter_missing()
(in ETreeXSLTTestCase) -test_encoding_write_default_encoding()
-(in _ETreeTestCaseBase) +test_entity_append_parsed()
+(in ETreeOnlyTestCase) test_registered_type_stringify()
(in ObjectifyTestCase) test_xslt_parameter_xpath()
(in ETreeXSLTTestCase) -test_entity_append()
+test_entity_error()
(in ETreeOnlyTestCase) test_registered_types()
(in ObjectifyTestCase) @@ -3129,7 +3145,7 @@ (in ETreeXSLTTestCase) -test_entity_append_parsed()
+test_entity_parse()
(in ETreeOnlyTestCase) test_registry()
(in ETreeNamespaceClassesTestCase) @@ -3137,7 +3153,7 @@ (in ETreeXSLTTestCase) -test_entity_error()
+test_entity_restructure()
(in ETreeOnlyTestCase) test_rel_xpath_boolean()
(in ETreeXPathTestCase) @@ -3145,7 +3161,7 @@ (in ETreeXSLTTestCase) -test_entity_parse()
+test_entity_values()
(in ETreeOnlyTestCase) test_rel_xpath_list_elements()
(in ETreeXPathTestCase) @@ -3153,31 +3169,31 @@ (in ETreeXSLTTestCase) -test_entity_restructure()
-(in ETreeOnlyTestCase) +test_equal_input()
+(in DoctestCompareTest) test_relaxng
(in lxml.tests) test_xslt_pi_embedded_id()
(in ETreeXSLTTestCase) -test_entity_values()
-(in ETreeOnlyTestCase) +test_errors
+(in lxml.tests) test_relaxng()
(in ETreeRelaxNGTestCase) test_xslt_pi_embedded_xmlid()
(in ETreeXSLTTestCase) -test_equal_input()
-(in DoctestCompareTest) +test_escaping()
+(in _XmlFileTestCaseBase) test_relaxng_compact()
(in RelaxNGCompactTestCase) test_xslt_pi_get()
(in ETreeXSLTTestCase) -test_errors
+test_etree
(in lxml.tests) test_relaxng_compact_file_obj()
(in RelaxNGCompactTestCase) @@ -3185,31 +3201,31 @@ (in ETreeXSLTTestCase) -test_escaping()
-(in _XmlFileTestCaseBase) +test_etree_parse_io_error()
+(in _IOTestCaseBase) test_relaxng_compact_str()
(in RelaxNGCompactTestCase) test_xslt_pi_get_all_reversed()
(in ETreeXSLTTestCase) -test_etree
-(in lxml.tests) +test_etree_sax_attributes()
+(in ETreeSaxTestCase) test_relaxng_elementtree_error()
(in ETreeRelaxNGTestCase) test_xslt_pi_get_unknown()
(in ETreeXSLTTestCase) -test_etree_parse_io_error()
-(in _IOTestCaseBase) +test_etree_sax_comment()
+(in ETreeSaxTestCase) test_relaxng_error()
(in ETreeRelaxNGTestCase) test_xslt_pi_set_new()
(in ETreeXSLTTestCase) -test_etree_sax_attributes()
+test_etree_sax_comment_root()
(in ETreeSaxTestCase) test_relaxng_generic_error()
(in ETreeRelaxNGTestCase) @@ -3217,7 +3233,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_comment()
+test_etree_sax_double()
(in ETreeSaxTestCase) test_relaxng_include()
(in ETreeRelaxNGTestCase) @@ -3225,7 +3241,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_comment_root()
+test_etree_sax_error()
(in ETreeSaxTestCase) test_relaxng_invalid_schema()
(in ETreeRelaxNGTestCase) @@ -3233,7 +3249,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_double()
+test_etree_sax_error2()
(in ETreeSaxTestCase) test_relaxng_invalid_schema2()
(in ETreeRelaxNGTestCase) @@ -3241,7 +3257,7 @@ (in Py3XSLTTestCase) -test_etree_sax_error()
+test_etree_sax_handler_default_ns()
(in ETreeSaxTestCase) test_relaxng_invalid_schema3()
(in ETreeRelaxNGTestCase) @@ -3249,7 +3265,7 @@ (in Py3XSLTTestCase) -test_etree_sax_error2()
+test_etree_sax_handler_default_ns_None()
(in ETreeSaxTestCase) test_relaxng_invalid_schema4()
(in ETreeRelaxNGTestCase) @@ -3257,7 +3273,7 @@ (in Py3XSLTTestCase) -test_etree_sax_handler_default_ns()
+test_etree_sax_no_ns()
(in ETreeSaxTestCase) test_relaxng_shortcut()
(in ETreeRelaxNGTestCase) @@ -3265,7 +3281,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_handler_default_ns_None()
+test_etree_sax_no_ns_attributes()
(in ETreeSaxTestCase) test_relaxng_stringio()
(in ETreeRelaxNGTestCase) @@ -3273,7 +3289,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_no_ns()
+test_etree_sax_ns1()
(in ETreeSaxTestCase) test_remove()
(in _ETreeTestCaseBase) @@ -3281,7 +3297,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_no_ns_attributes()
+test_etree_sax_ns2()
(in ETreeSaxTestCase) test_remove_nonexisting()
(in _ETreeTestCaseBase) @@ -3289,7 +3305,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_ns1()
+test_etree_sax_ns_attributes()
(in ETreeSaxTestCase) test_remove_ns()
(in _ETreeTestCaseBase) @@ -3297,7 +3313,7 @@ (in ETreeXSLTTestCase) -test_etree_sax_ns2()
+test_etree_sax_pi()
(in ETreeSaxTestCase) test_remove_tail()
(in _ETreeTestCaseBase) @@ -3305,534 +3321,527 @@ (in ETreeXSLTTestCase) -test_etree_sax_ns_attributes()
+test_etree_sax_pi_root()
(in ETreeSaxTestCase) -test_replace()
-(in ETreeOnlyTestCase) +test_remove_while_iterating()
+(in _ETreeTestCaseBase) test_xslt_write_output_failure()
(in ETreeXSLTTestCase) -test_etree_sax_pi()
+test_etree_sax_redefine_ns()
(in ETreeSaxTestCase) -test_replace_new()
+test_replace()
(in ETreeOnlyTestCase) test_xslt_write_output_file()
(in ETreeXSLTTestCase) -test_etree_sax_pi_root()
+test_etree_sax_simple()
(in ETreeSaxTestCase) -test_replace_slice_tail()
-(in _ETreeTestCaseBase) +test_replace_new()
+(in ETreeOnlyTestCase) test_xslt_write_output_file_path()
(in ETreeXSLTTestCase) -test_etree_sax_redefine_ns()
-(in ETreeSaxTestCase) -test_resolve_bytes_dtd()
-(in ETreeOnlyTestCase) +test_events()
+(in _XMLPullParserTest) +test_replace_slice_tail()
+(in _ETreeTestCaseBase) tests
(in lxml) -test_etree_sax_simple()
-(in ETreeSaxTestCase) -test_resolve_empty()
+test_events_sequence()
+(in _XMLPullParserTest) +test_resolve_bytes_dtd()
(in ETreeOnlyTestCase) text
(in QName) -test_events()
-(in _XMLPullParserTest) -test_resolve_error()
+test_evil_class_lookup()
+(in ClassLookupTestCase) +test_resolve_empty()
(in ETreeOnlyTestCase) text
(in _Element) -test_events_sequence()
-(in _XMLPullParserTest) -test_resolve_file_dtd()
+test_exslt_math()
+(in ETreeEXSLTTestCase) +test_resolve_error()
(in ETreeOnlyTestCase) text
(in _Entity) -test_evil_class_lookup()
-(in ClassLookupTestCase) -test_resolve_filelike_dtd()
+test_exslt_regexp_match()
+(in ETreeEXSLTTestCase) +test_resolve_file_dtd()
(in ETreeOnlyTestCase) text
(in ObjectifiedElement) -test_exslt_math()
+test_exslt_regexp_match1()
(in ETreeEXSLTTestCase) -test_resolve_filename_dtd()
+test_resolve_filelike_dtd()
(in ETreeOnlyTestCase) text
(in Element) -test_exslt_regexp_match()
+test_exslt_regexp_match2()
(in ETreeEXSLTTestCase) -test_resolve_filename_dtd_relative()
+test_resolve_filename_dtd()
(in ETreeOnlyTestCase) text_compare()
(in LXMLOutputChecker) -test_exslt_regexp_match1()
+test_exslt_regexp_match_groups()
(in ETreeEXSLTTestCase) -test_resolve_string_dtd()
+test_resolve_filename_dtd_relative()
(in ETreeOnlyTestCase) text_content()
(in HtmlMixin) -test_exslt_regexp_match2()
+test_exslt_regexp_replace()
(in ETreeEXSLTTestCase) -test_root()
-(in ObjectifyTestCase) +test_resolve_string_dtd()
+(in ETreeOnlyTestCase) TEXTAREA
(in lxml.html.builder) -test_exslt_regexp_match_groups()
+test_exslt_regexp_test()
(in ETreeEXSLTTestCase) -test_sax
-(in lxml.tests) +test_root()
+(in ObjectifyTestCase) TextareaElement -test_exslt_regexp_replace()
+test_exslt_str()
(in ETreeEXSLTTestCase) -test_sax_to_pulldom()
-(in ETreeSaxTestCase) +test_sax
+(in lxml.tests) TFOOT
(in lxml.html.builder) -test_exslt_regexp_test()
+test_exslt_str_attribute_replace()
(in ETreeEXSLTTestCase) -test_sax_to_pulldom_multiple_namespaces()
+test_sax_to_pulldom()
(in ETreeSaxTestCase) TH
(in lxml.html.builder) -test_exslt_str()
-(in ETreeEXSLTTestCase) -test_schema_types()
-(in ObjectifyTestCase) +test_extend()
+(in _ETreeTestCaseBase) +test_sax_to_pulldom_multiple_namespaces()
+(in ETreeSaxTestCase) THEAD
(in lxml.html.builder) -test_exslt_str_attribute_replace()
-(in ETreeEXSLTTestCase) -test_schema_types_prefixed()
+test_extension_element()
+(in ETreeXSLTExtElementTestCase) +test_schema_types()
(in ObjectifyTestCase) this_dir
(in lxml.tests.test_builder) -test_extend()
-(in _ETreeTestCaseBase) -test_schematron
-(in lxml.tests) +test_extension_element_apply_templates()
+(in ETreeXSLTExtElementTestCase) +test_schema_types_prefixed()
+(in ObjectifyTestCase) this_dir
(in lxml.tests.test_classlookup) -test_extension_element()
+test_extension_element_apply_templates_elements_only()
(in ETreeXSLTExtElementTestCase) -test_schematron()
-(in ETreeISOSchematronTestCase) +test_schematron
+(in lxml.tests) this_dir
(in lxml.tests.test_dtd) -test_extension_element_apply_templates()
+test_extension_element_apply_templates_remove_blank_text()
(in ETreeXSLTExtElementTestCase) -test_schematron()
-(in ETreeSchematronTestCase) +test_schematron()
+(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_elementtree) -test_extension_element_apply_templates_elements_only()
+test_extension_element_apply_templates_target_node()
(in ETreeXSLTExtElementTestCase) -test_schematron_abstract()
-(in ETreeISOSchematronTestCase) +test_schematron()
+(in ETreeSchematronTestCase) this_dir
(in lxml.tests.test_errors) -test_extension_element_apply_templates_remove_blank_text()
+test_extension_element_apply_templates_target_node_doc()
(in ETreeXSLTExtElementTestCase) -test_schematron_assertValid()
+test_schematron_abstract()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_htmlparser) -test_extension_element_apply_templates_target_node()
+test_extension_element_comment_pi_context()
(in ETreeXSLTExtElementTestCase) -test_schematron_call()
+test_schematron_assertValid()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_http_io) -test_extension_element_apply_templates_target_node_doc()
+test_extension_element_content()
(in ETreeXSLTExtElementTestCase) -test_schematron_customization()
+test_schematron_call()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_incremental_xmlfile) -test_extension_element_comment_pi_context()
+test_extension_element_doc_context()
(in ETreeXSLTExtElementTestCase) -test_schematron_elementtree_error()
+test_schematron_customization()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_io) -test_extension_element_content()
+test_extension_element_process_children()
(in ETreeXSLTExtElementTestCase) -test_schematron_elementtree_error()
-(in ETreeSchematronTestCase) +test_schematron_elementtree_error()
+(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_isoschematron) -test_extension_element_doc_context()
+test_extension_element_process_children_to_append_only()
(in ETreeXSLTExtElementTestCase) -test_schematron_empty_pattern()
-(in ETreeISOSchematronTestCase) +test_schematron_elementtree_error()
+(in ETreeSchematronTestCase) this_dir
(in lxml.tests.test_nsclasses) -test_extension_element_process_children()
+test_extension_element_process_children_to_read_only_raise()
(in ETreeXSLTExtElementTestCase) -test_schematron_error_log()
+test_schematron_empty_pattern()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_objectify) -test_extension_element_process_children_to_append_only()
+test_extension_element_process_children_with_subextension_element()
(in ETreeXSLTExtElementTestCase) -test_schematron_fail_on_report()
+test_schematron_error_log()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_pyclasslookup) -test_extension_element_process_children_to_read_only_raise()
+test_extension_element_raise()
(in ETreeXSLTExtElementTestCase) -test_schematron_from_element()
+test_schematron_fail_on_report()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_relaxng) -test_extension_element_process_children_with_subextension_element()
-(in ETreeXSLTExtElementTestCase) -test_schematron_from_file()
+test_extensions1()
+(in ETreeXSLTExtFuncTestCase) +test_schematron_from_element()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_sax) -test_extension_element_raise()
-(in ETreeXSLTExtElementTestCase) -test_schematron_from_tree()
+test_extensions2()
+(in ETreeXSLTExtFuncTestCase) +test_schematron_from_file()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_schematron) -test_extensions1()
-(in ETreeXSLTExtFuncTestCase) -test_schematron_invalid_args()
+test_external_document
+(in lxml.tests) +test_schematron_from_tree()
(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_threading) -test_extensions2()
-(in ETreeXSLTExtFuncTestCase) -test_schematron_invalid_schema()
-(in ETreeSchematronTestCase) +test_external_document_adoption()
+(in ExternalDocumentTestCase) +test_schematron_invalid_args()
+(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_unicode) -test_external_document
-(in lxml.tests) -test_schematron_invalid_schema_empty()
-(in ETreeISOSchematronTestCase) +test_extra_attributes()
+(in DoctestCompareTest) +test_schematron_invalid_schema()
+(in ETreeSchematronTestCase) this_dir
(in lxml.tests.test_xmlschema) -test_external_document_adoption()
-(in ExternalDocumentTestCase) -test_schematron_invalid_schema_empty()
-(in ETreeSchematronTestCase) +test_extra_children()
+(in DoctestCompareTest) +test_schematron_invalid_schema_empty()
+(in ETreeISOSchematronTestCase) this_dir
(in lxml.tests.test_xpathevaluator) -test_extra_attributes()
-(in DoctestCompareTest) -test_schematron_invalid_schema_namespace()
-(in ETreeISOSchematronTestCase) +test_failure_preceding_text()
+(in _XmlFileTestCaseBase) +test_schematron_invalid_schema_empty()
+(in ETreeSchematronTestCase) this_dir
(in lxml.tests.test_xslt) -test_extra_children()
-(in DoctestCompareTest) -test_schematron_invalid_schema_namespace()
-(in ETreeSchematronTestCase) +test_failure_trailing_Element()
+(in _XmlFileTestCaseBase) +test_schematron_invalid_schema_namespace()
+(in ETreeISOSchematronTestCase) ThreadingTestCase
(in lxml.tests.test_threading) -test_failure_preceding_text()
+test_failure_trailing_text()
(in _XmlFileTestCaseBase) -test_schematron_phases()
-(in ETreeISOSchematronTestCase) +test_schematron_invalid_schema_namespace()
+(in ETreeSchematronTestCase) ThreadPipelineTestCase
(in lxml.tests.test_threading) -test_failure_trailing_Element()
-(in _XmlFileTestCaseBase) -test_schematron_phases_kwarg()
+test_feed_parser_bytes()
+(in _ETreeTestCaseBase) +test_schematron_phases()
(in ETreeISOSchematronTestCase) threshold
(in InsensitiveSequenceMatcher) -test_failure_trailing_text()
-(in _XmlFileTestCaseBase) -test_schematron_relaxng_embedded()
+test_feed_parser_error_broken()
+(in _ETreeTestCaseBase) +test_schematron_phases_kwarg()
(in ETreeISOSchematronTestCase) TITLE
(in lxml.html.builder) -test_feed_parser_bytes()
+test_feed_parser_error_close_empty()
(in _ETreeTestCaseBase) -test_schematron_result_report()
+test_schematron_relaxng_embedded()
(in ETreeISOSchematronTestCase) tmpfile()
(in lxml.tests.test_etree) -test_feed_parser_error_broken()
+test_feed_parser_error_close_incomplete()
(in _ETreeTestCaseBase) -test_schematron_store_schematron()
+test_schematron_result_report()
(in ETreeISOSchematronTestCase) toggle()
(in Classes) -test_feed_parser_error_close_empty()
+test_feed_parser_error_position()
(in _ETreeTestCaseBase) -test_schematron_store_xslt()
+test_schematron_store_schematron()
(in ETreeISOSchematronTestCase) token
(in lxml.html.diff) -test_feed_parser_error_close_incomplete()
-(in _ETreeTestCaseBase) -test_schematron_validate()
+test_feed_parser_recover()
+(in ETreeOnlyTestCase) +test_schematron_store_xslt()
(in ETreeISOSchematronTestCase) tokenize()
(in lxml.html.diff) -test_feed_parser_error_position()
-(in _ETreeTestCaseBase) -test_schematron_xmlschema_embedded()
+test_feed_parser_recover_no_id_dict()
+(in ETreeOnlyTestCase) +test_schematron_validate()
(in ETreeISOSchematronTestCase) tokenize_annotated()
(in lxml.html.diff) -test_feed_parser_recover()
-(in ETreeOnlyTestCase) -test_set_decl_html()
-(in HtmlParserTestCase) +test_feed_parser_unicode()
+(in _ETreeTestCaseBase) +test_schematron_xmlschema_embedded()
+(in ETreeISOSchematronTestCase) top_level_tags
(in lxml.html.defs) -test_feed_parser_recover_no_id_dict()
-(in ETreeOnlyTestCase) -test_set_decl_public()
-(in ETreeDtdTestCase) +test_feed_while_iterating()
+(in _XMLPullParserTest) +test_set_decl_html()
+(in HtmlParserTestCase) tostring()
(in XSLT) -test_feed_parser_unicode()
-(in _ETreeTestCaseBase) -test_set_decl_system()
+test_filelike_close()
+(in BytesIOXmlFileTestCase) +test_set_decl_public()
(in ETreeDtdTestCase) tostring()
(in lxml.etree) -test_feed_while_iterating()
-(in _XMLPullParserTest) -test_set_string()
-(in ObjectifyTestCase) +test_filelike_close()
+(in SimpleFileLikeXmlFileTestCase) +test_set_decl_system()
+(in ETreeDtdTestCase) tostringlist()
(in lxml.etree) -test_filelike_close()
-(in BytesIOXmlFileTestCase) -test_set_text()
-(in _ETreeTestCaseBase) +test_filelike_not_closing()
+(in SimpleFileLikeXmlFileTestCase) +test_set_string()
+(in ObjectifyTestCase) tounicode()
(in lxml.etree) -test_filelike_close()
-(in SimpleFileLikeXmlFileTestCase) -test_set_text2()
+test_find()
+(in EtreeElementPathTestCase) +test_set_text()
(in _ETreeTestCaseBase) TR
(in lxml.html.builder) -test_filelike_not_closing()
-(in SimpleFileLikeXmlFileTestCase) -test_set_text_empty()
+test_findall()
+(in _ETreeTestCaseBase) +test_set_text2()
(in _ETreeTestCaseBase) TREE
(in ErrorDomains) -test_find()
-(in EtreeElementPathTestCase) -test_set_text_none()
+test_findall()
+(in ObjectifyTestCase) +test_set_text_empty()
(in _ETreeTestCaseBase) TREE_INVALID_DEC
(in ErrorTypes) -test_findall()
+test_findall_different_nsmaps()
+(in ETreeOnlyTestCase) +test_set_text_none()
(in _ETreeTestCaseBase) -test_setattr()
-(in ObjectifyTestCase) TREE_INVALID_HEX
(in ErrorTypes) -test_findall()
-(in ObjectifyTestCase) -test_setattr_nonunicode()
+test_findall_empty_prefix()
+(in ETreeOnlyTestCase) +test_setattr()
(in ObjectifyTestCase) TREE_NOT_UTF8
(in ErrorTypes) -test_findall_different_nsmaps()
-(in ETreeOnlyTestCase) -test_setitem()
+test_findall_ns()
(in _ETreeTestCaseBase) +test_setattr_nonunicode()
+(in ObjectifyTestCase) TREE_PYTYPE
(in lxml.tests.test_objectify) -test_findall_empty_prefix()
+test_findall_ns()
(in ETreeOnlyTestCase) -test_setitem2()
+test_setitem()
(in _ETreeTestCaseBase) TREE_UNTERMINATED_ENTITY
(in ErrorTypes) -test_findall_ns()
+test_findall_ns()
+(in ObjectifyTestCase) +test_setitem2()
(in _ETreeTestCaseBase) -test_setitem_assert()
-(in ETreeOnlyTestCase) TreeBuilder
(in lxml.etree) -test_findall_ns()
+test_findall_syntax_error()
+(in ETreeOnlyTestCase) +test_setitem_assert()
(in ETreeOnlyTestCase) -test_setitem_indexerror()
-(in _ETreeTestCaseBase) TreeBuilder -test_findall_ns()
-(in ObjectifyTestCase) -test_setitem_replace()
+test_flush()
+(in TempPathXmlFileTestCase) +test_setitem_indexerror()
(in _ETreeTestCaseBase) TT
(in lxml.html.builder) -test_findall_syntax_error()
-(in ETreeOnlyTestCase) -test_setitem_string()
-(in ObjectifyTestCase) +test_flush()
+(in _XmlFileTestCaseBase) +test_setitem_replace()
+(in _ETreeTestCaseBase) type
(in _LogEntry) -test_flush()
-(in TempPathXmlFileTestCase) -test_setitem_string_special()
+test_fromstring()
+(in _ETreeTestCaseBase) +test_setitem_string()
(in ObjectifyTestCase) type
(in InputElement) -test_flush()
-(in _XmlFileTestCaseBase) -test_setitem_tail()
+test_fromstringlist()
(in _ETreeTestCaseBase) +test_setitem_string_special()
+(in ObjectifyTestCase) type_check
(in PyType) -test_fromstring()
+test_fromstringlist_characters()
(in _ETreeTestCaseBase) -test_setslice()
+test_setitem_tail()
(in _ETreeTestCaseBase) type_name
(in _LogEntry) -test_fromstringlist()
-(in _ETreeTestCaseBase) -test_setslice_all()
-(in _ETreeTestCaseBase) -  - - -test_fromstringlist_characters()
+test_fromstringlist_single()
(in _ETreeTestCaseBase) -test_setslice_all_empty()
+test_setslice()
(in _ETreeTestCaseBase)   @@ -3871,7 +3880,7 @@ Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 (in NoneElement) __repr__()
(in token) -_test_getchildren()
-(in _ETreeTestCaseBase) +_test_multiple_extension_elements_with_output_parent()
+(in ETreeXSLTExtElementTestCase) __ne__()
(in NumberElement) __repr__()
(in BoolElement) -_test_multiple_extension_elements_with_output_parent()
-(in ETreeXSLTExtElementTestCase) +_test_pickle()
+(in ObjectifyTestCase) __ne__()
(in StringElement) __repr__()
(in NoneElement) -_test_pickle()
-(in ObjectifyTestCase) +_test_python_error_logging()
+(in ETreeErrorLogTest) __neg__()
(in NumberElement) __repr__()
(in NumberElement) -_test_python_error_logging()
-(in ETreeErrorLogTest) +_test_wrong_unicode_encoding()
+(in _ETreeTestCaseBase) __new__()
(in ElementMaker) __repr__()
(in ObjectifiedDataElement) -_test_wrong_unicode_encoding()
-(in _ETreeTestCaseBase) +_test_xpath_compile_unicode()
+(in ETreeETXPathClassTestCase) __new__()
(in AncestorsIterator) __repr__()
(in PyType) -_test_xpath_compile_unicode()
-(in ETreeETXPathClassTestCase) +_typemap
+(in ElementMaker) __new__()
(in AttributeBasedElementClassLookup) __repr__()
(in StringElement) -_typemap
-(in ElementMaker) +_validation_errors
+(in Schematron) __new__()
(in C14NError) __reversed__()
(in _Element) -_validation_errors
-(in Schematron) +_Validator
+(in lxml.etree) __new__()
(in CDATA) __rlshift__()
(in NumberElement) -_Validator
-(in lxml.etree) +_wrap_et_loader()
+(in lxml.ElementInclude) __new__()
(in CommentBase) __rmod__()
(in NumberElement) -_wrap_et_loader()
-(in lxml.ElementInclude) +_writeElement()
+(in _ETreeTestCaseBase) __new__()
(in CustomElementClassLookup) __rmod__()
(in StringElement) -_writeElement()
-(in _ETreeTestCaseBase) +_writeElement()
+(in ETreeOnlyTestCase) __new__()
(in DTD) __rmul__()
(in NumberElement) -_writeElement()
-(in ETreeOnlyTestCase) +_writeElementFile()
+(in _ETreeTestCaseBase) __new__()
(in DTDError) __rmul__()
(in StringElement) -_writeElementFile()
-(in _ETreeTestCaseBase) +_XIncludeTestCase
+(in lxml.tests.test_etree) __new__()
(in DTDParseError) __ror__()
(in NumberElement) -_XIncludeTestCase
-(in lxml.tests.test_etree) +_xml_schema_root
+(in lxml.isoschematron) __new__()
(in DTDValidateError) __rpow__()
(in NumberElement) -_xml_schema_root
-(in lxml.isoschematron) +_XmlFileTestCaseBase
+(in lxml.tests.test_incremental_xmlfile) __new__()
(in DocInfo) __rrshift__()
(in NumberElement) -_XmlFileTestCaseBase
-(in lxml.tests.test_incremental_xmlfile) +_XMLPullParserTest
+(in lxml.tests.test_elementtree) __new__()
(in DocumentInvalid) __rshift__()
(in NumberElement) -_XMLPullParserTest
-(in lxml.tests.test_elementtree) +_XPathEvaluatorBase
+(in lxml.etree) __new__()
(in ETCompatXMLParser) __rsub__()
(in NumberElement) -_XPathEvaluatorBase
-(in lxml.etree) +_xslt_setup()
+(in ETreeXSLTTestCase) __new__()
(in ETXPath) __rtruediv__()
(in NumberElement) -_xslt_setup()
-(in ETreeXSLTTestCase) +_XSLTProcessingInstruction
+(in lxml.etree) __new__()
(in ElementBase) __rxor__()
(in NumberElement) -_XSLTProcessingInstruction
+_XSLTResultTree
(in lxml.etree) @@ -2026,8 +2026,7 @@ (in ElementChildIterator) __setattr__()
(in ObjectifiedElement) -_XSLTResultTree
-(in lxml.etree)__new__()
@@ -2071,7 +2070,7 @@ Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 E Element factory for generating XML d   - __pyx_capi__ = {'ET': <capsule object "PyObject *" at 0x7f9baf... + __pyx_capi__ = {'ET': <capsule object "PyObject *" at 0x7f6cce... @@ -249,8 +249,8 @@ The E Element factory for generating XML d
Value:
-{'ET': <capsule object "PyObject *" at 0x7f9bafe9da50>,
- 'partial': <capsule object "PyObject *" at 0x7f9bafe9da80>}
+{'ET': <capsule object "PyObject *" at 0x7f6cce0ac270>,
+ 'partial': <capsule object "PyObject *" at 0x7f6cce0ac2a0>}
 
@@ -289,7 +289,7 @@ The E Element factory for generating XML d Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 namespace to the Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 CSSSelector Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 namespaces keyword argument:

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019
Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 want and got. Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 lxml.etree module implements the exten

Version: - 4.3.1 + 4.3.2

@@ -1725,7 +1725,7 @@ standard Python logging package.   - LXML_VERSION = (4, 3, 1, 0) + LXML_VERSION = (4, 3, 2, 0) @@ -1741,13 +1741,13 @@ standard Python logging package.   __pyx_capi__ = {'adoptExternalDocument': <capsule object "stru... @@ -2504,13 +2504,13 @@ function will only set the global error log of the current thread.

Value:
 {'adoptExternalDocument': <capsule object "struct LxmlElementTree *(xm\
-lDoc *, PyObject *, int)" at 0x7f9bb4249f30>,
+lDoc *, PyObject *, int)" at 0x7f6cd29a50c0>,
  'appendChild': <capsule object "void (struct LxmlElement *, struct Lx\
-mlElement *)" at 0x7f9bb425a750>,
+mlElement *)" at 0x7f6cd29a58a0>,
  'appendChildToElement': <capsule object "int (struct LxmlElement *, s\
-truct LxmlElement *)" at 0x7f9bb425a780>,
+truct LxmlElement *)" at 0x7f6cd29a58d0>,
  'attributeValue': <capsule object "PyObject *(xmlNode *, xmlAttr *)" \
-at 0x7f9bb425a420>,
+at 0x7f6cd29a5570>,
 ...
 
@@ -2576,7 +2576,7 @@ at 0x7f9bb425a420>, Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 smart_strings=False.

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019
Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 base_url.

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019
Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 base_url.

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019
Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Element.attrib p Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 error_log property Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019   - filename + filename
+ The file path where the report originated, if any. @@ -224,7 +225,8 @@ object --+   - message + message
+ The log message string. @@ -357,7 +359,7 @@ object --+ Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 <xsl:output> Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 'GET' Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 form.set('novalidate') Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 <option> elemen Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 .value Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 -z0-9%&\?;=~ Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 lxml.etree.

Version: - 4.3.1 + 4.3.2

@@ -1137,7 +1137,7 @@ elements. Pass 'string', for example, to make string values the default.

Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019   - __pyx_capi__ = {'_getNsTag': <capsule object "PyObject *(PyObj... + __pyx_capi__ = {'_getNsTag': <capsule object "PyObject *(PyObj... @@ -282,8 +282,8 @@ c0>}">{'
Value:
-{'_getNsTag': <capsule object "PyObject *(PyObject *)" at 0x7f9baf60e6\
-c0>}
+{'_getNsTag': <capsule object "PyObject *(PyObject *)" at 0x7f6ccdd4ff\
+00>}
 
@@ -322,7 +322,7 @@ c0>} Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 Generated by Epydoc 3.0.1 - on Fri Feb 8 19:32:40 2019 + on Thu Feb 28 20:36:14 2019 tag) 790 self.assertEqual([], result) 791 -
792 - def test_iteration_crash(self): -
793 # this would cause a crash in the past +
793 # this would cause a crash in the past 794 fromstring - 795 root = 795 root = fromstring('<html><p></p>x</html>') + 796 for elem in root: + 797 elem.tail = '' +
798 +
799 - def test_iteration_clear_tail(self): +
800 # this would cause a crash in the past + 801 fromstring = self.etree.etree.fromstring('<html><p></p>x</html>') - 796 for elem in root: - 797 elem.tail = '' -
798 -
799 - def test_iteration_reversed(self): -
800 fromstring + 802 root = fromstring('<html><p></p>x</html>') + 803 for elem in root: + 804 elem.tail = None +
805 +
806 - def test_iteration_reversed(self): +
807 XML = self.XML = self.etree.etree.XML - 801 root = XML + 808 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 802 result = [] - 803 for el in reversed(root): - 804 result.append(el.XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) + 809 result = [] + 810 for el in reversed(root): + 811 result.append(el.tag) - 805 self.assertEqual(['three', 'two', 'one'], result) -
806 -
807 - def test_iteration_subelement(self): -
808 tag) + 812 self.assertEqual(['three', 'two', 'one'], result) +
813 +
814 - def test_iteration_subelement(self): +
815 XML = self.XML = self.etree.etree.XML - 809 - 810 root = XML + 816 + 817 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 811 result = [] - 812 XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) + 818 result = [] + 819 add = True - 813 for el in root: - 814 result.append(el.add = True + 820 for el in root: + 821 result.append(el.tag) - 815 if tag) + 822 if add: - 816 self.add: + 823 self.etree.SubElement(root, 'four') - 817 etree.SubElement(root, 'four') + 824 add = False - 818 self.assertEqual(['one', 'two', 'three', 'four'], result) -
819 -
820 - def test_iteration_del_child(self): -
821 add = False + 825 self.assertEqual(['one', 'two', 'three', 'four'], result) +
826 +
827 - def test_iteration_del_child(self): +
828 XML = self.XML = self.etree.etree.XML - 822 - 823 root = XML + 829 + 830 root = XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) - 824 result = [] - 825 for el in root: - 826 result.append(el.XML(_bytes('<doc><one/><two>Two</two>Hm<three/></doc>')) + 831 result = [] + 832 for el in root: + 833 result.append(el.tag) - 827 del root[-1] - 828 self.assertEqual(['one', 'two'], result) -
829 -
830 - def test_iteration_double(self): -
831 tag) + 834 del root[-1] + 835 self.assertEqual(['one', 'two'], result) +
836 +
837 - def test_iteration_double(self): +
838 XML = self.XML = self.etree.etree.XML - 832 - 833 root = XML + 839 + 840 root = XML(_bytes('<doc><one/><two/></doc>')) - 834 result = [] - 835 for el0 in root: - 836 result.append(el0.XML(_bytes('<doc><one/><two/></doc>')) + 841 result = [] + 842 for el0 in root: + 843 result.append(el0.tag) - 837 for el1 in root: - 838 result.append(el1.tag) + 844 for el1 in root: + 845 result.append(el1.tag) - 839 self.assertEqual(['one','one', 'two', 'two', 'one', 'two'], result) -
840 - 841 required_versions_ET['test_itertext'] = (1,3) -
842 - def test_itertext(self): -
843 # ET 1.3+ - 844 tag) + 846 self.assertEqual(['one','one', 'two', 'two', 'one', 'two'], result) +
847 + 848 required_versions_ET['test_itertext'] = (1,3) +
849 - def test_itertext(self): +
850 # ET 1.3+ + 851 XML = self.XML = self.etree.etree.XML - 845 root = XML + 852 root = XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) - 846 - 847 XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) + 853 + 854 text = list(root.itertext()) - 848 self.assertEqual(["RTEXT", "ATAIL", "CTEXT", "CTAIL"], - 849 text = list(root.itertext()) + 855 self.assertEqual(["RTEXT", "ATAIL", "CTEXT", "CTAIL"], + 856 text) -
850 - 851 required_versions_ET['test_itertext_child'] = (1,3) -
852 - def test_itertext_child(self): -
853 # ET 1.3+ - 854 text) +
857 + 858 required_versions_ET['test_itertext_child'] = (1,3) +
859 - def test_itertext_child(self): +
860 # ET 1.3+ + 861 XML = self.XML = self.etree.etree.XML - 855 root = XML + 862 root = XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) - 856 - 857 XML(_bytes("<root>RTEXT<a></a>ATAIL<b/><c>CTEXT</c>CTAIL</root>")) + 863 + 864 text = list(root[2].itertext()) - 858 self.assertEqual(["CTEXT"], - 859 text = list(root[2].itertext()) + 865 self.assertEqual(["CTEXT"], + 866 text) -
860 -
861 - def test_findall(self): -
862 text) +
867 +
868 - def test_findall(self): +
869 XML = self.XML = self.etree.etree.XML - 863 root = XML + 870 root = XML(_bytes('<a><b><c/></b><b/><c><b/></c></a>')) - 864 self.assertEqual(len(list(root.findall("c"))), 1) - 865 self.assertEqual(len(list(root.findall(".//c"))), 2) - 866 self.assertEqual(len(list(root.findall(".//b"))), 3) - 867 self.assertEqual(len(list(root.findall(".//b"))[0]), 1) - 868 self.assertEqual(len(list(root.findall(".//b"))[1]), 0) - 869 self.assertEqual(len(list(root.findall(".//b"))[2]), 0) -
870 -
871 - def test_findall_ns(self): -
872 XML(_bytes('<a><b><c/></b><b/><c><b/></c></a>')) + 871 self.assertEqual(len(list(root.findall("c"))), 1) + 872 self.assertEqual(len(list(root.findall(".//c"))), 2) + 873 self.assertEqual(len(list(root.findall(".//b"))), 3) + 874 self.assertEqual(len(list(root.findall(".//b"))[0]), 1) + 875 self.assertEqual(len(list(root.findall(".//b"))[1]), 0) + 876 self.assertEqual(len(list(root.findall(".//b"))[2]), 0) +
877 +
878 - def test_findall_ns(self): +
879 XML = self.XML = self.etree.etree.XML - 873 root = XML + 880 root = XML(_bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>')) - 874 self.assertEqual(len(list(root.findall(".//{X}b"))), 2) - 875 self.assertEqual(len(list(root.findall(".//b"))), 3) - 876 self.assertEqual(len(list(root.findall("b"))), 2) -
877 -
879 Element = self.etree.Element - 880 - 881 el = Element('tag', foo='Foo', bar='Bar') - 882 self.assertEqual('Foo', el.attrib['foo']) - 883 self.assertEqual('Bar', el.attrib['bar']) +lxml.tests.test_pyclasslookup.PyClassLookupTestCase.XML" class="py-name" href="#" onclick="return doclink('link-1001', 'XML', 'link-259');">XML(_bytes('<a xmlns:x="X" xmlns:y="Y"><x:b><c/></x:b><b/><c><x:b/><b/></c><b/></a>')) + 881 self.assertEqual(len(list(root.findall(".//{X}b"))), 2) + 882 self.assertEqual(len(list(root.findall(".//b"))), 3) + 883 self.assertEqual(len(list(root.findall("b"))), 2)
884 -
886
886 Element = self. 888 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}) +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1012', 'Element', 'link-43');">Element('tag', foo='Foo', bar='Bar') 889 self.assertEqual('Foo', el.attrib['bar'])
891 -
893
893 Element = self.Element - 894 + 894 895 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, baz='Baz') +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1018', 'Element', 'link-43');">Element('tag', {'foo': 'Foo', 'bar': 'Bar'}) 896 self.assertEqual('Foo', el.attrib['bar']) - 898 self.assertEqual('Baz', el.attrib['baz']) -
899 -
901 898 +
900 Element = self.Element = self.etree.etree.Element - 902 - 903 el = Element + 901 + 902 el = Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, bar='Baz') - 904 self.assertEqual('Foo', el.Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, baz='Baz') + 903 self.assertEqual('Foo', el.attrib['foo']) +xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1025', 'attrib', 'link-317');">attrib['foo']) + 904 self.assertEqual('Bar', el.attrib['bar']) 905 self.assertEqual('Baz', el.attrib['bar']) +xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1027', 'attrib', 'link-317');">attrib['baz'])
906 -
908
908 Element = self. 910 el = Element('tag', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1031', 'Element', 'link-43');">Element('tag', {'foo': 'Foo', 'bar': 'Bar'}, bar='Baz') 911 self.assertEqual('Foo', el.attrib['{ns1}foo']) - 912 self.assertEqual('Bar', el.attrib['foo']) + 912 self.assertEqual('Baz', el.attrib['{ns2}bar']) +xml.etree.ElementTree.Element.attrib" class="py-name" href="#" onclick="return doclink('link-1033', 'attrib', 'link-317');">attrib['bar'])
913 -
915
915 Element = self.Element = self.Element - 916 SubElement = self. 916 + 917 el = Element('tag', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) + 918 self.assertEqual('Foo', el.attrib['{ns1}foo']) + 919 self.assertEqual('Bar', el.attrib['{ns2}bar']) +
920 +
922 Element = self.etree.SubElement - 917 - 918 el = etree.Element('tag') - 919 SubElement(el, 'foo', {'foo':'Foo'}, baz="Baz") - 920 self.assertEqual("Baz", el[0].Element + 923 SubElement = self.etree.SubElement + 924 + 925 el = Element('tag') + 926 SubElement(el, 'foo', {'foo':'Foo'}, baz="Baz") + 927 self.assertEqual("Baz", el[0].attrib['baz']) - 921 self.assertEqual('Foo', el[0].attrib['baz']) + 928 self.assertEqual('Foo', el[0].attrib['foo']) -
922 -
924 attrib['foo']) +
929 +
931 Element = self.Element = self.etree.etree.Element - 925 SubElement = self.Element + 932 SubElement = self.etree.SubElement - 926 - 927 el = etree.SubElement + 933 + 934 el = Element('tag') - 928 SubElement(el, 'foo', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) - 929 self.assertEqual('Foo', el[0].Element('tag') + 935 SubElement(el, 'foo', {'{ns1}foo':'Foo', '{ns2}bar':'Bar'}) + 936 self.assertEqual('Foo', el[0].attrib['{ns1}foo']) - 930 self.assertEqual('Bar', el[0].attrib['{ns1}foo']) + 937 self.assertEqual('Bar', el[0].attrib['{ns2}bar']) -
931 -
932 - def test_write(self): -
933 attrib['{ns2}bar']) +
938 +
939 - def test_write(self): +
940 ElementTree = self.ElementTree = self.etree.etree.ElementTree - 934 ElementTree + 941 XML = self.XML = self.etree.etree.XML - 935 - 936 for i in range(10): - 937 f = BytesIO() - 938 root = XML + 942 + 943 for i in range(10): + 944 f = BytesIO() + 945 root = XML(_bytes('<doc%s>This is a test.</doc%s>' % (i, i))) - 939 tree = XML(_bytes('<doc%s>This is a test.</doc%s>' % (i, i))) + 946 tree = ElementTree(element=root) - 940 tree.write(f) - 941 data = f.getvalue() - 942 self.assertEqual( - 943 _bytes('<doc%s>This is a test.</doc%s>' % (i, i)), - 944 canonicalize(data)) -
945 - 946 required_versions_ET['test_write_method_html'] = (1,3) -
947 - def test_write_method_html(self): -
948 ElementTree(element=root) + 947 tree.write(f) + 948 data = f.getvalue() + 949 self.assertEqual( + 950 _bytes('<doc%s>This is a test.</doc%s>' % (i, i)), + 951 canonicalize(data)) +
952 + 953 required_versions_ET['test_write_method_html'] = (1,3) +
954 - def test_write_method_html(self): +
955 ElementTree = self.ElementTree = self.etree.etree.ElementTree - 949 ElementTree + 956 Element = self.Element = self.etree.etree.Element - 950 SubElement = self.Element + 957 SubElement = self.etree.SubElement - 951 - 952 etree.SubElement + 958 + 959 html = html = Element('html') - 953 body = SubElement(Element('html') + 960 body = SubElement(html, 'body') - 954 p = SubElement(body, 'p') - 955 p.html, 'body') + 961 p = SubElement(body, 'p') + 962 p.text = "html" - 956 SubElement(p, 'br').tail = "test" - 957 - 958 tree = text = "html" + 963 SubElement(p, 'br').tail = "test" + 964 + 965 tree = ElementTree(element=ElementTree(element=html) - 959 f = BytesIO() - 960 tree.write(f, method="html") - 961 data = f.getvalue().replace(_bytes('\n'),_bytes('')) - 962 - 963 self.assertEqual(_bytes('<html><body><p>html<br>test</p></body></html>'), - 964 data) -
965 - 966 required_versions_ET['test_write_method_text'] = (1,3) -
967 - def test_write_method_text(self): -
968 html) + 966 f = BytesIO() + 967 tree.write(f, method="html") + 968 data = f.getvalue().replace(_bytes('\n'),_bytes('')) + 969 + 970 self.assertEqual(_bytes('<html><body><p>html<br>test</p></body></html>'), + 971 data) +
972 + 973 required_versions_ET['test_write_method_text'] = (1,3) +
974 - def test_write_method_text(self): +
975 ElementTree = self.ElementTree = self.etree.etree.ElementTree - 969 ElementTree + 976 Element = self.Element = self.etree.etree.Element - 970 SubElement = self.Element + 977 SubElement = self.etree.SubElement - 971 - 972 a = etree.SubElement + 978 + 979 a = Element('a') - 973 a.Element('a') + 980 a.text = "A" - 974 a.tail = "tail" - 975 b = SubElement(a, 'b') - 976 b.text = "A" + 981 a.tail = "tail" + 982 b = SubElement(a, 'b') + 983 b.text = "B" - 977 b.tail = "TAIL" - 978 c = SubElement(a, 'c') - 979 c.text = "B" + 984 b.tail = "TAIL" + 985 c = SubElement(a, 'c') + 986 c.text = "C" - 980 - 981 tree = ElementTree(element=a) - 982 f = BytesIO() - 983 tree.write(f, method="text") - 984 data = f.getvalue() - 985 - 986 self.assertEqual(_bytes('ABTAILCtail'), - 987 data) -
988 -
989 - def test_write_fail(self): -
990 text = "C" + 987 + 988 tree = ElementTree(element=a) + 989 f = BytesIO() + 990 tree.write(f, method="text") + 991 data = f.getvalue() + 992 + 993 self.assertEqual(_bytes('ABTAILCtail'), + 994 data) +
995 +
996 - def test_write_fail(self): +
997 ElementTree = self.ElementTree = self.etree.etree.ElementTree - 991 ElementTree + 998 XML = self.XML = self.etree.etree.XML - 992 - 993 tree = XML + 999 +1000 tree = ElementTree( ElementTree( XML(_bytes('<doc>This is a test.</doc>')) ) - 994 self.assertRaises(IOError, tree.write, - 995 "definitely////\\-\\nonexisting\\-\\////FILE") -
996 - 997 # this could trigger a crash, apparently because the document - 998 # reference was prematurely garbage collected -
999 - def test_crash(self): -
1000 XML(_bytes('<doc>This is a test.</doc>')) ) +1001 self.assertRaises(IOError, tree.write, +1002 "definitely////\\-\\nonexisting\\-\\////FILE") +
1003 +1004 # this could trigger a crash, apparently because the document +1005 # reference was prematurely garbage collected +
1006 - def test_crash(self): +
1007 Element = self.Element = self.etree.etree.Element -1001 -1002 element = Element +1008 +1009 element = Element('tag') -1003 for i in range(10): -1004 element.Element('tag') +1010 for i in range(10): +1011 element.attrib['key'] = 'value' -1005 attrib['key'] = 'value' +1012 value = element.value = element.attrib['key'] -1006 self.assertEqual(attrib['key'] +1013 self.assertEqual(value, 'value') -
1007 -1008 # from doctest; for some reason this caused crashes too -
1010 value, 'value') +
1014 +1015 # from doctest; for some reason this caused crashes too +
1017 Element = self.Element = self.etree.etree.Element -1011 Element +1018 ElementTree = self.ElementTree = self.etree.etree.ElementTree -1012 -1013 f = BytesIO() -1014 for i in range(10): -1015 element = ElementTree +1019 +1020 f = BytesIO() +1021 for i in range(10): +1022 element = Element('tag%s' % i) -1016 self._check_element(element) -1017 tree = Element('tag%s' % i) +1023 self._check_element(element) +1024 tree = ElementTree(element) -1018 tree.write(f) -1019 self._check_element_tree(tree) -
1020 -
1021 - def test_subelement_reference(self): -
1022 ElementTree(element) +1025 tree.write(f) +1026 self._check_element_tree(tree) +
1027 +
1028 - def test_subelement_reference(self): +
1029 Element = self.Element = self.etree.etree.Element -1023 SubElement = self.Element +1030 SubElement = self.etree.SubElement -1024 -1025 el = Element('foo') -1026 el2 = SubElement(el, 'bar') -1027 el3 = SubElement(el2, 'baz') -1028 -1029 al = etree.SubElement +1031 +1032 el = Element('foo2') -1030 al2 = SubElement(al, 'bar2') -1031 al3 = SubElement(al2, 'baz2') -1032 -1033 # now move al2 into el -1034 el.append(al2) +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1174', 'Element', 'link-43');">Element('foo') +1033 el2 = SubElement(el, 'bar') +1034 el3 = SubElement(el2, 'baz') 1035 -1036 # now change al3 directly -1037 al3.1036 al = Element('foo2') +1037 al2 = SubElement(al, 'bar2') +1038 al3 = SubElement(al2, 'baz2') +1039 +1040 # now move al2 into el +1041 el.append(al2) +1042 +1043 # now change al3 directly +1044 al3.text = 'baz2-modified' -1038 -1039 # it should have changed through this route too -1040 self.assertEqual( -1041 'baz2-modified', -1042 el[1][0].text = 'baz2-modified' +1045 +1046 # it should have changed through this route too +1047 self.assertEqual( +1048 'baz2-modified', +1049 el[1][0].text) -
1043 -
1044 - def test_set_text(self): -
1045 text) +
1050 +
1051 - def test_set_text(self): +
1052 Element = self.Element = self.etree.etree.Element -1046 SubElement = self.Element +1053 SubElement = self.etree.SubElement -1047 -1048 a = etree.SubElement +1054 +1055 a = Element('a') -1049 b = SubElement(a, 'b') -1050 a.Element('a') +1056 b = SubElement(a, 'b') +1057 a.text = 'hoi' -1051 self.assertEqual( -1052 'hoi', -1053 a.text = 'hoi' +1058 self.assertEqual( +1059 'hoi', +1060 a.text) -1054 self.assertEqual( -1055 'b', -1056 a[0].text) +1061 self.assertEqual( +1062 'b', +1063 a[0].tag) -
1057 -
1058 - def test_set_text2(self): -
1059 tag) +
1064 +
1065 - def test_set_text2(self): +
1066 Element = self.Element = self.etree.etree.Element -1060 SubElement = self.Element +1067 SubElement = self.etree.SubElement -1061 -1062 a = etree.SubElement +1068 +1069 a = Element('a') -1063 a.Element('a') +1070 a.text = 'hoi' -1064 b = SubElement(a ,'b') -1065 self.assertEqual( -1066 'hoi', -1067 a.text = 'hoi' +1071 b = SubElement(a ,'b') +1072 self.assertEqual( +1073 'hoi', +1074 a.text) -1068 self.assertEqual( -1069 'b', -1070 a[0].text) +1075 self.assertEqual( +1076 'b', +1077 a[0].tag) -
1071 -
1072 - def test_set_text_none(self): -
1073 tag) +
1078 +
1079 - def test_set_text_none(self): +
1080 Element = self.Element = self.etree.etree.Element -1074 -1075 a = Element +1081 +1082 a = Element('a') -1076 -1077 a.Element('a') +1083 +1084 a.text = 'foo' -1078 a.text = 'foo' +1085 a.text = None -1079 -1080 self.assertEqual( -1081 None, -1082 a.text = None +1086 +1087 self.assertEqual( +1088 None, +1089 a.text) -1083 self.assertXML(_bytes('<a></a>'), a) -
1084 -
1085 - def test_set_text_empty(self): -
1086 text) +1090 self.assertXML(_bytes('<a></a>'), a) +
1091 +
1092 - def test_set_text_empty(self): +
1093 Element = self.Element = self.etree.etree.Element -1087 -1088 a = Element +1094 +1095 a = Element('a') -1089 self.assertEqual(None, a.Element('a') +1096 self.assertEqual(None, a.text) -1090 -1091 a.text) +1097 +1098 a.text = '' -1092 self.assertEqual('', a.text = '' +1099 self.assertEqual('', a.text) -1093 self.assertXML(_bytes('<a></a>'), a) -
1094 -
1095 - def test_tail1(self): -
1096 text) +1100 self.assertXML(_bytes('<a></a>'), a) +
1101 +
1102 - def test_tail1(self): +
1103 Element = self.Element = self.etree.etree.Element -1097 SubElement = self.Element +1104 SubElement = self.etree.SubElement -1098 -1099 a = etree.SubElement +1105 +1106 a = Element('a') -1100 a.tail = 'dag' -1101 self.assertEqual('dag', -1102 a.tail) -1103 b = SubElement(a, 'b') -1104 b.tail = 'hoi' -1105 self.assertEqual('hoi', -1106 b.tail) -1107 self.assertEqual('dag', -1108 a.tail) -
1109 -
1110 - def test_tail_append(self): -
1111 Element('a') +1107 a.tail = 'dag' +1108 self.assertEqual('dag', +1109 a.tail) +1110 b = SubElement(a, 'b') +1111 b.tail = 'hoi' +1112 self.assertEqual('hoi', +1113 b.tail) +1114 self.assertEqual('dag', +1115 a.tail) +
1116 +
1117 - def test_tail_append(self): +
1118 Element = self.Element = self.etree.etree.Element -1112 -1113 a = Element +1119 +1120 a = Element('a') -1114 b = Element('a') +1121 b = Element('b') -1115 b.tail = 'b_tail' -1116 a.append(b) -1117 self.assertEqual('b_tail', -1118 b.tail) -
1119 -
1120 - def test_tail_set_twice(self): -
1121 Element('b') +1122 b.tail = 'b_tail' +1123 a.append(b) +1124 self.assertEqual('b_tail', +1125 b.tail) +
1126 +
1127 - def test_tail_set_twice(self): +
1128 Element = self.Element = self.etree.etree.Element -1122 SubElement = self.Element +1129 SubElement = self.etree.SubElement -1123 -1124 a = etree.SubElement +1130 +1131 a = Element('a') -1125 b = SubElement(a, 'b') -1126 b.tail = 'foo' -1127 b.tail = 'bar' -1128 self.assertEqual('bar', -1129 b.tail) -1130 self.assertXML(_bytes('<a><b></b>bar</a>'), a) -
1131 -
1132 - def test_tail_set_none(self): -
1133 Element('a') +1132 b = SubElement(a, 'b') +1133 b.tail = 'foo' +1134 b.tail = 'bar' +1135 self.assertEqual('bar', +1136 b.tail) +1137 self.assertXML(_bytes('<a><b></b>bar</a>'), a) +
1138 +
1139 - def test_tail_set_none(self): +
1140 Element = self.Element = self.etree.etree.Element -1134 a = Element +1141 a = Element('a') -1135 a.tail = 'foo' -1136 a.tail = None -1137 self.assertEqual( -1138 None, -1139 a.tail) -1140 self.assertXML(_bytes('<a></a>'), a) -
1141 -1142 required_versions_ET['test_extend'] = (1,3) -
1143 - def test_extend(self): -
1144 root = self.Element('a') +1142 a.tail = 'foo' +1143 a.tail = None +1144 self.assertEqual( +1145 None, +1146 a.tail) +1147 self.assertXML(_bytes('<a></a>'), a) +
1148 +1149 required_versions_ET['test_extend'] = (1,3) +
1150 - def test_extend(self): +
1151 root = self.etree.etree.Element('foo') -1145 for i in range(3): -1146 element = self.Element('foo') +1152 for i in range(3): +1153 element = self.etree.SubElement(root, 'a%s' % i) -1147 element.etree.SubElement(root, 'a%s' % i) +1154 element.text = "text%d" % i -1148 element.tail = "tail%d" % i -1149 -1150 elements = [] -1151 for i in range(3): -1152 new_element = self.text = "text%d" % i +1155 element.tail = "tail%d" % i +1156 +1157 elements = [] +1158 for i in range(3): +1159 new_element = self.etree.etree.Element("test%s" % i) -1153 new_element.Element("test%s" % i) +1160 new_element.text = "TEXT%s" % i -1154 new_element.tail = "TAIL%s" % i -1155 elements.append(new_element) -1156 -1157 root.extend(elements) -1158 -1159 self.assertEqual( -1160 ["a0", "a1", "a2", "test0", "test1", "test2"], -1161 [ el.text = "TEXT%s" % i +1161 new_element.tail = "TAIL%s" % i +1162 elements.append(new_element) +1163 +1164 root.extend(elements) +1165 +1166 self.assertEqual( +1167 ["a0", "a1", "a2", "test0", "test1", "test2"], +1168 [ el.tag for el in root ]) -1162 self.assertEqual( -1163 ["text0", "text1", "text2", "TEXT0", "TEXT1", "TEXT2"], -1164 [ el.tag for el in root ]) +1169 self.assertEqual( +1170 ["text0", "text1", "text2", "TEXT0", "TEXT1", "TEXT2"], +1171 [ el.text for el in root ]) -1165 self.assertEqual( -1166 ["tail0", "tail1", "tail2", "TAIL0", "TAIL1", "TAIL2"], -1167 [ el.tail for el in root ]) -
1168 -
1169 - def test_comment(self): -
1170 text for el in root ]) +1172 self.assertEqual( +1173 ["tail0", "tail1", "tail2", "TAIL0", "TAIL1", "TAIL2"], +1174 [ el.tail for el in root ]) +
1175 +
1176 - def test_comment(self): +
1177 Element = self.Element = self.etree.etree.Element -1171 SubElement = self.Element +1178 SubElement = self.etree.SubElement -1172 Comment = self.etree.SubElement +1179 Comment = self.etree.Comment -1173 -1174 a = etree.Comment +1180 +1181 a = Element('a') -1175 a.append(Comment('foo')) -1176 self.assertEqual(a[0].Element('a') +1182 a.append(Comment('foo')) +1183 self.assertEqual(a[0].tag, Comment) -1177 self.assertEqual(a[0].tag, Comment) +1184 self.assertEqual(a[0].text, 'foo') -
1178 -1179 # ElementTree < 1.3 adds whitespace around comments -1180 required_versions_ET['test_comment_text'] = (1,3) -
1181 - def test_comment_text(self): -
1182 text, 'foo') +
1185 +1186 # ElementTree < 1.3 adds whitespace around comments +1187 required_versions_ET['test_comment_text'] = (1,3) +
1188 - def test_comment_text(self): +
1189 Element = self.Element = self.etree.etree.Element -1183 SubElement = self.Element +1190 SubElement = self.etree.SubElement -1184 Comment = self.etree.SubElement +1191 Comment = self.etree.Comment -1185 tostring = self.etree.Comment +1192 tostring = self.etree.tostring -1186 -1187 a = etree.tostring +1193 +1194 a = Element('a') -1188 a.append(Comment('foo')) -1189 self.assertEqual(a[0].Element('a') +1195 a.append(Comment('foo')) +1196 self.assertEqual(a[0].text, 'foo') -1190 -1191 self.assertEqual( -1192 _bytes('<a><!--foo--></a>'), -1193 tostring(a)) -1194 -1195 a[0].text, 'foo') +1197 +1198 self.assertEqual( +1199 _bytes('<a><!--foo--></a>'), +1200 tostring(a)) +1201 +1202 a[0].text = "TEST" -1196 self.assertEqual(a[0].text = "TEST" +1203 self.assertEqual(a[0].text, 'TEST') -1197 -1198 self.assertEqual( -1199 _bytes('<a><!--TEST--></a>'), -1200 tostring(a)) -
1201 -1202 # ElementTree < 1.3 adds whitespace around comments -1203 required_versions_ET['test_comment_whitespace'] = (1,3) -
1204 - def test_comment_whitespace(self): -
1205 text, 'TEST') +1204 +1205 self.assertEqual( +1206 _bytes('<a><!--TEST--></a>'), +1207 tostring(a)) +
1208 +1209 # ElementTree < 1.3 adds whitespace around comments +1210 required_versions_ET['test_comment_whitespace'] = (1,3) +
1211 - def test_comment_whitespace(self): +
1212 Element = self.Element = self.etree.etree.Element -1206 SubElement = self.Element +1213 SubElement = self.etree.SubElement -1207 Comment = self.etree.SubElement +1214 Comment = self.etree.Comment -1208 tostring = self.etree.Comment +1215 tostring = self.etree.tostring -1209 -1210 a = etree.tostring +1216 +1217 a = Element('a') -1211 a.append(Comment(' foo ')) -1212 self.assertEqual(a[0].Element('a') +1218 a.append(Comment(' foo ')) +1219 self.assertEqual(a[0].text, ' foo ') -1213 self.assertEqual( -1214 _bytes('<a><!-- foo --></a>'), -1215 tostring(a)) -
1216 -
1217 - def test_comment_nonsense(self): -
1218 Comment = self.text, ' foo ') +1220 self.assertEqual( +1221 _bytes('<a><!-- foo --></a>'), +1222 tostring(a)) +
1223 +
1224 - def test_comment_nonsense(self): +
1225 Comment = self.etree.Comment -1219 c = Comment('foo') -1220 self.assertEqual({}, c.etree.Comment +1226 c = Comment('foo') +1227 self.assertEqual({}, c.attrib) -1221 self.assertEqual([], list(c.attrib) +1228 self.assertEqual([], list(c.keys())) -1222 self.assertEqual([], list(c.keys())) +1229 self.assertEqual([], list(c.items())) -1223 self.assertEqual(None, c.items())) +1230 self.assertEqual(None, c.get('hoi')) -1224 self.assertEqual(0, len(c)) -1225 # should not iterate -1226 for i in c: -1227 pass -
1228 -
1229 - def test_pi(self): -
1230 # lxml.etree separates target and text -1231 get('hoi')) +1231 self.assertEqual(0, len(c)) +1232 # should not iterate +1233 for i in c: +1234 pass +
1235 +
1236 - def test_pi(self): +
1237 # lxml.etree separates target and text +1238 Element = self.Element = self.etree.etree.Element -1232 SubElement = self.Element +1239 SubElement = self.etree.SubElement -1233 ProcessingInstruction = self.etree.SubElement +1240 ProcessingInstruction = self.etree.ProcessingInstruction -1234 -1235 a = etree.ProcessingInstruction +1241 +1242 a = Element('a') -1236 a.append(ProcessingInstruction('foo', 'some more text')) -1237 self.assertEqual(a[0].Element('a') +1243 a.append(ProcessingInstruction('foo', 'some more text')) +1244 self.assertEqual(a[0].tag, ProcessingInstruction) -1238 self.assertXML(_bytes("<a><?foo some more text?></a>"), -1239 a) -
1240 -
1241 - def test_processinginstruction(self): -
1242 # lxml.etree separates target and text -1243 tag, ProcessingInstruction) +1245 self.assertXML(_bytes("<a><?foo some more text?></a>"), +1246 a) +
1247 +
1248 - def test_processinginstruction(self): +
1249 # lxml.etree separates target and text +1250 Element = self.Element = self.etree.etree.Element -1244 SubElement = self.Element +1251 SubElement = self.etree.SubElement -1245 ProcessingInstruction = self.etree.SubElement +1252 ProcessingInstruction = self.etree.PI -1246 -1247 a = etree.PI +1253 +1254 a = Element('a') -1248 a.append(ProcessingInstruction('foo', 'some more text')) -1249 self.assertEqual(a[0].Element('a') +1255 a.append(ProcessingInstruction('foo', 'some more text')) +1256 self.assertEqual(a[0].tag, ProcessingInstruction) -1250 self.assertXML(_bytes("<a><?foo some more text?></a>"), -1251 a) -
1252 -
1253 - def test_pi_nonsense(self): -
1254 ProcessingInstruction = self.tag, ProcessingInstruction) +1257 self.assertXML(_bytes("<a><?foo some more text?></a>"), +1258 a) +
1259 +
1260 - def test_pi_nonsense(self): +
1261 ProcessingInstruction = self.etree.ProcessingInstruction -1255 pi = ProcessingInstruction('foo') -1256 self.assertEqual({}, pi.etree.ProcessingInstruction +1262 pi = ProcessingInstruction('foo') +1263 self.assertEqual({}, pi.attrib) -1257 self.assertEqual([], list(pi.attrib) +1264 self.assertEqual([], list(pi.keys())) -1258 self.assertEqual([], list(pi.keys())) +1265 self.assertEqual([], list(pi.items())) -1259 self.assertEqual(None, pi.items())) +1266 self.assertEqual(None, pi.get('hoi')) -1260 self.assertEqual(0, len(pi)) -1261 # should not iterate -1262 for i in pi: -1263 pass -
1264 -
1265 - def test_setitem(self): -
1266 get('hoi')) +1267 self.assertEqual(0, len(pi)) +1268 # should not iterate +1269 for i in pi: +1270 pass +
1271 +
1272 - def test_setitem(self): +
1273 Element = self.Element = self.etree.etree.Element -1267 SubElement = self.Element +1274 SubElement = self.etree.SubElement -1268 -1269 a = etree.SubElement +1275 +1276 a = Element('a') -1270 b = SubElement(a, 'b') -1271 c = Element('a') +1277 b = SubElement(a, 'b') +1278 c = Element('c') -1272 a[0] = c -1273 self.assertEqual( -1274 c, -1275 a[0]) -1276 self.assertXML(_bytes('<a><c></c></a>'), -1277 a) -1278 self.assertXML(_bytes('<b></b>'), -1279 b) -
1280 -
1281 - def test_setitem2(self): -
1282 Element('c') +1279 a[0] = c +1280 self.assertEqual( +1281 c, +1282 a[0]) +1283 self.assertXML(_bytes('<a><c></c></a>'), +1284 a) +1285 self.assertXML(_bytes('<b></b>'), +1286 b) +
1287 +
1288 - def test_setitem2(self): +
1289 Element = self.Element = self.etree.etree.Element -1283 SubElement = self.Element +1290 SubElement = self.etree.SubElement -1284 -1285 a = etree.SubElement +1291 +1292 a = Element('a') -1286 for i in range(5): -1287 b = SubElement(a, 'b%s' % i) -1288 c = SubElement(b, 'c') -1289 for i in range(5): -1290 d = Element('a') +1293 for i in range(5): +1294 b = SubElement(a, 'b%s' % i) +1295 c = SubElement(b, 'c') +1296 for i in range(5): +1297 d = Element('d') -1291 e = SubElement(d, 'e') -1292 a[i] = d -1293 self.assertXML( -1294 _bytes('<a><d><e></e></d><d><e></e></d><d><e></e></d><d><e></e></d><d><e></e></d></a>'), -1295 a) -1296 self.assertXML(_bytes('<c></c>'), -1297 c) -
1298 -
1299 - def test_setitem_replace(self): -
1300 Element('d') +1298 e = SubElement(d, 'e') +1299 a[i] = d +1300 self.assertXML( +1301 _bytes('<a><d><e></e></d><d><e></e></d><d><e></e></d><d><e></e></d><d><e></e></d></a>'), +1302 a) +1303 self.assertXML(_bytes('<c></c>'), +1304 c) +
1305 +
1306 - def test_setitem_replace(self): +
1307 Element = self.Element = self.etree.etree.Element -1301 SubElement = self.Element +1308 SubElement = self.etree.SubElement -1302 -1303 a = etree.SubElement +1309 +1310 a = Element('a') -1304 SubElement(a, 'b') -1305 d = Element('a') +1311 SubElement(a, 'b') +1312 d = Element('d') -1306 a[0] = d -1307 self.assertXML(_bytes('<a><d></d></a>'), a) -
1308 -
1309 - def test_setitem_indexerror(self): -
1310 Element('d') +1313 a[0] = d +1314 self.assertXML(_bytes('<a><d></d></a>'), a) +
1315 +
1316 - def test_setitem_indexerror(self): +
1317 Element = self.Element = self.etree.etree.Element -1311 SubElement = self.Element +1318 SubElement = self.etree.SubElement -1312 -1313 a = etree.SubElement +1319 +1320 a = Element('a') -1314 b = SubElement(a, 'b') -1315 -1316 self.assertRaises(IndexError, operator.setitem, a, 1, Element('a') +1321 b = SubElement(a, 'b') +1322 +1323 self.assertRaises(IndexError, operator.setitem, a, 1, Element('c')) -
1317 -
1318 - def test_setitem_tail(self): -
1319 Element('c')) +
1324 +
1325 - def test_setitem_tail(self): +
1326 Element = self.Element = self.etree.etree.Element -1320 SubElement = self.Element +1327 SubElement = self.etree.SubElement -1321 -1322 a = etree.SubElement +1328 +1329 a = Element('a') -1323 b = SubElement(a, 'b') -1324 b.tail = 'B2' -1325 c = Element('a') +1330 b = SubElement(a, 'b') +1331 b.tail = 'B2' +1332 c = Element('c') -1326 c.tail = 'C2' -1327 -1328 a[0] = c -1329 self.assertXML( -1330 _bytes('<a><c></c>C2</a>'), -1331 a) -
1332 -
1333 - def test_tag_write(self): -
1334 Element('c') +1333 c.tail = 'C2' +1334 +1335 a[0] = c +1336 self.assertXML( +1337 _bytes('<a><c></c>C2</a>'), +1338 a) +
1339 +
1340 - def test_tag_write(self): +
1341 Element = self.Element = self.etree.etree.Element -1335 SubElement = self.Element +1342 SubElement = self.etree.SubElement -1336 -1337 a = etree.SubElement +1343 +1344 a = Element('a') -1338 b = SubElement(a, 'b') -1339 -1340 a.Element('a') +1345 b = SubElement(a, 'b') +1346 +1347 a.tag = 'c' -1341 -1342 self.assertEqual( -1343 'c', -1344 a.tag = 'c' +1348 +1349 self.assertEqual( +1350 'c', +1351 a.tag) -1345 -1346 self.assertXML( -1347 _bytes('<c><b></b></c>'), -1348 a) -
1349 -
1350 - def test_tag_reset_ns(self): -
1351 tag) +1352 +1353 self.assertXML( +1354 _bytes('<c><b></b></c>'), +1355 a) +
1356 +
1357 - def test_tag_reset_ns(self): +
1358 Element = self.Element = self.etree.etree.Element -1352 SubElement = self.Element +1359 SubElement = self.etree.SubElement -1353 tostring = self.etree.SubElement +1360 tostring = self.etree.tostring -1354 -1355 a = etree.tostring +1361 +1362 a = Element('{a}a') -1356 b1 = SubElement(a, '{a}b') -1357 b2 = SubElement(a, '{b}b') -1358 -1359 self.assertEqual('{a}b', b1.Element('{a}a') +1363 b1 = SubElement(a, '{a}b') +1364 b2 = SubElement(a, '{b}b') +1365 +1366 self.assertEqual('{a}b', b1.tag) -1360 -1361 b1.tag) +1367 +1368 b1.tag = 'c' -1362 -1363 # can't use C14N here! -1364 self.assertEqual('c', b1.tag = 'c' +1369 +1370 # can't use C14N here! +1371 self.assertEqual('c', b1.tag) -1365 self.assertEqual(_bytes('<c'), tostring(b1)[:2]) -1366 self.assertTrue(_bytes('<c') in tostring(a)) -
1367 -
1368 - def test_tag_reset_root_ns(self): -
1369 tag) +1372 self.assertEqual(_bytes('<c'), tostring(b1)[:2]) +1373 self.assertTrue(_bytes('<c') in tostring(a)) +
1374 +
1375 - def test_tag_reset_root_ns(self): +
1376 Element = self.Element = self.etree.etree.Element -1370 SubElement = self.Element +1377 SubElement = self.etree.SubElement -1371 tostring = self.etree.SubElement +1378 tostring = self.etree.tostring -1372 -1373 a = etree.tostring +1379 +1380 a = Element('{a}a') -1374 b1 = SubElement(a, '{a}b') -1375 b2 = SubElement(a, '{b}b') -1376 -1377 a.Element('{a}a') +1381 b1 = SubElement(a, '{a}b') +1382 b2 = SubElement(a, '{b}b') +1383 +1384 a.tag = 'c' -1378 -1379 self.assertEqual( -1380 'c', -1381 a.tag = 'c' +1385 +1386 self.assertEqual( +1387 'c', +1388 a.tag) -1382 -1383 # can't use C14N here! -1384 self.assertEqual('c', a.tag) +1389 +1390 # can't use C14N here! +1391 self.assertEqual('c', a.tag) -1385 self.assertEqual(_bytes('<c'), tostring(a)[:2]) -
1386 -
1387 - def test_tag_str_subclass(self): -
1388 tag) +1392 self.assertEqual(_bytes('<c'), tostring(a)[:2]) +
1393 +
1394 - def test_tag_str_subclass(self): +
1395 Element = self.Element = self.etree.etree.Element -1389 -1390 class strTest(str): -1391 pass -
1392 -1393 a = Element +1396 +1397 class strTest(str): +1398 pass +
1399 +1400 a = Element("a") -1394 a.Element("a") +1401 a.tag = strTest("TAG") -1395 self.assertXML(_bytes('<TAG></TAG>'), -1396 a) -
1397 -
1398 - def test_delitem(self): -
1399 tag = strTest("TAG") +1402 self.assertXML(_bytes('<TAG></TAG>'), +1403 a) +
1404 +
1405 - def test_delitem(self): +
1406 Element = self.Element = self.etree.etree.Element -1400 SubElement = self.Element +1407 SubElement = self.etree.SubElement -1401 -1402 a = etree.SubElement +1408 +1409 a = Element('a') -1403 b = SubElement(a, 'b') -1404 c = SubElement(a, 'c') -1405 d = SubElement(a, 'd') -1406 -1407 del a[1] -1408 self.assertXML( -1409 _bytes('<a><b></b><d></d></a>'), -1410 a) -1411 -1412 del a[0] -1413 self.assertXML( -1414 _bytes('<a><d></d></a>'), -1415 a) -1416 -1417 del a[0] -1418 self.assertXML( -1419 _bytes('<a></a>'), -1420 a) -1421 # move deleted element into other tree afterwards -1422 other = Element('a') +1410 b = SubElement(a, 'b') +1411 c = SubElement(a, 'c') +1412 d = SubElement(a, 'd') +1413 +1414 del a[1] +1415 self.assertXML( +1416 _bytes('<a><b></b><d></d></a>'), +1417 a) +1418 +1419 del a[0] +1420 self.assertXML( +1421 _bytes('<a><d></d></a>'), +1422 a) +1423 +1424 del a[0] +1425 self.assertXML( +1426 _bytes('<a></a>'), +1427 a) +1428 # move deleted element into other tree afterwards +1429 other = Element('other') -1423 other.append(c) -1424 self.assertXML( -1425 _bytes('<other><c></c></other>'), -1426 other) -
1427 -
1428 - def test_del_insert(self): -
1429 Element('other') +1430 other.append(c) +1431 self.assertXML( +1432 _bytes('<other><c></c></other>'), +1433 other) +
1434 +
1435 - def test_del_insert(self): +
1436 Element = self.Element = self.etree.etree.Element -1430 SubElement = self.Element +1437 SubElement = self.etree.SubElement -1431 -1432 a = etree.SubElement +1438 +1439 a = Element('a') -1433 b = SubElement(a, 'b') -1434 bs = SubElement(b, 'bs') -1435 c = SubElement(a, 'c') -1436 cs = SubElement(c, 'cs') -1437 -1438 el = a[0] -1439 self.assertXML( -1440 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), -1441 a) -1442 self.assertXML(_bytes('<b><bs></bs></b>'), b) -1443 self.assertXML(_bytes('<c><cs></cs></c>'), c) +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1538', 'Element', 'link-43');">Element('a') +1440 b = SubElement(a, 'b') +1441 bs = SubElement(b, 'bs') +1442 c = SubElement(a, 'c') +1443 cs = SubElement(c, 'cs') 1444 -1445 del a[0] +1445 el = a[0] 1446 self.assertXML( -1447 _bytes('<a><c><cs></cs></c></a>'), +1447 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), 1448 a) 1449 self.assertXML(_bytes('<b><bs></bs></b>'), b) 1450 self.assertXML(_bytes('<c><cs></cs></c>'), c) 1451 -1452 a.insert(0, el) -1453 self.assertXML( -1454 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), +1452 del a[0] +1453 self.assertXML( +1454 _bytes('<a><c><cs></cs></c></a>'), 1455 a) -1456 self.assertXML(_bytes('<b><bs></bs></b>'), b) -1457 self.assertXML(_bytes('<c><cs></cs></c>'), c) -
1458 -
1459 - def test_del_setitem(self): -
1460 1456 self.assertXML(_bytes('<b><bs></bs></b>'), b) +1457 self.assertXML(_bytes('<c><cs></cs></c>'), c) +1458 +1459 a.insert(0, el) +1460 self.assertXML( +1461 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), +1462 a) +1463 self.assertXML(_bytes('<b><bs></bs></b>'), b) +1464 self.assertXML(_bytes('<c><cs></cs></c>'), c) +
1465 +
1466 - def test_del_setitem(self): +
1467 Element = self.Element = self.etree.etree.Element -1461 SubElement = self.Element +1468 SubElement = self.etree.SubElement -1462 -1463 a = etree.SubElement +1469 +1470 a = Element('a') -1464 b = SubElement(a, 'b') -1465 bs = SubElement(b, 'bs') -1466 c = SubElement(a, 'c') -1467 cs = SubElement(c, 'cs') -1468 -1469 el = a[0] -1470 del a[0] -1471 a[0] = el -1472 self.assertXML( -1473 _bytes('<a><b><bs></bs></b></a>'), -1474 a) -1475 self.assertXML(_bytes('<b><bs></bs></b>'), b) -1476 self.assertXML(_bytes('<c><cs></cs></c>'), c) -
1477 -
1478 - def test_del_setslice(self): -
1479 Element('a') +1471 b = SubElement(a, 'b') +1472 bs = SubElement(b, 'bs') +1473 c = SubElement(a, 'c') +1474 cs = SubElement(c, 'cs') +1475 +1476 el = a[0] +1477 del a[0] +1478 a[0] = el +1479 self.assertXML( +1480 _bytes('<a><b><bs></bs></b></a>'), +1481 a) +1482 self.assertXML(_bytes('<b><bs></bs></b>'), b) +1483 self.assertXML(_bytes('<c><cs></cs></c>'), c) +
1484 +
1485 - def test_del_setslice(self): +
1486 Element = self.Element = self.etree.etree.Element -1480 SubElement = self.Element +1487 SubElement = self.etree.SubElement -1481 -1482 a = etree.SubElement +1488 +1489 a = Element('a') -1483 b = SubElement(a, 'b') -1484 bs = SubElement(b, 'bs') -1485 c = SubElement(a, 'c') -1486 cs = SubElement(c, 'cs') -1487 -1488 el = a[0] -1489 del a[0] -1490 a[0:0] = [el] -1491 self.assertXML( -1492 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), -1493 a) -1494 self.assertXML(_bytes('<b><bs></bs></b>'), b) -1495 self.assertXML(_bytes('<c><cs></cs></c>'), c) -
1496 -
1497 - def test_replace_slice_tail(self): -
1498 Element('a') +1490 b = SubElement(a, 'b') +1491 bs = SubElement(b, 'bs') +1492 c = SubElement(a, 'c') +1493 cs = SubElement(c, 'cs') +1494 +1495 el = a[0] +1496 del a[0] +1497 a[0:0] = [el] +1498 self.assertXML( +1499 _bytes('<a><b><bs></bs></b><c><cs></cs></c></a>'), +1500 a) +1501 self.assertXML(_bytes('<b><bs></bs></b>'), b) +1502 self.assertXML(_bytes('<c><cs></cs></c>'), c) +
1503 +
1504 - def test_replace_slice_tail(self): +
1505 XML = self.XML = self.etree.etree.XML -1499 a = XML +1506 a = XML(_bytes('<a><b></b>B2<c></c>C2</a>')) -1500 b, c = a -1501 -1502 a[:] = [] -1503 -1504 self.assertEqual("B2", b.tail) -1505 self.assertEqual("C2", c.tail) -
1506 -
1508 XML(_bytes('<a><b></b>B2<c></c>C2</a>')) +1507 b, c = a +1508 +1509 a[:] = [] +1510 +1511 self.assertEqual("B2", b.tail) +1512 self.assertEqual("C2", c.tail) +
1513 +
1515 XML = self.XML = self.etree.etree.XML -1509 root = XML +1516 root = XML(_bytes( -1510 '<foo><bar xmlns:baz="http://huhu"><puh><baz:bump1 /><baz:bump2 /></puh></bar></foo>')) -1511 root[:] = root.findall('.//puh') # delete bar from hierarchy -1512 -1513 # previously, this lost a namespace declaration on bump2 -1514 result = self.XML(_bytes( +1517 '<foo><bar xmlns:baz="http://huhu"><puh><baz:bump1 /><baz:bump2 /></puh></bar></foo>')) +1518 root[:] = root.findall('.//puh') # delete bar from hierarchy +1519 +1520 # previously, this lost a namespace declaration on bump2 +1521 result = self.etree.tostring(root) -1515 foo = self.etree.tostring(root) +1522 foo = self.etree.etree.fromstring(result) -1516 -1517 self.assertEqual('puh', foo[0].fromstring(result) +1523 +1524 self.assertEqual('puh', foo[0].tag) -1518 self.assertEqual('{http://huhu}bump1', foo[0][0].tag) +1525 self.assertEqual('{http://huhu}bump1', foo[0][0].tag) -1519 self.assertEqual('{http://huhu}bump2', foo[0][1].tag) +1526 self.assertEqual('{http://huhu}bump2', foo[0][1].tag) -
1520 -
1521 - def test_delitem_tail(self): -
1522 tag) +
1527 +
1528 - def test_delitem_tail(self): +
1529 ElementTree = self.ElementTree = self.etree.etree.ElementTree -1523 f = BytesIO('<a><b></b>B2<c></c>C2</a>') -1524 doc = ElementTree +1530 f = BytesIO('<a><b></b>B2<c></c>C2</a>') +1531 doc = ElementTree(file=f) -1525 a = doc.getroot() -1526 del a[0] -1527 self.assertXML( -1528 _bytes('<a><c></c>C2</a>'), -1529 a) -
1530 -
1531 - def test_clear(self): -
1532 ElementTree(file=f) +1532 a = doc.getroot() +1533 del a[0] +1534 self.assertXML( +1535 _bytes('<a><c></c>C2</a>'), +1536 a) +
1537 +
1538 - def test_clear(self): +
1539 Element = self.Element = self.etree.etree.Element -1533 -1534 a = Element +1540 +1541 a = Element('a') -1535 a.Element('a') +1542 a.text = 'foo' -1536 a.tail = 'bar' -1537 a.text = 'foo' +1543 a.tail = 'bar' +1544 a.set('hoi', 'dag') -1538 a.set('hoi', 'dag') +1545 a.clear() -1539 self.assertEqual(None, a.clear() +1546 self.assertEqual(None, a.text) -1540 self.assertEqual(None, a.tail) -1541 self.assertEqual(None, a.text) +1547 self.assertEqual(None, a.tail) +1548 self.assertEqual(None, a.get('hoi')) -1542 self.assertEqual('a', a.get('hoi')) +1549 self.assertEqual('a', a.tag) -
1543 -
1544 - def test_clear_sub(self): -
1545 tag) +
1550 +
1551 - def test_clear_sub(self): +
1552 Element = self.Element = self.etree.etree.Element -1546 SubElement = self.Element +1553 SubElement = self.etree.SubElement -1547 -1548 a = etree.SubElement +1554 +1555 a = Element('a') -1549 a.Element('a') +1556 a.text = 'foo' -1550 a.tail = 'bar' -1551 a.text = 'foo' +1557 a.tail = 'bar' +1558 a.set('hoi', 'dag') -1552 b = SubElement(a, 'b') -1553 c = SubElement(b, 'c') -1554 a.set('hoi', 'dag') +1559 b = SubElement(a, 'b') +1560 c = SubElement(b, 'c') +1561 a.clear() -1555 self.assertEqual(None, a.clear() +1562 self.assertEqual(None, a.text) -1556 self.assertEqual(None, a.tail) -1557 self.assertEqual(None, a.text) +1563 self.assertEqual(None, a.tail) +1564 self.assertEqual(None, a.get('hoi')) -1558 self.assertEqual('a', a.get('hoi')) +1565 self.assertEqual('a', a.tag) -1559 self.assertEqual(0, len(a)) -1560 self.assertXML(_bytes('<a></a>'), -1561 a) -1562 self.assertXML(_bytes('<b><c></c></b>'), -1563 b) -
1564 -
1565 - def test_clear_tail(self): -
1566 tag) +1566 self.assertEqual(0, len(a)) +1567 self.assertXML(_bytes('<a></a>'), +1568 a) +1569 self.assertXML(_bytes('<b><c></c></b>'), +1570 b) +
1571 +
1572 - def test_clear_tail(self): +
1573 ElementTree = self.ElementTree = self.etree.etree.ElementTree -1567 f = BytesIO('<a><b></b>B2<c></c>C2</a>') -1568 doc = ElementTree +1574 f = BytesIO('<a><b></b>B2<c></c>C2</a>') +1575 doc = ElementTree(file=f) -1569 a = doc.getroot() -1570 a.ElementTree(file=f) +1576 a = doc.getroot() +1577 a.clear() -1571 self.assertXML( -1572 _bytes('<a></a>'), -1573 a) -
1574 -
1575 - def test_insert(self): -
1576 clear() +1578 self.assertXML( +1579 _bytes('<a></a>'), +1580 a) +
1581 +
1582 - def test_insert(self): +
1583 Element = self.Element = self.etree.etree.Element -1577 SubElement = self.Element +1584 SubElement = self.etree.SubElement -1578 -1579 a = etree.SubElement +1585 +1586 a = Element('a') -1580 b = SubElement(a, 'b') -1581 c = SubElement(a, 'c') -1582 d = Element('a') +1587 b = SubElement(a, 'b') +1588 c = SubElement(a, 'c') +1589 d = Element('d') -1583 a.insert(0, d) -1584 -1585 self.assertEqual( -1586 d, -1587 a[0]) -1588 -1589 self.assertXML( -1590 _bytes('<a><d></d><b></b><c></c></a>'), -1591 a) -1592 -1593 e = Element('d') +1590 a.insert(0, d) +1591 +1592 self.assertEqual( +1593 d, +1594 a[0]) +1595 +1596 self.assertXML( +1597 _bytes('<a><d></d><b></b><c></c></a>'), +1598 a) +1599 +1600 e = Element('e') -1594 a.insert(2, e) -1595 self.assertEqual( -1596 e, -1597 a[2]) -1598 self.assertXML( -1599 _bytes('<a><d></d><b></b><e></e><c></c></a>'), -1600 a) -
1601 -
1602 - def test_insert_name_interning(self): -
1603 # See GH#268 / LP#1773749. -1604 Element('e') +1601 a.insert(2, e) +1602 self.assertEqual( +1603 e, +1604 a[2]) +1605 self.assertXML( +1606 _bytes('<a><d></d><b></b><e></e><c></c></a>'), +1607 a) +
1608 +
1609 - def test_insert_name_interning(self): +
1610 # See GH#268 / LP#1773749. +1611 Element = self.Element = self.etree.etree.Element -1605 SubElement = self.Element +1612 SubElement = self.etree.SubElement -1606 -1607 # Use unique names to make sure they are new in the tag name dict. -1608 import uuid -1609 names = dict((k, 'tag-' + str(uuid.uuid4())) for k in 'abcde') -1610 -1611 a = etree.SubElement +1613 +1614 # Use unique names to make sure they are new in the tag name dict. +1615 import uuid +1616 names = dict((k, 'tag-' + str(uuid.uuid4())) for k in 'abcde') +1617 +1618 a = Element(names['a']) -1612 b = SubElement(a, names['b']) -1613 c = SubElement(a, names['c']) -1614 d = Element(names['a']) +1619 b = SubElement(a, names['b']) +1620 c = SubElement(a, names['c']) +1621 d = Element(names['d']) -1615 a.insert(0, d) -1616 -1617 self.assertEqual( -1618 d, -1619 a[0]) -1620 -1621 self.assertXML( -1622 _bytes('<%(a)s><%(d)s></%(d)s><%(b)s></%(b)s><%(c)s></%(c)s></%(a)s>' % names), -1623 a) -1624 -1625 e = Element(names['d']) +1622 a.insert(0, d) +1623 +1624 self.assertEqual( +1625 d, +1626 a[0]) +1627 +1628 self.assertXML( +1629 _bytes('<%(a)s><%(d)s></%(d)s><%(b)s></%(b)s><%(c)s></%(c)s></%(a)s>' % names), +1630 a) +1631 +1632 e = Element(names['e']) -1626 a.insert(2, e) -1627 self.assertEqual( -1628 e, -1629 a[2]) -1630 self.assertXML( -1631 _bytes('<%(a)s><%(d)s></%(d)s><%(b)s></%(b)s><%(e)s></%(e)s><%(c)s></%(c)s></%(a)s>' % names), -1632 a) -
1633 -
1634 - def test_insert_beyond_index(self): -
1635 Element(names['e']) +1633 a.insert(2, e) +1634 self.assertEqual( +1635 e, +1636 a[2]) +1637 self.assertXML( +1638 _bytes('<%(a)s><%(d)s></%(d)s><%(b)s></%(b)s><%(e)s></%(e)s><%(c)s></%(c)s></%(a)s>' % names), +1639 a) +
1640 +
1641 - def test_insert_beyond_index(self): +
1642 Element = self.Element = self.etree.etree.Element -1636 SubElement = self.Element +1643 SubElement = self.etree.SubElement -1637 -1638 a = etree.SubElement +1644 +1645 a = Element('a') -1639 b = SubElement(a, 'b') -1640 c = Element('a') +1646 b = SubElement(a, 'b') +1647 c = Element('c') -1641 -1642 a.insert(2, c) -1643 self.assertEqual( -1644 c, -1645 a[1]) -1646 self.assertXML( -1647 _bytes('<a><b></b><c></c></a>'), -1648 a) -
1649 -
1650 - def test_insert_negative(self): -
1651 Element('c') +1648 +1649 a.insert(2, c) +1650 self.assertEqual( +1651 c, +1652 a[1]) +1653 self.assertXML( +1654 _bytes('<a><b></b><c></c></a>'), +1655 a) +
1656 +
1657 - def test_insert_negative(self): +
1658 Element = self.Element = self.etree.etree.Element -1652 SubElement = self.Element +1659 SubElement = self.etree.SubElement -1653 -1654 a = etree.SubElement +1660 +1661 a = Element('a') -1655 b = SubElement(a, 'b') -1656 c = SubElement(a, 'c') -1657 -1658 d = Element('a') +1662 b = SubElement(a, 'b') +1663 c = SubElement(a, 'c') +1664 +1665 d = Element('d') -1659 a.insert(-1, d) -1660 self.assertEqual( -1661 d, -1662 a[-2]) -1663 self.assertXML( -1664 _bytes('<a><b></b><d></d><c></c></a>'), -1665 a) -
1666 -
1667 - def test_insert_tail(self): -
1668 Element('d') +1666 a.insert(-1, d) +1667 self.assertEqual( +1668 d, +1669 a[-2]) +1670 self.assertXML( +1671 _bytes('<a><b></b><d></d><c></c></a>'), +1672 a) +
1673 +
1674 - def test_insert_tail(self): +
1675 Element = self.Element = self.etree.etree.Element -1669 SubElement = self.Element +1676 SubElement = self.etree.SubElement -1670 -1671 a = etree.SubElement +1677 +1678 a = Element('a') -1672 b = SubElement(a, 'b') -1673 -1674 c = Element('a') +1679 b = SubElement(a, 'b') +1680 +1681 c = Element('c') -1675 c.tail = 'C2' -1676 -1677 a.insert(0, c) -1678 self.assertXML( -1679 _bytes('<a><c></c>C2<b></b></a>'), -1680 a) -
1681 -
1682 - def test_remove(self): -
1683 Element('c') +1682 c.tail = 'C2' +1683 +1684 a.insert(0, c) +1685 self.assertXML( +1686 _bytes('<a><c></c>C2<b></b></a>'), +1687 a) +
1688 +
1689 - def test_remove(self): +
1690 Element = self.Element = self.etree.etree.Element -1684 SubElement = self.Element +1691 SubElement = self.etree.SubElement -1685 -1686 a = etree.SubElement +1692 +1693 a = Element('a') -1687 b = SubElement(a, 'b') -1688 c = SubElement(a, 'c') -1689 -1690 a.Element('a') +1694 b = SubElement(a, 'b') +1695 c = SubElement(a, 'c') +1696 +1697 a.remove(b) -1691 self.assertEqual( -1692 c, -1693 a[0]) -1694 self.assertXML( -1695 _bytes('<a><c></c></a>'), -1696 a) -
1697 -
1698 - def test_remove_ns(self): -
1699 remove(b) +1698 self.assertEqual( +1699 c, +1700 a[0]) +1701 self.assertXML( +1702 _bytes('<a><c></c></a>'), +1703 a) +
1704 +
1705 - def test_remove_ns(self): +
1706 Element = self.Element = self.etree.etree.Element -1700 SubElement = self.Element +1707 SubElement = self.etree.SubElement -1701 -1702 a = etree.SubElement +1708 +1709 a = Element('{http://test}a') -1703 b = SubElement(a, '{http://test}b') -1704 c = SubElement(a, '{http://test}c') -1705 -1706 a.Element('{http://test}a') +1710 b = SubElement(a, '{http://test}b') +1711 c = SubElement(a, '{http://test}c') +1712 +1713 a.remove(b) -1707 self.assertXML( -1708 _bytes('<ns0:a xmlns:ns0="http://test"><ns0:c></ns0:c></ns0:a>'), -1709 a) -1710 self.assertXML( -1711 _bytes('<ns0:b xmlns:ns0="http://test"></ns0:b>'), -1712 b) -
1713 -
1714 - def test_remove_nonexisting(self): -
1715 remove(b) +1714 self.assertXML( +1715 _bytes('<ns0:a xmlns:ns0="http://test"><ns0:c></ns0:c></ns0:a>'), +1716 a) +1717 self.assertXML( +1718 _bytes('<ns0:b xmlns:ns0="http://test"></ns0:b>'), +1719 b) +
1720 +
1721 - def test_remove_nonexisting(self): +
1722 Element = self.Element = self.etree.etree.Element -1716 SubElement = self.Element +1723 SubElement = self.etree.SubElement -1717 -1718 a = etree.SubElement +1724 +1725 a = Element('a') -1719 b = SubElement(a, 'b') -1720 c = SubElement(a, 'c') -1721 d = Element('a') +1726 b = SubElement(a, 'b') +1727 c = SubElement(a, 'c') +1728 d = Element('d') -1722 self.assertRaises( -1723 ValueError, a.Element('d') +1729 self.assertRaises( +1730 ValueError, a.remove, d) -
1724 -
1725 - def test_remove_tail(self): -
1726 remove, d) +
1731 +
1732 - def test_remove_tail(self): +
1733 Element = self.Element = self.etree.etree.Element -1727 SubElement = self.Element +1734 SubElement = self.etree.SubElement -1728 -1729 a = etree.SubElement +1735 +1736 a = Element('a') -1730 b = SubElement(a, 'b') -1731 b.tail = 'b2' -1732 a.Element('a') +1737 b = SubElement(a, 'b') +1738 b.tail = 'b2' +1739 a.remove(b) -1733 self.assertXML( -1734 _bytes('<a></a>'), -1735 a) -1736 self.assertEqual('b2', b.tail) -
1737 -
1738 - def _test_getchildren(self): -
1739 remove(b) +1740 self.assertXML( +1741 _bytes('<a></a>'), +1742 a) +1743 self.assertEqual('b2', b.tail) +
1744 +
1745 - def test_remove_while_iterating(self): +
1746 # There is no guarantee that this "works", but it should +1747 # remove at least one child and not crash. +1748 Element = self.Element = self.etree.etree.Element -1740 SubElement = self.Element +1749 SubElement = self.etree.SubElement -1741 -1742 a = etree.SubElement +1750 +1751 a = Element('a') -1743 b = SubElement(a, 'b') -1744 c = SubElement(a, 'c') -1745 d = SubElement(b, 'd') -1746 e = SubElement(c, 'e') -1747 self.assertXML( -1748 _bytes('<a><b><d></d></b><c><e></e></c></a>'), -1749 a) -1750 self.assertEqual( -1751 [b, c], -1752 a.getchildren()) -1753 self.assertEqual( -1754 [d], -1755 b.getchildren()) -1756 self.assertEqual( -1757 [], -1758 d.getchildren()) -
1759 -
1760 - def test_makeelement(self): -
1761 Element('a') +1752 SubElement(a, 'b') +1753 SubElement(a, 'c') +1754 SubElement(a, 'd') +1755 for el in a: +1756 a.remove(el) +1757 self.assertLess(len(a), 3) +
1758 +
1759 - def test_getchildren(self): +
1760 Element = self.Element = self.etree.etree.Element +xml.etree.ElementTree.Element" class="py-name" href="#" onclick="return doclink('link-1804', 'Element', 'link-43');">Element +1761 SubElement = self.etree.SubElement 1762 -1763 a = 1763 a = Element('a') -1764 b = a.Element('a') +1764 b = SubElement(a, 'b') +1765 c = SubElement(a, 'c') +1766 d = SubElement(b, 'd') +1767 e = SubElement(c, 'e') +1768 self.assertXML( +1769 _bytes('<a><b><d></d></b><c><e></e></c></a>'), +1770 a) +1771 self.assertEqual( +1772 [b, c], +1773 a.getchildren()) +1774 self.assertEqual( +1775 [d], +1776 b.getchildren()) +1777 self.assertEqual( +1778 [], +1779 d.getchildren()) +
1780 +
1781 - def test_makeelement(self): +
1782 Element = self.etree.Element +1783 +1784 a = Element('a') +1785 b = a.makeelement('c', {'hoi':'dag'}) -1765 self.assertXML( -1766 _bytes('<c hoi="dag"></c>'), -1767 b) -
1768 -1769 required_versions_ET['test_iter'] = (1,3) -
1770 - def test_iter(self): -
1771 makeelement('c', {'hoi':'dag'}) +1786 self.assertXML( +1787 _bytes('<c hoi="dag"></c>'), +1788 b) +
1789 +1790 required_versions_ET['test_iter'] = (1,3) +
1791 - def test_iter(self): +
1792 Element = self.Element = self.etree.etree.Element -1772 SubElement = self.Element +1793 SubElement = self.etree.SubElement -1773 -1774 a = etree.SubElement +1794 +1795 a = Element('a') -1775 b = SubElement(a, 'b') -1776 c = SubElement(a, 'c') -1777 d = SubElement(b, 'd') -1778 e = SubElement(c, 'e') -1779 -1780 self.assertEqual( -1781 [a, b, d, c, e], -1782 list(a.iter())) -1783 self.assertEqual( -1784 [d], -1785 list(d.iter())) -
1786 -
1787 - def test_getiterator(self): -
1788 Element('a') +1796 b = SubElement(a, 'b') +1797 c = SubElement(a, 'c') +1798 d = SubElement(b, 'd') +1799 e = SubElement(c, 'e') +1800 +1801 self.assertEqual( +1802 [a, b, d, c, e], +1803 list(a.iter())) +1804 self.assertEqual( +1805 [d], +1806 list(d.iter())) +
1807 +
1808 - def test_iter_remove_tail(self): +
1809 Element = self.Element = self.etree.etree.Element -1789 SubElement = self.Element +1810 SubElement = self.etree.SubElement -1790 -1791 a = etree.SubElement +1811 +1812 a = Element('a') -1792 b = SubElement(a, 'b') -1793 c = SubElement(a, 'c') -1794 d = SubElement(b, 'd') -1795 e = SubElement(c, 'e') -1796 -1797 self.assertEqual( -1798 [a, b, d, c, e], -1799 list(a.getiterator())) -1800 self.assertEqual( -1801 [d], -1802 list(d.getiterator())) -
1803 -
1804 - def test_getiterator_empty(self): -
1805 Element('a') +1813 a.text = 'a' +1814 a.tail = 'a1' * 100 +1815 b = SubElement(a, 'b') +1816 b.text = 'b' +1817 b.tail = 'b1' * 100 +1818 c = SubElement(a, 'c') +1819 c.text = 'c' +1820 c.tail = 'c1' * 100 +1821 d = SubElement(b, 'd') +1822 d.text = 'd' +1823 d.tail = 'd1' * 100 +1824 e = SubElement(c, 'e') +1825 e.text = 'e' +1826 e.tail = 'e1' * 100 +1827 +1828 for el in a.iter(): +1829 el.tail = None +1830 el = None +1831 +1832 self.assertEqual( +1833 [None] * 5, +1834 [el.tail for el in a.iter()]) +
1835 +
1836 - def test_getiterator(self): +
1837 Element = self.Element = self.etree.etree.Element -1806 SubElement = self.Element +1838 SubElement = self.etree.SubElement -1807 -1808 a = etree.SubElement +1839 +1840 a = Element('a') -1809 b = SubElement(a, 'b') -1810 c = SubElement(a, 'c') -1811 d = SubElement(b, 'd') -1812 e = SubElement(c, 'e') -1813 -1814 self.assertEqual( -1815 [], -1816 list(a.getiterator('none'))) -1817 self.assertEqual( -1818 [], -1819 list(e.getiterator('none'))) -1820 self.assertEqual( -1821 [e], -1822 list(e.getiterator())) -
1823 -
1824 - def test_getiterator_filter(self): -
1825 Element('a') +1841 b = SubElement(a, 'b') +1842 c = SubElement(a, 'c') +1843 d = SubElement(b, 'd') +1844 e = SubElement(c, 'e') +1845 +1846 self.assertEqual( +1847 [a, b, d, c, e], +1848 list(a.getiterator())) +1849 self.assertEqual( +1850 [d], +1851 list(d.getiterator())) +
1852 +
1853 - def test_getiterator_empty(self): +
1854 Element = self.Element = self.etree.etree.Element -1826 SubElement = self.Element +1855 SubElement = self.etree.SubElement -1827 -1828 a = Element('a') -1829 b = SubElement(a, 'b') -1830 c = SubElement(a, 'c') -1831 d = SubElement(b, 'd') -1832 e = SubElement(c, 'e') -1833 -1834 self.assertEqual( -1835 [a], -1836 list(a.getiterator('a'))) -1837 a2 = SubElement(e, 'a') -1838 self.assertEqual( -1839 [a, a2], -1840 list(a.getiterator('a'))) -1841 self.assertEqual( -1842 [a2], -1843 list(c.getiterator('a'))) -
1844 -
1845 - def test_getiterator_filter_all(self): -
1846 etree.SubElement +1856 +1857 a = Element = self.Element('a') +1858 b = SubElement(a, 'b') +1859 c = SubElement(a, 'c') +1860 d = SubElement(b, 'd') +1861 e = SubElement(c, 'e') +1862 +1863 self.assertEqual( +1864 [], +1865 list(a.getiterator('none'))) +1866 self.assertEqual( +1867 [], +1868 list(e.getiterator('none'))) +1869 self.assertEqual( +1870 [e], +1871 list(e.getiterator())) +
1872 +
1873 - def test_getiterator_filter(self): +
1874 Element = self.etree.etree.Element -1847 SubElement = self.Element +1875 SubElement = self.etree.SubElement -1848 -1849 a = etree.SubElement +1876 +1877 a = Element('a') -1850 b = SubElement(a, 'b') -1851 c = SubElement(a, 'c') -1852 d = SubElement(b, 'd') -1853 e = SubElement(c, 'e') -1854 -1855 self.assertEqual( -1856 [a, b, d, c, e], -1857 list(a.getiterator('*'))) -
1858 -
1860 Element('a') +1878 b = SubElement(a, 'b') +1879 c = SubElement(a, 'c') +1880 d = SubElement(b, 'd') +1881 e = SubElement(c, 'e') +1882 +1883 self.assertEqual( +1884 [a], +1885 list(a.getiterator('a'))) +1886 a2 = SubElement(e, 'a') +1887 self.assertEqual( +1888 [a, a2], +1889 list(a.getiterator('a'))) +1890 self.assertEqual( +1891 [a2], +1892 list(c.getiterator('a'))) +
1893 +
1894 - def test_getiterator_filter_all(self): +
1895 Element = self.Element = self.etree.etree.Element -1861 Comment = self.Element +1896 SubElement = self.etree.Comment -1862 SubElement = self.etree.SubElement +1897 +1898 a = Element('a') +1899 b = SubElement(a, 'b') +1900 c = SubElement(a, 'c') +1901 d = SubElement(b, 'd') +1902 e = SubElement(c, 'e') +1903 +1904 self.assertEqual( +1905 [a, b, d, c, e], +1906 list(a.getiterator('*'))) +
1907 +
1909 Element = self.etree.SubElement -1863 -1864 a = etree.Element('a') -1865 b = SubElement(a, 'b') -1866 comment_b = Comment("TEST-b") -1867 b.append(comment_b) -1868 -1869 self.assertEqual( -1870 [comment_b], -1871 list(a.getiterator(Comment))) -1872 -1873 comment_a = Comment("TEST-a") -1874 a.append(comment_a) -1875 -1876 self.assertEqual( -1877 [comment_b, comment_a], -1878 list(a.getiterator(Comment))) -1879 -1880 self.assertEqual( -1881 [comment_b], -1882 list(b.getiterator(Comment))) -
1883 -
1884 - def test_getiterator_filter_pi(self): -
1885 Element +1910 Comment = self.etree.Comment +1911 SubElement = self.etree.SubElement +1912 +1913 a = Element('a') +1914 b = SubElement(a, 'b') +1915 comment_b = Comment("TEST-b") +1916 b.append(comment_b) +1917 +1918 self.assertEqual( +1919 [comment_b], +1920 list(a.getiterator(Comment))) +1921 +1922 comment_a = Comment("TEST-a") +1923 a.append(comment_a) +1924 +1925 self.assertEqual( +1926 [comment_b, comment_a], +1927 list(a.getiterator(Comment))) +1928 +1929 self.assertEqual( +1930 [comment_b], +1931 list(b.getiterator(Comment))) +
1932 +
1933 - def test_getiterator_filter_pi(self): +
1934 Element = self.Element = self.etree.etree.Element -1886 PI = self.Element +1935 PI = self.etree.ProcessingInstruction -1887 SubElement = self.etree.ProcessingInstruction +1936 SubElement = self.etree.SubElement -1888 -1889 a = etree.SubElement +1937 +1938 a = Element('a') -1890 b = SubElement(a, 'b') -1891 pi_b = PI("TEST-b") -1892 b.append(pi_b) -1893 -1894 self.assertEqual( -1895 [pi_b], -1896 list(a.getiterator(PI))) -1897 -1898 pi_a = PI("TEST-a") -1899 a.append(pi_a) -1900 -1901 self.assertEqual( -1902 [pi_b, pi_a], -1903 list(a.getiterator(PI))) -1904 -1905 self.assertEqual( -1906 [pi_b], -1907 list(b.getiterator(PI))) -
1908 -
1909 - def test_getiterator_with_text(self): -
1910 Element('a') +1939 b = SubElement(a, 'b') +1940 pi_b = PI("TEST-b") +1941 b.append(pi_b) +1942 +1943 self.assertEqual( +1944 [pi_b], +1945 list(a.getiterator(PI))) +1946 +1947 pi_a = PI("TEST-a") +1948 a.append(pi_a) +1949 +1950 self.assertEqual( +1951 [pi_b, pi_a], +1952 list(a.getiterator(PI))) +1953 +1954 self.assertEqual( +1955 [pi_b], +1956 list(b.getiterator(PI))) +
1957 +
1958 - def test_getiterator_with_text(self): +
1959 Element = self.Element = self.etree.etree.Element -1911 SubElement = self.Element +1960 SubElement = self.etree.SubElement -1912 -1913 a = etree.SubElement +1961 +1962 a = Element('a') -1914 a.Element('a') +1963 a.text = 'a' -1915 b = SubElement(a, 'b') -1916 b.text = 'a' +1964 b = SubElement(a, 'b') +1965 b.text = 'b' -1917 b.tail = 'b1' -1918 c = SubElement(a, 'c') -1919 c.text = 'b' +1966 b.tail = 'b1' +1967 c = SubElement(a, 'c') +1968 c.text = 'c' -1920 c.tail = 'c1' -1921 d = SubElement(b, 'd') -1922 c.text = 'c' +1969 c.tail = 'c1' +1970 d = SubElement(b, 'd') +1971 d.text = 'd' -1923 c.tail = 'd1' -1924 e = SubElement(c, 'e') -1925 e.text = 'd' +1972 d.tail = 'd1' +1973 e = SubElement(c, 'e') +1974 e.text = 'e' -1926 e.tail = 'e1' -1927 -1928 self.assertEqual( -1929 [a, b, d, c, e], -1930 list(a.getiterator())) -
1931 #self.assertEqual( -1932 # [d], -1933 # list(d.getiterator())) -1934 -
1936 text = 'e' +1975 e.tail = 'e1' +1976 +1977 self.assertEqual( +1978 [a, b, d, c, e], +1979 list(a.getiterator())) +
1980 #self.assertEqual( +1981 # [d], +1982 # list(d.getiterator())) +1983 +
1985 Element = self.Element = self.etree.etree.Element -1937 SubElement = self.Element +1986 SubElement = self.etree.SubElement -1938 -1939 a = etree.SubElement +1987 +1988 a = Element('a') -1940 a.Element('a') +1989 a.text = 'a' -1941 b = SubElement(a, 'b') -1942 b.text = 'a' +1990 b = SubElement(a, 'b') +1991 b.text = 'b' -1943 b.tail = 'b1' -1944 c = SubElement(a, 'c') -1945 c.text = 'b' +1992 b.tail = 'b1' +1993 c = SubElement(a, 'c') +1994 c.text = 'c' -1946 c.tail = 'c1' -1947 d = SubElement(b, 'd') -1948 c.text = 'c' +1995 c.tail = 'c1' +1996 d = SubElement(b, 'd') +1997 d.text = 'd' -1949 c.tail = 'd1' -1950 e = SubElement(c, 'e') -1951 e.text = 'd' +1998 d.tail = 'd1' +1999 e = SubElement(c, 'e') +2000 e.text = 'e' -1952 e.tail = 'e1' -1953 -1954 self.assertEqual( -1955 [a], -1956 list(a.getiterator('a'))) -1957 a2 = SubElement(e, 'a') -1958 self.assertEqual( -1959 [a, a2], -1960 list(a.getiterator('a'))) -1961 self.assertEqual( -1962 [a2], -1963 list(e.getiterator('a'))) -
1964 -
1965 - def test_getslice(self): -
1966 text = 'e' +2001 e.tail = 'e1' +2002 +2003 self.assertEqual( +2004 [a], +2005 list(a.getiterator('a'))) +2006 a2 = SubElement(e, 'a') +2007 self.assertEqual( +2008 [a, a2], +2009 list(a.getiterator('a'))) +2010 self.assertEqual( +2011 [a2], +2012 list(e.getiterator('a'))) +
2013 +
2014 - def test_getslice(self): +
2015 Element = self.Element = self.etree.etree.Element -1967 SubElement = self.Element +2016 SubElement = self.etree.SubElement -1968 -1969 a = etree.SubElement +2017 +2018 a = Element('a') -1970 b = SubElement(a, 'b') -1971 c = SubElement(a, 'c') -1972 d = SubElement(a, 'd') -1973 -1974 self.assertEqual( -1975 [b, c], -1976 a[0:2]) -1977 self.assertEqual( -1978 [b, c, d], -1979 a[:]) -1980 self.assertEqual( -1981 [b, c, d], -1982 a[:10]) -1983 self.assertEqual( -1984 [b], -1985 a[0:1]) -1986 self.assertEqual( -1987 [], -1988 a[10:12]) -
1989 -
1990 - def test_getslice_negative(self): -
1991 Element('a') +2019 b = SubElement(a, 'b') +2020 c = SubElement(a, 'c') +2021 d = SubElement(a, 'd') +2022 +2023 self.assertEqual( +2024 [b, c], +2025 a[0:2]) +2026 self.assertEqual( +2027 [b, c, d], +2028 a[:]) +2029 self.assertEqual( +2030 [b, c, d], +2031 a[:10]) +2032 self.assertEqual( +2033 [b], +2034 a[0:1]) +2035 self.assertEqual( +2036 [], +2037 a[10:12]) +
2038 +
2039 - def test_getslice_negative(self): +
2040 Element = self.Element = self.etree.etree.Element -1992 SubElement = self.Element +2041 SubElement = self.etree.SubElement -1993 -1994 a = etree.SubElement +2042 +2043 a = Element('a') -1995 b = SubElement(a, 'b') -1996 c = SubElement(a, 'c') -1997 d = SubElement(a, 'd') -1998 -1999 self.assertEqual( -2000 [d], -2001 a[-1:]) -2002 self.assertEqual( -2003 [c, d], -2004 a[-2:]) -2005 self.assertEqual( -2006 [c], -2007 a[-2:-1]) -2008 self.assertEqual( -2009 [b, c], -2010 a[-3:-1]) -2011 self.assertEqual( -2012 [b, c], -2013 a[-3:2]) -
2014 -
2015 - def test_getslice_step(self): -
2016 Element('a') +2044 b = SubElement(a, 'b') +2045 c = SubElement(a, 'c') +2046 d = SubElement(a, 'd') +2047 +2048 self.assertEqual( +2049 [d], +2050 a[-1:]) +2051 self.assertEqual( +2052 [c, d], +2053 a[-2:]) +2054 self.assertEqual( +2055 [c], +2056 a[-2:-1]) +2057 self.assertEqual( +2058 [b, c], +2059 a[-3:-1]) +2060 self.assertEqual( +2061 [b, c], +2062 a[-3:2]) +
2063 +
2064 - def test_getslice_step(self): +
2065 Element = self.Element = self.etree.etree.Element -2017 SubElement = self.Element +2066 SubElement = self.etree.SubElement -2018 -2019 a = etree.SubElement +2067 +2068 a = Element('a') -2020 b = SubElement(a, 'b') -2021 c = SubElement(a, 'c') -2022 d = SubElement(a, 'd') -2023 e = SubElement(a, 'e') -2024 -2025 self.assertEqual( -2026 [e,d,c,b], -2027 a[::-1]) -2028 self.assertEqual( -2029 [b,d], -2030 a[::2]) -2031 self.assertEqual( -2032 [e,c], -2033 a[::-2]) -2034 self.assertEqual( -2035 [d,c], -2036 a[-2:0:-1]) -2037 self.assertEqual( -2038 [e], -2039 a[:1:-2]) -
2040 -
2041 - def test_getslice_text(self): -
2042 Element('a') +2069 b = SubElement(a, 'b') +2070 c = SubElement(a, 'c') +2071 d = SubElement(a, 'd') +2072 e = SubElement(a, 'e') +2073 +2074 self.assertEqual( +2075 [e,d,c,b], +2076 a[::-1]) +2077 self.assertEqual( +2078 [b,d], +2079 a[::2]) +2080 self.assertEqual( +2081 [e,c], +2082 a[::-2]) +2083 self.assertEqual( +2084 [d,c], +2085 a[-2:0:-1]) +2086 self.assertEqual( +2087 [e], +2088 a[:1:-2]) +
2089 +
2090 - def test_getslice_text(self): +
2091 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2043 -2044 f = BytesIO('<a><b>B</b>B1<c>C</c>C1</a>') -2045 doc = ElementTree +2092 +2093 f = BytesIO('<a><b>B</b>B1<c>C</c>C1</a>') +2094 doc = ElementTree(file=f) -2046 a = doc.getroot() -2047 b = a[0] -2048 c = a[1] -2049 self.assertEqual( -2050 [b, c], -2051 a[:]) -2052 self.assertEqual( -2053 [b], -2054 a[0:1]) -2055 self.assertEqual( -2056 [c], -2057 a[1:]) -
2058 -
2060 ElementTree(file=f) +2095 a = doc.getroot() +2096 b = a[0] +2097 c = a[1] +2098 self.assertEqual( +2099 [b, c], +2100 a[:]) +2101 self.assertEqual( +2102 [b], +2103 a[0:1]) +2104 self.assertEqual( +2105 [c], +2106 a[1:]) +
2107 +
2109 Element = self.Element = self.etree.etree.Element -2061 Comment = self.Element +2110 Comment = self.etree.Comment -2062 SubElement = self.etree.Comment +2111 SubElement = self.etree.SubElement -2063 -2064 a = etree.SubElement +2112 +2113 a = Element('a') -2065 b = SubElement(a, 'b') -2066 foo = Comment('foo') -2067 a.append(foo) -2068 c = SubElement(a, 'c') -2069 self.assertEqual( -2070 [b, foo, c], -2071 a[:]) -2072 self.assertEqual( -2073 foo, -2074 a[1]) -2075 a[1] = new = Element('a') +2114 b = SubElement(a, 'b') +2115 foo = Comment('foo') +2116 a.append(foo) +2117 c = SubElement(a, 'c') +2118 self.assertEqual( +2119 [b, foo, c], +2120 a[:]) +2121 self.assertEqual( +2122 foo, +2123 a[1]) +2124 a[1] = new = Element('new') -2076 self.assertEqual( -2077 new, -2078 a[1]) -2079 self.assertXML( -2080 _bytes('<a><b></b><new></new><c></c></a>'), -2081 a) -
2082 -
2083 - def test_delslice(self): -
2084 Element('new') +2125 self.assertEqual( +2126 new, +2127 a[1]) +2128 self.assertXML( +2129 _bytes('<a><b></b><new></new><c></c></a>'), +2130 a) +
2131 +
2132 - def test_delslice(self): +
2133 Element = self.Element = self.etree.etree.Element -2085 SubElement = self.Element +2134 SubElement = self.etree.SubElement -2086 -2087 a = etree.SubElement +2135 +2136 a = Element('a') -2088 b = SubElement(a, 'b') -2089 c = SubElement(a, 'c') -2090 d = SubElement(a, 'd') -2091 e = SubElement(a, 'e') -2092 -2093 del a[1:3] -2094 self.assertEqual( -2095 [b, e], -2096 list(a)) -
2097 -
2098 - def test_delslice_negative1(self): -
2099 Element('a') +2137 b = SubElement(a, 'b') +2138 c = SubElement(a, 'c') +2139 d = SubElement(a, 'd') +2140 e = SubElement(a, 'e') +2141 +2142 del a[1:3] +2143 self.assertEqual( +2144 [b, e], +2145 list(a)) +
2146 +
2147 - def test_delslice_negative1(self): +
2148 Element = self.Element = self.etree.etree.Element -2100 SubElement = self.Element +2149 SubElement = self.etree.SubElement -2101 -2102 a = etree.SubElement +2150 +2151 a = Element('a') -2103 b = SubElement(a, 'b') -2104 c = SubElement(a, 'c') -2105 d = SubElement(a, 'd') -2106 e = SubElement(a, 'e') -2107 -2108 del a[1:-1] -2109 self.assertEqual( -2110 [b, e], -2111 list(a)) -
2112 -
2113 - def test_delslice_negative2(self): -
2114 Element('a') +2152 b = SubElement(a, 'b') +2153 c = SubElement(a, 'c') +2154 d = SubElement(a, 'd') +2155 e = SubElement(a, 'e') +2156 +2157 del a[1:-1] +2158 self.assertEqual( +2159 [b, e], +2160 list(a)) +
2161 +
2162 - def test_delslice_negative2(self): +
2163 Element = self.Element = self.etree.etree.Element -2115 SubElement = self.Element +2164 SubElement = self.etree.SubElement -2116 -2117 a = etree.SubElement +2165 +2166 a = Element('a') -2118 b = SubElement(a, 'b') -2119 c = SubElement(a, 'c') -2120 d = SubElement(a, 'd') -2121 e = SubElement(a, 'e') -2122 -2123 del a[-3:-1] -2124 self.assertEqual( -2125 [b, e], -2126 list(a)) -
2127 -
2128 - def test_delslice_step(self): -
2129 Element('a') +2167 b = SubElement(a, 'b') +2168 c = SubElement(a, 'c') +2169 d = SubElement(a, 'd') +2170 e = SubElement(a, 'e') +2171 +2172 del a[-3:-1] +2173 self.assertEqual( +2174 [b, e], +2175 list(a)) +
2176 +
2177 - def test_delslice_step(self): +
2178 Element = self.Element = self.etree.etree.Element -2130 SubElement = self.Element +2179 SubElement = self.etree.SubElement -2131 -2132 a = etree.SubElement +2180 +2181 a = Element('a') -2133 b = SubElement(a, 'b') -2134 c = SubElement(a, 'c') -2135 d = SubElement(a, 'd') -2136 e = SubElement(a, 'e') -2137 -2138 del a[1::2] -2139 self.assertEqual( -2140 [b, d], -2141 list(a)) -
2142 -
2143 - def test_delslice_step_negative(self): -
2144 Element('a') +2182 b = SubElement(a, 'b') +2183 c = SubElement(a, 'c') +2184 d = SubElement(a, 'd') +2185 e = SubElement(a, 'e') +2186 +2187 del a[1::2] +2188 self.assertEqual( +2189 [b, d], +2190 list(a)) +
2191 +
2192 - def test_delslice_step_negative(self): +
2193 Element = self.Element = self.etree.etree.Element -2145 SubElement = self.Element +2194 SubElement = self.etree.SubElement -2146 -2147 a = etree.SubElement +2195 +2196 a = Element('a') -2148 b = SubElement(a, 'b') -2149 c = SubElement(a, 'c') -2150 d = SubElement(a, 'd') -2151 e = SubElement(a, 'e') -2152 -2153 del a[::-1] -2154 self.assertEqual( -2155 [], -2156 list(a)) -
2157 -
2159 Element('a') +2197 b = SubElement(a, 'b') +2198 c = SubElement(a, 'c') +2199 d = SubElement(a, 'd') +2200 e = SubElement(a, 'e') +2201 +2202 del a[::-1] +2203 self.assertEqual( +2204 [], +2205 list(a)) +
2206 +
2208 Element = self.Element = self.etree.etree.Element -2160 SubElement = self.Element +2209 SubElement = self.etree.SubElement -2161 -2162 a = etree.SubElement +2210 +2211 a = Element('a') -2163 b = SubElement(a, 'b') -2164 c = SubElement(a, 'c') -2165 d = SubElement(a, 'd') -2166 e = SubElement(a, 'e') -2167 -2168 del a[::-2] -2169 self.assertEqual( -2170 [b, d], -2171 list(a)) -
2172 -
2173 - def test_delslice_child_tail(self): -
2174 Element('a') +2212 b = SubElement(a, 'b') +2213 c = SubElement(a, 'c') +2214 d = SubElement(a, 'd') +2215 e = SubElement(a, 'e') +2216 +2217 del a[::-2] +2218 self.assertEqual( +2219 [b, d], +2220 list(a)) +
2221 +
2222 - def test_delslice_child_tail(self): +
2223 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2175 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') -2176 doc = ElementTree +2224 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') +2225 doc = ElementTree(file=f) -2177 a = doc.getroot() -2178 del a[1:3] -2179 self.assertXML( -2180 _bytes('<a><b></b>B2<e></e>E2</a>'), -2181 a) -
2182 -
2183 - def test_delslice_tail(self): -
2184 ElementTree(file=f) +2226 a = doc.getroot() +2227 del a[1:3] +2228 self.assertXML( +2229 _bytes('<a><b></b>B2<e></e>E2</a>'), +2230 a) +
2231 +
2232 - def test_delslice_tail(self): +
2233 XML = self.XML = self.etree.etree.XML -2185 a = XML +2234 a = XML(_bytes('<a><b></b>B2<c></c>C2</a>')) -2186 b, c = a -2187 -2188 del a[:] -2189 -2190 self.assertEqual("B2", b.tail) -2191 self.assertEqual("C2", c.tail) -
2192 -
2193 - def test_delslice_memory(self): -
2194 # this could trigger a crash -2195 XML(_bytes('<a><b></b>B2<c></c>C2</a>')) +2235 b, c = a +2236 +2237 del a[:] +2238 +2239 self.assertEqual("B2", b.tail) +2240 self.assertEqual("C2", c.tail) +
2241 +
2242 - def test_delslice_memory(self): +
2243 # this could trigger a crash +2244 Element = self.Element = self.etree.etree.Element -2196 SubElement = self.Element +2245 SubElement = self.etree.SubElement -2197 a = etree.SubElement +2246 a = Element('a') -2198 b = SubElement(a, 'b') -2199 c = SubElement(b, 'c') -2200 del b # no more reference to b -2201 del a[:] -2202 self.assertEqual('c', c.Element('a') +2247 b = SubElement(a, 'b') +2248 c = SubElement(b, 'c') +2249 del b # no more reference to b +2250 del a[:] +2251 self.assertEqual('c', c.tag) -
2203 -
2204 - def test_setslice(self): -
2205 tag) +
2252 +
2253 - def test_setslice(self): +
2254 Element = self.Element = self.etree.etree.Element -2206 SubElement = self.Element +2255 SubElement = self.etree.SubElement -2207 -2208 a = etree.SubElement +2256 +2257 a = Element('a') -2209 b = SubElement(a, 'b') -2210 c = SubElement(a, 'c') -2211 d = SubElement(a, 'd') -2212 -2213 e = Element('a') +2258 b = SubElement(a, 'b') +2259 c = SubElement(a, 'c') +2260 d = SubElement(a, 'd') +2261 +2262 e = Element('e') -2214 f = Element('e') +2263 f = Element('f') -2215 g = Element('f') +2264 g = Element('g') -2216 -2217 s = [e, f, g] -2218 a[1:2] = s -2219 self.assertEqual( -2220 [b, e, f, g, d], -2221 list(a)) -
2222 -
2223 - def test_setslice_all(self): -
2224 Element('g') +2265 +2266 s = [e, f, g] +2267 a[1:2] = s +2268 self.assertEqual( +2269 [b, e, f, g, d], +2270 list(a)) +
2271 +
2272 - def test_setslice_all(self): +
2273 Element = self.Element = self.etree.etree.Element -2225 SubElement = self.Element +2274 SubElement = self.etree.SubElement -2226 -2227 a = etree.SubElement +2275 +2276 a = Element('a') -2228 b = SubElement(a, 'b') -2229 c = SubElement(a, 'c') -2230 -2231 e = Element('a') +2277 b = SubElement(a, 'b') +2278 c = SubElement(a, 'c') +2279 +2280 e = Element('e') -2232 f = Element('e') +2281 f = Element('f') -2233 g = Element('f') +2282 g = Element('g') -2234 -2235 s = [e, f, g] -2236 a[:] = s -2237 self.assertEqual( -2238 [e, f, g], -2239 list(a)) -
2240 -
2241 - def test_setslice_all_empty(self): -
2242 Element('g') +2283 +2284 s = [e, f, g] +2285 a[:] = s +2286 self.assertEqual( +2287 [e, f, g], +2288 list(a)) +
2289 +
2290 - def test_setslice_all_empty(self): +
2291 Element = self.Element = self.etree.etree.Element -2243 SubElement = self.Element +2292 SubElement = self.etree.SubElement -2244 -2245 a = etree.SubElement +2293 +2294 a = Element('a') -2246 -2247 e = Element('a') +2295 +2296 e = Element('e') -2248 f = Element('e') +2297 f = Element('f') -2249 g = Element('f') +2298 g = Element('g') -2250 -2251 s = [e, f, g] -2252 a[:] = s -2253 self.assertEqual( -2254 [e, f, g], -2255 list(a)) -
2256 -
2257 - def test_setslice_all_replace(self): -
2258 Element('g') +2299 +2300 s = [e, f, g] +2301 a[:] = s +2302 self.assertEqual( +2303 [e, f, g], +2304 list(a)) +
2305 +
2306 - def test_setslice_all_replace(self): +
2307 Element = self.Element = self.etree.etree.Element -2259 SubElement = self.Element +2308 SubElement = self.etree.SubElement -2260 -2261 a = etree.SubElement +2309 +2310 a = Element('a') -2262 b = SubElement(a, 'b') -2263 c = SubElement(a, 'c') -2264 d = SubElement(a, 'd') -2265 -2266 s = [b, c, d] -2267 a[:] = s -2268 self.assertEqual( -2269 [b, c, d], -2270 list(a)) -
2271 -
2273 Element('a') +2311 b = SubElement(a, 'b') +2312 c = SubElement(a, 'c') +2313 d = SubElement(a, 'd') +2314 +2315 s = [b, c, d] +2316 a[:] = s +2317 self.assertEqual( +2318 [b, c, d], +2319 list(a)) +
2320 +
2322 Element = self.Element = self.etree.etree.Element -2274 SubElement = self.Element +2323 SubElement = self.etree.SubElement -2275 -2276 a = etree.SubElement +2324 +2325 a = Element('a') -2277 b = SubElement(a, 'b') -2278 c = SubElement(a, 'c') -2279 d = SubElement(a, 'd') -2280 -2281 s = [d, c, b] -2282 a[:] = s -2283 self.assertEqual( -2284 [d, c, b], -2285 list(a)) -
2286 -
2288 Element('a') +2326 b = SubElement(a, 'b') +2327 c = SubElement(a, 'c') +2328 d = SubElement(a, 'd') +2329 +2330 s = [d, c, b] +2331 a[:] = s +2332 self.assertEqual( +2333 [d, c, b], +2334 list(a)) +
2335 +
2337 Element = self.Element = self.etree.etree.Element -2289 SubElement = self.Element +2338 SubElement = self.etree.SubElement -2290 -2291 a = etree.SubElement +2339 +2340 a = Element('{ns}a') -2292 b = SubElement(a, '{ns}b', {'{ns1}a1': 'test'}) -2293 c = SubElement(a, '{ns}c', {'{ns2}a2': 'test'}) -2294 d = SubElement(a, '{ns}d', {'{ns3}a3': 'test'}) -2295 -2296 s = [d, c, b] -2297 a[:] = s -2298 self.assertEqual( -2299 [d, c, b], -2300 list(a)) -2301 self.assertEqual( -2302 ['{ns}d', '{ns}c', '{ns}b'], -2303 [ child.Element('{ns}a') +2341 b = SubElement(a, '{ns}b', {'{ns1}a1': 'test'}) +2342 c = SubElement(a, '{ns}c', {'{ns2}a2': 'test'}) +2343 d = SubElement(a, '{ns}d', {'{ns3}a3': 'test'}) +2344 +2345 s = [d, c, b] +2346 a[:] = s +2347 self.assertEqual( +2348 [d, c, b], +2349 list(a)) +2350 self.assertEqual( +2351 ['{ns}d', '{ns}c', '{ns}b'], +2352 [ child.tag for child in a ]) -2304 -2305 self.assertEqual( -2306 [['{ns3}a3'], ['{ns2}a2'], ['{ns1}a1']], -2307 [ list(child.tag for child in a ]) +2353 +2354 self.assertEqual( +2355 [['{ns3}a3'], ['{ns2}a2'], ['{ns1}a1']], +2356 [ list(child.attrib.attrib.keys()) for child in a ]) -
2308 -
2310 keys()) for child in a ]) +
2357 +
2359 Element = self.Element = self.etree.etree.Element -2311 SubElement = self.Element +2360 SubElement = self.etree.SubElement -2312 -2313 a = etree.SubElement +2361 +2362 a = Element('{ns}a') -2314 b = SubElement(a, '{ns1}b', {'{ns}a1': 'test'}) -2315 c = SubElement(a, '{ns2}c', {'{ns}a2': 'test'}) -2316 d = SubElement(a, '{ns3}d', {'{ns}a3': 'test'}) -2317 -2318 s = [d, c, b] -2319 a[:] = s -2320 self.assertEqual( -2321 [d, c, b], -2322 list(a)) -2323 self.assertEqual( -2324 ['{ns3}d', '{ns2}c', '{ns1}b'], -2325 [ child.Element('{ns}a') +2363 b = SubElement(a, '{ns1}b', {'{ns}a1': 'test'}) +2364 c = SubElement(a, '{ns2}c', {'{ns}a2': 'test'}) +2365 d = SubElement(a, '{ns3}d', {'{ns}a3': 'test'}) +2366 +2367 s = [d, c, b] +2368 a[:] = s +2369 self.assertEqual( +2370 [d, c, b], +2371 list(a)) +2372 self.assertEqual( +2373 ['{ns3}d', '{ns2}c', '{ns1}b'], +2374 [ child.tag for child in a ]) -2326 -2327 self.assertEqual( -2328 [['{ns}a3'], ['{ns}a2'], ['{ns}a1']], -2329 [ list(child.tag for child in a ]) +2375 +2376 self.assertEqual( +2377 [['{ns}a3'], ['{ns}a2'], ['{ns}a1']], +2378 [ list(child.attrib.attrib.keys()) for child in a ]) -
2330 -
2331 - def test_setslice_end(self): -
2332 keys()) for child in a ]) +
2379 +
2380 - def test_setslice_end(self): +
2381 Element = self.Element = self.etree.etree.Element -2333 SubElement = self.Element +2382 SubElement = self.etree.SubElement -2334 -2335 a = etree.SubElement +2383 +2384 a = Element('a') -2336 b = SubElement(a, 'b') -2337 c = SubElement(a, 'c') -2338 -2339 e = Element('a') +2385 b = SubElement(a, 'b') +2386 c = SubElement(a, 'c') +2387 +2388 e = Element('e') -2340 f = Element('e') +2389 f = Element('f') -2341 g = Element('f') +2390 g = Element('g') -2342 h = Element('g') +2391 h = Element('h') -2343 -2344 s = [e, f] -2345 a[99:] = s -2346 self.assertEqual( -2347 [b, c, e, f], -2348 list(a)) -2349 -2350 s = [g, h] -2351 a[:0] = s -2352 self.assertEqual( -2353 [g, h, b, c, e, f], -2354 list(a)) -
2355 -
2356 - def test_setslice_end_exact(self): -
2357 Element('h') +2392 +2393 s = [e, f] +2394 a[99:] = s +2395 self.assertEqual( +2396 [b, c, e, f], +2397 list(a)) +2398 +2399 s = [g, h] +2400 a[:0] = s +2401 self.assertEqual( +2402 [g, h, b, c, e, f], +2403 list(a)) +
2404 +
2405 - def test_setslice_end_exact(self): +
2406 Element = self.Element = self.etree.etree.Element -2358 SubElement = self.Element +2407 SubElement = self.etree.SubElement -2359 -2360 a = etree.SubElement +2408 +2409 a = Element('a') -2361 b = SubElement(a, 'b') -2362 c = SubElement(a, 'c') -2363 d = SubElement(a, 'd') -2364 -2365 e = Element('a') +2410 b = SubElement(a, 'b') +2411 c = SubElement(a, 'c') +2412 d = SubElement(a, 'd') +2413 +2414 e = Element('e') -2366 f = Element('e') +2415 f = Element('f') -2367 g = Element('f') +2416 g = Element('g') -2368 -2369 s = [e, f, g] -2370 a[3:] = s -2371 self.assertEqual( -2372 [b, c, d, e, f, g], -2373 list(a)) -
2374 -
2375 - def test_setslice_single(self): -
2376 Element('g') +2417 +2418 s = [e, f, g] +2419 a[3:] = s +2420 self.assertEqual( +2421 [b, c, d, e, f, g], +2422 list(a)) +
2423 +
2424 - def test_setslice_single(self): +
2425 Element = self.Element = self.etree.etree.Element -2377 SubElement = self.Element +2426 SubElement = self.etree.SubElement -2378 -2379 a = etree.SubElement +2427 +2428 a = Element('a') -2380 b = SubElement(a, 'b') -2381 c = SubElement(a, 'c') -2382 -2383 e = Element('a') +2429 b = SubElement(a, 'b') +2430 c = SubElement(a, 'c') +2431 +2432 e = Element('e') -2384 f = Element('e') +2433 f = Element('f') -2385 -2386 s = [e] -2387 a[0:1] = s -2388 self.assertEqual( -2389 [e, c], -2390 list(a)) -2391 -2392 s = [f] -2393 a[1:2] = s -2394 self.assertEqual( -2395 [e, f], -2396 list(a)) -
2397 -
2398 - def test_setslice_tail(self): -
2399 Element('f') +2434 +2435 s = [e] +2436 a[0:1] = s +2437 self.assertEqual( +2438 [e, c], +2439 list(a)) +2440 +2441 s = [f] +2442 a[1:2] = s +2443 self.assertEqual( +2444 [e, f], +2445 list(a)) +
2446 +
2447 - def test_setslice_tail(self): +
2448 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2400 ElementTree +2449 Element = self.Element = self.etree.etree.Element -2401 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') -2402 doc = Element +2450 f = BytesIO('<a><b></b>B2<c></c>C2<d></d>D2<e></e>E2</a>') +2451 doc = ElementTree(file=f) -2403 a = doc.getroot() -2404 x = ElementTree(file=f) +2452 a = doc.getroot() +2453 x = Element('x') -2405 y = Element('x') +2454 y = Element('y') -2406 z = Element('y') +2455 z = Element('z') -2407 x.tail = 'X2' -2408 y.tail = 'Y2' -2409 z.tail = 'Z2' -2410 a[1:3] = [x, y, z] -2411 self.assertXML( -2412 _bytes('<a><b></b>B2<x></x>X2<y></y>Y2<z></z>Z2<e></e>E2</a>'), -2413 a) -
2414 -
2415 - def test_setslice_negative(self): -
2416 Element('z') +2456 x.tail = 'X2' +2457 y.tail = 'Y2' +2458 z.tail = 'Z2' +2459 a[1:3] = [x, y, z] +2460 self.assertXML( +2461 _bytes('<a><b></b>B2<x></x>X2<y></y>Y2<z></z>Z2<e></e>E2</a>'), +2462 a) +
2463 +
2464 - def test_setslice_negative(self): +
2465 Element = self.Element = self.etree.etree.Element -2417 SubElement = self.Element +2466 SubElement = self.etree.SubElement -2418 -2419 a = etree.SubElement +2467 +2468 a = Element('a') -2420 b = SubElement(a, 'b') -2421 c = SubElement(a, 'c') -2422 d = SubElement(a, 'd') -2423 -2424 x = Element('a') +2469 b = SubElement(a, 'b') +2470 c = SubElement(a, 'c') +2471 d = SubElement(a, 'd') +2472 +2473 x = Element('x') -2425 y = Element('x') +2474 y = Element('y') -2426 -2427 a[1:-1] = [x, y] -2428 self.assertEqual( -2429 [b, x, y, d], -2430 list(a)) -
2431 -
2432 - def test_setslice_negative2(self): -
2433 Element('y') +2475 +2476 a[1:-1] = [x, y] +2477 self.assertEqual( +2478 [b, x, y, d], +2479 list(a)) +
2480 +
2481 - def test_setslice_negative2(self): +
2482 Element = self.Element = self.etree.etree.Element -2434 SubElement = self.Element +2483 SubElement = self.etree.SubElement -2435 -2436 a = etree.SubElement +2484 +2485 a = Element('a') -2437 b = SubElement(a, 'b') -2438 c = SubElement(a, 'c') -2439 d = SubElement(a, 'd') -2440 -2441 x = Element('a') +2486 b = SubElement(a, 'b') +2487 c = SubElement(a, 'c') +2488 d = SubElement(a, 'd') +2489 +2490 x = Element('x') -2442 y = Element('x') +2491 y = Element('y') -2443 -2444 a[1:-2] = [x, y] -2445 self.assertEqual( -2446 [b, x, y, c, d], -2447 list(a)) -
2448 -
2449 - def test_setslice_empty(self): -
2450 Element('y') +2492 +2493 a[1:-2] = [x, y] +2494 self.assertEqual( +2495 [b, x, y, c, d], +2496 list(a)) +
2497 +
2498 - def test_setslice_empty(self): +
2499 Element = self.Element = self.etree.etree.Element -2451 -2452 a = Element +2500 +2501 a = Element('a') -2453 -2454 b = Element('a') +2502 +2503 b = Element('b') -2455 c = Element('b') +2504 c = Element('c') -2456 -2457 a[:] = [b, c] -2458 self.assertEqual( -2459 [b, c], -2460 list(a)) -
2461 -
2462 - def test_tail_elementtree_root(self): -
2463 Element('c') +2505 +2506 a[:] = [b, c] +2507 self.assertEqual( +2508 [b, c], +2509 list(a)) +
2510 +
2511 - def test_tail_elementtree_root(self): +
2512 Element = self.Element = self.etree.etree.Element -2464 Element +2513 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2465 -2466 a = ElementTree +2514 +2515 a = Element('a') -2467 a.tail = 'A2' -2468 t = Element('a') +2516 a.tail = 'A2' +2517 t = ElementTree(element=a) -2469 self.assertEqual('A2', -2470 a.tail) -
2471 -
2473 ElementTree(element=a) +2518 self.assertEqual('A2', +2519 a.tail) +
2520 +
2522 Element = self.Element = self.etree.etree.Element -2474 SubElement = self.Element +2523 SubElement = self.etree.SubElement -2475 etree.SubElement +2524 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2476 -2477 a = ElementTree +2525 +2526 a = Element('a') -2478 b = SubElement(a, 'b') -2479 c = SubElement(a, 'c') -2480 d = SubElement(b, 'd') -2481 e = SubElement(c, 'e') -2482 t = Element('a') +2527 b = SubElement(a, 'b') +2528 c = SubElement(a, 'c') +2529 d = SubElement(b, 'd') +2530 e = SubElement(c, 'e') +2531 t = ElementTree(element=a) -2483 -2484 self.assertEqual( -2485 [a, b, d, c, e], -2486 list(t.getiterator())) -
2487 -
2489 ElementTree(element=a) +2532 +2533 self.assertEqual( +2534 [a, b, d, c, e], +2535 list(t.getiterator())) +
2536 +
2538 Element = self.Element = self.etree.etree.Element -2490 SubElement = self.Element +2539 SubElement = self.etree.SubElement -2491 etree.SubElement +2540 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2492 a = ElementTree +2541 a = Element('a') -2493 b = SubElement(a, 'b') -2494 c = SubElement(a, 'c') -2495 d = SubElement(b, 'd') -2496 e = SubElement(c, 'e') -2497 t = Element('a') +2542 b = SubElement(a, 'b') +2543 c = SubElement(a, 'c') +2544 d = SubElement(b, 'd') +2545 e = SubElement(c, 'e') +2546 t = ElementTree(element=a) -2498 -2499 self.assertEqual( -2500 [a], -2501 list(t.getiterator('a'))) -2502 a2 = SubElement(e, 'a') -2503 self.assertEqual( -2504 [a, a2], -2505 list(t.getiterator('a'))) -
2506 -
2507 - def test_ns_access(self): -
2508 ElementTree(element=a) +2547 +2548 self.assertEqual( +2549 [a], +2550 list(t.getiterator('a'))) +2551 a2 = SubElement(e, 'a') +2552 self.assertEqual( +2553 [a, a2], +2554 list(t.getiterator('a'))) +
2555 +
2556 - def test_ns_access(self): +
2557 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2509 ns = 'http://xml.infrae.com/1' -2510 f = BytesIO('<x:a xmlns:x="%s"><x:b></x:b></x:a>' % ns) -2511 t = ElementTree +2558 ns = 'http://xml.infrae.com/1' +2559 f = BytesIO('<x:a xmlns:x="%s"><x:b></x:b></x:a>' % ns) +2560 t = ElementTree(file=f) -2512 a = t.getroot() -2513 self.assertEqual('{%s}a' % ns, -2514 a.ElementTree(file=f) +2561 a = t.getroot() +2562 self.assertEqual('{%s}a' % ns, +2563 a.tag) -2515 self.assertEqual('{%s}b' % ns, -2516 a[0].tag) +2564 self.assertEqual('{%s}b' % ns, +2565 a[0].tag) -
2517 -
2518 - def test_ns_access2(self): -
2519 tag) +
2566 +
2567 - def test_ns_access2(self): +
2568 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2520 ns = 'http://xml.infrae.com/1' -2521 ns2 = 'http://xml.infrae.com/2' -2522 f = BytesIO('<x:a xmlns:x="%s" xmlns:y="%s"><x:b></x:b><y:b></y:b></x:a>' % (ns, ns2)) -2523 t = ElementTree +2569 ns = 'http://xml.infrae.com/1' +2570 ns2 = 'http://xml.infrae.com/2' +2571 f = BytesIO('<x:a xmlns:x="%s" xmlns:y="%s"><x:b></x:b><y:b></y:b></x:a>' % (ns, ns2)) +2572 t = ElementTree(file=f) -2524 a = t.getroot() -2525 self.assertEqual('{%s}a' % ns, -2526 a.ElementTree(file=f) +2573 a = t.getroot() +2574 self.assertEqual('{%s}a' % ns, +2575 a.tag) -2527 self.assertEqual('{%s}b' % ns, -2528 a[0].tag) +2576 self.assertEqual('{%s}b' % ns, +2577 a[0].tag) -2529 self.assertEqual('{%s}b' % ns2, -2530 a[1].tag) +2578 self.assertEqual('{%s}b' % ns2, +2579 a[1].tag) -
2531 -
2532 - def test_ns_setting(self): -
2533 tag) +
2580 +
2581 - def test_ns_setting(self): +
2582 Element = self.Element = self.etree.etree.Element -2534 SubElement = self.Element +2583 SubElement = self.etree.SubElement -2535 ns = 'http://xml.infrae.com/1' -2536 ns2 = 'http://xml.infrae.com/2' -2537 a = etree.SubElement +2584 ns = 'http://xml.infrae.com/1' +2585 ns2 = 'http://xml.infrae.com/2' +2586 a = Element('{%s}a' % ns) -2538 b = SubElement(a, '{%s}b' % ns2) -2539 c = SubElement(a, '{%s}c' % ns) -2540 self.assertEqual('{%s}a' % ns, -2541 a.Element('{%s}a' % ns) +2587 b = SubElement(a, '{%s}b' % ns2) +2588 c = SubElement(a, '{%s}c' % ns) +2589 self.assertEqual('{%s}a' % ns, +2590 a.tag) -2542 self.assertEqual('{%s}b' % ns2, -2543 b.tag) +2591 self.assertEqual('{%s}b' % ns2, +2592 b.tag) -2544 self.assertEqual('{%s}c' % ns, -2545 c.tag) +2593 self.assertEqual('{%s}c' % ns, +2594 c.tag) -2546 self.assertEqual('{%s}a' % ns, -2547 a.tag) +2595 self.assertEqual('{%s}a' % ns, +2596 a.tag) -2548 self.assertEqual('{%s}b' % ns2, -2549 b.tag) +2597 self.assertEqual('{%s}b' % ns2, +2598 b.tag) -2550 self.assertEqual('{%s}c' % ns, -2551 c.tag) +2599 self.assertEqual('{%s}c' % ns, +2600 c.tag) -
2552 -
2553 - def test_ns_tag_parse(self): -
2554 tag) +
2601 +
2602 - def test_ns_tag_parse(self): +
2603 Element = self.Element = self.etree.etree.Element -2555 SubElement = self.Element +2604 SubElement = self.etree.SubElement -2556 etree.SubElement +2605 ElementTree = self.ElementTree = self.etree.etree.ElementTree -2557 -2558 ns = 'http://xml.infrae.com/1' -2559 ns2 = 'http://xml.infrae.com/2' -2560 f = BytesIO('<a xmlns="%s" xmlns:x="%s"><x:b></x:b><b></b></a>' % (ns, ns2)) -2561 t = ElementTree +2606 +2607 ns = 'http://xml.infrae.com/1' +2608 ns2 = 'http://xml.infrae.com/2' +2609 f = BytesIO('<a xmlns="%s" xmlns:x="%s"><x:b></x:b><b></b></a>' % (ns, ns2)) +2610 t = ElementTree(file=f) -2562 -2563 a = t.getroot() -2564 self.assertEqual('{%s}a' % ns, -2565 a.ElementTree(file=f) +2611 +2612 a = t.getroot() +2613 self.assertEqual('{%s}a' % ns, +2614 a.tag) -2566 self.assertEqual('{%s}b' % ns2, -2567 a[0].tag) +2615 self.assertEqual('{%s}b' % ns2, +2616 a[0].tag) -2568 self.assertEqual('{%s}b' % ns, -2569 a[1].tag) +2617 self.assertEqual('{%s}b' % ns, +2618 a[1].tag) -
2570 -
2571 - def test_ns_attr(self): -
2572 tag) +
2619 +
2620 - def test_ns_attr(self): +
2621 Element = self.Element = self.etree.etree.Element -2573 ns = 'http://xml.infrae.com/1' -2574 ns2 = 'http://xml.infrae.com/2' -2575 a = Element +2622 ns = 'http://xml.infrae.com/1' +2623 ns2 = 'http://xml.infrae.com/2' +2624 a = Element('a') -2576 a.Element('a') +2625 a.set('{%s}foo' % ns, 'Foo') -2577 a.set('{%s}foo' % ns, 'Foo') +2626 a.set('{%s}bar' % ns2, 'Bar') -2578 self.assertEqual( -2579 'Foo', -2580 a.set('{%s}bar' % ns2, 'Bar') +2627 self.assertEqual( +2628 'Foo', +2629 a.get('{%s}foo' % ns)) -2581 self.assertEqual( -2582 'Bar', -2583 a.get('{%s}foo' % ns)) +2630 self.assertEqual( +2631 'Bar', +2632 a.get('{%s}bar' % ns2)) -2584 try: -2585 self.assertXML( -2586 _bytes('<a xmlns:ns0="%s" xmlns:ns1="%s" ns0:foo="Foo" ns1:bar="Bar"></a>' % (ns, ns2)), -2587 a) -2588 except AssertionError: -2589 self.assertXML( -2590 _bytes('<a xmlns:ns0="%s" xmlns:ns1="%s" ns1:foo="Foo" ns0:bar="Bar"></a>' % (ns2, ns)), -2591 a) -
2592 -
2593 - def test_ns_move(self): -
2594 get('{%s}bar' % ns2)) +2633 try: +2634 self.assertXML( +2635 _bytes('<a xmlns:ns0="%s" xmlns:ns1="%s" ns0:foo="Foo" ns1:bar="Bar"></a>' % (ns, ns2)), +2636 a) +2637 except AssertionError: +2638 self.assertXML( +2639 _bytes('<a xmlns:ns0="%s" xmlns:ns1="%s" ns1:foo="Foo" ns0:bar="Bar"></a>' % (ns2, ns)), +2640 a) +
2641 +
2642 - def test_ns_move(self): +
2643 Element = self.Element = self.etree.etree.Element -2595 one = self.Element +2644 one = self.etree.etree.fromstring( -2596 _bytes('<foo><bar xmlns:ns="http://a.b.c"><ns:baz/></bar></foo>')) -2597 baz = one[0][0] -2598 -2599 two = Element('root') -2600 two.append(baz) -2601 # removing the originating document could cause a crash/error before -2602 # as namespace is not moved along with it -2603 del one, baz -2604 self.assertEqual('{http://a.b.c}baz', two[0].fromstring( +2645 _bytes('<foo><bar xmlns:ns="http://a.b.c"><ns:baz/></bar></foo>')) +2646 baz = one[0][0] +2647 +2648 two = Element('root') +2649 two.append(baz) +2650 # removing the originating document could cause a crash/error before +2651 # as namespace is not moved along with it +2652 del one, baz +2653 self.assertEqual('{http://a.b.c}baz', two[0].tag) -
2605 -
2606 - def test_ns_decl_tostring(self): -
2607 tostring = self.tag) +
2654 +
2655 - def test_ns_decl_tostring(self): +
2656 tostring = self.etree.tostring -2608 root = self.etree.tostring +2657 root = self.etree.etree.XML( -2609 _bytes('<foo><bar xmlns:ns="http://a.b.c"><ns:baz/></bar></foo>')) -2610 baz = root[0][0] -2611 -2612 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), -2613 tostring(baz)) -2614 self.assertEqual([_bytes("http://a.b.c")], nsdecl) -
2615 -
2617 tostring = self.XML( +2658 _bytes('<foo><bar xmlns:ns="http://a.b.c"><ns:baz/></bar></foo>')) +2659 baz = root[0][0] +2660 +2661 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), +2662 tostring(baz)) +2663 self.assertEqual([_bytes("http://a.b.c")], nsdecl) +
2664 +
2666 tostring = self.etree.tostring -2618 root = self.etree.tostring +2667 root = self.etree.etree.XML( -2619 _bytes('<foo><bar xmlns="http://a.b.c"><baz/></bar></foo>')) -2620 baz = root[0][0] -2621 -2622 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), -2623 tostring(baz)) -2624 self.assertEqual([_bytes("http://a.b.c")], nsdecl) -
2625 -
2626 - def test_ns_decl_tostring_root(self): -
2627 tostring = self.XML( +2668 _bytes('<foo><bar xmlns="http://a.b.c"><baz/></bar></foo>')) +2669 baz = root[0][0] +2670 +2671 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), +2672 tostring(baz)) +2673 self.assertEqual([_bytes("http://a.b.c")], nsdecl) +
2674 +
2675 - def test_ns_decl_tostring_root(self): +
2676 tostring = self.etree.tostring -2628 root = self.etree.tostring +2677 root = self.etree.etree.XML( -2629 _bytes('<foo xmlns:ns="http://a.b.c"><bar><ns:baz/></bar></foo>')) -2630 baz = root[0][0] -2631 -2632 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), -2633 tostring(baz)) -2634 -2635 self.assertEqual([_bytes("http://a.b.c")], nsdecl) -
2636 -
2638 XML( +2678 _bytes('<foo xmlns:ns="http://a.b.c"><bar><ns:baz/></bar></foo>')) +2679 baz = root[0][0] +2680 +2681 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), +2682 tostring(baz)) +2683 +2684 self.assertEqual([_bytes("http://a.b.c")], nsdecl) +
2685 +
2687 Element = self.Element = self.etree.etree.Element -2639 SubElement = self.Element +2688 SubElement = self.etree.SubElement -2640 -2641 root = etree.SubElement +2689 +2690 root = Element("foo") -2642 bar = SubElement(root, "{http://a.b.c}bar") -2643 baz = SubElement(bar, "{http://a.b.c}baz") -2644 -2645 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), -2646 self.Element("foo") +2691 bar = SubElement(root, "{http://a.b.c}bar") +2692 baz = SubElement(bar, "{http://a.b.c}baz") +2693 +2694 nsdecl = re.findall(_bytes("xmlns(?::[a-z0-9]+)?=[\"']([^\"']+)[\"']"), +2695 self.etree.tostring(baz)) -2647 -2648 self.assertEqual([_bytes("http://a.b.c")], nsdecl) -
2649 -
2650 - def test_attribute_xmlns_move(self): -
2651 etree.tostring(baz)) +2696 +2697 self.assertEqual([_bytes("http://a.b.c")], nsdecl) +
2698 +
2699 - def test_attribute_xmlns_move(self): +
2700 Element = self.Element = self.etree.etree.Element -2652 -2653 root = Element +2701 +2702 root = Element('element') -2654 -2655 subelement = Element('element') +2703 +2704 subelement = Element('subelement', -2656 {"{http://www.w3.org/XML/1998/namespace}id": "foo"}) -2657 self.assertEqual(1, len(subelement.Element('subelement', +2705 {"{http://www.w3.org/XML/1998/namespace}id": "foo"}) +2706 self.assertEqual(1, len(subelement.attrib)) -2658 self.assertEqual( -2659 "foo", -2660 subelement.attrib)) +2707 self.assertEqual( +2708 "foo", +2709 subelement.get("{http://www.w3.org/XML/1998/namespace}id")) -2661 -2662 root.append(subelement) -2663 self.assertEqual(1, len(subelement.get("{http://www.w3.org/XML/1998/namespace}id")) +2710 +2711 root.append(subelement) +2712 self.assertEqual(1, len(subelement.attrib)) -2664 self.assertEqual( -2665 list({"{http://www.w3.org/XML/1998/namespace}id" : "foo"}.attrib)) +2713 self.assertEqual( +2714 list({"{http://www.w3.org/XML/1998/namespace}id" : "foo"}.items()), -2666 list(subelement.items()), +2715 list(subelement.attrib.attrib.items())) -2667 self.assertEqual( -2668 "foo", -2669 subelement.items())) +2716 self.assertEqual( +2717 "foo", +2718 subelement.get("{http://www.w3.org/XML/1998/namespace}id")) -
2670 -
2672 get("{http://www.w3.org/XML/1998/namespace}id")) +
2719 +
2721 parse = self.parse = self.etree.etree.parse -2673 tostring = self.parse +2722 tostring = self.etree.tostring -2674 -2675 ns_href = "http://a.b.c" -2676 one = etree.tostring +2723 +2724 ns_href = "http://a.b.c" +2725 one = parse( -2677 BytesIO('<foo><bar xmlns:ns="%s"><ns:baz/></bar></foo>' % ns_href)) -2678 baz = one.getroot()[0][0] -2679 -2680 parsed = parse( +2726 BytesIO('<foo><bar xmlns:ns="%s"><ns:baz/></bar></foo>' % ns_href)) +2727 baz = one.getroot()[0][0] +2728 +2729 parsed = parse(BytesIO( tostring(baz) )).getroot() -2681 self.assertEqual('{%s}baz' % ns_href, parsed.parse(BytesIO( tostring(baz) )).getroot() +2730 self.assertEqual('{%s}baz' % ns_href, parsed.tag) -
2682 -
2684 tag) +
2731 +
2733 fromstring = self.fromstring = self.etree.etree.fromstring -2685 tostring = self.fromstring +2734 tostring = self.etree.tostring -2686 -2687 ns_href = "http://a.b.c" -2688 xml = _bytes('<root xmlns="%s" xmlns:x="%s"><el x:a="test" /></root>' % ( -2689 ns_href,ns_href)) -2690 root = etree.tostring +2735 +2736 ns_href = "http://a.b.c" +2737 xml = _bytes('<root xmlns="%s" xmlns:x="%s"><el x:a="test" /></root>' % ( +2738 ns_href,ns_href)) +2739 root = fromstring(xml) -2691 self.assertEqual('test', root[0].fromstring(xml) +2740 self.assertEqual('test', root[0].get('{%s}a' % ns_href)) -2692 -2693 xml2 = tostring(root) -2694 self.assertTrue(_bytes(':a=') in xml2, xml2) -2695 -2696 root2 = get('{%s}a' % ns_href)) +2741 +2742 xml2 = tostring(root) +2743 self.assertTrue(_bytes(':a=') in xml2, xml2) +2744 +2745 root2 = fromstring(xml2) -2697 self.assertEqual('test', root2[0].fromstring(xml2) +2746 self.assertEqual('test', root2[0].get('{%s}a' % ns_href)) -
2698 -
2700 get('{%s}a' % ns_href)) +
2747 +
2749 fromstring = self.fromstring = self.etree.etree.fromstring -2701 tostring = self.fromstring +2750 tostring = self.etree.tostring -2702 -2703 ns_href = "http://a.b.c" -2704 xml = _bytes('<root xmlns="%s" xmlns:x="%s"><el x:a="test" /></root>' % ( -2705 ns_href,ns_href)) -2706 root = etree.tostring +2751 +2752 ns_href = "http://a.b.c" +2753 xml = _bytes('<root xmlns="%s" xmlns:x="%s"><el x:a="test" /></root>' % ( +2754 ns_href,ns_href)) +2755 root = fromstring(xml) -2707 self.assertEqual('test', root[0].fromstring(xml) +2756 self.assertEqual('test', root[0].get('{%s}a' % ns_href)) -2708 -2709 root[0].get('{%s}a' % ns_href)) +2757 +2758 root[0].set('{%s}a' % ns_href, 'TEST') -2710 -2711 xml2 = tostring(root) -2712 self.assertTrue(_bytes(':a=') in xml2, xml2) -2713 -2714 root2 = set('{%s}a' % ns_href, 'TEST') +2759 +2760 xml2 = tostring(root) +2761 self.assertTrue(_bytes(':a=') in xml2, xml2) +2762 +2763 root2 = fromstring(xml2) -2715 self.assertEqual('TEST', root2[0].fromstring(xml2) +2764 self.assertEqual('TEST', root2[0].get('{%s}a' % ns_href)) -
2716 -2717 required_versions_ET['test_register_namespace'] = (1,3) -
2718 - def test_register_namespace(self): -
2719 # ET 1.3+ -2720 get('{%s}a' % ns_href)) +
2765 +2766 required_versions_ET['test_register_namespace'] = (1,3) +
2767 - def test_register_namespace(self): +
2768 # ET 1.3+ +2769 Element = self.Element = self.etree.etree.Element -2721 prefix = 'TESTPREFIX' -2722 namespace = 'http://seriously.unknown/namespace/URI' -2723 -2724 el = Element +2770 prefix = 'TESTPREFIX' +2771 namespace = 'http://seriously.unknown/namespace/URI' +2772 +2773 el = Element('{%s}test' % namespace) -2725 self.assertEqual(_bytes('<ns0:test xmlns:ns0="%s"></ns0:test>' % namespace), -2726 self._writeElement(el)) -2727 -2728 self.Element('{%s}test' % namespace) +2774 self.assertEqual(_bytes('<ns0:test xmlns:ns0="%s"></ns0:test>' % namespace), +2775 self._writeElement(el)) +2776 +2777 self.etree.register_namespace(prefix, namespace) -2729 el = etree.register_namespace(prefix, namespace) +2778 el = Element('{%s}test' % namespace) -2730 self.assertEqual(_bytes('<%s:test xmlns:%s="%s"></%s:test>' % ( -2731 prefix, prefix, namespace, prefix)), -2732 self._writeElement(el)) -2733 -2734 self.assertRaises(ValueError, self.Element('{%s}test' % namespace) +2779 self.assertEqual(_bytes('<%s:test xmlns:%s="%s"></%s:test>' % ( +2780 prefix, prefix, namespace, prefix)), +2781 self._writeElement(el)) +2782 +2783 self.assertRaises(ValueError, self.etree.register_namespace, 'ns25', namespace) -
2735 -
2736 - def test_tostring(self): -
2737 tostring = self.etree.register_namespace, 'ns25', namespace) +
2784 +
2785 - def test_tostring(self): +
2786 tostring = self.etree.tostring -2738 etree.tostring +2787 Element = self.Element = self.etree.etree.Element -2739 SubElement = self.Element +2788 SubElement = self.etree.SubElement -2740 -2741 a = etree.SubElement +2789 +2790 a = Element('a') -2742 b = SubElement(a, 'b') -2743 c = SubElement(a, 'c') -2744 -2745 self.assertEqual(_bytes('<a><b></b><c></c></a>'), -2746 canonicalize(tostring(a))) -
2747 -
2748 - def test_tostring_element(self): -
2749 tostring = self.Element('a') +2791 b = SubElement(a, 'b') +2792 c = SubElement(a, 'c') +2793 +2794 self.assertEqual(_bytes('<a><b></b><c></c></a>'), +2795 canonicalize(tostring(a))) +
2796 +
2797 - def test_tostring_element(self): +
2798 tostring = self.etree.tostring -2750 etree.tostring +2799 Element = self.Element = self.etree.etree.Element -2751 SubElement = self.Element +2800 SubElement = self.etree.SubElement -2752 -2753 a = etree.SubElement +2801 +2802 a = Element('a') -2754 b = SubElement(a, 'b') -2755 c = SubElement(a, 'c') -2756 d = SubElement(c, 'd') -2757 self.assertEqual(_bytes('<b></b>'), -2758 canonicalize(tostring(b))) -2759 self.assertEqual(_bytes('<c><d></d></c>'), -2760 canonicalize(tostring(c))) -
2761 -
2762 - def test_tostring_element_tail(self): -
2763 tostring = self.Element('a') +2803 b = SubElement(a, 'b') +2804 c = SubElement(a, 'c') +2805 d = SubElement(c, 'd') +2806 self.assertEqual(_bytes('<b></b>'), +2807 canonicalize(tostring(b))) +2808 self.assertEqual(_bytes('<c><d></d></c>'), +2809 canonicalize(tostring(c))) +
2810 +
2811 - def test_tostring_element_tail(self): +
2812 tostring = self.etree.tostring -2764 etree.tostring +2813 Element = self.Element = self.etree.etree.Element -2765 SubElement = self.Element +2814 SubElement = self.etree.SubElement -2766 -2767 a = etree.SubElement +2815 +2816 a = Element('a') -2768 b = SubElement(a, 'b') -2769 c = SubElement(a, 'c') -2770 d = SubElement(c, 'd') -2771 b.tail = 'Foo' -2772 -2773 self.assertTrue(tostring(b) == _bytes('<b/>Foo') or -2774 tostring(b) == _bytes('<b />Foo')) -
2775 -2776 required_versions_ET['test_tostring_method_html'] = (1,3) -
2777 - def test_tostring_method_html(self): -
2778 tostring = self.Element('a') +2817 b = SubElement(a, 'b') +2818 c = SubElement(a, 'c') +2819 d = SubElement(c, 'd') +2820 b.tail = 'Foo' +2821 +2822 self.assertTrue(tostring(b) == _bytes('<b/>Foo') or +2823 tostring(b) == _bytes('<b />Foo')) +
2824 +2825 required_versions_ET['test_tostring_method_html'] = (1,3) +
2826 - def test_tostring_method_html(self): +
2827 tostring = self.etree.tostring -2779 etree.tostring +2828 Element = self.Element = self.etree.etree.Element -2780 SubElement = self.Element +2829 SubElement = self.etree.SubElement -2781 -2782 etree.SubElement +2830 +2831 html = html = Element('html') -2783 body = SubElement(Element('html') +2832 body = SubElement(html, 'body') -2784 p = SubElement(body, 'p') -2785 p.html, 'body') +2833 p = SubElement(body, 'p') +2834 p.text = "html" -2786 SubElement(p, 'br').tail = "test" -2787 -2788 self.assertEqual(_bytes('<html><body><p>html<br>test</p></body></html>'), -2789 tostring(text = "html" +2835 SubElement(p, 'br').tail = "test" +2836 +2837 self.assertEqual(_bytes('<html><body><p>html<br>test</p></body></html>'), +2838 tostring(html, method="html")) -
2790 -2791 required_versions_ET['test_tostring_method_text'] = (1,3) -
2792 - def test_tostring_method_text(self): -
2793 tostring = self.html, method="html")) +
2839 +2840 required_versions_ET['test_tostring_method_text'] = (1,3) +
2841 - def test_tostring_method_text(self): +
2842 tostring = self.etree.tostring -2794 etree.tostring +2843 Element = self.Element = self.etree.etree.Element -2795 SubElement = self.Element +2844 SubElement = self.etree.SubElement -2796 -2797 a = etree.SubElement +2845 +2846 a = Element('a') -2798 a.Element('a') +2847 a.text = "A" -2799 a.tail = "tail" -2800 b = SubElement(a, 'b') -2801 b.text = "A" +2848 a.tail = "tail" +2849 b = SubElement(a, 'b') +2850 b.text = "B" -2802 b.tail = "TAIL" -2803 c = SubElement(a, 'c') -2804 c.text = "B" +2851 b.tail = "TAIL" +2852 c = SubElement(a, 'c') +2853 c.text = "C" -2805 -2806 self.assertEqual(_bytes('ABTAILCtail'), -2807 tostring(a, method="text")) -
2808 -
2809 - def test_iterparse(self): -
2810 iterparse = self.etree.iterparse -2811 f = BytesIO('<a><b></b><c/></a>') -2812 -2813 iterator = iterparse(f) -2814 self.assertEqual(None, -2815 iterator.root) -2816 events = list(iterator) -2817 root = iterator.root -2818 self.assertEqual( -2819 [('end', root[0]), ('end', root[1]), ('end', root)], -2820 events) -
2821 -
2822 - def test_iterparse_incomplete(self): -
2823 iterparse = self.etree.iterparse -2824 f = BytesIO('<a><b></b><c/></a>') -2825 -2826 iterator = iterparse(f) -2827 self.assertEqual(None, -2828 iterator.root) -2829 event, element = text = "C" +2854 +2855 self.assertEqual(_bytes('ABTAILCtail'), +2856 tostring(a, method="text")) +
2857 +
2858 - def test_iterparse(self): +
2859 iterparse = self.etree.iterparse +2860 f = BytesIO('<a><b></b><c/></a>') +2861 +2862 iterator = iterparse(f) +2863 self.assertEqual(None, +2864 iterator.root) +2865 events = list(iterator) +2866 root = iterator.root +2867 self.assertEqual( +2868 [('end', root[0]), ('end', root[1]), ('end', root)], +2869 events) +
2870 +
2871 - def test_iterparse_incomplete(self): +
2872 iterparse = self.etree.iterparse +2873 f = BytesIO('<a><b></b><c/></a>') +2874 +2875 iterator = iterparse(f) +2876 self.assertEqual(None, +2877 iterator.root) +2878 event, element = next(iter(iterator)) -2830 self.assertEqual('end', event) -2831 self.assertEqual('b', element.next(iter(iterator)) +2879 self.assertEqual('end', event) +2880 self.assertEqual('b', element.tag) -
2832 -
2833 - def test_iterparse_file(self): -
2834 iterparse = self.etree.iterparse -2835 iterator = iterparse(fileInTestDir("test.xml")) -2836 self.assertEqual(None, -2837 iterator.root) -2838 events = list(iterator) -2839 root = iterator.root -2840 self.assertEqual( -2841 [('end', root[0]), ('end', root)], -2842 events) -
2843 -
2844 - def test_iterparse_start(self): -
2845 iterparse = self.etree.iterparse -2846 f = BytesIO('<a><b></b><c/></a>') -2847 -2848 iterator = iterparse(f, events=('start',)) -2849 events = list(iterator) -2850 root = iterator.root -2851 self.assertEqual( -2852 [('start', root), ('start', root[0]), ('start', root[1])], -2853 events) -
2854 -
2855 - def test_iterparse_start_end(self): -
2856 iterparse = self.etree.iterparse -2857 f = BytesIO('<a><b></b><c/></a>') -2858 -2859 iterator = iterparse(f, events=('start','end')) -2860 events = list(iterator) -2861 root = iterator.root -2862 self.assertEqual( -2863 [('start', root), ('start', root[0]), ('end', root[0]), -2864 ('start', root[1]), ('end', root[1]), ('end', root)], -2865 events) -
2866 -
2867 - def test_iterparse_clear(self): -
2868 iterparse = self.etree.iterparse -2869 f = BytesIO('<a><b></b><c/></a>') -2870 -2871 iterator = iterparse(f) -2872 for event, elem in iterator: -2873 elem.tag) +
2881 +
2882 - def test_iterparse_file(self): +
2883 iterparse = self.etree.iterparse +2884 iterator = iterparse(fileInTestDir("test.xml")) +2885 self.assertEqual(None, +2886 iterator.root) +2887 events = list(iterator) +2888 root = iterator.root +2889 self.assertEqual( +2890 [('end', root[0]), ('end', root)], +2891 events) +
2892 +
2893 - def test_iterparse_start(self): +
2894 iterparse = self.etree.iterparse +2895 f = BytesIO('<a><b></b><c/></a>') +2896 +2897 iterator = iterparse(f, events=('start',)) +2898 events = list(iterator) +2899 root = iterator.root +2900 self.assertEqual( +2901 [('start', root), ('start', root[0]), ('start', root[1])], +2902 events) +
2903 +
2904 - def test_iterparse_start_end(self): +
2905 iterparse = self.etree.iterparse +2906 f = BytesIO('<a><b></b><c/></a>') +2907 +2908 iterator = iterparse(f, events=('start','end')) +2909 events = list(iterator) +2910 root = iterator.root +2911 self.assertEqual( +2912 [('start', root), ('start', root[0]), ('end', root[0]), +2913 ('start', root[1]), ('end', root[1]), ('end', root)], +2914 events) +
2915 +
2916 - def test_iterparse_clear(self): +
2917 iterparse = self.etree.iterparse +2918 f = BytesIO('<a><b></b><c/></a>') +2919 +2920 iterator = iterparse(f) +2921 for event, elem in iterator: +2922 elem.clear() -2874 -2875 root = iterator.root -2876 self.assertEqual(0, -2877 len(root)) -
2878 -
2879 - def test_iterparse_large(self): -
2880 iterparse = self.etree.iterparse -2881 CHILD_COUNT = 12345 -2882 f = BytesIO('<a>%s</a>' % ('<b>test</b>'*CHILD_COUNT)) -2883 -2884 i = 0 -2885 for key in iterparse(f): -2886 event, element = key -2887 i += 1 -2888 self.assertEqual(i, CHILD_COUNT + 1) -
2889 -
2890 - def test_iterparse_attrib_ns(self): -
2891 iterparse = self.etree.iterparse -2892 f = BytesIO('<a xmlns="http://ns1/"><b><c xmlns="http://ns2/"/></b></a>') -2893 -2894 attr_name = '{http://testns/}bla' -2895 events = [] -2896 iterator = iterparse(f, events=('start','end','start-ns','end-ns')) -2897 for event, elem in iterator: -2898 events.append(event) -2899 if event == 'start': -2900 if elem.clear() +2923 +2924 root = iterator.root +2925 self.assertEqual(0, +2926 len(root)) +
2927 +
2928 - def test_iterparse_large(self): +
2929 iterparse = self.etree.iterparse +2930 CHILD_COUNT = 12345 +2931 f = BytesIO('<a>%s</a>' % ('<b>test</b>'*CHILD_COUNT)) +2932 +2933 i = 0 +2934 for key in iterparse(f): +2935 event, element = key +2936 i += 1 +2937 self.assertEqual(i, CHILD_COUNT + 1) +
2938 +
2939 - def test_iterparse_attrib_ns(self): +
2940 iterparse = self.etree.iterparse +2941 f = BytesIO('<a xmlns="http://ns1/"><b><c xmlns="http://ns2/"/></b></a>') +2942 +2943 attr_name = '{http://testns/}bla' +2944 events = [] +2945 iterator = iterparse(f, events=('start','end','start-ns','end-ns')) +2946 for event, elem in iterator: +2947 events.append(event) +2948 if event == 'start': +2949 if elem.tag != '{http://ns1/}a': -2901 elem.tag != '{http://ns1/}a': +2950 elem.set(attr_name, 'value') -2902 -2903 self.assertEqual( -2904 ['start-ns', 'start', 'start', 'start-ns', 'start', -2905 'end', 'end-ns', 'end', 'end', 'end-ns'], -2906 events) -2907 -2908 root = iterator.root -2909 self.assertEqual( -2910 None, -2911 root.set(attr_name, 'value') +2951 +2952 self.assertEqual( +2953 ['start-ns', 'start', 'start', 'start-ns', 'start', +2954 'end', 'end-ns', 'end', 'end', 'end-ns'], +2955 events) +2956 +2957 root = iterator.root +2958 self.assertEqual( +2959 None, +2960 root.get(attr_name)) -2912 self.assertEqual( -2913 'value', -2914 root[0].get(attr_name)) +2961 self.assertEqual( +2962 'value', +2963 root[0].get(attr_name)) -
2915 -
2916 - def test_iterparse_getiterator(self): -
2917 iterparse = self.get(attr_name)) +
2964 +
2965 - def test_iterparse_getiterator(self): +
2966 iterparse = self.etree.iterparse -2918 f = BytesIO('<a><b><d/></b><c/></a>') -2919 -2920 counts = [] -2921 for event, elem in iterparse(f): -2922 counts.append(len(list(elem.getiterator()))) -2923 self.assertEqual( -2924 [1,2,1,4], -2925 counts) -
2926 -
2928 iterparse = self.etree.iterparse +2967 f = BytesIO('<a><b><d/></b><c/></a>') +2968 +2969 counts = [] +2970 for event, elem in iterparse(f): +2971 counts.append(len(list(elem.getiterator()))) +2972 self.assertEqual( +2973 [1,2,1,4], +2974 counts) +
2975 +
2977 iterparse = self.etree.iterparse -2929 f = BytesIO('<a><b><d/></b><c/></a>') -2930 -2931 for event, node in etree.iterparse +2978 f = BytesIO('<a><b><d/></b><c/></a>') +2979 +2980 for event, node in etree.iterparse(f): pass -2932 -2933 root = etree.iterparse(f): pass +2981 +2982 root = etree.etree.Element('new_root', {}) -2934 root[:] = node[:] -2935 -2936 self.assertEqual( -2937 ['b', 'c'], -2938 [ el.Element('new_root', {}) +2983 root[:] = node[:] +2984 +2985 self.assertEqual( +2986 ['b', 'c'], +2987 [ el.tag for el in root ]) -
2939 -
2940 - def test_iterparse_cdata(self): -
2941 tostring = self.tag for el in root ]) +
2988 +
2989 - def test_iterparse_cdata(self): +
2990 tostring = self.etree.tostring -2942 f = BytesIO('<root><![CDATA[test]]></root>') -2943 context = self.etree.tostring +2991 f = BytesIO('<root><![CDATA[test]]></root>') +2992 context = self.etree.iterparse(f) -2944 content = [ el.etree.iterparse(f) +2993 content = [ el.text for event,el in context ] -2945 -2946 self.assertEqual(['test'], content) -2947 self.assertEqual(_bytes('<root>test</root>'), -2948 tostring(context.root)) -
2949 -
2950 - def test_parse_file(self): -
2951 text for event,el in context ] +2994 +2995 self.assertEqual(['test'], content) +2996 self.assertEqual(_bytes('<root>test</root>'), +2997 tostring(context.root)) +
2998 +
2999 - def test_parse_file(self): +
3000 parse = self.parse = self.etree.etree.parse -2952 # from file -2953 tree = parse +3001 # from file +3002 tree = parse(fileInTestDir('test.xml')) -2954 self.assertXML( -2955 _bytes('<a><b></b></a>'), -2956 tree.getroot()) -
2957 -
2958 - def test_parse_file_nonexistent(self): -
2959 parse(fileInTestDir('test.xml')) +3003 self.assertXML( +3004 _bytes('<a><b></b></a>'), +3005 tree.getroot()) +
3006 +
3007 - def test_parse_file_nonexistent(self): +
3008 parse = self.parse = self.etree.etree.parse -2960 self.assertRaises(IOError, parse +3009 self.assertRaises(IOError, parse, fileInTestDir('notthere.xml')) -
2961 -
2962 - def test_parse_error_none(self): -
2963 parse, fileInTestDir('notthere.xml')) +
3010 +
3011 - def test_parse_error_none(self): +
3012 parse = self.parse = self.etree.etree.parse -2964 self.assertRaises(TypeError, parse +3013 self.assertRaises(TypeError, parse, None) -
2965 -2966 required_versions_ET['test_parse_error'] = (1,3) -
2967 - def test_parse_error(self): -
2968 # ET < 1.3 raises ExpatError -2969 parse, None) +
3014 +3015 required_versions_ET['test_parse_error'] = (1,3) +
3016 - def test_parse_error(self): +
3017 # ET < 1.3 raises ExpatError +3018 parse = self.parse = self.etree.etree.parse -2970 f = BytesIO('<a><b></c></b></a>') -2971 self.assertRaises(SyntaxError, parse +3019 f = BytesIO('<a><b></c></b></a>') +3020 self.assertRaises(SyntaxError, parse, f) -2972 f.parse, f) +3021 f.close() -
2973 -2974 required_versions_ET['test_parse_error_from_file'] = (1,3) -
2975 - def test_parse_error_from_file(self): -
2976 close() +
3022 +3023 required_versions_ET['test_parse_error_from_file'] = (1,3) +
3024 - def test_parse_error_from_file(self): +
3025 parse = self.parse = self.etree.etree.parse -2977 # from file -2978 f = open(fileInTestDir('test_broken.xml'), 'rb') -2979 self.assertRaises(SyntaxError, parse +3026 # from file +3027 f = open(fileInTestDir('test_broken.xml'), 'rb') +3028 self.assertRaises(SyntaxError, parse, f) -2980 f.parse, f) +3029 f.close() -
2981 -
2982 - def test_parse_file_object(self): -
2983 close() +
3030 +
3031 - def test_parse_file_object(self): +
3032 parse = self.parse = self.etree.etree.parse -2984 # from file object -2985 f = open(fileInTestDir('test.xml'), 'rb') -2986 tree = parse +3033 # from file object +3034 f = open(fileInTestDir('test.xml'), 'rb') +3035 tree = parse(f) -2987 f.parse(f) +3036 f.close() -2988 self.assertXML( -2989 _bytes('<a><b></b></a>'), -2990 tree.getroot()) -
2991 -
2992 - def test_parse_stringio(self): -
2993 close() +3037 self.assertXML( +3038 _bytes('<a><b></b></a>'), +3039 tree.getroot()) +
3040 +
3041 - def test_parse_stringio(self): +
3042 parse = self.parse = self.etree.etree.parse -2994 f = BytesIO('<a><b></b></a>') -2995 tree = parse +3043 f = BytesIO('<a><b></b></a>') +3044 tree = parse(f) -2996 f.parse(f) +3045 f.close() -2997 self.assertXML( -2998 _bytes('<a><b></b></a>'), -2999 tree.getroot() -3000 ) -
3001 -
3002 - def test_parse_cdata(self): -
3003 tostring = self.close() +3046 self.assertXML( +3047 _bytes('<a><b></b></a>'), +3048 tree.getroot() +3049 ) +
3050 +
3051 - def test_parse_cdata(self): +
3052 tostring = self.etree.tostring -3004 root = self.etree.tostring +3053 root = self.etree.etree.XML(_bytes('<root><![CDATA[test]]></root>')) -3005 -3006 self.assertEqual('test', root.XML(_bytes('<root><![CDATA[test]]></root>')) +3054 +3055 self.assertEqual('test', root.text) -3007 self.assertEqual(_bytes('<root>test</root>'), -3008 tostring(root)) -
3009 -
3010 - def test_parse_with_encoding(self): -
3011 # this can fail in libxml2 <= 2.6.22 -3012 text) +3056 self.assertEqual(_bytes('<root>test</root>'), +3057 tostring(root)) +
3058 +
3059 - def test_parse_with_encoding(self): +
3060 # this can fail in libxml2 <= 2.6.22 +3061 parse = self.parse = self.etree.etree.parse -3013 tree = parse +3062 tree = parse(BytesIO('<?xml version="1.0" encoding="ascii"?><html/>')) -3014 self.assertXML(_bytes('<html></html>'), -3015 tree.getroot()) -
3016 -
3017 - def test_encoding(self): -
3018 parse(BytesIO('<?xml version="1.0" encoding="ascii"?><html/>')) +3063 self.assertXML(_bytes('<html></html>'), +3064 tree.getroot()) +
3065 +
3066 - def test_encoding(self): +
3067 Element = self.Element = self.etree.etree.Element -3019 -3020 a = Element +3068 +3069 a = Element('a') -3021 a.Element('a') +3070 a.text = _str('Søk på nettet') -3022 self.assertXML( -3023 _str('<a>Søk på nettet</a>').encode('UTF-8'), -3024 a, 'utf-8') -
3025 -
3026 - def test_encoding_exact(self): -
3027 text = _str('Søk på nettet') +3071 self.assertXML( +3072 _str('<a>Søk på nettet</a>').encode('UTF-8'), +3073 a, 'utf-8') +
3074 +
3075 - def test_encoding_exact(self): +
3076 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3028 ElementTree +3077 Element = self.Element = self.etree.etree.Element -3029 -3030 a = Element +3078 +3079 a = Element('a') -3031 a.Element('a') +3080 a.text = _str('Søk på nettet') -3032 -3033 f = BytesIO() -3034 tree = text = _str('Søk på nettet') +3081 +3082 f = BytesIO() +3083 tree = ElementTree(element=a) -3035 tree.write(f, ElementTree(element=a) +3084 tree.write(f, encoding='utf-8') -3036 self.assertEqual(_str('<a>Søk på nettet</a>').encode('UTF-8'), -3037 f.getvalue().replace(_bytes('\n'),_bytes(''))) -
3038 -
3039 - def test_parse_file_encoding(self): -
3040 encoding='utf-8') +3085 self.assertEqual(_str('<a>Søk på nettet</a>').encode('UTF-8'), +3086 f.getvalue().replace(_bytes('\n'),_bytes(''))) +
3087 +
3088 - def test_parse_file_encoding(self): +
3089 parse = self.parse = self.etree.etree.parse -3041 # from file -3042 tree = parse +3090 # from file +3091 tree = parse(fileInTestDir('test-string.xml')) -3043 self.assertXML( -3044 _str('<a>Søk på nettet</a>').encode('UTF-8'), -3045 tree.getroot(), 'UTF-8') -
3046 -
3048 parse(fileInTestDir('test-string.xml')) +3092 self.assertXML( +3093 _str('<a>Søk på nettet</a>').encode('UTF-8'), +3094 tree.getroot(), 'UTF-8') +
3095 +
3097 parse = self.parse = self.etree.etree.parse -3049 # from file object -3050 f = open(fileInTestDir('test-string.xml'), 'rb') -3051 tree = parse +3098 # from file object +3099 f = open(fileInTestDir('test-string.xml'), 'rb') +3100 tree = parse(f) -3052 f.parse(f) +3101 f.close() -3053 self.assertXML( -3054 _str('<a>Søk på nettet</a>').encode('UTF-8'), -3055 tree.getroot(), 'UTF-8') -
3056 -
3057 - def test_encoding_8bit_latin1(self): -
3058 close() +3102 self.assertXML( +3103 _str('<a>Søk på nettet</a>').encode('UTF-8'), +3104 tree.getroot(), 'UTF-8') +
3105 +
3106 - def test_encoding_8bit_latin1(self): +
3107 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3059 ElementTree +3108 Element = self.Element = self.etree.etree.Element -3060 -3061 a = Element +3109 +3110 a = Element('a') -3062 a.Element('a') +3111 a.text = _str('Søk på nettet') -3063 -3064 f = BytesIO() -3065 tree = text = _str('Søk på nettet') +3112 +3113 f = BytesIO() +3114 tree = ElementTree(element=a) -3066 tree.write(f, ElementTree(element=a) +3115 tree.write(f, encoding='iso-8859-1') -3067 result = f.getvalue() -3068 declaration = _bytes("<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>") -3069 self.assertEncodingDeclaration(result, _bytes('iso-8859-1')) -3070 result = result.split(_bytes('?>'), 1)[-1].replace(_bytes('\n'),_bytes('')) -3071 self.assertEqual(_str('<a>Søk på nettet</a>').encode('iso-8859-1'), -3072 result) -
3073 -3074 required_versions_ET['test_parse_encoding_8bit_explicit'] = (1,3) -
3076 encoding='iso-8859-1') +3116 result = f.getvalue() +3117 declaration = _bytes("<?xml version=\'1.0\' encoding=\'iso-8859-1\'?>") +3118 self.assertEncodingDeclaration(result, _bytes('iso-8859-1')) +3119 result = result.split(_bytes('?>'), 1)[-1].replace(_bytes('\n'),_bytes('')) +3120 self.assertEqual(_str('<a>Søk på nettet</a>').encode('iso-8859-1'), +3121 result) +
3122 +3123 required_versions_ET['test_parse_encoding_8bit_explicit'] = (1,3) +
3125 XMLParser = self.XMLParser = self.XMLParser -3077 -3078 XMLParser +3126 +3127 text = _str('Søk på nettet') -3079 xml_latin1 = (_str('<a>%s</a>') % text = _str('Søk på nettet') +3128 xml_latin1 = (_str('<a>%s</a>') % text).encode('iso-8859-1') -3080 -3081 self.assertRaises(self.text).encode('iso-8859-1') +3129 +3130 self.assertRaises(self.etree.ParseError, -3082 self.etree.ParseError, +3131 self.etree.etree.parse, -3083 BytesIO(xml_latin1)) -3084 -3085 tree = self.parse, +3132 BytesIO(xml_latin1)) +3133 +3134 tree = self.etree.etree.parse(BytesIO(xml_latin1), -3086 parse(BytesIO(xml_latin1), +3135 XMLParser(XMLParser(encoding="iso-8859-1")) -3087 a = tree.getroot() -3088 self.assertEqual(a.encoding="iso-8859-1")) +3136 a = tree.getroot() +3137 self.assertEqual(a.text, text, text) -
3089 -3090 required_versions_ET['test_parse_encoding_8bit_override'] = (1,3) -
3092 text) +
3138 +3139 required_versions_ET['test_parse_encoding_8bit_override'] = (1,3) +
3141 XMLParser = self.XMLParser = self.XMLParser -3093 -3094 XMLParser +3142 +3143 text = _str('Søk på nettet') -3095 wrong_declaration = _str("<?xml version='1.0' encoding='UTF-8'?>") -3096 xml_latin1 = (_str('%s<a>%s</a>') % (wrong_declaration, text = _str('Søk på nettet') +3144 wrong_declaration = _str("<?xml version='1.0' encoding='UTF-8'?>") +3145 xml_latin1 = (_str('%s<a>%s</a>') % (wrong_declaration, text) -3097 ).encode('iso-8859-1') -3098 -3099 self.assertRaises(self.text) +3146 ).encode('iso-8859-1') +3147 +3148 self.assertRaises(self.etree.ParseError, -3100 self.etree.ParseError, +3149 self.etree.etree.parse, -3101 BytesIO(xml_latin1)) -3102 -3103 tree = self.parse, +3150 BytesIO(xml_latin1)) +3151 +3152 tree = self.etree.etree.parse(BytesIO(xml_latin1), -3104 parse(BytesIO(xml_latin1), +3153 XMLParser(XMLParser(encoding="iso-8859-1")) -3105 a = tree.getroot() -3106 self.assertEqual(a.encoding="iso-8859-1")) +3154 a = tree.getroot() +3155 self.assertEqual(a.text, text, text) -
3107 -
3109 # raise error on wrong encoding declaration in unicode strings -3110 text) +
3156 +
3158 # raise error on wrong encoding declaration in unicode strings +3159 XML = self.XML = self.etree.etree.XML -3111 test_utf = (_str('<?xml version="1.0" encoding="iso-8859-1"?>') + -3112 _str('<a>Søk på nettet</a>')) -3113 self.assertRaises(SyntaxError, XML +3160 test_utf = (_str('<?xml version="1.0" encoding="iso-8859-1"?>') + +3161 _str('<a>Søk på nettet</a>')) +3162 self.assertRaises(SyntaxError, XML, test_utf) -
3114 -
3116 XML, test_utf) +
3163 +
3165 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3117 ElementTree +3166 Element = self.Element = self.etree.etree.Element -3118 -3119 a = Element +3167 +3168 a = Element('a') -3120 a.Element('a') +3169 a.text = _str('Søk på nettet') -3121 -3122 f = BytesIO() -3123 tree = text = _str('Søk på nettet') +3170 +3171 f = BytesIO() +3172 tree = ElementTree(element=a) -3124 tree.write(f) -3125 data = f.getvalue().replace(_bytes('\n'),_bytes('')) -3126 self.assertEqual( -3127 _str('<a>Søk på nettet</a>').encode('ASCII', 'xmlcharrefreplace'), -3128 data) -
3129 -
3130 - def test_encoding_tostring(self): -
3131 ElementTree(element=a) +3173 tree.write(f) +3174 data = f.getvalue().replace(_bytes('\n'),_bytes('')) +3175 self.assertEqual( +3176 _str('<a>Søk på nettet</a>').encode('ASCII', 'xmlcharrefreplace'), +3177 data) +
3178 +
3179 - def test_encoding_tostring(self): +
3180 Element = self.Element = self.etree.etree.Element -3132 tostring = self.Element +3181 tostring = self.etree.tostring -3133 -3134 a = etree.tostring +3182 +3183 a = Element('a') -3135 a.Element('a') +3184 a.text = _str('Søk på nettet') -3136 self.assertEqual(_str('<a>Søk på nettet</a>').encode('UTF-8'), -3137 tostring(a, text = _str('Søk på nettet') +3185 self.assertEqual(_str('<a>Søk på nettet</a>').encode('UTF-8'), +3186 tostring(a, encoding='utf-8')) -
3138 -
3140 encoding='utf-8')) +
3187 +
3189 Element = self.Element = self.etree.etree.Element -3141 tostring = self.Element +3190 tostring = self.etree.tostring -3142 -3143 a = etree.tostring +3191 +3192 a = Element('a') -3144 a.Element('a') +3193 a.text = _str('Søk på nettet') -3145 self.assertRaises(LookupError, tostring, a, -3146 text = _str('Søk på nettet') +3194 self.assertRaises(LookupError, tostring, a, +3195 encoding='Invalid Encoding') -
3147 -
3148 - def test_encoding_tostring_sub(self): -
3149 encoding='Invalid Encoding') +
3196 +
3197 - def test_encoding_tostring_sub(self): +
3198 Element = self.Element = self.etree.etree.Element -3150 SubElement = self.Element +3199 SubElement = self.etree.SubElement -3151 tostring = self.etree.SubElement +3200 tostring = self.etree.tostring -3152 -3153 a = etree.tostring +3201 +3202 a = Element('a') -3154 b = SubElement(a, 'b') -3155 b.Element('a') +3203 b = SubElement(a, 'b') +3204 b.text = _str('Søk på nettet') -3156 self.assertEqual(_str('<b>Søk på nettet</b>').encode('UTF-8'), -3157 tostring(b, text = _str('Søk på nettet') +3205 self.assertEqual(_str('<b>Søk på nettet</b>').encode('UTF-8'), +3206 tostring(b, encoding='utf-8')) -
3158 -
3160 encoding='utf-8')) +
3207 +
3209 Element = self.Element = self.etree.etree.Element -3161 SubElement = self.Element +3210 SubElement = self.etree.SubElement -3162 tostring = self.etree.SubElement +3211 tostring = self.etree.tostring -3163 -3164 a = etree.tostring +3212 +3213 a = Element('a') -3165 b = SubElement(a, 'b') -3166 b.Element('a') +3214 b = SubElement(a, 'b') +3215 b.text = _str('Søk på nettet') -3167 b.tail = _str('Søk') -3168 self.assertEqual(_str('<b>Søk på nettet</b>Søk').encode('UTF-8'), -3169 tostring(b, text = _str('Søk på nettet') +3216 b.tail = _str('Søk') +3217 self.assertEqual(_str('<b>Søk på nettet</b>Søk').encode('UTF-8'), +3218 tostring(b, encoding='utf-8')) -
3170 -
3172 encoding='utf-8')) +
3219 +
3221 Element = self.Element = self.etree.etree.Element -3173 SubElement = self.Element +3222 SubElement = self.etree.SubElement -3174 tostring = self.etree.SubElement +3223 tostring = self.etree.tostring -3175 -3176 a = etree.tostring +3224 +3225 a = Element('a') -3177 a.Element('a') +3226 a.text = _str('Søk på nettet') -3178 -3179 expected = _bytes('<a>S&#248;k p&#229; nettet</a>') -3180 self.assertEqual( -3181 expected, -3182 tostring(a)) -
3183 -
3185 text = _str('Søk på nettet') +3227 +3228 expected = _bytes('<a>S&#248;k p&#229; nettet</a>') +3229 self.assertEqual( +3230 expected, +3231 tostring(a)) +
3232 +
3234 Element = self.Element = self.etree.etree.Element -3186 SubElement = self.Element +3235 SubElement = self.etree.SubElement -3187 tostring = self.etree.SubElement +3236 tostring = self.etree.tostring -3188 -3189 a = etree.tostring +3237 +3238 a = Element('a') -3190 b = SubElement(a, 'b') -3191 b.Element('a') +3239 b = SubElement(a, 'b') +3240 b.text = _str('Søk på nettet') -3192 -3193 expected = _bytes('<b>S&#248;k p&#229; nettet</b>') -3194 self.assertEqual( -3195 expected, -3196 tostring(b)) -
3197 -
3198 - def test_encoding_8bit_xml(self): -
3199 utext = _str('Søk på nettet') -3200 uxml = _str('<p>%s</p>') % utext -3201 prologue = _bytes('<?xml version="1.0" encoding="iso-8859-1" ?>') -3202 isoxml = prologue + uxml.encode('iso-8859-1') -3203 tree = self.text = _str('Søk på nettet') +3241 +3242 expected = _bytes('<b>S&#248;k p&#229; nettet</b>') +3243 self.assertEqual( +3244 expected, +3245 tostring(b)) +
3246 +
3247 - def test_encoding_8bit_xml(self): +
3248 utext = _str('Søk på nettet') +3249 uxml = _str('<p>%s</p>') % utext +3250 prologue = _bytes('<?xml version="1.0" encoding="iso-8859-1" ?>') +3251 isoxml = prologue + uxml.encode('iso-8859-1') +3252 tree = self.etree.etree.XML(isoxml) -3204 self.assertEqual(utext, tree.XML(isoxml) +3253 self.assertEqual(utext, tree.text) -
3205 -
3206 - def test_encoding_utf8_bom(self): -
3207 utext = _str('Søk på nettet') -3208 uxml = (_str('<?xml version="1.0" encoding="UTF-8"?>') + -3209 _str('<p>%s</p>') % utext) -3210 bom = _bytes('\\xEF\\xBB\\xBF').decode("unicode_escape").encode("latin1") -3211 xml = bom + uxml.encode("utf-8") -3212 tree = text) +
3254 +
3255 - def test_encoding_utf8_bom(self): +
3256 utext = _str('Søk på nettet') +3257 uxml = (_str('<?xml version="1.0" encoding="UTF-8"?>') + +3258 _str('<p>%s</p>') % utext) +3259 bom = _bytes('\\xEF\\xBB\\xBF').decode("unicode_escape").encode("latin1") +3260 xml = bom + uxml.encode("utf-8") +3261 tree = etree.etree.XML(xml) -3213 self.assertEqual(utext, tree.XML(xml) +3262 self.assertEqual(utext, tree.text) -
3214 -
3216 utext = _str('Søk på nettet') -3217 uxml = _str('<p>%s</p>') % utext -3218 prologue = _bytes('<?xml version="1.0" encoding="iso-8859-1" ?>') -3219 isoxml = prologue + uxml.encode('iso-8859-1') -3220 el = self.text) +
3263 +
3265 utext = _str('Søk på nettet') +3266 uxml = _str('<p>%s</p>') % utext +3267 prologue = _bytes('<?xml version="1.0" encoding="iso-8859-1" ?>') +3268 isoxml = prologue + uxml.encode('iso-8859-1') +3269 el = self.etree.etree.parse(BytesIO(isoxml)).getroot() -3221 self.assertEqual(utext, el.parse(BytesIO(isoxml)).getroot() +3270 self.assertEqual(utext, el.text) -
3222 -
3223 - def test_deepcopy_elementtree(self): -
3224 text) +
3271 +
3272 - def test_deepcopy_elementtree(self): +
3273 Element = self.Element = self.etree.etree.Element -3225 Element +3274 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3226 -3227 a = ElementTree +3275 +3276 a = Element('a') -3228 a.Element('a') +3277 a.text = "Foo" -3229 atree = text = "Foo" +3278 atree = ElementTree(a) -3230 -3231 btree = ElementTree(a) +3279 +3280 btree = copy.deepcopy(atree) -3232 self.assertEqual("Foo", atree.getroot().copy.deepcopy(atree) +3281 self.assertEqual("Foo", atree.getroot().text) -3233 self.assertEqual("Foo", btree.getroot().text) +3282 self.assertEqual("Foo", btree.getroot().text) -3234 self.assertFalse(btree is atree) -3235 self.assertFalse(btree.getroot() is atree.getroot()) -
3236 -
3237 - def test_deepcopy(self): -
3238 text) +3283 self.assertFalse(btree is atree) +3284 self.assertFalse(btree.getroot() is atree.getroot()) +
3285 +
3286 - def test_deepcopy(self): +
3287 Element = self.Element = self.etree.etree.Element -3239 -3240 a = Element +3288 +3289 a = Element('a') -3241 a.Element('a') +3290 a.text = 'Foo' -3242 -3243 b = text = 'Foo' +3291 +3292 b = copy.deepcopy(a) -3244 self.assertEqual('Foo', b.copy.deepcopy(a) +3293 self.assertEqual('Foo', b.text) -3245 -3246 b.text) +3294 +3295 b.text = 'Bar' -3247 self.assertEqual('Bar', b.text = 'Bar' +3296 self.assertEqual('Bar', b.text) -3248 self.assertEqual('Foo', a.text) +3297 self.assertEqual('Foo', a.text) -3249 -3250 del a -3251 self.assertEqual('Bar', b.text) +3298 +3299 del a +3300 self.assertEqual('Bar', b.text) -
3252 -
3253 - def test_deepcopy_tail(self): -
3254 text) +
3301 +
3302 - def test_deepcopy_tail(self): +
3303 Element = self.Element = self.etree.etree.Element -3255 -3256 a = Element +3304 +3305 a = Element('a') -3257 a.tail = 'Foo' -3258 -3259 b = Element('a') +3306 a.tail = 'Foo' +3307 +3308 b = copy.deepcopy(a) -3260 self.assertEqual('Foo', b.tail) -3261 -3262 b.tail = 'Bar' -3263 self.assertEqual('Bar', b.tail) -3264 self.assertEqual('Foo', a.tail) -3265 -3266 del a -3267 self.assertEqual('Bar', b.tail) -
3268 -
3269 - def test_deepcopy_subelement(self): -
3270 copy.deepcopy(a) +3309 self.assertEqual('Foo', b.tail) +3310 +3311 b.tail = 'Bar' +3312 self.assertEqual('Bar', b.tail) +3313 self.assertEqual('Foo', a.tail) +3314 +3315 del a +3316 self.assertEqual('Bar', b.tail) +
3317 +
3318 - def test_deepcopy_subelement(self): +
3319 Element = self.Element = self.etree.etree.Element -3271 SubElement = self.Element +3320 SubElement = self.etree.SubElement -3272 -3273 root = etree.SubElement +3321 +3322 root = Element('root') -3274 a = SubElement(root, 'a') -3275 a.Element('root') +3323 a = SubElement(root, 'a') +3324 a.text = 'FooText' -3276 a.tail = 'FooTail' -3277 -3278 b = text = 'FooText' +3325 a.tail = 'FooTail' +3326 +3327 b = copy.deepcopy(a) -3279 self.assertEqual('FooText', b.copy.deepcopy(a) +3328 self.assertEqual('FooText', b.text) -3280 self.assertEqual('FooTail', b.tail) -3281 -3282 b.text) +3329 self.assertEqual('FooTail', b.tail) +3330 +3331 b.text = 'BarText' -3283 b.tail = 'BarTail' -3284 self.assertEqual('BarTail', b.tail) -3285 self.assertEqual('FooTail', a.tail) -3286 self.assertEqual('BarText', b.text = 'BarText' +3332 b.tail = 'BarTail' +3333 self.assertEqual('BarTail', b.tail) +3334 self.assertEqual('FooTail', a.tail) +3335 self.assertEqual('BarText', b.text) -3287 self.assertEqual('FooText', a.text) +3336 self.assertEqual('FooText', a.text) -3288 -3289 del a -3290 self.assertEqual('BarTail', b.tail) -3291 self.assertEqual('BarText', b.text) +3337 +3338 del a +3339 self.assertEqual('BarTail', b.tail) +3340 self.assertEqual('BarText', b.text) -
3292 -
3293 - def test_deepcopy_namespaces(self): -
3294 root = self.text) +
3341 +
3342 - def test_deepcopy_namespaces(self): +
3343 root = self.etree.etree.XML(_bytes('''<doc xmlns="dns" xmlns:t="tns"> -3295 <parent><node t:foo="bar" /></parent> -3296 </doc>''')) -3297 self.assertEqual( -3298 root[0][0].XML(_bytes('''<doc xmlns="dns" xmlns:t="tns"> +3344 <parent><node t:foo="bar" /></parent> +3345 </doc>''')) +3346 self.assertEqual( +3347 root[0][0].get('{tns}foo'), -3299 get('{tns}foo'), +3348 copy.deepcopy(root[0])[0].copy.deepcopy(root[0])[0].get('{tns}foo') ) -3300 self.assertEqual( -3301 root[0][0].get('{tns}foo') ) +3349 self.assertEqual( +3350 root[0][0].get('{tns}foo'), -3302 get('{tns}foo'), +3351 copy.deepcopy(root[0][0]).copy.deepcopy(root[0][0]).get('{tns}foo') ) -
3303 -
3304 - def test_deepcopy_append(self): -
3305 # previously caused a crash -3306 get('{tns}foo') ) +
3352 +
3353 - def test_deepcopy_append(self): +
3354 # previously caused a crash +3355 Element = self.Element = self.etree.etree.Element -3307 tostring = self.Element +3356 tostring = self.etree.tostring -3308 -3309 a = etree.tostring +3357 +3358 a = Element('a') -3310 b = Element('a') +3359 b = copy.deepcopy(a) -3311 a.append( copy.deepcopy(a) +3360 a.append( Element('C') ) -3312 b.append( Element('C') ) +3361 b.append( Element('X') ) -3313 -3314 self.assertEqual(_bytes('<a><C/></a>'), -3315 tostring(a).replace(_bytes(' '), _bytes(''))) -3316 self.assertEqual(_bytes('<a><X/></a>'), -3317 tostring(b).replace(_bytes(' '), _bytes(''))) -
3318 -
3319 - def test_deepcopy_comment(self): -
3320 # previously caused a crash -3321 # not supported by ET < 1.3! -3322 Comment = self.Element('X') ) +3362 +3363 self.assertEqual(_bytes('<a><C/></a>'), +3364 tostring(a).replace(_bytes(' '), _bytes(''))) +3365 self.assertEqual(_bytes('<a><X/></a>'), +3366 tostring(b).replace(_bytes(' '), _bytes(''))) +
3367 +
3368 - def test_deepcopy_comment(self): +
3369 # previously caused a crash +3370 # not supported by ET < 1.3! +3371 Comment = self.etree.Comment -3323 -3324 a = Comment("ONE") -3325 b = etree.Comment +3372 +3373 a = Comment("ONE") +3374 b = copy.deepcopy(a) -3326 b.copy.deepcopy(a) +3375 b.text = "ANOTHER" -3327 -3328 self.assertEqual('ONE', a.text = "ANOTHER" +3376 +3377 self.assertEqual('ONE', a.text) -3329 self.assertEqual('ANOTHER', b.text) +3378 self.assertEqual('ANOTHER', b.text) -
3330 -
3331 - def test_shallowcopy(self): -
3332 text) +
3379 +
3380 - def test_shallowcopy(self): +
3381 Element = self.Element = self.etree.etree.Element -3333 -3334 a = Element +3382 +3383 a = Element('a') -3335 a.Element('a') +3384 a.text = 'Foo' -3336 -3337 b = text = 'Foo' +3385 +3386 b = copy.copy.copy(a) -3338 self.assertEqual('Foo', b.copy(a) +3387 self.assertEqual('Foo', b.text) -3339 -3340 b.text) +3388 +3389 b.text = 'Bar' -3341 self.assertEqual('Bar', b.text = 'Bar' +3390 self.assertEqual('Bar', b.text) -3342 self.assertEqual('Foo', a.text) +3391 self.assertEqual('Foo', a.text) -
3343 # XXX ElementTree will share nodes, but lxml.etree won't.. -3344 -
3346 text) +
3392 # XXX ElementTree will share nodes, but lxml.etree won't.. +3393 +
3395 Element = self.Element = self.etree.etree.Element -3347 Element +3396 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3348 -3349 a = ElementTree +3397 +3398 a = Element('a') -3350 a.Element('a') +3399 a.text = 'Foo' -3351 atree = text = 'Foo' +3400 atree = ElementTree(a) -3352 -3353 btree = ElementTree(a) +3401 +3402 btree = copy.copy.copy(atree) -3354 self.assertFalse(btree is atree) -3355 self.assertTrue(btree.getroot() is atree.getroot()) -3356 self.assertEqual('Foo', atree.getroot().copy(atree) +3403 self.assertFalse(btree is atree) +3404 self.assertTrue(btree.getroot() is atree.getroot()) +3405 self.assertEqual('Foo', atree.getroot().text) -
3357 -
3358 - def _test_element_boolean(self): -
3359 # deprecated as of ET 1.3/lxml 2.0 -3360 text) +
3406 +
3407 - def _test_element_boolean(self): +
3408 # deprecated as of ET 1.3/lxml 2.0 +3409 etree = self.etree = self.etree -3361 e = etree +3410 e = etree.etree.Element('foo') -3362 self.assertEqual(False, bool(e)) -3363 Element('foo') +3411 self.assertEqual(False, bool(e)) +3412 etree.SubElement(e, 'bar') -3364 self.assertEqual(True, bool(e)) -3365 e = etree.SubElement(e, 'bar') +3413 self.assertEqual(True, bool(e)) +3414 e = etree.etree.Element('foo') -3366 e.Element('foo') +3415 e.text = 'hey' -3367 self.assertEqual(False, bool(e)) -3368 e = text = 'hey' +3416 self.assertEqual(False, bool(e)) +3417 e = etree.etree.Element('foo') -3369 e.tail = 'bar' -3370 self.assertEqual(False, bool(e)) -3371 e = Element('foo') +3418 e.tail = 'bar' +3419 self.assertEqual(False, bool(e)) +3420 e = etree.etree.Element('foo') -3372 e.Element('foo') +3421 e.set('bar', 'Bar') -3373 self.assertEqual(False, bool(e)) -
3374 -
3375 - def test_multiple_elementrees(self): -
3376 set('bar', 'Bar') +3422 self.assertEqual(False, bool(e)) +
3423 +
3424 - def test_multiple_elementrees(self): +
3425 etree = self.etree = self.etree -3377 -3378 a = etree +3426 +3427 a = etree.etree.Element('a') -3379 b = Element('a') +3428 b = etree.SubElement(a, 'b') -3380 -3381 t = etree.SubElement(a, 'b') +3429 +3430 t = etree.etree.ElementTree(a) -3382 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) -3383 -3384 t1 = ElementTree(a) +3431 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) +3432 +3433 t1 = etree.etree.ElementTree(a) -3385 self.assertEqual(self._rootstring(t1), _bytes('<a><b/></a>')) -3386 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) -3387 -3388 t2 = ElementTree(a) +3434 self.assertEqual(self._rootstring(t1), _bytes('<a><b/></a>')) +3435 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) +3436 +3437 t2 = etree.etree.ElementTree(b) -3389 self.assertEqual(self._rootstring(t2), _bytes('<b/>')) -3390 self.assertEqual(self._rootstring(t1), _bytes('<a><b/></a>')) -3391 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) -
3392 -
3393 - def test_qname(self): -
3394 ElementTree(b) +3438 self.assertEqual(self._rootstring(t2), _bytes('<b/>')) +3439 self.assertEqual(self._rootstring(t1), _bytes('<a><b/></a>')) +3440 self.assertEqual(self._rootstring(t), _bytes('<a><b/></a>')) +
3441 +
3442 - def test_qname(self): +
3443 etree = self.etree = self.etree -3395 qname = etree +3444 qname = etree.QName('myns', 'a') -3396 a1 = etree.QName('myns', 'a') +3445 a1 = etree.etree.Element(qname) -3397 a2 = Element(qname) +3446 a2 = etree.SubElement(a1, qname) -3398 self.assertEqual(a1.etree.SubElement(a1, qname) +3447 self.assertEqual(a1.tag, "{myns}a") -3399 self.assertEqual(a2.tag, "{myns}a") +3448 self.assertEqual(a2.tag, "{myns}a") -
3400 -
3401 - def test_qname_cmp(self): -
3402 tag, "{myns}a") +
3449 +
3450 - def test_qname_cmp(self): +
3451 etree = self.etree = self.etree -3403 qname1 = etree +3452 qname1 = etree.QName('myns', 'a') -3404 qname2 = etree.QName('myns', 'a') +3453 qname2 = etree.QName('myns', 'a') -3405 self.assertEqual(qname1, "{myns}a") -3406 self.assertEqual("{myns}a", qname2) -3407 self.assertEqual(qname1, qname1) -3408 self.assertEqual(qname1, qname2) -
3409 -
3410 - def test_qname_attribute_getset(self): -
3411 etree.QName('myns', 'a') +3454 self.assertEqual(qname1, "{myns}a") +3455 self.assertEqual("{myns}a", qname2) +3456 self.assertEqual(qname1, qname1) +3457 self.assertEqual(qname1, qname2) +
3458 +
3459 - def test_qname_attribute_getset(self): +
3460 etree = self.etree = self.etree -3412 qname = etree +3461 qname = etree.QName('myns', 'a') -3413 -3414 a = etree.QName('myns', 'a') +3462 +3463 a = etree.etree.Element(qname) -3415 a.Element(qname) +3464 a.set(qname, "value") -3416 -3417 self.assertEqual(a.set(qname, "value") +3465 +3466 self.assertEqual(a.get(qname), "value") -3418 self.assertEqual(a.get(qname), "value") +3467 self.assertEqual(a.get("{myns}a"), "value") -
3419 -
3420 - def test_qname_attrib(self): -
3421 get("{myns}a"), "value") +
3468 +
3469 - def test_qname_attrib(self): +
3470 etree = self.etree = self.etree -3422 qname = etree +3471 qname = etree.QName('myns', 'a') -3423 -3424 a = etree.QName('myns', 'a') +3472 +3473 a = etree.etree.Element(qname) -3425 a.Element(qname) +3474 a.attrib[qname] = "value" -3426 -3427 self.assertEqual(a.attrib[qname] = "value" +3475 +3476 self.assertEqual(a.attrib[qname], "value") -3428 self.assertEqual(a.attrib[qname], "value") +3477 self.assertEqual(a.attrib.attrib.get(qname), "value") -3429 -3430 self.assertEqual(a.get(qname), "value") +3478 +3479 self.assertEqual(a.attrib["{myns}a"], "value") -3431 self.assertEqual(a.attrib["{myns}a"], "value") +3480 self.assertEqual(a.attrib.attrib.get("{myns}a"), "value") -
3432 -
3434 get("{myns}a"), "value") +
3481 +
3483 etree = self.etree = self.etree -3435 qname = etree +3484 qname = etree.QName('http://myns', 'a') -3436 a = etree.QName('http://myns', 'a') +3485 a = etree.etree.Element(qname) -3437 a.Element(qname) +3486 a.set(qname, qname) -3438 -3439 self.assertXML( -3440 _bytes('<ns0:a xmlns:ns0="http://myns" ns0:a="ns0:a"></ns0:a>'), -3441 a) -
3442 -
3444 set(qname, qname) +3487 +3488 self.assertXML( +3489 _bytes('<ns0:a xmlns:ns0="http://myns" ns0:a="ns0:a"></ns0:a>'), +3490 a) +
3491 +
3493 etree = self.etree = self.etree -3445 qname = etree +3494 qname = etree.QName('http://myns', 'a') -3446 a = etree.QName('http://myns', 'a') +3495 a = etree.etree.Element('a') -3447 a.Element('a') +3496 a.set('a', qname) -3448 -3449 self.assertXML( -3450 _bytes('<a xmlns:ns0="http://myns" a="ns0:a"></a>'), -3451 a) -
3452 -
3453 - def test_qname_attrib_resolve(self): -
3454 set('a', qname) +3497 +3498 self.assertXML( +3499 _bytes('<a xmlns:ns0="http://myns" a="ns0:a"></a>'), +3500 a) +
3501 +
3502 - def test_qname_attrib_resolve(self): +
3503 etree = self.etree = self.etree -3455 qname = etree +3504 qname = etree.QName('http://myns', 'a') -3456 a = etree.QName('http://myns', 'a') +3505 a = etree.etree.Element(qname) -3457 a.Element(qname) +3506 a.attrib[qname] = qname -3458 -3459 self.assertXML( -3460 _bytes('<ns0:a xmlns:ns0="http://myns" ns0:a="ns0:a"></ns0:a>'), -3461 a) -
3462 -
3463 - def test_parser_version(self): -
3464 attrib[qname] = qname +3507 +3508 self.assertXML( +3509 _bytes('<ns0:a xmlns:ns0="http://myns" ns0:a="ns0:a"></ns0:a>'), +3510 a) +
3511 +
3512 - def test_parser_version(self): +
3513 etree = self.etree = self.etree -3465 parser = etree +3514 parser = etree.etree.XMLParser() -3466 if hasattr(parser, "version"): -3467 # ElementTree 1.3+, cET -3468 self.assertTrue(re.match("[^ ]+ [0-9.]+", parser.version)) -
3469 -3470 # feed parser interface -3471 -
3472 - def test_feed_parser_bytes(self): -
3473 parser = self.XMLParser() +3515 if hasattr(parser, "version"): +3516 # ElementTree 1.3+, cET +3517 self.assertTrue(re.match("[^ ]+ [0-9.]+", parser.version)) +
3518 +3519 # feed parser interface +3520 +
3521 - def test_feed_parser_bytes(self): +
3522 parser = self.XMLParser() -3474 -3475 parser.feed(_bytes('<?xml version=')) -3476 parser.feed(_bytes('"1.0"?><ro')) -3477 parser.feed(_bytes('ot><')) -3478 parser.feed(_bytes('a test="works"/')) -3479 parser.feed(_bytes('></root')) -3480 parser.feed(_bytes('>')) -3481 -3482 root = parser.XMLParser() +3523 +3524 parser.feed(_bytes('<?xml version=')) +3525 parser.feed(_bytes('"1.0"?><ro')) +3526 parser.feed(_bytes('ot><')) +3527 parser.feed(_bytes('a test="works"/')) +3528 parser.feed(_bytes('></root')) +3529 parser.feed(_bytes('>')) +3530 +3531 root = parser.close() -3483 -3484 self.assertEqual(root.close() +3532 +3533 self.assertEqual(root.tag, "root") -3485 self.assertEqual(root[0].tag, "root") +3534 self.assertEqual(root[0].tag, "a") -3486 self.assertEqual(root[0].tag, "a") +3535 self.assertEqual(root[0].get("test"), "works") -
3487 -
3488 - def test_feed_parser_unicode(self): -
3489 parser = self.get("test"), "works") +
3536 +
3537 - def test_feed_parser_unicode(self): +
3538 parser = self.XMLParser() -3490 -3491 parser.feed(_str('<ro')) -3492 parser.feed(_str('ot><')) -3493 parser.feed(_str('a test="works"/')) -3494 parser.feed(_str('></root')) -3495 parser.feed(_str('>')) -3496 -3497 root = parser.XMLParser() +3539 +3540 parser.feed(_str('<ro')) +3541 parser.feed(_str('ot><')) +3542 parser.feed(_str('a test="works"/')) +3543 parser.feed(_str('></root')) +3544 parser.feed(_str('>')) +3545 +3546 root = parser.close() -3498 -3499 self.assertEqual(root.close() +3547 +3548 self.assertEqual(root.tag, "root") -3500 self.assertEqual(root[0].tag, "root") +3549 self.assertEqual(root[0].tag, "a") -3501 self.assertEqual(root[0].tag, "a") +3550 self.assertEqual(root[0].get("test"), "works") -
3502 -3503 required_versions_ET['test_feed_parser_error_close_empty'] = (1,3) -
3505 ParseError = self.get("test"), "works") +
3551 +3552 required_versions_ET['test_feed_parser_error_close_empty'] = (1,3) +
3554 ParseError = self.etree.ParseError -3506 parser = self.etree.ParseError +3555 parser = self.XMLParser() -3507 self.assertRaises(ParseError, parser.XMLParser() +3556 self.assertRaises(ParseError, parser.close) -
3508 -3509 required_versions_ET['test_feed_parser_error_close_incomplete'] = (1,3) -
3511 ParseError = self.close) +
3557 +3558 required_versions_ET['test_feed_parser_error_close_incomplete'] = (1,3) +
3560 ParseError = self.etree.ParseError -3512 parser = self.etree.ParseError +3561 parser = self.XMLParser() -3513 -3514 parser.feed('<?xml version=') -3515 parser.feed('"1.0"?><ro') -3516 -3517 self.assertRaises(ParseError, parser.XMLParser() +3562 +3563 parser.feed('<?xml version=') +3564 parser.feed('"1.0"?><ro') +3565 +3566 self.assertRaises(ParseError, parser.close) -
3518 -3519 required_versions_ET['test_feed_parser_error_broken'] = (1,3) -
3521 ParseError = self.close) +
3567 +3568 required_versions_ET['test_feed_parser_error_broken'] = (1,3) +
3570 ParseError = self.etree.ParseError -3522 parser = self.etree.ParseError +3571 parser = self.XMLParser() -3523 -3524 parser.feed('<?xml version=') -3525 parser.feed('"1.0"?><ro') -3526 try: -3527 parser.feed('<><><><><><><') -3528 except ParseError: -3529 # can raise, but not required before close() -3530 pass -3531 -3532 self.assertRaises(ParseError, parser.XMLParser() +3572 +3573 parser.feed('<?xml version=') +3574 parser.feed('"1.0"?><ro') +3575 try: +3576 parser.feed('<><><><><><><') +3577 except ParseError: +3578 # can raise, but not required before close() +3579 pass +3580 +3581 self.assertRaises(ParseError, parser.close) -
3533 -3534 required_versions_ET['test_feed_parser_error_position'] = (1,3) -
3536 ParseError = self.close) +
3582 +3583 required_versions_ET['test_feed_parser_error_position'] = (1,3) +
3585 ParseError = self.etree.ParseError -3537 parser = self.etree.ParseError +3586 parser = self.XMLParser() -3538 try: -3539 parser.XMLParser() +3587 try: +3588 parser.close() -3540 except ParseError: -3541 e = sys.exc_info()[1] -3542 self.assertNotEqual(None, e.code) -3543 self.assertNotEqual(0, e.code) -3544 self.assertTrue(isinstance(e.position, tuple)) -3545 self.assertTrue(e.position >= (0, 0)) -
3546 -3547 # parser target interface -3548 -3549 required_versions_ET['test_parser_target_property'] = (1,3) -
3550 - def test_parser_target_property(self): -
3551 class Target(object): -3552 pass -
3553 -3554 target = Target() -3555 parser = self.close() +3589 except ParseError: +3590 e = sys.exc_info()[1] +3591 self.assertNotEqual(None, e.code) +3592 self.assertNotEqual(0, e.code) +3593 self.assertTrue(isinstance(e.position, tuple)) +3594 self.assertTrue(e.position >= (0, 0)) +
3595 +3596 # parser target interface +3597 +3598 required_versions_ET['test_parser_target_property'] = (1,3) +
3599 - def test_parser_target_property(self): +
3600 class Target(object): +3601 pass +
3602 +3603 target = Target() +3604 parser = self.XMLParser(target=target) -3556 -3557 self.assertEqual(target, parser.target) -
3558 -
3559 - def test_parser_target_tag(self): -
3560 assertEqual = self.assertEqual -3561 assertFalse = self.assertFalse -3562 -3563 events = [] -3564 class Target(object): -3565 def start(self, tag, attrib): -3566 events.append("start") -3567 assertFalse(attrib) -3568 assertEqual("TAG", XMLParser(target=target) +3605 +3606 self.assertEqual(target, parser.target) +
3607 +
3608 - def test_parser_target_tag(self): +
3609 assertEqual = self.assertEqual +3610 assertFalse = self.assertFalse +3611 +3612 events = [] +3613 class Target(object): +3614 def start(self, tag, attrib): +3615 events.append("start") +3616 assertFalse(attrib) +3617 assertEqual("TAG", tag) -
3569 def end(self, tag): -3570 events.append("end") -3571 assertEqual("TAG", tag) +
3618 def end(self, tag): +3619 events.append("end") +3620 assertEqual("TAG", tag) -
3572 def close(self): -3573 return "DONE" -3574 -3575 parser = self.tag) +3621 def close(self): +3622 return "DONE" +3623 +3624 parser = self.XMLParser(target=Target()) -3576 -3577 parser.feed("<TAG/>") -3578 done = parser.XMLParser(target=Target()) +3625 +3626 parser.feed("<TAG/>") +3627 done = parser.close() -3579 -3580 self.assertEqual("DONE", done) -3581 self.assertEqual(["start", "end"], events) -3582 -
3584 assertEqual = self.assertEqual -3585 -3586 events = [] -3587 class Target(object): -3588 def start(self, tag, attrib): -3589 events.append("start") -3590 assertEqual("TAG", close() +3628 +3629 self.assertEqual("DONE", done) +3630 self.assertEqual(["start", "end"], events) +
3631 +
3633 assertEqual = self.assertEqual +3634 +3635 events = [] +3636 class Target(object): +3637 def start(self, tag, attrib): +3638 events.append("start") +3639 assertEqual("TAG", tag) -3591 raise ValueError("TEST") -
3592 def end(self, tag): -3593 events.append("end") -3594 assertEqual("TAG", tag) +3640 raise ValueError("TEST") +3641 def end(self, tag): +3642 events.append("end") +3643 assertEqual("TAG", tag) -3595 def close(self): -3596 return "DONE" -3597 -3598 parser = self.tag) +3644 def close(self): +3645 return "DONE" +3646 +3647 parser = self.XMLParser(target=Target()) -3599 -3600 try: -3601 parser.feed("<TAG/>") -3602 except ValueError: -3603 self.assertTrue('TEST' in str(sys.exc_info()[1])) -3604 else: -3605 self.assertTrue(False) -3606 if 'lxml' in self.etree.__name__: -3607 self.assertEqual(["start"], events) -3608 else: -3609 # cElementTree calls end() as well -3610 self.assertTrue("start" in events) -3611 -
3613 assertEqual = self.assertEqual -3614 -3615 events = [] -3616 class Target(object): -3617 def start(self, tag, attrib): -3618 events.append("start") -3619 assertEqual("TAG", XMLParser(target=Target()) +3648 +3649 try: +3650 parser.feed("<TAG/>") +3651 except ValueError: +3652 self.assertTrue('TEST' in str(sys.exc_info()[1])) +3653 else: +3654 self.assertTrue(False) +3655 if 'lxml' in self.etree.__name__: +3656 self.assertEqual(["start"], events) +3657 else: +3658 # cElementTree calls end() as well +3659 self.assertTrue("start" in events) +
3660 +
3662 assertEqual = self.assertEqual +3663 +3664 events = [] +3665 class Target(object): +3666 def start(self, tag, attrib): +3667 events.append("start") +3668 assertEqual("TAG", tag) -
3620 def end(self, tag): -3621 events.append("end") -3622 assertEqual("TAG", tag) +3669 def end(self, tag): +3670 events.append("end") +3671 assertEqual("TAG", tag) -3623 raise ValueError("TEST") -3624 def close(self): -3625 return "DONE" -3626 -3627 parser = self.tag) +3672 raise ValueError("TEST") +3673 def close(self): +3674 return "DONE" +3675 +3676 parser = self.XMLParser(target=Target()) -3628 -3629 try: -3630 parser.feed("<TAG/>") -3631 except ValueError: -3632 self.assertTrue('TEST' in str(sys.exc_info()[1])) -3633 else: -3634 self.assertTrue(False) -3635 self.assertEqual(["start", "end"], events) -3636 -
3638 assertEqual = self.assertEqual -3639 -3640 events = [] -3641 class Target(object): -3642 def start(self, tag, attrib): -3643 events.append("start") -3644 assertEqual("TAG", XMLParser(target=Target()) +3677 +3678 try: +3679 parser.feed("<TAG/>") +3680 except ValueError: +3681 self.assertTrue('TEST' in str(sys.exc_info()[1])) +3682 else: +3683 self.assertTrue(False) +3684 self.assertEqual(["start", "end"], events) +
3685 +
3687 assertEqual = self.assertEqual +3688 +3689 events = [] +3690 class Target(object): +3691 def start(self, tag, attrib): +3692 events.append("start") +3693 assertEqual("TAG", tag) -
3645 def end(self, tag): -3646 events.append("end") -3647 assertEqual("TAG", tag) +3694 def end(self, tag): +3695 events.append("end") +3696 assertEqual("TAG", tag) -3648 def close(self): -3649 raise ValueError("TEST") -3650 -3651 parser = self.tag) +3697 def close(self): +3698 raise ValueError("TEST") +3699 +3700 parser = self.XMLParser(target=Target()) -3652 -3653 try: -3654 parser.feed("<TAG/>") -3655 parser.XMLParser(target=Target()) +3701 +3702 try: +3703 parser.feed("<TAG/>") +3704 parser.close() -3656 except ValueError: -3657 self.assertTrue('TEST' in str(sys.exc_info()[1])) -3658 else: -3659 self.assertTrue(False) -3660 self.assertEqual(["start", "end"], events) -3661 -
3663 assertEqual = self.assertEqual -3664 -3665 events = [] -3666 class Target(object): -3667 def start(self, tag, attrib): -3668 events.append("start") -3669 assertEqual("TAG", close() +3705 except ValueError: +3706 self.assertTrue('TEST' in str(sys.exc_info()[1])) +3707 else: +3708 self.assertTrue(False) +3709 self.assertEqual(["start", "end"], events) +
3710 +
3712 assertEqual = self.assertEqual +3713 +3714 events = [] +3715 class Target(object): +3716 def start(self, tag, attrib): +3717 events.append("start") +3718 assertEqual("TAG", tag) -3670 raise IndexError("TEST-IE") -
3671 def end(self, tag): -3672 events.append("end") -3673 assertEqual("TAG", tag) +3719 raise IndexError("TEST-IE") +3720 def end(self, tag): +3721 events.append("end") +3722 assertEqual("TAG", tag) -3674 def close(self): -3675 raise ValueError("TEST-VE") -3676 -3677 parser = self.tag) +3723 def close(self): +3724 raise ValueError("TEST-VE") +3725 +3726 parser = self.XMLParser(target=Target()) -3678 -3679 try: -3680 parser.feed("<TAG/>") -3681 parser.XMLParser(target=Target()) +3727 +3728 try: +3729 parser.feed("<TAG/>") +3730 parser.close() -3682 except IndexError: -3683 if 'lxml' in self.close() +3731 except IndexError: +3732 if 'lxml' in self.etree.__name__: -3684 # we try not to swallow the initial exception in Py2 -3685 self.assertTrue(sys.version_info[0] < 3) -3686 self.assertTrue('TEST-IE' in str(sys.exc_info()[1])) -3687 except ValueError: -3688 if 'lxml' in self.etree.__name__: +3733 # we try not to swallow the initial exception in Py2 +3734 self.assertTrue(sys.version_info[0] < 3) +3735 self.assertTrue('TEST-IE' in str(sys.exc_info()[1])) +3736 except ValueError: +3737 if 'lxml' in self.etree.__name__: -3689 self.assertTrue(sys.version_info[0] >= 3) -3690 self.assertTrue('TEST-VE' in str(sys.exc_info()[1])) -3691 else: -3692 self.assertTrue(False) -3693 -3694 if 'lxml' in self.etree.__name__: +3738 self.assertTrue(sys.version_info[0] >= 3) +3739 self.assertTrue('TEST-VE' in str(sys.exc_info()[1])) +3740 else: +3741 self.assertTrue(False) +3742 +3743 if 'lxml' in self.etree.__name__: -3695 self.assertEqual(["start"], events) -3696 else: -3697 # cElementTree calls end() as well -3698 self.assertTrue("start" in events) -3699 -
3701 assertEqual = self.assertEqual -3702 assertFalse = self.assertFalse -3703 etree.__name__: +3744 self.assertEqual(["start"], events) +3745 else: +3746 # cElementTree calls end() as well +3747 self.assertTrue("start" in events) +
3748 +
3750 assertEqual = self.assertEqual +3751 assertFalse = self.assertFalse +3752 Element = self.Element = self.etree.etree.Element -3704 -3705 events = [] -3706 class Target(object): -3707 def start(self, tag, attrib): -3708 events.append("start") -3709 assertFalse(Element +3753 +3754 events = [] +3755 class Target(object): +3756 def start(self, tag, attrib): +3757 events.append("start") +3758 assertFalse(attrib) -3710 assertEqual("TAG", attrib) +3759 assertEqual("TAG", tag) -
3711 def end(self, tag): -3712 events.append("end") -3713 assertEqual("TAG", tag) +3760 def end(self, tag): +3761 events.append("end") +3762 assertEqual("TAG", tag) -3714 def close(self): -3715 return tag) +3763 def close(self): +3764 return Element("DONE") -3716 -3717 parser = self.Element("DONE") +3765 +3766 parser = self.XMLParser(target=Target()) -3718 tree = self.XMLParser(target=Target()) +3767 tree = self.etree.etree.ElementTree() -3719 tree.ElementTree() +3768 tree.parse(BytesIO("<TAG/>"), parser=parser) -3720 -3721 self.assertEqual("DONE", tree.getroot().parse(BytesIO("<TAG/>"), parser=parser) +3769 +3770 self.assertEqual("DONE", tree.getroot().tag) -3722 self.assertEqual(["start", "end"], events) -3723 -
3724 - def test_parser_target_attrib(self): -
3725 assertEqual = self.assertEqual -3726 -3727 events = [] -3728 class Target(object): -3729 def start(self, tag, attrib): -3730 events.append("start-" + tag) +3771 self.assertEqual(["start", "end"], events) +
3772 +
3773 - def test_parser_target_attrib(self): +
3774 assertEqual = self.assertEqual +3775 +3776 events = [] +3777 class Target(object): +3778 def start(self, tag, attrib): +3779 events.append("start-" + tag) -3731 for tag) +3780 for name, name, value in value in attrib.attrib.items(): -3732 assertEqual(items(): +3781 assertEqual(tag + tag + name, name, value) -
3733 def end(self, tag): -3734 events.append("end-" + value) +3782 def end(self, tag): +3783 events.append("end-" + tag) -3735 def close(self): -3736 return "DONE" -3737 -3738 parser = self.tag) +3784 def close(self): +3785 return "DONE" +3786 +3787 parser = self.XMLParser(target=Target()) -3739 -3740 parser.feed('<root a="roota" b="rootb"><sub c="subc"/></root>') -3741 done = parser.XMLParser(target=Target()) +3788 +3789 parser.feed('<root a="roota" b="rootb"><sub c="subc"/></root>') +3790 done = parser.close() -3742 -3743 self.assertEqual("DONE", done) -3744 self.assertEqual(["start-root", "start-sub", "end-sub", "end-root"], -3745 events) -3746 -
3747 - def test_parser_target_data(self): -
3748 events = [] -3749 class Target(object): -3750 def start(self, tag, attrib): -3751 events.append("start-" + close() +3791 +3792 self.assertEqual("DONE", done) +3793 self.assertEqual(["start-root", "start-sub", "end-sub", "end-root"], +3794 events) +
3795 +
3796 - def test_parser_target_data(self): +
3797 events = [] +3798 class Target(object): +3799 def start(self, tag, attrib): +3800 events.append("start-" + tag) -
3752 def end(self, tag): -3753 events.append("end-" + tag) +3801 def end(self, tag): +3802 events.append("end-" + tag) -3754 def data(self, data): -3755 events.append("data-" + data) -3756 def close(self): -3757 return "DONE" -3758 -3759 parser = self.tag) +3803 def data(self, data): +3804 events.append("data-" + data) +3805 def close(self): +3806 return "DONE" +3807 +3808 parser = self.XMLParser(target=Target()) -3760 -3761 parser.feed('<root>A<sub/>B</root>') -3762 done = parser.XMLParser(target=Target()) +3809 +3810 parser.feed('<root>A<sub/>B</root>') +3811 done = parser.close() -3763 -3764 self.assertEqual("DONE", done) -3765 self.assertEqual(["start-root", "data-A", "start-sub", -3766 "end-sub", "data-B", "end-root"], -3767 events) -3768 -
3769 - def test_parser_target_entity(self): -
3770 events = [] -3771 class Target(object): -3772 def __init__(self): -3773 self._data = [] -
3774 def _flush_data(self): -3775 if self._data: -3776 events.append("data-" + ''.join(self._data)) -3777 del self._data[:] -3778 def start(self, tag, attrib): -3779 self._flush_data() -3780 events.append("start-" + close() +3812 +3813 self.assertEqual("DONE", done) +3814 self.assertEqual(["start-root", "data-A", "start-sub", +3815 "end-sub", "data-B", "end-root"], +3816 events) +3817 +
3818 - def test_parser_target_entity(self): +
3819 events = [] +3820 class Target(object): +3821 def __init__(self): +3822 self._data = [] +
3823 def _flush_data(self): +3824 if self._data: +3825 events.append("data-" + ''.join(self._data)) +3826 del self._data[:] +3827 def start(self, tag, attrib): +3828 self._flush_data() +3829 events.append("start-" + tag) -3781 def end(self, tag): -3782 self._flush_data() -3783 events.append("end-" + tag) +3830 def end(self, tag): +3831 self._flush_data() +3832 events.append("end-" + tag) -3784 def data(self, data): -3785 self._data.append(data) -3786 def close(self): -3787 self._flush_data() -3788 return "DONE" -3789 -3790 parser = self.tag) +3833 def data(self, data): +3834 self._data.append(data) +3835 def close(self): +3836 self._flush_data() +3837 return "DONE" +3838 +3839 parser = self.XMLParser(target=Target()) -3791 -3792 dtd = ''' -3793 <!DOCTYPE root [ -3794 <!ELEMENT root (sub*)> -3795 <!ELEMENT sub (#PCDATA)> -3796 <!ENTITY ent "an entity"> -3797 ]> -3798 ''' -3799 parser.feed(dtd+'<root><sub/><sub>this is &ent;</sub><sub/></root>') -3800 done = parser.XMLParser(target=Target()) +3840 +3841 dtd = ''' +3842 <!DOCTYPE root [ +3843 <!ELEMENT root (sub*)> +3844 <!ELEMENT sub (#PCDATA)> +3845 <!ENTITY ent "an entity"> +3846 ]> +3847 ''' +3848 parser.feed(dtd+'<root><sub/><sub>this is &ent;</sub><sub/></root>') +3849 done = parser.close() -3801 -3802 self.assertEqual("DONE", done) -3803 self.assertEqual(["start-root", "start-sub", "end-sub", "start-sub", -3804 "data-this is an entity", -3805 "end-sub", "start-sub", "end-sub", "end-root"], -3806 events) -3807 -3808 required_versions_ET['test_parser_target_entity_unknown'] = (1,3) -
3810 events = [] -3811 class Target(object): -3812 def __init__(self): -3813 self._data = [] -
3814 def _flush_data(self): -3815 if self._data: -3816 events.append("data-" + ''.join(self._data)) -3817 del self._data[:] -3818 def start(self, tag, attrib): -3819 self._flush_data() -3820 events.append("start-" + close() +3850 +3851 self.assertEqual("DONE", done) +3852 self.assertEqual(["start-root", "start-sub", "end-sub", "start-sub", +3853 "data-this is an entity", +3854 "end-sub", "start-sub", "end-sub", "end-root"], +3855 events) +3856 +3857 required_versions_ET['test_parser_target_entity_unknown'] = (1,3) +
3859 events = [] +3860 class Target(object): +3861 def __init__(self): +3862 self._data = [] +
3863 def _flush_data(self): +3864 if self._data: +3865 events.append("data-" + ''.join(self._data)) +3866 del self._data[:] +3867 def start(self, tag, attrib): +3868 self._flush_data() +3869 events.append("start-" + tag) -3821 def end(self, tag): -3822 self._flush_data() -3823 events.append("end-" + tag) +3870 def end(self, tag): +3871 self._flush_data() +3872 events.append("end-" + tag) -3824 def data(self, data): -3825 self._data.append(data) -3826 def close(self): -3827 self._flush_data() -3828 return "DONE" -3829 -3830 parser = self.tag) +3873 def data(self, data): +3874 self._data.append(data) +3875 def close(self): +3876 self._flush_data() +3877 return "DONE" +3878 +3879 parser = self.XMLParser(target=Target()) -3831 -3832 def feed(): -3833 parser.feed('<root><sub/><sub>some &ent;</sub><sub/></root>') -3834 parser.XMLParser(target=Target()) +3880 +3881 def feed(): +3882 parser.feed('<root><sub/><sub>some &ent;</sub><sub/></root>') +3883 parser.close() -3835 -3836 self.assertRaises(self.close() +3884 +3885 self.assertRaises(self.etree.ParseError, feed) -3837 -
3838 - def test_treebuilder(self): -
3839 builder = self.etree.ParseError, feed) +
3886 +
3887 - def test_treebuilder(self): +
3888 builder = self.etree.TreeBuilder() -3840 el = builder.start("root", {'a':'A', 'b':'B'}) -3841 self.assertEqual("root", el.etree.TreeBuilder() +3889 el = builder.start("root", {'a':'A', 'b':'B'}) +3890 self.assertEqual("root", el.tag) -3842 self.assertEqual({'a':'A', 'b':'B'}, el.tag) +3891 self.assertEqual({'a':'A', 'b':'B'}, el.attrib) -3843 builder.data("ROOTTEXT") -3844 el = builder.start("child", {'x':'X', 'y':'Y'}) -3845 self.assertEqual("child", el.attrib) +3892 builder.data("ROOTTEXT") +3893 el = builder.start("child", {'x':'X', 'y':'Y'}) +3894 self.assertEqual("child", el.tag) -3846 self.assertEqual({'x':'X', 'y':'Y'}, el.tag) +3895 self.assertEqual({'x':'X', 'y':'Y'}, el.attrib) -3847 builder.data("CHILDTEXT") -3848 el = builder.end("child") -3849 self.assertEqual("child", el.attrib) +3896 builder.data("CHILDTEXT") +3897 el = builder.end("child") +3898 self.assertEqual("child", el.tag) -3850 self.assertEqual({'x':'X', 'y':'Y'}, el.tag) +3899 self.assertEqual({'x':'X', 'y':'Y'}, el.attrib) -3851 self.assertEqual("CHILDTEXT", el.attrib) +3900 self.assertEqual("CHILDTEXT", el.text) -3852 self.assertEqual(None, el.tail) -3853 builder.data("CHILDTAIL") -3854 root = builder.end("root") -3855 -3856 self.assertEqual("root", root.text) +3901 self.assertEqual(None, el.tail) +3902 builder.data("CHILDTAIL") +3903 root = builder.end("root") +3904 +3905 self.assertEqual("root", root.tag) -3857 self.assertEqual("ROOTTEXT", root.tag) +3906 self.assertEqual("ROOTTEXT", root.text) -3858 self.assertEqual("CHILDTEXT", root[0].text) +3907 self.assertEqual("CHILDTEXT", root[0].text) -3859 self.assertEqual("CHILDTAIL", root[0].tail) -
3860 -
3861 - def test_treebuilder_target(self): -
3862 parser = self.text) +3908 self.assertEqual("CHILDTAIL", root[0].tail) +
3909 +
3910 - def test_treebuilder_target(self): +
3911 parser = self.XMLParser(target=self.XMLParser(target=self.etree.TreeBuilder()) -3863 parser.feed('<root>ROOTTEXT<child>CHILDTEXT</child>CHILDTAIL</root>') -3864 root = parser.etree.TreeBuilder()) +3912 parser.feed('<root>ROOTTEXT<child>CHILDTEXT</child>CHILDTAIL</root>') +3913 root = parser.close() -3865 -3866 self.assertEqual("root", root.close() +3914 +3915 self.assertEqual("root", root.tag) -3867 self.assertEqual("ROOTTEXT", root.tag) +3916 self.assertEqual("ROOTTEXT", root.text) -3868 self.assertEqual("CHILDTEXT", root[0].text) +3917 self.assertEqual("CHILDTEXT", root[0].text) -3869 self.assertEqual("CHILDTAIL", root[0].tail) -
3870 -3871 # helper methods -3872 -
3873 - def _writeElement(self, element, encoding='us-ascii'): -
3874 """Write out element for comparison. -3875 """ -3876 data = self.text) +3918 self.assertEqual("CHILDTAIL", root[0].tail) +
3919 +3920 # helper methods +3921 +
3922 - def _writeElement(self, element, encoding='us-ascii'): +
3923 """Write out element for comparison. +3924 """ +3925 data = self.etree.tostring(element, etree.tostring(element, encoding=encoding=encoding) -3877 return canonicalize(data) -
3878 -
3879 - def _writeElementFile(self, element, encoding='us-ascii'): -
3880 """Write out element for comparison, using real file. -3881 """ -3882 encoding) +3926 return canonicalize(data) +
3927 +
3928 - def _writeElementFile(self, element, encoding='us-ascii'): +
3929 """Write out element for comparison, using real file. +3930 """ +3931 ElementTree = self.ElementTree = self.etree.etree.ElementTree -3883 ElementTree +3932 handle, filename = tempfile.mkstemp() -3884 try: -3885 f = open(filename, 'wb') -3886 tree = handle, filename = tempfile.mkstemp() +3933 try: +3934 f = open(filename, 'wb') +3935 tree = ElementTree(element=element) -3887 tree.write(f, ElementTree(element=element) +3936 tree.write(f, encoding=encoding=encoding) -3888 f.encoding) +3937 f.close() -3889 f = open(filename, 'rb') -3890 data = f.read() -3891 f.close() +3938 f = open(filename, 'rb') +3939 data = f.read() +3940 f.close() -3892 finally: -3893 os.close() +3941 finally: +3942 os.close(close(handle) -3894 os.handle) +3943 os.remove(filename) -3895 return canonicalize(data) -
3896 -
3897 - def assertXML(self, expected, element, encoding='us-ascii'): -
3898 """Writes element out and checks whether it is expected. -3899 -3900 Does this two ways; once using BytesIO, once using a real file. -3901 """ -3902 if isinstance(expected, unicode): -3903 expected = expected.encode(remove(filename) +3944 return canonicalize(data) +
3945 +
3946 - def assertXML(self, expected, element, encoding='us-ascii'): +
3947 """Writes element out and checks whether it is expected. +3948 +3949 Does this two ways; once using BytesIO, once using a real file. +3950 """ +3951 if isinstance(expected, unicode): +3952 expected = expected.encode(encoding) -3904 self.assertEqual(expected, self._writeElement(element, encoding) +3953 self.assertEqual(expected, self._writeElement(element, encoding)) -3905 self.assertEqual(expected, self._writeElementFile(element, encoding)) +3954 self.assertEqual(expected, self._writeElementFile(element, encoding)) -
3906 -
3907 - def assertEncodingDeclaration(self, result, encoding): -
3908 "Checks if the result XML byte string specifies the encoding." -3909 enc_re = r"<\?xml[^>]+ encoding=[\"']([^\"']+)[\"']" -3910 if isinstance(result, str): -3911 has_encoding = re.compile(enc_re).match -3912 else: -3913 has_encoding = re.compile(_bytes(enc_re)).match -3914 self.assertTrue(has_encoding(result)) -3915 result_encoding = has_encoding(result).group(1) -3916 self.assertEqual(result_encoding.upper(), encoding)) +
3955 +
3956 - def assertEncodingDeclaration(self, result, encoding): +
3957 "Checks if the result XML byte string specifies the encoding." +3958 enc_re = r"<\?xml[^>]+ encoding=[\"']([^\"']+)[\"']" +3959 if isinstance(result, str): +3960 has_encoding = re.compile(enc_re).match +3961 else: +3962 has_encoding = re.compile(_bytes(enc_re)).match +3963 self.assertTrue(has_encoding(result)) +3964 result_encoding = has_encoding(result).group(1) +3965 self.assertEqual(result_encoding.upper(), encoding.upper()) -
3917 -
3918 - def _rootstring(self, tree): -
3919 return self.etree.tostring(tree.getroot()).replace( -3920 _bytes(' '), _bytes('')).replace(_bytes('\n'), _bytes('')) -
3921 -
3922 - def _check_element_tree(self, tree): -
3923 self._check_element(tree.getroot()) -
3924 -
3925 - def _check_element(self, element): -
3926 self.assertTrue(hasattr(element, 'tag')) -3927 self.assertTrue(hasattr(element, 'attrib')) -3928 self.assertTrue(hasattr(element, 'text')) -3929 self.assertTrue(hasattr(element, 'tail')) -3930 self._check_string(element.encoding.upper()) +
3966 +
3967 - def _rootstring(self, tree): +
3968 return self.etree.tostring(tree.getroot()).replace( +3969 _bytes(' '), _bytes('')).replace(_bytes('\n'), _bytes('')) +
3970 +
3971 - def _check_element_tree(self, tree): +
3972 self._check_element(tree.getroot()) +
3973 +
3974 - def _check_element(self, element): +
3975 self.assertTrue(hasattr(element, 'tag')) +3976 self.assertTrue(hasattr(element, 'attrib')) +3977 self.assertTrue(hasattr(element, 'text')) +3978 self.assertTrue(hasattr(element, 'tail')) +3979 self._check_string(element.tag) -3931 self._check_mapping(element.tag) +3980 self._check_mapping(element.attrib) -3932 if element.attrib) +3981 if element.text is not None: -3933 self._check_string(element.text is not None: +3982 self._check_string(element.text) -3934 if element.tail is not None: -3935 self._check_string(element.tail) -
3936 -
3937 - def _check_string(self, string): -
3938 len(string) -3939 for char in string: -3940 self.assertEqual(1, len(char)) -3941 new_string = string + "" -3942 new_string = string + " " -3943 string[:0] -
3944 -
3945 - def _check_mapping(self, mapping): -
3946 len(mapping) -3947 text) +3983 if element.tail is not None: +3984 self._check_string(element.tail) +
3985 +
3986 - def _check_string(self, string): +
3987 len(string) +3988 for char in string: +3989 self.assertEqual(1, len(char)) +3990 new_string = string + "" +3991 new_string = string + " " +3992 string[:0] +
3993 +
3994 - def _check_mapping(self, mapping): +
3995 len(mapping) +3996 keys = mapping.keys = mapping.keys() -3948 keys() +3997 values = mapping.values = mapping.values() -3949 values() +3998 items = mapping.items = mapping.items() -3950 for key in items() +3999 for key in keys: -3951 item = mapping[key] -3952 mapping["key"] = "value" -3953 self.assertEqual("value", mapping["key"]) -
3954 -
3955 -3956 -class _XMLPullParserTest(unittest.TestCase): -
3957 etree = None -3958 -
3959 - def _feed(self, parser, data, chunk_size=None): -
3960 if chunk_size is None: -3961 parser.feed(data) -3962 else: -3963 for i in range(0, len(data), chunk_size): -3964 parser.feed(data[i:i+chunk_size]) -
3965 -
3966 - def _close_and_return_root(self, parser): -
3967 if 'ElementTree' in self.etree.__name__: -3968 # ElementTree's API is a bit unwieldy in Py3.4 -3969 root = parser._close_and_return_root() -3970 else: -3971 root = parser.keys: +4000 item = mapping[key] +4001 mapping["key"] = "value" +4002 self.assertEqual("value", mapping["key"]) +
4003 +
4004 +4005 -class _XMLPullParserTest(unittest.TestCase): +
4006 etree = None +4007 +
4008 - def _feed(self, parser, data, chunk_size=None): +
4009 if chunk_size is None: +4010 parser.feed(data) +4011 else: +4012 for i in range(0, len(data), chunk_size): +4013 parser.feed(data[i:i+chunk_size]) +
4014 +
4015 - def _close_and_return_root(self, parser): +
4016 if 'ElementTree' in self.etree.__name__: +4017 # ElementTree's API is a bit unwieldy in Py3.4 +4018 root = parser._close_and_return_root() +4019 else: +4020 root = parser.close() -3972 return root -
3973 -
3974 - def assert_event_tags(self, parser, expected): -
3975 events = parser.read_events() -3976 self.assertEqual([(action, elem.close() +4021 return root +
4022 +
4023 - def assert_event_tags(self, parser, expected): +
4024 events = parser.read_events() +4025 self.assertEqual([(action, elem.tag) for action, elem in events], -3977 expected) -
3978 -
3979 - def test_simple_xml(self): -
3980 for chunk_size in (None, 1, 5): -3981 #with self.subTest(chunk_size=chunk_size): -3982 parser = self.etree.XMLPullParser() -3983 self.assert_event_tags(parser, []) -3984 self._feed(parser, "<!-- comment -->\n", chunk_size) -3985 self.assert_event_tags(parser, []) -3986 self._feed(parser, -3987 "<root>\n <element key='value'>text</element", -3988 chunk_size) -3989 self.assert_event_tags(parser, []) -3990 self._feed(parser, ">\n", chunk_size) -3991 self.assert_event_tags(parser, [('end', 'element')]) -3992 self._feed(parser, "<element>text</element>tail\n", chunk_size) -3993 self._feed(parser, "<empty-element/>\n", chunk_size) -3994 self.assert_event_tags(parser, [ -3995 ('end', 'element'), -3996 ('end', 'empty-element'), -3997 ]) -3998 self._feed(parser, "</root>\n", chunk_size) -3999 self.assert_event_tags(parser, [('end', 'root')]) -4000 root = self._close_and_return_root(parser) -4001 self.assertEqual(root.tag) for action, elem in events], +4026 expected) +
4027 +
4028 - def test_simple_xml(self): +
4029 for chunk_size in (None, 1, 5): +4030 #with self.subTest(chunk_size=chunk_size): +4031 parser = self.etree.XMLPullParser() +4032 self.assert_event_tags(parser, []) +4033 self._feed(parser, "<!-- comment -->\n", chunk_size) +4034 self.assert_event_tags(parser, []) +4035 self._feed(parser, +4036 "<root>\n <element key='value'>text</element", +4037 chunk_size) +4038 self.assert_event_tags(parser, []) +4039 self._feed(parser, ">\n", chunk_size) +4040 self.assert_event_tags(parser, [('end', 'element')]) +4041 self._feed(parser, "<element>text</element>tail\n", chunk_size) +4042 self._feed(parser, "<empty-element/>\n", chunk_size) +4043 self.assert_event_tags(parser, [ +4044 ('end', 'element'), +4045 ('end', 'empty-element'), +4046 ]) +4047 self._feed(parser, "</root>\n", chunk_size) +4048 self.assert_event_tags(parser, [('end', 'root')]) +4049 root = self._close_and_return_root(parser) +4050 self.assertEqual(root.tag, 'root') -
4002 -
4003 - def test_feed_while_iterating(self): -
4004 parser = self.tag, 'root') +
4051 +
4052 - def test_feed_while_iterating(self): +
4053 parser = self.etree.XMLPullParser() -4005 it = parser.read_events() -4006 self._feed(parser, "<root>\n <element key='value'>text</element>\n") -4007 action, elem = etree.XMLPullParser() +4054 it = parser.read_events() +4055 self._feed(parser, "<root>\n <element key='value'>text</element>\n") +4056 action, elem = next(it) -4008 self.assertEqual((action, elem.next(it) +4057 self.assertEqual((action, elem.tag), ('end', 'element')) -4009 self._feed(parser, "</root>\n") -4010 action, elem = tag), ('end', 'element')) +4058 self._feed(parser, "</root>\n") +4059 action, elem = next(it) -4011 self.assertEqual((action, elem.next(it) +4060 self.assertEqual((action, elem.tag), ('end', 'root')) -4012 try: -4013 tag), ('end', 'root')) +4061 try: +4062 next(it) -4014 except StopIteration: -4015 self.assertTrue(True) -4016 else: -4017 self.assertTrue(False) -
4018 -
4019 - def test_simple_xml_with_ns(self): -
4020 parser = self.etree.XMLPullParser() -4021 self.assert_event_tags(parser, []) -4022 self._feed(parser, "<!-- comment -->\n") -4023 self.assert_event_tags(parser, []) -4024 self._feed(parser, "<root xmlns='namespace'>\n") -4025 self.assert_event_tags(parser, []) -4026 self._feed(parser, "<element key='value'>text</element") -4027 self.assert_event_tags(parser, []) -4028 self._feed(parser, ">\n") -4029 self.assert_event_tags(parser, [('end', '{namespace}element')]) -4030 self._feed(parser, "<element>text</element>tail\n") -4031 self._feed(parser, "<empty-element/>\n") -4032 self.assert_event_tags(parser, [ -4033 ('end', '{namespace}element'), -4034 ('end', '{namespace}empty-element'), -4035 ]) -4036 self._feed(parser, "</root>\n") -4037 self.assert_event_tags(parser, [('end', '{namespace}root')]) -4038 root = self._close_and_return_root(parser) -4039 self.assertEqual(root.next(it) +4063 except StopIteration: +4064 self.assertTrue(True) +4065 else: +4066 self.assertTrue(False) +
4067 +
4068 - def test_simple_xml_with_ns(self): +
4069 parser = self.etree.XMLPullParser() +4070 self.assert_event_tags(parser, []) +4071 self._feed(parser, "<!-- comment -->\n") +4072 self.assert_event_tags(parser, []) +4073 self._feed(parser, "<root xmlns='namespace'>\n") +4074 self.assert_event_tags(parser, []) +4075 self._feed(parser, "<element key='value'>text</element") +4076 self.assert_event_tags(parser, []) +4077 self._feed(parser, ">\n") +4078 self.assert_event_tags(parser, [('end', '{namespace}element')]) +4079 self._feed(parser, "<element>text</element>tail\n") +4080 self._feed(parser, "<empty-element/>\n") +4081 self.assert_event_tags(parser, [ +4082 ('end', '{namespace}element'), +4083 ('end', '{namespace}empty-element'), +4084 ]) +4085 self._feed(parser, "</root>\n") +4086 self.assert_event_tags(parser, [('end', '{namespace}root')]) +4087 root = self._close_and_return_root(parser) +4088 self.assertEqual(root.tag, '{namespace}root') -
4040 -
4041 - def test_ns_events(self): -
4042 parser = self.etree.XMLPullParser(events=('start-ns', 'end-ns')) -4043 self._feed(parser, "<!-- comment -->\n") -4044 self._feed(parser, "<root xmlns='namespace'>\n") -4045 self.assertEqual( -4046 list(parser.read_events()), -4047 [('start-ns', ('', 'namespace'))]) -4048 self._feed(parser, "<element key='value'>text</element") -4049 self._feed(parser, ">\n") -4050 self._feed(parser, "<element>text</element>tail\n") -4051 self._feed(parser, "<empty-element/>\n") -4052 self._feed(parser, "</root>\n") -4053 self.assertEqual(list(parser.read_events()), [('end-ns', None)]) -4054 parser.tag, '{namespace}root') +
4089 +
4090 - def test_ns_events(self): +
4091 parser = self.etree.XMLPullParser(events=('start-ns', 'end-ns')) +4092 self._feed(parser, "<!-- comment -->\n") +4093 self._feed(parser, "<root xmlns='namespace'>\n") +4094 self.assertEqual( +4095 list(parser.read_events()), +4096 [('start-ns', ('', 'namespace'))]) +4097 self._feed(parser, "<element key='value'>text</element") +4098 self._feed(parser, ">\n") +4099 self._feed(parser, "<element>text</element>tail\n") +4100 self._feed(parser, "<empty-element/>\n") +4101 self._feed(parser, "</root>\n") +4102 self.assertEqual(list(parser.read_events()), [('end-ns', None)]) +4103 parser.close() -
4055 -
4056 - def test_events(self): -
4057 parser = self.etree.XMLPullParser(events=()) -4058 self._feed(parser, "<root/>\n") -4059 self.assert_event_tags(parser, []) -4060 -4061 parser = self.etree.XMLPullParser(events=('start', 'end')) -4062 self._feed(parser, "<!-- comment -->\n") -4063 self.assert_event_tags(parser, []) -4064 self._feed(parser, "<root>\n") -4065 self.assert_event_tags(parser, [('start', 'root')]) -4066 self._feed(parser, "<element key='value'>text</element") -4067 self.assert_event_tags(parser, [('start', 'element')]) -4068 self._feed(parser, ">\n") -4069 self.assert_event_tags(parser, [('end', 'element')]) -4070 self._feed(parser, -4071 "<element xmlns='foo'>text<empty-element/></element>tail\n") -4072 self.assert_event_tags(parser, [ -4073 ('start', '{foo}element'), -4074 ('start', '{foo}empty-element'), -4075 ('end', '{foo}empty-element'), -4076 ('end', '{foo}element'), -4077 ]) -4078 self._feed(parser, "</root>") -4079 root = self._close_and_return_root(parser) -4080 self.assert_event_tags(parser, [('end', 'root')]) -4081 self.assertEqual(root.close() +
4104 +
4105 - def test_events(self): +
4106 parser = self.etree.XMLPullParser(events=()) +4107 self._feed(parser, "<root/>\n") +4108 self.assert_event_tags(parser, []) +4109 +4110 parser = self.etree.XMLPullParser(events=('start', 'end')) +4111 self._feed(parser, "<!-- comment -->\n") +4112 self.assert_event_tags(parser, []) +4113 self._feed(parser, "<root>\n") +4114 self.assert_event_tags(parser, [('start', 'root')]) +4115 self._feed(parser, "<element key='value'>text</element") +4116 self.assert_event_tags(parser, [('start', 'element')]) +4117 self._feed(parser, ">\n") +4118 self.assert_event_tags(parser, [('end', 'element')]) +4119 self._feed(parser, +4120 "<element xmlns='foo'>text<empty-element/></element>tail\n") +4121 self.assert_event_tags(parser, [ +4122 ('start', '{foo}element'), +4123 ('start', '{foo}empty-element'), +4124 ('end', '{foo}empty-element'), +4125 ('end', '{foo}element'), +4126 ]) +4127 self._feed(parser, "</root>") +4128 root = self._close_and_return_root(parser) +4129 self.assert_event_tags(parser, [('end', 'root')]) +4130 self.assertEqual(root.tag, 'root') -4082 -4083 parser = self.etree.XMLPullParser(events=('start',)) -4084 self._feed(parser, "<!-- comment -->\n") -4085 self.assert_event_tags(parser, []) -4086 self._feed(parser, "<root>\n") -4087 self.assert_event_tags(parser, [('start', 'root')]) -4088 self._feed(parser, "<element key='value'>text</element") -4089 self.assert_event_tags(parser, [('start', 'element')]) -4090 self._feed(parser, ">\n") -4091 self.assert_event_tags(parser, []) -4092 self._feed(parser, -4093 "<element xmlns='foo'>text<empty-element/></element>tail\n") -4094 self.assert_event_tags(parser, [ -4095 ('start', '{foo}element'), -4096 ('start', '{foo}empty-element'), -4097 ]) -4098 self._feed(parser, "</root>") -4099 root = self._close_and_return_root(parser) -4100 self.assertEqual(root.tag, 'root') +4131 +4132 parser = self.etree.XMLPullParser(events=('start',)) +4133 self._feed(parser, "<!-- comment -->\n") +4134 self.assert_event_tags(parser, []) +4135 self._feed(parser, "<root>\n") +4136 self.assert_event_tags(parser, [('start', 'root')]) +4137 self._feed(parser, "<element key='value'>text</element") +4138 self.assert_event_tags(parser, [('start', 'element')]) +4139 self._feed(parser, ">\n") +4140 self.assert_event_tags(parser, []) +4141 self._feed(parser, +4142 "<element xmlns='foo'>text<empty-element/></element>tail\n") +4143 self.assert_event_tags(parser, [ +4144 ('start', '{foo}element'), +4145 ('start', '{foo}empty-element'), +4146 ]) +4147 self._feed(parser, "</root>") +4148 root = self._close_and_return_root(parser) +4149 self.assertEqual(root.tag, 'root') -
4101 -
4102 - def test_events_sequence(self): -
4103 # Test that events can be some sequence that's not just a tuple or list -4104 eventset = {'end', 'start'} -4105 parser = self.etree.XMLPullParser(events=eventset) -4106 self._feed(parser, "<foo>bar</foo>") -4107 self.assert_event_tags(parser, [('start', 'foo'), ('end', 'foo')]) -4108 -4109 class DummyIter: -4110 def __init__(self): -4111 self.events = iter(['start', 'end', 'start-ns']) -
4112 def __iter__(self): -4113 return self -
4114 def __next__(self): -4115 return tag, 'root') +4150 +
4151 - def test_events_sequence(self): +
4152 # Test that events can be some sequence that's not just a tuple or list +4153 eventset = {'end', 'start'} +4154 parser = self.etree.XMLPullParser(events=eventset) +4155 self._feed(parser, "<foo>bar</foo>") +4156 self.assert_event_tags(parser, [('start', 'foo'), ('end', 'foo')]) +4157 +4158 class DummyIter: +4159 def __init__(self): +4160 self.events = iter(['start', 'end', 'start-ns']) +
4161 def __iter__(self): +4162 return self +4163 def __next__(self): +4164 return next(self.events) -4116 next(self.events) +4165 next = next = __next__ -4117 -4118 parser = self.__next__ +4166 +4167 parser = self.etree.XMLPullParser(events=DummyIter()) -4119 self._feed(parser, "<foo>bar</foo>") -4120 self.assert_event_tags(parser, [('start', 'foo'), ('end', 'foo')]) -4121 -
4122 - def test_unknown_event(self): -
4123 try: -4124 self.etree.XMLPullParser(events=DummyIter()) +4168 self._feed(parser, "<foo>bar</foo>") +4169 self.assert_event_tags(parser, [('start', 'foo'), ('end', 'foo')]) +
4170 +
4171 - def test_unknown_event(self): +
4172 try: +4173 self.etree.XMLPullParser(events=('start', 'end', 'bogus')) -4125 except ValueError: -4126 self.assertTrue(True) -4127 else: -4128 self.assertTrue(False) -
4129 -4130 -4131 if etree.XMLPullParser(events=('start', 'end', 'bogus')) +4174 except ValueError: +4175 self.assertTrue(True) +4176 else: +4177 self.assertTrue(False) +4178 +4179 +4180 if etree: -
4132 - class ETreeTestCase(_ETreeTestCaseBase): -
4133 etree: +
4181 - class ETreeTestCase(_ETreeTestCaseBase): +
4182 etree = etree = etree -
4134 -
4135 - class ETreePullTestCase(_XMLPullParserTest): -
4136 etree +
4183 +
4184 - class ETreePullTestCase(_XMLPullParserTest): +
4185 etree = etree = etree -
4137 -4138 -4139 if etree +
4186 +4187 +4188 if ElementTree: -
4140 - class ElementTreeTestCase(_ETreeTestCaseBase): -
4141 ElementTree: +
4189 - class ElementTreeTestCase(_ETreeTestCaseBase): +
4190 etree = etree = ElementTree -4142 -4143 @classmethod -
4144 - def setUpClass(cls): -
4145 import warnings -4146 # ElementTree warns about getiterator() in recent Pythons -4147 warnings.filterwarnings( -4148 'ignore', -4149 r'This method will be removed.*\.iter\(\).*instead', -4150 PendingDeprecationWarning) -
4151 -4152 filter_by_version( -4153 ElementTreeTestCase, -4154 ElementTreeTestCase.required_versions_ET, ET_VERSION) -4155 -4156 if hasattr(ElementTree +4191 +4192 @classmethod +
4193 - def setUpClass(cls): +
4194 import warnings +4195 # ElementTree warns about getiterator() in recent Pythons +4196 warnings.filterwarnings( +4197 'ignore', +4198 r'This method will be removed.*\.iter\(\).*instead', +4199 PendingDeprecationWarning) +
4200 +4201 filter_by_version( +4202 ElementTreeTestCase, +4203 ElementTreeTestCase.required_versions_ET, ET_VERSION) +4204 +4205 if hasattr(ElementTree, 'XMLPullParser'): -
4157 - class ElementTreePullTestCase(_XMLPullParserTest): -
4158 ElementTree, 'XMLPullParser'): +
4206 - class ElementTreePullTestCase(_XMLPullParserTest): +
4159 else: -4160 ElementTreePullTestCase = None -4161 -4162 -4163 if cElementTree: -
4164 - class CElementTreeTestCase(_ETreeTestCaseBase): -
4208 else: +4209 ElementTreePullTestCase = None +4210 +4211 +4212 if cElementTree: +
4213 - class CElementTreeTestCase(_ETreeTestCaseBase): +
4166 -4167 filter_by_version( -4168 CElementTreeTestCase, -4169 CElementTreeTestCase.required_versions_cET, CET_VERSION) -
4170 -4171 -4172 -def test_suite(): -
4173 suite = unittest.TestSuite() -4174 if etree: -4175 suite.addTests([unittest.makeSuite(ETreeTestCase)]) -4176 suite.addTests([unittest.makeSuite(ETreePullTestCase)]) -4177 if ElementTree: -4178 suite.addTests([unittest.makeSuite(ElementTreeTestCase)]) -4179 if ElementTreePullTestCase: -4180 suite.addTests([unittest.makeSuite(ElementTreePullTestCase)]) -4181 if cElementTree: -4182 suite.addTests([unittest.makeSuite(CElementTreeTestCase)]) -4183 return suite -
4184 -4185 if __name__ == '__main__': -4186 print('to test use test.py %s' % __file__) -4187
-

How to build lxml from source

+

How to build lxml from source

To build lxml from source, you need libxml2 and libxslt properly installed, including the header files. These are likely shipped in @@ -317,7 +317,7 @@ installed using dpkg -i

diff --git a/doc/html/capi.html b/doc/html/capi.html index b0baa89..4349504 100644 --- a/doc/html/capi.html +++ b/doc/html/capi.html @@ -24,7 +24,7 @@ function hide_menu() {
-

The public C-API of lxml.etree

+

The public C-API of lxml.etree

As of version 1.1, lxml.etree provides a public C-API. This allows external C extensions to efficiently access public functions and classes of lxml, @@ -127,7 +127,7 @@ includes may not be sufficient.

diff --git a/doc/html/changes-4.3.1.html b/doc/html/changes-4.3.2.html similarity index 99% rename from doc/html/changes-4.3.1.html rename to doc/html/changes-4.3.2.html index d63f427..6127a82 100644 --- a/doc/html/changes-4.3.1.html +++ b/doc/html/changes-4.3.2.html @@ -12,13 +12,37 @@

lxml changelog

+

4.3.2 (2019-02-29)

+
+

Bugs fixed

+
    +
  • Crash in 4.3.1 when appending a child subtree with certain text nodes.
  • +
+
+
+

Other changes

+
    +
  • Built with Cython 0.29.6.
  • +
+
+
+

4.3.1 (2019-02-08)

+
+

Bugs fixed

  • LP#1814522: Crash when appending a child subtree that contains unsubstituted entity references.
-
+
+

Other changes

+
    +
  • Built with Cython 0.29.5.
  • +
+
+
+

4.3.0 (2019-01-04)

Features added

@@ -31,7 +55,7 @@ is used. Patch by Lennart Regebro. and the corresponding schema to the 2016 version (with optional "properties").
-
+

Other changes

  • GH#270, GH#271: Support for Python 2.6 and 3.3 was removed. @@ -42,9 +66,9 @@ which were released in 2014 and 2012 respectively.
-
+

4.2.6 (2019-01-02)

-
+

Bugs fixed

  • LP#1799755: Fix a DeprecationWarning in Py3.7+.
  • @@ -52,9 +76,9 @@ which were released in 2014 and 2012 respectively.
-
+

4.2.5 (2018-09-09)

-
+

Bugs fixed

  • Javascript URLs that used URL escaping were not removed by the HTML cleaner. @@ -62,16 +86,16 @@ Security problem found by Omar Eissa. (CVE-2018-19787)
-
+

4.2.4 (2018-08-03)

-
+

Features added

  • GH#259: Allow using pkg-config for build configuration. Patch by Patrick Griffis.
-
+

Bugs fixed

  • LP#1773749, GH#268: Crash when moving an element to another document with @@ -80,18 +104,18 @@ Patch by Alexander Weggerle.
-
+

4.2.3 (2018-06-27)

-
+

Bugs fixed

  • Reverted GH#265: lxml links against zlib as a shared library again.
-
+

4.2.2 (2018-06-22)

-
+

Bugs fixed

  • GH#266: Fix sporadic crash during GC when parse-time schema validation is used @@ -102,9 +126,9 @@ Patch by Nehal J Wani.
-
+

4.2.1 (2018-03-21)

-
+

Bugs fixed

  • LP#1755825: iterwalk() failed to return the 'start' event for the initial @@ -114,9 +138,9 @@ element if a tag selector is used.
-
+

4.2.0 (2018-03-13)

-
+

Features added

  • GH#255: SelectElement.value returns more standard-compliant and @@ -129,7 +153,7 @@ first one). If no options are present (not standard-compliant) Patch by stranac.
-
+

Bugs fixed

  • LP#1551797: Some XSLT messages were not captured by the transform error log.
  • @@ -137,19 +161,19 @@ Patch by stranac. validation.
-
+

Other changes

-
+

4.1.1 (2017-11-04)

  • Rebuild with Cython 0.27.3 to improve support for Py3.7.
-
+

4.1.0 (2017-10-13)

-
+

Features added

  • ElementPath supports text predicates for current node, like "[.='text']".
  • @@ -161,7 +185,7 @@ This should have a beneficial impact on the overall performance by providing a tighter compiler integration between lxml and libxml2/libxslt.
-
+

Bugs fixed

  • LP#1722776: Requesting non-Element objects like comments from a document with @@ -169,9 +193,9 @@ a tighter compiler integration between lxml and libxml2/libxslt.
-
+

4.0.0 (2017-09-17)

-
+

Features added

  • The ElementPath implementation is now compiled using Cython, @@ -187,7 +211,7 @@ allow relative resource lookups.
  • output data into a file according to the <xsl:output> configuration.
-
+

Bugs fixed

  • GH#251: HTML comments were handled incorrectly by the soupparser. @@ -220,7 +244,7 @@ to output end tags even after writing failed with an exception.

-
+

Other changes

  • The main module source files were renamed from lxml.*.pyx to plain @@ -231,9 +255,9 @@ be worth validating that third-party code does not notice this change.
-
+

3.8.0 (2017-06-03)

-
+

Features added

  • ElementTree.write() has a new option doctype that writes out a @@ -249,7 +273,7 @@ responsible for the error. Patch by Bob Kline.
  • a default namespace when passing a None prefix.
-
+

Bugs fixed

  • GH#238: Character escapes were not hex-encoded in the xmlfile serialiser. @@ -263,7 +287,7 @@ multi-threaded XSLT processing.
  • LP#1673355, GH#233: fromstring() html5parser failed to parse byte strings.
-
+

Other changes

  • The previously undocumented docstring option in ElementTree.write() @@ -271,9 +295,9 @@ produces a deprecation warning and will eventually be removed.
-
+

3.7.4 (2017-??-??)

-
+

Bugs fixed

  • LP#1551797: revert previous fix for XSLT error logging as it breaks @@ -282,9 +306,9 @@ multi-threaded XSLT processing.
-
+

3.7.3 (2017-02-18)

-
+

Bugs fixed

  • GH#218 was ineffective in Python 3.
  • @@ -293,13 +317,13 @@ Patch by Jakub Wilk.
-
+

3.7.2 (2017-01-08)

  • GH#220: xmlfile allows switching output methods at an element level. Patch by Burak Arslan.
-
+

Bugs fixed

  • Work around installation problems in recent Python 2.7 versions @@ -311,16 +335,16 @@ script/style tags. Patch by Burak Arslan.
-
+

3.7.1 (2016-12-23)

  • No source changes, issued only to solve problems with the binary packages released for 3.7.0.
-
+

3.7.0 (2016-12-10)

-
+

Features added

  • GH#217: XMLSyntaxError now behaves more like its SyntaxError @@ -338,14 +362,14 @@ serialises like <div attrname& marked as disabled in HTML. Patch by Kristian Klemon.
-
+

Bugs fixed

  • GH#206: File name and line number were missing from XSLT error messages. Patch by Marcus Brinkmann.
-
+

Other changes

  • Log entries no longer allow anything but plain string objects as message text @@ -354,27 +378,27 @@ and file name.
-
+

3.6.4 (2016-08-20)

-
+

3.6.3 (2016-08-18)

  • LP#1614603: change linker flags to build multi-linux wheels
-
+

3.6.2 (2016-08-18)

  • LP#1614603: release without source changes to provide cleanly built Linux wheels
-
+

3.6.1 (2016-07-24)

-
+

Features added

  • GH#180: Separate option inline_style for Cleaner that only removes style @@ -382,7 +406,7 @@ attributes instead of all styles. Patch by Christian Pedersen.
  • GH#196: Windows build support for Python 3.5. Contribution by Maximilian Hils.
-
+

Bugs fixed

  • GH#199: Exclude file fields from FormElement.form_values (as browsers do). @@ -395,9 +419,9 @@ Patch by Holger Joukl.
-
+

3.6.0 (2016-03-17)

-
+

Features added

  • GH#187: Now supports (only) version 5.x and later of PyPy. @@ -406,7 +430,7 @@ Patch by Armin Rigo.
  • is installed. Patch by Dirkjan Ochtman.
-
+

Bugs fixed

  • GH#189: Static builds honour FTP proxy configurations when downloading @@ -418,9 +442,9 @@ Patch by Petr Demin.
-
+

3.5.0 (2015-11-13)

-
+

Bugs fixed

  • Unicode string results failed XPath queries in PyPy.
  • @@ -432,7 +456,7 @@ and continued parsing instead.

3.5.0b1 (2015-09-18)

-
+

Features added

  • cleanup_namespaces() accepts a new argument keep_ns_prefixes @@ -464,7 +488,7 @@ Patch by Olli Pottonen.
  • of version 3 if available.
-
+

Bugs fixed

  • Memory errors that occur during tree adaptations (e.g. moving subtrees @@ -491,9 +515,9 @@ with ElementPath to avoid hiding bugs in user code.
-
+

3.4.4 (2015-04-25)

-
+

Bugs fixed

  • An ElementTree compatibility test added in lxml 3.4.3 that failed in @@ -501,9 +525,9 @@ Python 3.4+ was removed again.
-
+

3.4.3 (2015-04-15)

-
+

Bugs fixed

  • Expression cache in ElementPath was ignored. Fix by Changaco.
  • @@ -516,9 +540,9 @@ double quotes. Patch by Olli Pottonen.
-
+

3.4.2 (2015-02-07)

-
+

Bugs fixed

  • LP#1415907: Crash when creating an XMLSchema from a non-root element @@ -530,25 +554,25 @@ with pseudo-attributes.
-
+

3.4.1 (2014-11-20)

-
+

Features added

  • New htmlfile HTML generator to accompany the incremental xmlfile serialisation API. Patch by Burak Arslan.
-
+

Bugs fixed

  • lxml.sax.ElementTreeContentHandler did not initialise its superclass.
-
+

3.4.0 (2014-09-10)

-
+

Features added

  • xmlfile(buffered=False) disables output buffering and flushes the @@ -573,10 +597,10 @@ if it had opened it internally.
  • Allow "bytearray" type for ASCII text input.
-
+

Bugs fixed

-
+

Other changes

  • LP#400588: decoding errors have become hard errors even in recovery mode. @@ -590,9 +614,9 @@ use lxml 3.3.x with older versions.
-
+

3.3.6 (2014-08-28)

-
+

Bugs fixed

  • Prevent tree cycle creation when adding Elements as siblings.
  • @@ -602,9 +626,9 @@ extension functions.
-
+

3.3.5 (2014-04-18)

-
+

Bugs fixed

  • HTML cleaning could fail to strip javascript links that mix control @@ -612,34 +636,34 @@ characters into the link scheme.
-
+

3.3.4 (2014-04-03)

-
+

Features added

  • Source line numbers above 65535 are available on Elements when using libxml2 2.9 or later.
-
+

Bugs fixed

  • lxml.html.fragment_fromstring() failed for bytes input in Py3.
-
+

Other changes

-
+

3.3.3 (2014-03-04)

-
+

Bugs fixed

  • LP#1287118: Crash when using Element subtypes with __slots__.
-
+

Other changes

  • The internal classes _LogEntry and _Attrib can no longer be @@ -647,9 +671,9 @@ subclassed from Python code.
-
+

3.3.2 (2014-02-26)

-
+

Bugs fixed

  • The properties resolvers and version, as well as the methods @@ -670,12 +694,12 @@ provide the same interface as that returned for Elements.
-
+

3.3.1 (2014-02-12)

-
+

Features added

-
+

Bugs fixed

  • LP#1014290: HTML documents parsed with parser.feed() failed to find @@ -687,36 +711,36 @@ header file.
  • LP#1274118: iterparse() failed to parse BOM prefixed files.
-
+

Other changes

-
+

3.3.0 (2014-01-26)

-
+

Features added

-
+

Bugs fixed

  • The heuristic that distinguishes file paths from URLs was tightened to produce less false negatives.
-
+

Other changes

3.3.0beta5 (2014-01-18)

-
+

Features added

  • The PEP 393 unicode parsing support gained a fallback for wchar strings which might still be somewhat common on Windows systems.
-
+

Bugs fixed

  • Several error handling problems were fixed throughout the code base that @@ -729,7 +753,7 @@ propagate exceptions (its return type is void) parsing the string character by character.
-
+

Other changes

  • Document cleanup code was simplified using the new GC features in @@ -739,10 +763,10 @@ Cython 0.20.

3.3.0beta4 (2014-01-12)

-
+

Features added

-
+

Bugs fixed

  • The (empty) value returned by the attrib property of Entity and Comment @@ -755,7 +779,7 @@ and keyword arguments could modify the mapping passed as +

    Other changes

    • Built with Cython 0.20pre (gitrev 012ae82eb) to prepare support for @@ -765,39 +789,39 @@ Python 3.4.

    3.3.0beta3 (2014-01-02)

    -
    +

    Features added

    • Unicode string parsing was optimised for Python 3.3 (PEP 393).
    -
    +

    Bugs fixed

    • HTML parsing of Unicode strings could misdecode the input on some platforms.
    • Crash in xmlfile() when closing open elements out of order in an error case.
    -
    +

    Other changes

    3.3.0beta2 (2013-12-20)

    -
    +

    Features added

    • iterparse() supports the recover option.
    -
    +

    Bugs fixed

    • Crash in iterparse() for HTML parsing.
    • Crash in target parsing with attributes.
    -
    +

    Other changes

    • The safety check in the read-only tree implementation (e.g. used by @@ -810,7 +834,7 @@ behaviour.

    3.3.0beta1 (2013-12-12)

    -
    +

    Features added

    • New option handle_failures in make_links_absolute() and @@ -822,7 +846,7 @@ incremental parsing, as implemented for ElementTree in Python 3.4.
    • (html=True).
    -
    +

    Bugs fixed

    • LP#1255132: crash when trying to run validation over non-Element (e.g. @@ -844,7 +868,7 @@ The textarea used to be cleared before the new content was set, which removed the name attribute.
    -
    +

    Other changes

    • Some basic API classes use freelists internally for faster @@ -855,12 +879,12 @@ classes internally instead of being a parser itself.
    -
    +

    3.2.5 (2014-01-02)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • Crash in xmlfile() when closing open elements out of order in an error case.
    • @@ -869,16 +893,16 @@ classes internally instead of being a parser itself. comment or PI).
    -
    +

    Other changes

    -
    +

    3.2.4 (2013-11-07)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • Memory leak when creating an XPath evaluator in a thread.
    • @@ -889,32 +913,32 @@ to one of its own descendants.
    • Compressed plain-text serialisation to file-like objects was broken.
    -
    +

    Other changes

    -
    +

    3.2.3 (2013-07-28)

    -
    +

    Bugs fixed

    • Fix support for Python 2.4 which was lost in 3.2.2.
    -
    +

    3.2.2 (2013-07-28)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • LP#1185701: spurious XMLSyntaxError after finishing iterparse().
    • Crash in lxml.objectify during xsi annotation.
    -
    +

    Other changes

    • Return values of user provided element class lookup methods are now @@ -923,9 +947,9 @@ API class mismatches.
    -
    +

    3.2.1 (2013-05-11)

    -
    +

    Features added

    • The methods apply_templates() and process_children() of XSLT @@ -934,7 +958,7 @@ and remove_blank_text that discard either all strings from the result list.
    -
    +

    Bugs fixed

    • When moving Elements to another tree, the namespace cleanup mechanism @@ -947,16 +971,16 @@ to a crash.
    • crashed.
    -
    +

    Other changes

    -
    +

    3.2.0 (2013-04-28)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • LP#690319: Leading whitespace could change the behaviour of the string @@ -975,16 +999,16 @@ of overwriting the current value.
    • allowed by the user provided whitelist. Patch by Christine Koppelt.
    -
    +

    Other changes

    -
    +

    3.1.2 (2013-04-12)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • LP#1136509: Passing attributes through the namespace-unaware API of @@ -996,16 +1020,16 @@ the result tree to a Unicode string.
    • by properly exported API function xmlBufUse().
    -
    +

    Other changes

    -
    +

    3.1.1 (2013-03-29)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • LP#1160386: Write access to lxml.html.FormElement.fields raised @@ -1013,7 +1037,7 @@ an AttributeError in Py3.
    • Illegal memory access during cleanup in incremental xmlfile writer.
    -
    +

    Other changes

    • The externally useless class lxml.etree._BaseParser was removed @@ -1021,16 +1045,16 @@ from the module dict.
    -
    +

    3.1.0 (2013-02-10)

    -
    +

    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 @@ -1043,13 +1067,13 @@ in for the current run.
    • without threading support. Patch by Ulrich Seidl.
    -
    +

    Other changes

    3.1beta1 (2012-12-21)

    -
    +

    Features added

    • New build-time option --with-unicode-strings for Python 2 that @@ -1060,7 +1084,7 @@ instead of byte strings for plain ASCII content.
    • tags with non-identifier names without having to resort to getattr().
    -
    +

    Bugs fixed

    • When starting from a non-namespaced element in lxml.objectify, searching @@ -1072,7 +1096,7 @@ the search to non-namespaced children.
    • LP#1080792: Static build of libxml2 2.9.0 failed due to missing file.
    -
    +

    Other changes

    • The externally useless class _ObjectifyElementMakerCaller was @@ -1082,27 +1106,27 @@ many children. Patch by Anders Hammarquist.
    -
    +

    3.0.2 (2012-12-14)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • Fix crash during interpreter shutdown by switching to Cython 0.17.3 for building.
    -
    +

    Other changes

    -
    +

    3.0.1 (2012-10-14)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • LP#1065924: Element proxies could disappear during garbage collection @@ -1111,16 +1135,16 @@ in PyPy without proper cleanup.
    • LP#1065139: static MacOS-X build failed in Py3.
    -
    +

    Other changes

    -
    +

    3.0 (2012-10-08)

    -
    +

    Features added

    -
    +

    Bugs fixed

    • End-of-file handling was incorrect in iterparse() when reading from @@ -1128,7 +1152,7 @@ a low-level C file stream and failed in libxml2 2.9.0 due to its improved consistency checks.
    -
    +

    Other changes

    • The build no longer uses Cython by default unless the generated C files @@ -1141,21 +1165,21 @@ run special setup.py commands that do not actually run a build), pass

    3.0beta1 (2012-09-26)

    -
    +

    Features added

    • Python level access to (optional) libxml2 memory debugging features to simplify debugging of memory leaks etc.
    -
    +

    Bugs fixed

    • Fix a memory leak in XPath by switching to Cython 0.17.1.
    • Some tests were adapted to work with PyPy.
    -
    +

    Other changes

    • The code was adapted to work with the upcoming libxml2 2.9.0 release.
    • @@ -1164,7 +1188,7 @@ to simplify debugging of memory leaks etc.

    3.0alpha2 (2012-08-23)

    -
    +

    Features added

    diff --git a/doc/html/cssselect.html b/doc/html/cssselect.html index bfdd928..e8238cd 100644 --- a/doc/html/cssselect.html +++ b/doc/html/cssselect.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    lxml.cssselect

    +

    lxml.cssselect

    lxml supports a number of interesting languages for tree traversal and element selection. The most important is obviously XPath, but there is also @@ -113,7 +113,7 @@ namespace URIs: the CSSSelector class accepts

    diff --git a/doc/html/element_classes.html b/doc/html/element_classes.html index 1c25959..0e8616b 100644 --- a/doc/html/element_classes.html +++ b/doc/html/element_classes.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Using custom Element classes in lxml

    +

    Using custom Element classes in lxml

    lxml has very sophisticated support for custom Element classes. You can provide your own classes for Elements and have lxml use them by @@ -525,7 +525,7 @@ and use the blank decorator instead:

    diff --git a/doc/html/elementsoup.html b/doc/html/elementsoup.html index 736ffae..5d05af7 100644 --- a/doc/html/elementsoup.html +++ b/doc/html/elementsoup.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    BeautifulSoup Parser

    +

    BeautifulSoup Parser

    BeautifulSoup is a Python package for working with real-world and broken HTML, just like lxml.html. As of version 4.x, it can use @@ -203,7 +203,7 @@ you can simply pass the resulting Unicode string into lxml's parser.

    diff --git a/doc/html/extensions.html b/doc/html/extensions.html index 7de203b..84c1543 100644 --- a/doc/html/extensions.html +++ b/doc/html/extensions.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Python extensions for XPath and XSLT

    +

    Python extensions for XPath and XSLT

    This document describes how to use Python extension functions in XPath and XSLT like this:

    @@ -530,7 +530,7 @@ will work:

    diff --git a/doc/html/html5parser.html b/doc/html/html5parser.html index c448e38..67ed302 100644 --- a/doc/html/html5parser.html +++ b/doc/html/html5parser.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    html5lib Parser

    +

    html5lib Parser

    html5lib is a Python package that implements the HTML5 parsing algorithm which is heavily influenced by current browsers and based on the WHATWG @@ -90,7 +90,7 @@ module. Note that these are the parser classes provided by html5lib.

    diff --git a/doc/html/index.html b/doc/html/index.html index 6d7fcba..f644b29 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -26,7 +26,7 @@ function hide_menu() {
    -

    lxml - XML and HTML with Python

    +

    lxml - XML and HTML with Python

    @@ -72,7 +72,7 @@ Jetbrains supports the lxml project by donating free licenses of their

    Documentation

    -

    The complete lxml documentation is available for download as PDF +

    The complete lxml documentation is available for download as PDF documentation. The HTML documentation from this web site is part of the normal source download.

    diff --git a/doc/html/installation.html b/doc/html/installation.html index e769f8d..ccc7b7d 100644 --- a/doc/html/installation.html +++ b/doc/html/installation.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Installing lxml

    +

    Installing lxml

    Contents

    @@ -208,7 +208,7 @@ read the
    diff --git a/doc/html/intro.html b/doc/html/intro.html index fdf0f2d..38db610 100644 --- a/doc/html/intro.html +++ b/doc/html/intro.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Why lxml?

    +

    Why lxml?

    Contents

    @@ -82,7 +82,7 @@ having to learn new things -- XML is complicated enough.

    diff --git a/doc/html/lxml-source-howto.html b/doc/html/lxml-source-howto.html index db3d694..60d2f52 100644 --- a/doc/html/lxml-source-howto.html +++ b/doc/html/lxml-source-howto.html @@ -27,7 +27,7 @@ function hide_menu() {
    -

    How to read the source of lxml

    +

    How to read the source of lxml

    @@ -286,7 +286,7 @@ implemented in pure Python.

    diff --git a/doc/html/lxmlhtml.html b/doc/html/lxmlhtml.html index 85f0498..17fc2ee 100644 --- a/doc/html/lxmlhtml.html +++ b/doc/html/lxmlhtml.html @@ -25,7 +25,7 @@ function hide_menu() {
    -

    lxml.html

    +

    lxml.html

    @@ -696,7 +696,7 @@ microformat.

    diff --git a/doc/html/objectify.html b/doc/html/objectify.html index a9c8a44..9c79143 100644 --- a/doc/html/objectify.html +++ b/doc/html/objectify.html @@ -25,7 +25,7 @@ function hide_menu() {
    -

    lxml.objectify

    +

    lxml.objectify

    @@ -1165,7 +1165,7 @@ support any XPath expression. diff --git a/doc/html/parsing.html b/doc/html/parsing.html index 5094e3c..3526930 100644 --- a/doc/html/parsing.html +++ b/doc/html/parsing.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Parsing XML and HTML with lxml

    +

    Parsing XML and HTML with lxml

    lxml provides a very simple and powerful API for parsing XML and HTML. It supports one-step parsing as well as step-by-step parsing using an @@ -893,7 +893,7 @@ with UTF-8 is also considerably faster in most cases.

    diff --git a/doc/html/performance.html b/doc/html/performance.html index e4dd813..a3ac32e 100644 --- a/doc/html/performance.html +++ b/doc/html/performance.html @@ -27,7 +27,7 @@ function hide_menu() {
    -

    Benchmarks and Speed

    +

    Benchmarks and Speed

    @@ -798,7 +798,7 @@ random.

    diff --git a/doc/html/resolvers.html b/doc/html/resolvers.html index 148b37b..6b029ca 100644 --- a/doc/html/resolvers.html +++ b/doc/html/resolvers.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Document loading and URL resolving

    +

    Document loading and URL resolving

    Contents

    @@ -250,7 +250,7 @@ documents or raises exceptions if access is denied.
    diff --git a/doc/html/sax.html b/doc/html/sax.html index 6c21d89..30c4bf9 100644 --- a/doc/html/sax.html +++ b/doc/html/sax.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Sax support

    +

    Sax support

    In this document we'll describe lxml's SAX support. lxml has support for producing SAX events for an ElementTree or Element. lxml can also turn SAX @@ -124,7 +124,7 @@ DOM implementation cannot generate SAX events from a DOM tree.

    diff --git a/doc/html/sitemap.html b/doc/html/sitemap.html index 23fe82c..9d16604 100644 --- a/doc/html/sitemap.html +++ b/doc/html/sitemap.html @@ -8,5 +8,5 @@

    Sitemap of lxml.de - Processing XML and HTML with Python

    -
    +
    \ No newline at end of file diff --git a/doc/html/tutorial.html b/doc/html/tutorial.html index 8868a93..6973861 100644 --- a/doc/html/tutorial.html +++ b/doc/html/tutorial.html @@ -27,7 +27,7 @@ function hide_menu() {
    -

    The lxml.etree Tutorial

    +

    The lxml.etree Tutorial

    @@ -1184,7 +1184,7 @@ whereas the other two examples would raise a StopIt diff --git a/doc/html/validation.html b/doc/html/validation.html index 2de5ecc..840ddab 100644 --- a/doc/html/validation.html +++ b/doc/html/validation.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    Validation with lxml

    +

    Validation with lxml

    Apart from the built-in DTD support in parsers, lxml currently supports three schema languages: DTD, Relax NG and XML Schema. All three provide @@ -556,7 +556,7 @@ reporting during validation.

    diff --git a/doc/html/xpathxslt.html b/doc/html/xpathxslt.html index e911844..345c664 100644 --- a/doc/html/xpathxslt.html +++ b/doc/html/xpathxslt.html @@ -24,7 +24,7 @@ function hide_menu() {
    -

    XPath and XSLT with lxml

    +

    XPath and XSLT with lxml

    lxml supports XPath 1.0, XSLT 1.0 and the EXSLT extensions through libxml2 and libxslt in a standards compliant way.

    @@ -632,7 +632,7 @@ If you want to free it from memory, just do:

    diff --git a/doc/main.txt b/doc/main.txt index 90dbab5..c3a8e46 100644 --- a/doc/main.txt +++ b/doc/main.txt @@ -157,8 +157,8 @@ Index `_ (PyPI). It has the source that compiles on various platforms. The source distribution is signed with `this key `_. -The latest version is `lxml 4.3.1`_, released 2019-02-08 -(`changes for 4.3.1`_). `Older versions <#old-versions>`_ +The latest version is `lxml 4.3.2`_, released 2019-02-29 +(`changes for 4.3.2`_). `Older versions <#old-versions>`_ are listed below. Please take a look at the @@ -251,7 +251,9 @@ See the websites of lxml .. and the `latest in-development version `_. -.. _`PDF documentation`: lxmldoc-4.3.1.pdf +.. _`PDF documentation`: lxmldoc-4.3.2.pdf + +* `lxml 4.3.2`_, released 2019-02-29 (`changes for 4.3.2`_) * `lxml 4.3.1`_, released 2019-02-08 (`changes for 4.3.1`_) @@ -281,6 +283,7 @@ See the websites of lxml * `older releases `_ +.. _`lxml 4.3.2`: /files/lxml-4.3.2.tgz .. _`lxml 4.3.1`: /files/lxml-4.3.1.tgz .. _`lxml 4.3.0`: /files/lxml-4.3.0.tgz .. _`lxml 4.2.6`: /files/lxml-4.2.6.tgz @@ -295,6 +298,7 @@ See the websites of lxml .. _`lxml 4.0.0`: /files/lxml-4.0.0.tgz .. _`lxml 3.8.0`: /files/lxml-3.8.0.tgz +.. _`changes for 4.3.2`: /changes-4.3.2.html .. _`changes for 4.3.1`: /changes-4.3.1.html .. _`changes for 4.3.0`: /changes-4.3.0.html .. _`changes for 4.2.6`: /changes-4.2.6.html diff --git a/src/lxml.egg-info/PKG-INFO b/src/lxml.egg-info/PKG-INFO index d4074f1..0b90e60 100644 --- a/src/lxml.egg-info/PKG-INFO +++ b/src/lxml.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: lxml -Version: 4.3.1 +Version: 4.3.2 Summary: Powerful and Pythonic XML processing library combining libxml2/libxslt with the ElementTree API. Home-page: http://lxml.de/ Author: lxml dev team @@ -38,11 +38,18 @@ 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. - 4.3.1 (2019-02-08) + 4.3.2 (2019-02-29) ================== - * LP#1814522: Crash when appending a child subtree that contains unsubstituted - entity references. + Bugs fixed + ---------- + + * Crash in 4.3.1 when appending a child subtree with certain text nodes. + + Other changes + ------------- + + * Built with Cython 0.29.6. diff --git a/src/lxml.egg-info/SOURCES.txt b/src/lxml.egg-info/SOURCES.txt index 1cbab13..940a9ce 100644 --- a/src/lxml.egg-info/SOURCES.txt +++ b/src/lxml.egg-info/SOURCES.txt @@ -56,7 +56,7 @@ doc/html/FAQ.html doc/html/api.html doc/html/build.html doc/html/capi.html -doc/html/changes-4.3.1.html +doc/html/changes-4.3.2.html doc/html/compatibility.html doc/html/credits.html doc/html/cssselect.html diff --git a/src/lxml/_elementpath.c b/src/lxml/_elementpath.c index 6140e15..cdd88d5 100644 --- a/src/lxml/_elementpath.c +++ b/src/lxml/_elementpath.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -33,8 +33,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -626,7 +626,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -1275,7 +1276,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -13759,22 +13760,26 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec #endif /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } diff --git a/src/lxml/apihelpers.pxi b/src/lxml/apihelpers.pxi index bccf5fb..cf932d4 100644 --- a/src/lxml/apihelpers.pxi +++ b/src/lxml/apihelpers.pxi @@ -1269,7 +1269,7 @@ cdef int _replaceSlice(_Element parent, xmlNode* c_node, cdef int _linkChild(xmlNode* c_parent, xmlNode* c_node) except -1: - """Simple version of 'xmlAddChild()' that does not deep-fix the document links. + """Adaptation of 'xmlAddChild()' that deep-fix the document links iteratively. """ assert _isElement(c_node) c_node.parent = c_parent @@ -1279,6 +1279,8 @@ cdef int _linkChild(xmlNode* c_parent, xmlNode* c_node) except -1: c_node.prev = c_parent.last c_parent.last.next = c_node c_parent.last = c_node + + _setTreeDoc(c_node, c_parent.doc) return 0 diff --git a/src/lxml/builder.c b/src/lxml/builder.c index ad1c715..9cadf07 100644 --- a/src/lxml/builder.c +++ b/src/lxml/builder.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -33,8 +33,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -626,7 +626,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -1111,7 +1112,7 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -6769,22 +6770,26 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { } /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } diff --git a/src/lxml/dtd.pxi b/src/lxml/dtd.pxi index 6ea9e69..ca4df70 100644 --- a/src/lxml/dtd.pxi +++ b/src/lxml/dtd.pxi @@ -28,64 +28,64 @@ cdef class _DTDElementContentDecl: def __repr__(self): return "<%s.%s object name=%r type=%r occur=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.type, self.occur, id(self)) - property name: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.name) if self._c_node.name is not NULL else None - - property type: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef int type = self._c_node.type - if type == tree.XML_ELEMENT_CONTENT_PCDATA: - return "pcdata" - elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: - return "element" - elif type == tree.XML_ELEMENT_CONTENT_SEQ: - return "seq" - elif type == tree.XML_ELEMENT_CONTENT_OR: - return "or" - else: - return None - - property occur: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef int occur = self._c_node.ocur - if occur == tree.XML_ELEMENT_CONTENT_ONCE: - return "once" - elif occur == tree.XML_ELEMENT_CONTENT_OPT: - return "opt" - elif occur == tree.XML_ELEMENT_CONTENT_MULT: - return "mult" - elif occur == tree.XML_ELEMENT_CONTENT_PLUS: - return "plus" - else: - return None - - property left: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - c1 = self._c_node.c1 - if c1: - node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - node._dtd = self._dtd - node._c_node = c1 - return node - else: - return None - - property right: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - c2 = self._c_node.c2 - if c2: - node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - node._dtd = self._dtd - node._c_node = c2 - return node - else: - return None + @property + def name(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.name) if self._c_node.name is not NULL else None + + @property + def type(self): + _assertValidDTDNode(self, self._c_node) + cdef int type = self._c_node.type + if type == tree.XML_ELEMENT_CONTENT_PCDATA: + return "pcdata" + elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + return "element" + elif type == tree.XML_ELEMENT_CONTENT_SEQ: + return "seq" + elif type == tree.XML_ELEMENT_CONTENT_OR: + return "or" + else: + return None + + @property + def occur(self): + _assertValidDTDNode(self, self._c_node) + cdef int occur = self._c_node.ocur + if occur == tree.XML_ELEMENT_CONTENT_ONCE: + return "once" + elif occur == tree.XML_ELEMENT_CONTENT_OPT: + return "opt" + elif occur == tree.XML_ELEMENT_CONTENT_MULT: + return "mult" + elif occur == tree.XML_ELEMENT_CONTENT_PLUS: + return "plus" + else: + return None + + @property + def left(self): + _assertValidDTDNode(self, self._c_node) + c1 = self._c_node.c1 + if c1: + node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + node._dtd = self._dtd + node._c_node = c1 + return node + else: + return None + + @property + def right(self): + _assertValidDTDNode(self, self._c_node) + c2 = self._c_node.c2 + if c2: + node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + node._dtd = self._dtd + node._c_node = c2 + return node + else: + return None @cython.final @@ -98,67 +98,67 @@ cdef class _DTDAttributeDecl: def __repr__(self): return "<%s.%s object name=%r elemname=%r prefix=%r type=%r default=%r default_value=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.elemname, self.prefix, self.type, self.default, self.default_value, id(self)) - property name: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.name) if self._c_node.name is not NULL else None - - property elemname: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None - - property prefix: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None - - property type: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef int type = self._c_node.atype - if type == tree.XML_ATTRIBUTE_CDATA: - return "cdata" - elif type == tree.XML_ATTRIBUTE_ID: - return "id" - elif type == tree.XML_ATTRIBUTE_IDREF: - return "idref" - elif type == tree.XML_ATTRIBUTE_IDREFS: - return "idrefs" - elif type == tree.XML_ATTRIBUTE_ENTITY: - return "entity" - elif type == tree.XML_ATTRIBUTE_ENTITIES: - return "entities" - elif type == tree.XML_ATTRIBUTE_NMTOKEN: - return "nmtoken" - elif type == tree.XML_ATTRIBUTE_NMTOKENS: - return "nmtokens" - elif type == tree.XML_ATTRIBUTE_ENUMERATION: - return "enumeration" - elif type == tree.XML_ATTRIBUTE_NOTATION: - return "notation" - else: - return None - - property default: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef int default = self._c_node.def_ - if default == tree.XML_ATTRIBUTE_NONE: - return "none" - elif default == tree.XML_ATTRIBUTE_REQUIRED: - return "required" - elif default == tree.XML_ATTRIBUTE_IMPLIED: - return "implied" - elif default == tree.XML_ATTRIBUTE_FIXED: - return "fixed" - else: - return None - - property default_value: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + @property + def name(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.name) if self._c_node.name is not NULL else None + + @property + def elemname(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None + + @property + def prefix(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + + @property + def type(self): + _assertValidDTDNode(self, self._c_node) + cdef int type = self._c_node.atype + if type == tree.XML_ATTRIBUTE_CDATA: + return "cdata" + elif type == tree.XML_ATTRIBUTE_ID: + return "id" + elif type == tree.XML_ATTRIBUTE_IDREF: + return "idref" + elif type == tree.XML_ATTRIBUTE_IDREFS: + return "idrefs" + elif type == tree.XML_ATTRIBUTE_ENTITY: + return "entity" + elif type == tree.XML_ATTRIBUTE_ENTITIES: + return "entities" + elif type == tree.XML_ATTRIBUTE_NMTOKEN: + return "nmtoken" + elif type == tree.XML_ATTRIBUTE_NMTOKENS: + return "nmtokens" + elif type == tree.XML_ATTRIBUTE_ENUMERATION: + return "enumeration" + elif type == tree.XML_ATTRIBUTE_NOTATION: + return "notation" + else: + return None + + @property + def default(self): + _assertValidDTDNode(self, self._c_node) + cdef int default = self._c_node.def_ + if default == tree.XML_ATTRIBUTE_NONE: + return "none" + elif default == tree.XML_ATTRIBUTE_REQUIRED: + return "required" + elif default == tree.XML_ATTRIBUTE_IMPLIED: + return "implied" + elif default == tree.XML_ATTRIBUTE_FIXED: + return "fixed" + else: + return None + + @property + def default_value(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None def itervalues(self): _assertValidDTDNode(self, self._c_node) @@ -181,44 +181,44 @@ cdef class _DTDElementDecl: def __repr__(self): return "<%s.%s object name=%r prefix=%r type=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.prefix, self.type, id(self)) - property name: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.name) if self._c_node.name is not NULL else None - - property prefix: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None - - property type: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef int type = self._c_node.etype - if type == tree.XML_ELEMENT_TYPE_UNDEFINED: - return "undefined" - elif type == tree.XML_ELEMENT_TYPE_EMPTY: - return "empty" - elif type == tree.XML_ELEMENT_TYPE_ANY: - return "any" - elif type == tree.XML_ELEMENT_TYPE_MIXED: - return "mixed" - elif type == tree.XML_ELEMENT_TYPE_ELEMENT: - return "element" - else: - return None - - property content: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - cdef tree.xmlElementContent *content = self._c_node.content - if content: - node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - node._dtd = self._dtd - node._c_node = content - return node - else: - return None + @property + def name(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.name) if self._c_node.name is not NULL else None + + @property + def prefix(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + + @property + def type(self): + _assertValidDTDNode(self, self._c_node) + cdef int type = self._c_node.etype + if type == tree.XML_ELEMENT_TYPE_UNDEFINED: + return "undefined" + elif type == tree.XML_ELEMENT_TYPE_EMPTY: + return "empty" + elif type == tree.XML_ELEMENT_TYPE_ANY: + return "any" + elif type == tree.XML_ELEMENT_TYPE_MIXED: + return "mixed" + elif type == tree.XML_ELEMENT_TYPE_ELEMENT: + return "element" + else: + return None + + @property + def content(self): + _assertValidDTDNode(self, self._c_node) + cdef tree.xmlElementContent *content = self._c_node.content + if content: + node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + node._dtd = self._dtd + node._c_node = content + return node + else: + return None def iterattributes(self): _assertValidDTDNode(self, self._c_node) @@ -243,20 +243,20 @@ cdef class _DTDEntityDecl: def __repr__(self): return "<%s.%s object name=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, id(self)) - property name: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.name) if self._c_node.name is not NULL else None + @property + def name(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.name) if self._c_node.name is not NULL else None - property orig: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None + @property + def orig(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None - property content: - def __get__(self): - _assertValidDTDNode(self, self._c_node) - return funicode(self._c_node.content) if self._c_node.content is not NULL else None + @property + def content(self): + _assertValidDTDNode(self, self._c_node) + return funicode(self._c_node.content) if self._c_node.content is not NULL else None ################################################################################ @@ -293,23 +293,23 @@ cdef class DTD(_Validator): self._error_log._buildExceptionMessage(u"error parsing DTD"), self._error_log) - property name: - def __get__(self): - if self._c_dtd is NULL: - return None - return funicodeOrNone(self._c_dtd.name) - - property external_id: - def __get__(self): - if self._c_dtd is NULL: - return None - return funicodeOrNone(self._c_dtd.ExternalID) - - property system_url: - def __get__(self): - if self._c_dtd is NULL: - return None - return funicodeOrNone(self._c_dtd.SystemID) + @property + def name(self): + if self._c_dtd is NULL: + return None + return funicodeOrNone(self._c_dtd.name) + + @property + def external_id(self): + if self._c_dtd is NULL: + return None + return funicodeOrNone(self._c_dtd.ExternalID) + + @property + def system_url(self): + if self._c_dtd is NULL: + return None + return funicodeOrNone(self._c_dtd.SystemID) def iterelements(self): cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL diff --git a/src/lxml/etree.c b/src/lxml/etree.c index c781f4d..0ab54e8 100644 --- a/src/lxml/etree.c +++ b/src/lxml/etree.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -100,8 +100,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -740,7 +740,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -1288,7 +1289,7 @@ struct __pyx_t_4lxml_5etree__nscache { size_t last; }; -/* "src/lxml/proxy.pxi":582 +/* "src/lxml/proxy.pxi":590 * # adopt an xmlDoc from an external libxml2 document source * * cdef _Document _adoptForeignDoc(xmlDoc* c_doc, _BaseParser parser=None, bint is_owned=True): # <<<<<<<<<<<<<< @@ -1313,7 +1314,7 @@ struct __pyx_t_4lxml_5etree__ns_node_ref { xmlNode *node; }; -/* "src/lxml/xmlerror.pxi":676 +/* "src/lxml/xmlerror.pxi":680 * * * cdef void _connectGenericErrorLog(log, int c_domain=-1): # <<<<<<<<<<<<<< @@ -1325,7 +1326,7 @@ struct __pyx_opt_args_4lxml_5etree__connectGenericErrorLog { int c_domain; }; -/* "lxml/etree.pyx":2725 +/* "lxml/etree.pyx":2736 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -1442,7 +1443,7 @@ struct __pyx_obj_4lxml_5etree__LogEntry { }; -/* "src/lxml/xmlerror.pxi":180 +/* "src/lxml/xmlerror.pxi":184 * * * cdef class _BaseErrorLog: # <<<<<<<<<<<<<< @@ -1457,7 +1458,7 @@ struct __pyx_obj_4lxml_5etree__BaseErrorLog { }; -/* "src/lxml/xmlerror.pxi":270 +/* "src/lxml/xmlerror.pxi":274 * return message * * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<< @@ -1471,7 +1472,7 @@ struct __pyx_obj_4lxml_5etree__ListErrorLog { }; -/* "src/lxml/xmlerror.pxi":388 +/* "src/lxml/xmlerror.pxi":392 * @cython.final * @cython.internal * cdef class _ErrorLogContext: # <<<<<<<<<<<<<< @@ -1489,7 +1490,7 @@ struct __pyx_obj_4lxml_5etree__ErrorLogContext { }; -/* "src/lxml/xmlerror.pxi":425 +/* "src/lxml/xmlerror.pxi":429 * * * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<< @@ -1502,7 +1503,7 @@ struct __pyx_obj_4lxml_5etree__ErrorLog { }; -/* "src/lxml/xmlerror.pxi":478 +/* "src/lxml/xmlerror.pxi":482 * self._entries.append(entry) * * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<< @@ -1514,7 +1515,7 @@ struct __pyx_obj_4lxml_5etree__DomainErrorLog { }; -/* "src/lxml/xmlerror.pxi":487 +/* "src/lxml/xmlerror.pxi":491 * _ErrorLog.receive(self, entry) * * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<< @@ -1527,7 +1528,7 @@ struct __pyx_obj_4lxml_5etree__RotatingErrorLog { }; -/* "src/lxml/xmlerror.pxi":505 +/* "src/lxml/xmlerror.pxi":509 * del self._entries[:offset] * * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<< @@ -1590,7 +1591,7 @@ struct LxmlElement { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementType; -/* "lxml/etree.pyx":1623 +/* "lxml/etree.pyx":1634 * * @cython.internal * cdef class __ContentOnlyElement(_Element): # <<<<<<<<<<<<<< @@ -1603,43 +1604,43 @@ struct __pyx_obj_4lxml_5etree___ContentOnlyElement { }; -/* "lxml/etree.pyx":1690 +/* "lxml/etree.pyx":1701 * return [] * * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_obj_4lxml_5etree__Comment { struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base; }; -/* "lxml/etree.pyx":1698 +/* "lxml/etree.pyx":1709 * return "" % strrepr(self.text) * * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_obj_4lxml_5etree__ProcessingInstruction { struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base; }; -/* "lxml/etree.pyx":1749 +/* "lxml/etree.pyx":1760 * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall * * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_obj_4lxml_5etree__Entity { struct __pyx_obj_4lxml_5etree___ContentOnlyElement __pyx_base; }; -/* "lxml/etree.pyx":1778 +/* "lxml/etree.pyx":1789 * * * cdef class QName: # <<<<<<<<<<<<<< @@ -1654,7 +1655,7 @@ struct __pyx_obj_4lxml_5etree_QName { }; -/* "lxml/etree.pyx":1847 +/* "lxml/etree.pyx":1858 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -1670,7 +1671,7 @@ struct LxmlElementTree { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType; -/* "lxml/etree.pyx":2395 +/* "lxml/etree.pyx":2406 * @cython.final * @cython.freelist(16) * cdef class _Attrib: # <<<<<<<<<<<<<< @@ -1683,7 +1684,7 @@ struct __pyx_obj_4lxml_5etree__Attrib { }; -/* "lxml/etree.pyx":2533 +/* "lxml/etree.pyx":2544 * @cython.final * @cython.internal * cdef class _AttribIterator: # <<<<<<<<<<<<<< @@ -1698,7 +1699,7 @@ struct __pyx_obj_4lxml_5etree__AttribIterator { }; -/* "lxml/etree.pyx":2574 +/* "lxml/etree.pyx":2585 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -1716,7 +1717,7 @@ struct LxmlElementTagMatcher { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType; -/* "lxml/etree.pyx":2605 +/* "lxml/etree.pyx":2616 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< @@ -1731,7 +1732,7 @@ struct LxmlElementIterator { __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType; -/* "lxml/etree.pyx":2642 +/* "lxml/etree.pyx":2653 * @cython.final * @cython.internal * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<< @@ -1750,7 +1751,7 @@ struct __pyx_obj_4lxml_5etree__MultiTagMatcher { }; -/* "lxml/etree.pyx":2779 +/* "lxml/etree.pyx":2790 * return False * * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<< @@ -1766,7 +1767,7 @@ struct __pyx_obj_4lxml_5etree__ElementMatchIterator { }; -/* "lxml/etree.pyx":2808 +/* "lxml/etree.pyx":2819 * return current_node * * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1778,7 +1779,7 @@ struct __pyx_obj_4lxml_5etree_ElementChildIterator { }; -/* "lxml/etree.pyx":2828 +/* "lxml/etree.pyx":2839 * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None * * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1790,7 +1791,7 @@ struct __pyx_obj_4lxml_5etree_SiblingsIterator { }; -/* "lxml/etree.pyx":2843 +/* "lxml/etree.pyx":2854 * self._storeNext(node) * * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -1802,7 +1803,7 @@ struct __pyx_obj_4lxml_5etree_AncestorsIterator { }; -/* "lxml/etree.pyx":2853 +/* "lxml/etree.pyx":2864 * self._storeNext(node) * * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<< @@ -1818,7 +1819,7 @@ struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator { }; -/* "lxml/etree.pyx":2929 +/* "lxml/etree.pyx":2940 * return NULL * * cdef class ElementTextIterator: # <<<<<<<<<<<<<< @@ -1832,7 +1833,7 @@ struct __pyx_obj_4lxml_5etree_ElementTextIterator { }; -/* "lxml/etree.pyx":3055 +/* "lxml/etree.pyx":3066 * * * cdef class CDATA: # <<<<<<<<<<<<<< @@ -1866,8 +1867,8 @@ struct __pyx_obj_4lxml_5etree__ReadOnlyProxy { * @cython.final * @cython.internal * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for processing instructions (for internal use only!)" - * property target: + * """A read-only proxy for processing instructions (for internal use only!)""" + * @property */ struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy { struct __pyx_obj_4lxml_5etree__ReadOnlyProxy __pyx_base; @@ -1878,7 +1879,7 @@ struct __pyx_obj_4lxml_5etree__ReadOnlyPIProxy { * @cython.final * @cython.internal * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for entity references (for internal use only!)" + * """A read-only proxy for entity references (for internal use only!)""" * property name: */ struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy { @@ -1890,7 +1891,7 @@ struct __pyx_obj_4lxml_5etree__ReadOnlyEntityProxy { * * @cython.internal * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"The main read-only Element proxy class (for internal use only!)." + * """The main read-only Element proxy class (for internal use only!).""" * */ struct __pyx_obj_4lxml_5etree__ReadOnlyElementProxy { @@ -1940,7 +1941,7 @@ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyProxy { * @cython.final * @cython.internal * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<< - * u"""A read-only proxy that allows changing the text/target content of a + * """A read-only proxy that allows changing the text/target content of a * processing instruction. */ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy { @@ -1952,7 +1953,7 @@ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyPIProxy { * @cython.final * @cython.internal * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for entity references (for internal use only!)" + * "A read-only proxy for entity references (for internal use only!)" * property name: */ struct __pyx_obj_4lxml_5etree__ModifyContentOnlyEntityProxy { @@ -3140,7 +3141,7 @@ struct __pyx_obj_4lxml_5etree_XSLTExtension { }; -/* "lxml/etree.pyx":3497 +/* "lxml/etree.pyx":3508 * # Validation * * cdef class DocumentInvalid(LxmlError): # <<<<<<<<<<<<<< @@ -3152,7 +3153,7 @@ struct __pyx_obj_4lxml_5etree_DocumentInvalid { }; -/* "lxml/etree.pyx":3505 +/* "lxml/etree.pyx":3516 * * * cdef class _Validator: # <<<<<<<<<<<<<< @@ -3618,7 +3619,7 @@ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_10___aexit__ { /* "src/lxml/dtd.pxi":163 - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -3632,7 +3633,7 @@ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_11_itervalues { /* "src/lxml/dtd.pxi":223 - * return None + * return None * * def iterattributes(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -3647,7 +3648,7 @@ struct __pyx_obj_4lxml_5etree___pyx_scope_struct_12_iterattributes { /* "src/lxml/dtd.pxi":314 - * return funicodeOrNone(self._c_dtd.SystemID) + * return funicodeOrNone(self._c_dtd.SystemID) * * def iterelements(self): # <<<<<<<<<<<<<< * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL @@ -3729,7 +3730,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setError(struct __pyx_obj_4lxm static PyObject *__pyx_f_4lxml_5etree_9_LogEntry__setGeneric(struct __pyx_obj_4lxml_5etree__LogEntry *, int, int, int, int, PyObject *, PyObject *); -/* "src/lxml/xmlerror.pxi":180 +/* "src/lxml/xmlerror.pxi":184 * * * cdef class _BaseErrorLog: # <<<<<<<<<<<<<< @@ -3752,7 +3753,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *); -/* "src/lxml/xmlerror.pxi":270 +/* "src/lxml/xmlerror.pxi":274 * return message * * cdef class _ListErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<< @@ -3766,7 +3767,7 @@ struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog { static struct __pyx_vtabstruct_4lxml_5etree__ListErrorLog *__pyx_vtabptr_4lxml_5etree__ListErrorLog; -/* "src/lxml/xmlerror.pxi":388 +/* "src/lxml/xmlerror.pxi":392 * @cython.final * @cython.internal * cdef class _ErrorLogContext: # <<<<<<<<<<<<<< @@ -3783,7 +3784,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_obj_4lxml_5etree__ErrorLogContext *); -/* "src/lxml/xmlerror.pxi":425 +/* "src/lxml/xmlerror.pxi":429 * * * cdef class _ErrorLog(_ListErrorLog): # <<<<<<<<<<<<<< @@ -3804,7 +3805,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5etree__ErrorLog *); -/* "src/lxml/xmlerror.pxi":478 +/* "src/lxml/xmlerror.pxi":482 * self._entries.append(entry) * * cdef class _DomainErrorLog(_ErrorLog): # <<<<<<<<<<<<<< @@ -3818,7 +3819,7 @@ struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog { static struct __pyx_vtabstruct_4lxml_5etree__DomainErrorLog *__pyx_vtabptr_4lxml_5etree__DomainErrorLog; -/* "src/lxml/xmlerror.pxi":487 +/* "src/lxml/xmlerror.pxi":491 * _ErrorLog.receive(self, entry) * * cdef class _RotatingErrorLog(_ErrorLog): # <<<<<<<<<<<<<< @@ -3832,7 +3833,7 @@ struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog { static struct __pyx_vtabstruct_4lxml_5etree__RotatingErrorLog *__pyx_vtabptr_4lxml_5etree__RotatingErrorLog; -/* "src/lxml/xmlerror.pxi":505 +/* "src/lxml/xmlerror.pxi":509 * del self._entries[:offset] * * cdef class PyErrorLog(_BaseErrorLog): # <<<<<<<<<<<<<< @@ -3891,7 +3892,7 @@ static struct __pyx_vtabstruct_4lxml_5etree_DocInfo *__pyx_vtabptr_4lxml_5etree_ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5etree_DocInfo *); -/* "lxml/etree.pyx":1623 +/* "lxml/etree.pyx":1634 * * @cython.internal * cdef class __ContentOnlyElement(_Element): # <<<<<<<<<<<<<< @@ -3905,12 +3906,12 @@ struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement { static struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement; -/* "lxml/etree.pyx":1690 +/* "lxml/etree.pyx":1701 * return [] * * cdef class _Comment(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_vtabstruct_4lxml_5etree__Comment { @@ -3919,12 +3920,12 @@ struct __pyx_vtabstruct_4lxml_5etree__Comment { static struct __pyx_vtabstruct_4lxml_5etree__Comment *__pyx_vtabptr_4lxml_5etree__Comment; -/* "lxml/etree.pyx":1698 +/* "lxml/etree.pyx":1709 * return "" % strrepr(self.text) * * cdef class _ProcessingInstruction(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction { @@ -3933,12 +3934,12 @@ struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction { static struct __pyx_vtabstruct_4lxml_5etree__ProcessingInstruction *__pyx_vtabptr_4lxml_5etree__ProcessingInstruction; -/* "lxml/etree.pyx":1749 +/* "lxml/etree.pyx":1760 * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall * * cdef class _Entity(__ContentOnlyElement): # <<<<<<<<<<<<<< - * property tag: - * def __get__(self): + * @property + * def tag(self): */ struct __pyx_vtabstruct_4lxml_5etree__Entity { @@ -3948,7 +3949,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__Entity *__pyx_vtabptr_4lxml_5etree_ __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTreeType; -/* "lxml/etree.pyx":1847 +/* "lxml/etree.pyx":1858 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -3964,7 +3965,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementTagMatcherType; -/* "lxml/etree.pyx":2574 +/* "lxml/etree.pyx":2585 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -3979,7 +3980,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ElementTagMatcher *__pyx_vtabptr_4l __PYX_EXTERN_C DL_EXPORT(PyTypeObject) LxmlElementIteratorType; -/* "lxml/etree.pyx":2605 +/* "lxml/etree.pyx":2616 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< @@ -3994,7 +3995,7 @@ struct __pyx_vtabstruct_4lxml_5etree__ElementIterator { static struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *__pyx_vtabptr_4lxml_5etree__ElementIterator; -/* "lxml/etree.pyx":2642 +/* "lxml/etree.pyx":2653 * @cython.final * @cython.internal * cdef class _MultiTagMatcher: # <<<<<<<<<<<<<< @@ -4027,7 +4028,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *); -/* "lxml/etree.pyx":2779 +/* "lxml/etree.pyx":2790 * return False * * cdef class _ElementMatchIterator: # <<<<<<<<<<<<<< @@ -4044,7 +4045,7 @@ static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(st static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *); -/* "lxml/etree.pyx":2808 +/* "lxml/etree.pyx":2819 * return current_node * * cdef class ElementChildIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4058,7 +4059,7 @@ struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator { static struct __pyx_vtabstruct_4lxml_5etree_ElementChildIterator *__pyx_vtabptr_4lxml_5etree_ElementChildIterator; -/* "lxml/etree.pyx":2828 +/* "lxml/etree.pyx":2839 * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None * * cdef class SiblingsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4072,7 +4073,7 @@ struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator { static struct __pyx_vtabstruct_4lxml_5etree_SiblingsIterator *__pyx_vtabptr_4lxml_5etree_SiblingsIterator; -/* "lxml/etree.pyx":2843 +/* "lxml/etree.pyx":2854 * self._storeNext(node) * * cdef class AncestorsIterator(_ElementMatchIterator): # <<<<<<<<<<<<<< @@ -4086,7 +4087,7 @@ struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator { static struct __pyx_vtabstruct_4lxml_5etree_AncestorsIterator *__pyx_vtabptr_4lxml_5etree_AncestorsIterator; -/* "lxml/etree.pyx":2853 +/* "lxml/etree.pyx":2864 * self._storeNext(node) * * cdef class ElementDepthFirstIterator: # <<<<<<<<<<<<<< @@ -4125,8 +4126,8 @@ static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *__pyx_vtabptr_4lxml_ * @cython.final * @cython.internal * cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for processing instructions (for internal use only!)" - * property target: + * """A read-only proxy for processing instructions (for internal use only!)""" + * @property */ struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy { @@ -4139,7 +4140,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy *__pyx_vtabptr_4lxm * @cython.final * @cython.internal * cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for entity references (for internal use only!)" + * """A read-only proxy for entity references (for internal use only!)""" * property name: */ @@ -4153,7 +4154,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyEntityProxy *__pyx_vtabptr_ * * @cython.internal * cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): # <<<<<<<<<<<<<< - * u"The main read-only Element proxy class (for internal use only!)." + * """The main read-only Element proxy class (for internal use only!).""" * */ @@ -4198,7 +4199,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyProxy *__pyx_vtabp * @cython.final * @cython.internal * cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<< - * u"""A read-only proxy that allows changing the text/target content of a + * """A read-only proxy that allows changing the text/target content of a * processing instruction. */ @@ -4212,7 +4213,7 @@ static struct __pyx_vtabstruct_4lxml_5etree__ModifyContentOnlyPIProxy *__pyx_vta * @cython.final * @cython.internal * cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): # <<<<<<<<<<<<<< - * u"A read-only proxy for entity references (for internal use only!)" + * "A read-only proxy for entity references (for internal use only!)" * property name: */ @@ -5146,7 +5147,7 @@ struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension { static struct __pyx_vtabstruct_4lxml_5etree_XSLTExtension *__pyx_vtabptr_4lxml_5etree_XSLTExtension; -/* "lxml/etree.pyx":3505 +/* "lxml/etree.pyx":3516 * * * cdef class _Validator: # <<<<<<<<<<<<<< @@ -5716,7 +5717,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObj static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -6219,7 +6220,7 @@ static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* ClassMethod.proto */ #include "descrobject.h" -static PyObject* __Pyx_Method_ClassMethod(PyObject *method); +static CYTHON_UNUSED PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* RegisterModuleCleanup.proto */ static void __pyx_module_cleanup(PyObject *self); @@ -6837,6 +6838,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__appendToNsCache(__pyx_t_4lxml_5et static int __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(xmlNode *, __pyx_t_4lxml_5etree__nscache *, xmlNs **); /*proto*/ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *, __pyx_t_4lxml_5etree__nscache *, xmlNs *); /*proto*/ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *, xmlDoc *, xmlNode *); /*proto*/ +static void __pyx_f_4lxml_5etree__setTreeDoc(xmlNode *, xmlDoc *); /*proto*/ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixDocChildren(xmlNode *, xmlDoc *); /*proto*/ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *, xmlNode *, xmlNode *, __pyx_t_4lxml_5etree__nscache *, xmlNs *); /*proto*/ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *, struct LxmlDocument *, size_t); /*proto*/ @@ -7856,7 +7858,7 @@ static const char __pyx_k_StopIteration[] = "StopIteration"; static const char __pyx_k_Unknown_error[] = "\077\077 Unknown error \077\077\n"; static const char __pyx_k_XIncludeError[] = "XIncludeError"; static const char __pyx_k_XMLPullParser[] = "XMLPullParser"; -static const char __pyx_k_XML_line_3165[] = "XML (line 3165)"; +static const char __pyx_k_XML_line_3176[] = "XML (line 3176)"; static const char __pyx_k_XSLTExtension[] = "XSLTExtension"; static const char __pyx_k_XSLTSaveError[] = "XSLTSaveError"; static const char __pyx_k_XSLT_strparam[] = "XSLT.strparam"; @@ -9036,7 +9038,7 @@ static PyObject *__pyx_n_s_XMLSchemaValidateError; static PyObject *__pyx_n_s_XMLSyntaxError; static PyObject *__pyx_n_s_XMLTreeBuilder; static PyObject *__pyx_kp_s_XML_declaration_already_written; -static PyObject *__pyx_kp_u_XML_line_3165; +static PyObject *__pyx_kp_u_XML_line_3176; static PyObject *__pyx_kp_u_XML_text_parser_None_base_url_No; static PyObject *__pyx_n_u_XPATH_LOCATIONSET; static PyObject *__pyx_n_u_XPATH_POINT; @@ -15818,8 +15820,7 @@ static void __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(xmlNode *__pyx_ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_doc, xmlDoc *__pyx_v_c_source_doc, xmlNode *__pyx_v_c_element) { xmlNode *__pyx_v_c_start_node; xmlNode *__pyx_v_c_node; - xmlDoc *__pyx_v_c_doc; - xmlAttr *__pyx_v_c_attr; + CYTHON_UNUSED xmlDoc *__pyx_v_c_doc; __pyx_t_4lxml_5etree__nscache __pyx_v_c_ns_cache; xmlNs *__pyx_v_c_del_ns_list; PyObject *__pyx_v_proxy_count = 0; @@ -15924,23 +15925,14 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * c_start_node = c_element * * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) # <<<<<<<<<<<<<< - * # 0) set C doc link - * c_element.doc = c_doc - */ - BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_element, 1); - - /* "src/lxml/proxy.pxi":341 - * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) - * # 0) set C doc link - * c_element.doc = c_doc # <<<<<<<<<<<<<< - * * if tree._isElementOrXInclude(c_element): + * if hasProxy(c_element): */ - __pyx_v_c_element->doc = __pyx_v_c_doc; + BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_element, 1); - /* "src/lxml/proxy.pxi":343 - * c_element.doc = c_doc + /* "src/lxml/proxy.pxi":340 * + * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) * if tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<< * if hasProxy(c_element): * proxy_count += 1 @@ -15948,8 +15940,8 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = (_isElementOrXInclude(__pyx_v_c_element) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":344 - * + /* "src/lxml/proxy.pxi":341 + * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) * if tree._isElementOrXInclude(c_element): * if hasProxy(c_element): # <<<<<<<<<<<<<< * proxy_count += 1 @@ -15958,20 +15950,20 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_element) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":345 + /* "src/lxml/proxy.pxi":342 * if tree._isElementOrXInclude(c_element): * if hasProxy(c_element): * proxy_count += 1 # <<<<<<<<<<<<<< * * # 1) cut out namespaces defined here that are already known by */ - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_proxy_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 345, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_v_proxy_count, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(4, 342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_proxy_count, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/proxy.pxi":344 - * + /* "src/lxml/proxy.pxi":341 + * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) * if tree._isElementOrXInclude(c_element): * if hasProxy(c_element): # <<<<<<<<<<<<<< * proxy_count += 1 @@ -15979,7 +15971,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":349 + /* "src/lxml/proxy.pxi":346 * # 1) cut out namespaces defined here that are already known by * # the ancestors * if c_element.nsDef is not NULL: # <<<<<<<<<<<<<< @@ -15989,7 +15981,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_c_element->nsDef != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":350 + /* "src/lxml/proxy.pxi":347 * # the ancestors * if c_element.nsDef is not NULL: * try: # <<<<<<<<<<<<<< @@ -16005,16 +15997,16 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "src/lxml/proxy.pxi":351 + /* "src/lxml/proxy.pxi":348 * if c_element.nsDef is not NULL: * try: * _stripRedundantNamespaceDeclarations(c_element, &c_ns_cache, &c_del_ns_list) # <<<<<<<<<<<<<< * except: * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) */ - __pyx_t_8 = __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(__pyx_v_c_element, (&__pyx_v_c_ns_cache), (&__pyx_v_c_del_ns_list)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 351, __pyx_L7_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__stripRedundantNamespaceDeclarations(__pyx_v_c_element, (&__pyx_v_c_ns_cache), (&__pyx_v_c_del_ns_list)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 348, __pyx_L7_error) - /* "src/lxml/proxy.pxi":350 + /* "src/lxml/proxy.pxi":347 * # the ancestors * if c_element.nsDef is not NULL: * try: # <<<<<<<<<<<<<< @@ -16029,7 +16021,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_L7_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/proxy.pxi":352 + /* "src/lxml/proxy.pxi":349 * try: * _stripRedundantNamespaceDeclarations(c_element, &c_ns_cache, &c_del_ns_list) * except: # <<<<<<<<<<<<<< @@ -16038,12 +16030,12 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ /*except:*/ { __Pyx_AddTraceback("lxml.etree.moveNodeToDocument", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(4, 352, __pyx_L9_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_10) < 0) __PYX_ERR(4, 349, __pyx_L9_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_10); - /* "src/lxml/proxy.pxi":353 + /* "src/lxml/proxy.pxi":350 * _stripRedundantNamespaceDeclarations(c_element, &c_ns_cache, &c_del_ns_list) * except: * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) # <<<<<<<<<<<<<< @@ -16052,7 +16044,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(__pyx_v_c_start_node, (&__pyx_v_c_ns_cache), __pyx_v_c_del_ns_list); - /* "src/lxml/proxy.pxi":354 + /* "src/lxml/proxy.pxi":351 * except: * _cleanUpFromNamespaceAdaptation(c_start_node, &c_ns_cache, c_del_ns_list) * raise # <<<<<<<<<<<<<< @@ -16064,11 +16056,11 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __Pyx_XGIVEREF(__pyx_t_10); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_9, __pyx_t_10); __pyx_t_4 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; - __PYX_ERR(4, 354, __pyx_L9_except_error) + __PYX_ERR(4, 351, __pyx_L9_except_error) } __pyx_L9_except_error:; - /* "src/lxml/proxy.pxi":350 + /* "src/lxml/proxy.pxi":347 * # the ancestors * if c_element.nsDef is not NULL: * try: # <<<<<<<<<<<<<< @@ -16083,7 +16075,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_L12_try_end:; } - /* "src/lxml/proxy.pxi":349 + /* "src/lxml/proxy.pxi":346 * # 1) cut out namespaces defined here that are already known by * # the ancestors * if c_element.nsDef is not NULL: # <<<<<<<<<<<<<< @@ -16092,7 +16084,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":358 + /* "src/lxml/proxy.pxi":355 * # 2) make sure the namespaces of an element and its attributes * # are declared in this document (i.e. on the node or its parents) * if c_element.ns is not NULL: # <<<<<<<<<<<<<< @@ -16102,16 +16094,16 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_c_element->ns != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":359 + /* "src/lxml/proxy.pxi":356 * # are declared in this document (i.e. on the node or its parents) * if c_element.ns is not NULL: * _fixCNs(doc, c_start_node, c_element, &c_ns_cache, c_del_ns_list) # <<<<<<<<<<<<<< * * c_node = c_element.properties */ - __pyx_t_8 = __pyx_f_4lxml_5etree__fixCNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_element, (&__pyx_v_c_ns_cache), __pyx_v_c_del_ns_list); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 359, __pyx_L1_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__fixCNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_element, (&__pyx_v_c_ns_cache), __pyx_v_c_del_ns_list); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 356, __pyx_L1_error) - /* "src/lxml/proxy.pxi":358 + /* "src/lxml/proxy.pxi":355 * # 2) make sure the namespaces of an element and its attributes * # are declared in this document (i.e. on the node or its parents) * if c_element.ns is not NULL: # <<<<<<<<<<<<<< @@ -16120,7 +16112,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":361 + /* "src/lxml/proxy.pxi":358 * _fixCNs(doc, c_start_node, c_element, &c_ns_cache, c_del_ns_list) * * c_node = c_element.properties # <<<<<<<<<<<<<< @@ -16129,7 +16121,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ __pyx_v_c_node = ((xmlNode *)__pyx_v_c_element->properties); - /* "src/lxml/proxy.pxi":362 + /* "src/lxml/proxy.pxi":359 * * c_node = c_element.properties * while c_node is not NULL: # <<<<<<<<<<<<<< @@ -16140,92 +16132,37 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "src/lxml/proxy.pxi":363 + /* "src/lxml/proxy.pxi":360 * c_node = c_element.properties * while c_node is not NULL: * if c_node.ns is not NULL: # <<<<<<<<<<<<<< * _fixCNs(doc, c_start_node, c_node, &c_ns_cache, c_del_ns_list) - * + * c_node = c_node.next */ __pyx_t_3 = ((__pyx_v_c_node->ns != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":364 + /* "src/lxml/proxy.pxi":361 * while c_node is not NULL: * if c_node.ns is not NULL: * _fixCNs(doc, c_start_node, c_node, &c_ns_cache, c_del_ns_list) # <<<<<<<<<<<<<< + * c_node = c_node.next * - * # remove attribute from ID table (see xmlSetTreeDoc() in libxml2's tree.c) */ - __pyx_t_8 = __pyx_f_4lxml_5etree__fixCNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node, (&__pyx_v_c_ns_cache), __pyx_v_c_del_ns_list); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 364, __pyx_L1_error) + __pyx_t_8 = __pyx_f_4lxml_5etree__fixCNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node, (&__pyx_v_c_ns_cache), __pyx_v_c_del_ns_list); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(4, 361, __pyx_L1_error) - /* "src/lxml/proxy.pxi":363 + /* "src/lxml/proxy.pxi":360 * c_node = c_element.properties * while c_node is not NULL: * if c_node.ns is not NULL: # <<<<<<<<<<<<<< * _fixCNs(doc, c_start_node, c_node, &c_ns_cache, c_del_ns_list) - * - */ - } - - /* "src/lxml/proxy.pxi":367 - * - * # remove attribute from ID table (see xmlSetTreeDoc() in libxml2's tree.c) - * c_attr = c_node # <<<<<<<<<<<<<< - * if c_attr.atype == tree.XML_ATTRIBUTE_ID: - * tree.xmlRemoveID(c_source_doc, c_attr) - */ - __pyx_v_c_attr = ((xmlAttr *)__pyx_v_c_node); - - /* "src/lxml/proxy.pxi":368 - * # remove attribute from ID table (see xmlSetTreeDoc() in libxml2's tree.c) - * c_attr = c_node - * if c_attr.atype == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< - * tree.xmlRemoveID(c_source_doc, c_attr) - * # set C doc link also for attributes - */ - __pyx_t_3 = ((__pyx_v_c_attr->atype == XML_ATTRIBUTE_ID) != 0); - if (__pyx_t_3) { - - /* "src/lxml/proxy.pxi":369 - * c_attr = c_node - * if c_attr.atype == tree.XML_ATTRIBUTE_ID: - * tree.xmlRemoveID(c_source_doc, c_attr) # <<<<<<<<<<<<<< - * # set C doc link also for attributes - * c_node.doc = c_doc - */ - (void)(xmlRemoveID(__pyx_v_c_source_doc, __pyx_v_c_attr)); - - /* "src/lxml/proxy.pxi":368 - * # remove attribute from ID table (see xmlSetTreeDoc() in libxml2's tree.c) - * c_attr = c_node - * if c_attr.atype == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< - * tree.xmlRemoveID(c_source_doc, c_attr) - * # set C doc link also for attributes - */ - } - - /* "src/lxml/proxy.pxi":371 - * tree.xmlRemoveID(c_source_doc, c_attr) - * # set C doc link also for attributes - * c_node.doc = c_doc # <<<<<<<<<<<<<< - * _fixDocChildren(c_node.children, c_doc) * c_node = c_node.next */ - __pyx_v_c_node->doc = __pyx_v_c_doc; - - /* "src/lxml/proxy.pxi":372 - * # set C doc link also for attributes - * c_node.doc = c_doc - * _fixDocChildren(c_node.children, c_doc) # <<<<<<<<<<<<<< - * c_node = c_node.next - * - */ - __pyx_f_4lxml_5etree__fixDocChildren(__pyx_v_c_node->children, __pyx_v_c_doc); + } - /* "src/lxml/proxy.pxi":373 - * c_node.doc = c_doc - * _fixDocChildren(c_node.children, c_doc) + /* "src/lxml/proxy.pxi":362 + * if c_node.ns is not NULL: + * _fixCNs(doc, c_start_node, c_node, &c_ns_cache, c_del_ns_list) * c_node = c_node.next # <<<<<<<<<<<<<< * * tree.END_FOR_EACH_FROM(c_element) @@ -16234,16 +16171,16 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_v_c_node = __pyx_t_11; } - /* "src/lxml/proxy.pxi":343 - * c_element.doc = c_doc + /* "src/lxml/proxy.pxi":340 * + * tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) * if tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<< * if hasProxy(c_element): * proxy_count += 1 */ } - /* "src/lxml/proxy.pxi":375 + /* "src/lxml/proxy.pxi":364 * c_node = c_node.next * * tree.END_FOR_EACH_FROM(c_element) # <<<<<<<<<<<<<< @@ -16252,7 +16189,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ END_FOR_EACH_FROM(__pyx_v_c_element); - /* "src/lxml/proxy.pxi":378 + /* "src/lxml/proxy.pxi":367 * * # free now unused namespace declarations * if c_del_ns_list is not NULL: # <<<<<<<<<<<<<< @@ -16262,7 +16199,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_c_del_ns_list != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":379 + /* "src/lxml/proxy.pxi":368 * # free now unused namespace declarations * if c_del_ns_list is not NULL: * tree.xmlFreeNsList(c_del_ns_list) # <<<<<<<<<<<<<< @@ -16271,7 +16208,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ xmlFreeNsList(__pyx_v_c_del_ns_list); - /* "src/lxml/proxy.pxi":378 + /* "src/lxml/proxy.pxi":367 * * # free now unused namespace declarations * if c_del_ns_list is not NULL: # <<<<<<<<<<<<<< @@ -16280,7 +16217,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":382 + /* "src/lxml/proxy.pxi":371 * * # cleanup * if c_ns_cache.ns_map is not NULL: # <<<<<<<<<<<<<< @@ -16290,7 +16227,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_c_ns_cache.ns_map != NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":383 + /* "src/lxml/proxy.pxi":372 * # cleanup * if c_ns_cache.ns_map is not NULL: * python.lxml_free(c_ns_cache.ns_map) # <<<<<<<<<<<<<< @@ -16299,7 +16236,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ lxml_free(__pyx_v_c_ns_cache.ns_map); - /* "src/lxml/proxy.pxi":382 + /* "src/lxml/proxy.pxi":371 * * # cleanup * if c_ns_cache.ns_map is not NULL: # <<<<<<<<<<<<<< @@ -16308,7 +16245,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":386 + /* "src/lxml/proxy.pxi":375 * * # 3) fix the names in the tree if we moved it from a different thread * if doc._c_doc.dict is not c_source_doc.dict: # <<<<<<<<<<<<<< @@ -16318,7 +16255,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = ((__pyx_v_doc->_c_doc->dict != __pyx_v_c_source_doc->dict) != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":387 + /* "src/lxml/proxy.pxi":376 * # 3) fix the names in the tree if we moved it from a different thread * if doc._c_doc.dict is not c_source_doc.dict: * fixThreadDictNames(c_start_node, c_source_doc.dict, doc._c_doc.dict) # <<<<<<<<<<<<<< @@ -16327,7 +16264,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ __pyx_f_4lxml_5etree_fixThreadDictNames(__pyx_v_c_start_node, __pyx_v_c_source_doc->dict, __pyx_v_doc->_c_doc->dict); - /* "src/lxml/proxy.pxi":386 + /* "src/lxml/proxy.pxi":375 * * # 3) fix the names in the tree if we moved it from a different thread * if doc._c_doc.dict is not c_source_doc.dict: # <<<<<<<<<<<<<< @@ -16336,52 +16273,52 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":391 + /* "src/lxml/proxy.pxi":380 * # 4) fix _Document references * # (and potentially deallocate the source document) * if proxy_count > 0: # <<<<<<<<<<<<<< * if proxy_count == 1 and c_start_node._private is not NULL: * proxy = getProxy(c_start_node) */ - __pyx_t_10 = PyObject_RichCompare(__pyx_v_proxy_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 391, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(4, 391, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_v_proxy_count, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 380, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(4, 380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":392 + /* "src/lxml/proxy.pxi":381 * # (and potentially deallocate the source document) * if proxy_count > 0: * if proxy_count == 1 and c_start_node._private is not NULL: # <<<<<<<<<<<<<< * proxy = getProxy(c_start_node) * if proxy is not None: */ - __pyx_t_10 = __Pyx_PyInt_EqObjC(__pyx_v_proxy_count, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 392, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_EqObjC(__pyx_v_proxy_count, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(4, 392, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(4, 381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_12) { } else { __pyx_t_3 = __pyx_t_12; - goto __pyx_L25_bool_binop_done; + goto __pyx_L24_bool_binop_done; } __pyx_t_12 = ((__pyx_v_c_start_node->_private != NULL) != 0); __pyx_t_3 = __pyx_t_12; - __pyx_L25_bool_binop_done:; + __pyx_L24_bool_binop_done:; if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":393 + /* "src/lxml/proxy.pxi":382 * if proxy_count > 0: * if proxy_count == 1 and c_start_node._private is not NULL: * proxy = getProxy(c_start_node) # <<<<<<<<<<<<<< * if proxy is not None: * if proxy._doc is not doc: */ - __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_start_node)); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 393, __pyx_L1_error) + __pyx_t_10 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_start_node)); if (unlikely(!__pyx_t_10)) __PYX_ERR(4, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_proxy = ((struct LxmlElement *)__pyx_t_10); __pyx_t_10 = 0; - /* "src/lxml/proxy.pxi":394 + /* "src/lxml/proxy.pxi":383 * if proxy_count == 1 and c_start_node._private is not NULL: * proxy = getProxy(c_start_node) * if proxy is not None: # <<<<<<<<<<<<<< @@ -16392,7 +16329,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_12 = (__pyx_t_3 != 0); if (__pyx_t_12) { - /* "src/lxml/proxy.pxi":395 + /* "src/lxml/proxy.pxi":384 * proxy = getProxy(c_start_node) * if proxy is not None: * if proxy._doc is not doc: # <<<<<<<<<<<<<< @@ -16403,7 +16340,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __pyx_t_3 = (__pyx_t_12 != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":396 + /* "src/lxml/proxy.pxi":385 * if proxy is not None: * if proxy._doc is not doc: * proxy._doc = doc # <<<<<<<<<<<<<< @@ -16416,7 +16353,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ __Pyx_DECREF(((PyObject *)__pyx_v_proxy->_doc)); __pyx_v_proxy->_doc = __pyx_v_doc; - /* "src/lxml/proxy.pxi":395 + /* "src/lxml/proxy.pxi":384 * proxy = getProxy(c_start_node) * if proxy is not None: * if proxy._doc is not doc: # <<<<<<<<<<<<<< @@ -16425,17 +16362,17 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":394 + /* "src/lxml/proxy.pxi":383 * if proxy_count == 1 and c_start_node._private is not NULL: * proxy = getProxy(c_start_node) * if proxy is not None: # <<<<<<<<<<<<<< * if proxy._doc is not doc: * proxy._doc = doc */ - goto __pyx_L27; + goto __pyx_L26; } - /* "src/lxml/proxy.pxi":398 + /* "src/lxml/proxy.pxi":387 * proxy._doc = doc * else: * fixElementDocument(c_start_node, doc, proxy_count) # <<<<<<<<<<<<<< @@ -16443,22 +16380,22 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * fixElementDocument(c_start_node, doc, proxy_count) */ /*else*/ { - __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_v_proxy_count); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 398, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_v_proxy_count); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 387, __pyx_L1_error) __pyx_f_4lxml_5etree_fixElementDocument(__pyx_v_c_start_node, __pyx_v_doc, __pyx_t_13); } - __pyx_L27:; + __pyx_L26:; - /* "src/lxml/proxy.pxi":392 + /* "src/lxml/proxy.pxi":381 * # (and potentially deallocate the source document) * if proxy_count > 0: * if proxy_count == 1 and c_start_node._private is not NULL: # <<<<<<<<<<<<<< * proxy = getProxy(c_start_node) * if proxy is not None: */ - goto __pyx_L24; + goto __pyx_L23; } - /* "src/lxml/proxy.pxi":400 + /* "src/lxml/proxy.pxi":389 * fixElementDocument(c_start_node, doc, proxy_count) * else: * fixElementDocument(c_start_node, doc, proxy_count) # <<<<<<<<<<<<<< @@ -16466,12 +16403,12 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ * return 0 */ /*else*/ { - __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_v_proxy_count); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 400, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_size_t(__pyx_v_proxy_count); if (unlikely((__pyx_t_13 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(4, 389, __pyx_L1_error) __pyx_f_4lxml_5etree_fixElementDocument(__pyx_v_c_start_node, __pyx_v_doc, __pyx_t_13); } - __pyx_L24:; + __pyx_L23:; - /* "src/lxml/proxy.pxi":391 + /* "src/lxml/proxy.pxi":380 * # 4) fix _Document references * # (and potentially deallocate the source document) * if proxy_count > 0: # <<<<<<<<<<<<<< @@ -16480,7 +16417,7 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ */ } - /* "src/lxml/proxy.pxi":402 + /* "src/lxml/proxy.pxi":391 * fixElementDocument(c_start_node, doc, proxy_count) * * return 0 # <<<<<<<<<<<<<< @@ -16512,7 +16449,157 @@ static int __pyx_f_4lxml_5etree_moveNodeToDocument(struct LxmlDocument *__pyx_v_ return __pyx_r; } -/* "src/lxml/proxy.pxi":405 +/* "src/lxml/proxy.pxi":394 + * + * + * cdef void _setTreeDoc(xmlNode* c_node, xmlDoc* c_doc): # <<<<<<<<<<<<<< + * """Adaptation of 'xmlSetTreeDoc()' that deep-fix the document links iteratively. + * It avoids https://gitlab.gnome.org/GNOME/libxml2/issues/42 + */ + +static void __pyx_f_4lxml_5etree__setTreeDoc(xmlNode *__pyx_v_c_node, xmlDoc *__pyx_v_c_doc) { + xmlAttr *__pyx_v_c_attr; + __Pyx_RefNannyDeclarations + int __pyx_t_1; + xmlAttr *__pyx_t_2; + __Pyx_RefNannySetupContext("_setTreeDoc", 0); + + /* "src/lxml/proxy.pxi":398 + * It avoids https://gitlab.gnome.org/GNOME/libxml2/issues/42 + * """ + * tree.BEGIN_FOR_EACH_FROM(c_node, c_node, 1) # <<<<<<<<<<<<<< + * if c_node.type == tree.XML_ELEMENT_NODE: + * c_attr = c_node.properties + */ + BEGIN_FOR_EACH_FROM(__pyx_v_c_node, __pyx_v_c_node, 1); + + /* "src/lxml/proxy.pxi":399 + * """ + * tree.BEGIN_FOR_EACH_FROM(c_node, c_node, 1) + * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * c_attr = c_node.properties + * while c_attr: + */ + __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); + if (__pyx_t_1) { + + /* "src/lxml/proxy.pxi":400 + * tree.BEGIN_FOR_EACH_FROM(c_node, c_node, 1) + * if c_node.type == tree.XML_ELEMENT_NODE: + * c_attr = c_node.properties # <<<<<<<<<<<<<< + * while c_attr: + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: + */ + __pyx_v_c_attr = ((xmlAttr *)__pyx_v_c_node->properties); + + /* "src/lxml/proxy.pxi":401 + * if c_node.type == tree.XML_ELEMENT_NODE: + * c_attr = c_node.properties + * while c_attr: # <<<<<<<<<<<<<< + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: + * tree.xmlRemoveID(c_node.doc, c_attr) + */ + while (1) { + __pyx_t_1 = (__pyx_v_c_attr != 0); + if (!__pyx_t_1) break; + + /* "src/lxml/proxy.pxi":402 + * c_attr = c_node.properties + * while c_attr: + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< + * tree.xmlRemoveID(c_node.doc, c_attr) + * c_attr.doc = c_doc + */ + __pyx_t_1 = ((__pyx_v_c_attr->atype == XML_ATTRIBUTE_ID) != 0); + if (__pyx_t_1) { + + /* "src/lxml/proxy.pxi":403 + * while c_attr: + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: + * tree.xmlRemoveID(c_node.doc, c_attr) # <<<<<<<<<<<<<< + * c_attr.doc = c_doc + * _fixDocChildren(c_attr.children, c_doc) + */ + (void)(xmlRemoveID(__pyx_v_c_node->doc, __pyx_v_c_attr)); + + /* "src/lxml/proxy.pxi":402 + * c_attr = c_node.properties + * while c_attr: + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< + * tree.xmlRemoveID(c_node.doc, c_attr) + * c_attr.doc = c_doc + */ + } + + /* "src/lxml/proxy.pxi":404 + * if c_attr.atype == tree.XML_ATTRIBUTE_ID: + * tree.xmlRemoveID(c_node.doc, c_attr) + * c_attr.doc = c_doc # <<<<<<<<<<<<<< + * _fixDocChildren(c_attr.children, c_doc) + * c_attr = c_attr.next + */ + __pyx_v_c_attr->doc = __pyx_v_c_doc; + + /* "src/lxml/proxy.pxi":405 + * tree.xmlRemoveID(c_node.doc, c_attr) + * c_attr.doc = c_doc + * _fixDocChildren(c_attr.children, c_doc) # <<<<<<<<<<<<<< + * c_attr = c_attr.next + * # Set doc link for all nodes, not only elements. + */ + __pyx_f_4lxml_5etree__fixDocChildren(__pyx_v_c_attr->children, __pyx_v_c_doc); + + /* "src/lxml/proxy.pxi":406 + * c_attr.doc = c_doc + * _fixDocChildren(c_attr.children, c_doc) + * c_attr = c_attr.next # <<<<<<<<<<<<<< + * # Set doc link for all nodes, not only elements. + * c_node.doc = c_doc + */ + __pyx_t_2 = __pyx_v_c_attr->next; + __pyx_v_c_attr = __pyx_t_2; + } + + /* "src/lxml/proxy.pxi":399 + * """ + * tree.BEGIN_FOR_EACH_FROM(c_node, c_node, 1) + * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * c_attr = c_node.properties + * while c_attr: + */ + } + + /* "src/lxml/proxy.pxi":408 + * c_attr = c_attr.next + * # Set doc link for all nodes, not only elements. + * c_node.doc = c_doc # <<<<<<<<<<<<<< + * tree.END_FOR_EACH_FROM(c_node) + * + */ + __pyx_v_c_node->doc = __pyx_v_c_doc; + + /* "src/lxml/proxy.pxi":409 + * # Set doc link for all nodes, not only elements. + * c_node.doc = c_doc + * tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<< + * + * + */ + END_FOR_EACH_FROM(__pyx_v_c_node); + + /* "src/lxml/proxy.pxi":394 + * + * + * cdef void _setTreeDoc(xmlNode* c_node, xmlDoc* c_doc): # <<<<<<<<<<<<<< + * """Adaptation of 'xmlSetTreeDoc()' that deep-fix the document links iteratively. + * It avoids https://gitlab.gnome.org/GNOME/libxml2/issues/42 + */ + + /* function exit code */ + __Pyx_RefNannyFinishContext(); +} + +/* "src/lxml/proxy.pxi":412 * * * cdef inline void _fixDocChildren(xmlNode* c_child, xmlDoc* c_doc): # <<<<<<<<<<<<<< @@ -16526,38 +16613,57 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixDocChildren(xmlNode *__pyx_v_ xmlNode *__pyx_t_2; __Pyx_RefNannySetupContext("_fixDocChildren", 0); - /* "src/lxml/proxy.pxi":406 + /* "src/lxml/proxy.pxi":413 * * cdef inline void _fixDocChildren(xmlNode* c_child, xmlDoc* c_doc): * while c_child: # <<<<<<<<<<<<<< * c_child.doc = c_doc - * _fixDocChildren(c_child.children, c_doc) + * if c_child.children: */ while (1) { __pyx_t_1 = (__pyx_v_c_child != 0); if (!__pyx_t_1) break; - /* "src/lxml/proxy.pxi":407 + /* "src/lxml/proxy.pxi":414 * cdef inline void _fixDocChildren(xmlNode* c_child, xmlDoc* c_doc): * while c_child: * c_child.doc = c_doc # <<<<<<<<<<<<<< - * _fixDocChildren(c_child.children, c_doc) - * c_child = c_child.next + * if c_child.children: + * _fixDocChildren(c_child.children, c_doc) */ __pyx_v_c_child->doc = __pyx_v_c_doc; - /* "src/lxml/proxy.pxi":408 + /* "src/lxml/proxy.pxi":415 * while c_child: * c_child.doc = c_doc - * _fixDocChildren(c_child.children, c_doc) # <<<<<<<<<<<<<< + * if c_child.children: # <<<<<<<<<<<<<< + * _fixDocChildren(c_child.children, c_doc) + * c_child = c_child.next + */ + __pyx_t_1 = (__pyx_v_c_child->children != 0); + if (__pyx_t_1) { + + /* "src/lxml/proxy.pxi":416 + * c_child.doc = c_doc + * if c_child.children: + * _fixDocChildren(c_child.children, c_doc) # <<<<<<<<<<<<<< * c_child = c_child.next * */ - __pyx_f_4lxml_5etree__fixDocChildren(__pyx_v_c_child->children, __pyx_v_c_doc); + __pyx_f_4lxml_5etree__fixDocChildren(__pyx_v_c_child->children, __pyx_v_c_doc); - /* "src/lxml/proxy.pxi":409 + /* "src/lxml/proxy.pxi":415 + * while c_child: * c_child.doc = c_doc - * _fixDocChildren(c_child.children, c_doc) + * if c_child.children: # <<<<<<<<<<<<<< + * _fixDocChildren(c_child.children, c_doc) + * c_child = c_child.next + */ + } + + /* "src/lxml/proxy.pxi":417 + * if c_child.children: + * _fixDocChildren(c_child.children, c_doc) * c_child = c_child.next # <<<<<<<<<<<<<< * * @@ -16566,7 +16672,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixDocChildren(xmlNode *__pyx_v_ __pyx_v_c_child = __pyx_t_2; } - /* "src/lxml/proxy.pxi":405 + /* "src/lxml/proxy.pxi":412 * * * cdef inline void _fixDocChildren(xmlNode* c_child, xmlDoc* c_doc): # <<<<<<<<<<<<<< @@ -16578,7 +16684,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixDocChildren(xmlNode *__pyx_v_ __Pyx_RefNannyFinishContext(); } -/* "src/lxml/proxy.pxi":412 +/* "src/lxml/proxy.pxi":420 * * * cdef int _fixCNs(_Document doc, xmlNode* c_start_node, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -16607,7 +16713,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("_fixCNs", 0); - /* "src/lxml/proxy.pxi":414 + /* "src/lxml/proxy.pxi":422 * cdef int _fixCNs(_Document doc, xmlNode* c_start_node, xmlNode* c_node, * _nscache* c_ns_cache, xmlNs* c_del_ns_list) except -1: * cdef xmlNs* c_ns = NULL # <<<<<<<<<<<<<< @@ -16616,7 +16722,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ __pyx_v_c_ns = NULL; - /* "src/lxml/proxy.pxi":415 + /* "src/lxml/proxy.pxi":423 * _nscache* c_ns_cache, xmlNs* c_del_ns_list) except -1: * cdef xmlNs* c_ns = NULL * cdef bint is_prefixed_attr = (c_node.type == tree.XML_ATTRIBUTE_NODE and c_node.ns.prefix) # <<<<<<<<<<<<<< @@ -16634,7 +16740,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_L3_bool_binop_done:; __pyx_v_is_prefixed_attr = __pyx_t_1; - /* "src/lxml/proxy.pxi":417 + /* "src/lxml/proxy.pxi":425 * cdef bint is_prefixed_attr = (c_node.type == tree.XML_ATTRIBUTE_NODE and c_node.ns.prefix) * * for ns_map in c_ns_cache.ns_map[:c_ns_cache.last]: # <<<<<<<<<<<<<< @@ -16646,7 +16752,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_t_3 = __pyx_t_5; __pyx_v_ns_map = (__pyx_t_3[0]); - /* "src/lxml/proxy.pxi":418 + /* "src/lxml/proxy.pxi":426 * * for ns_map in c_ns_cache.ns_map[:c_ns_cache.last]: * if c_node.ns is ns_map.old: # <<<<<<<<<<<<<< @@ -16656,7 +16762,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_t_1 = ((__pyx_v_c_node->ns == __pyx_v_ns_map.old) != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":419 + /* "src/lxml/proxy.pxi":427 * for ns_map in c_ns_cache.ns_map[:c_ns_cache.last]: * if c_node.ns is ns_map.old: * if is_prefixed_attr and not ns_map.new.prefix: # <<<<<<<<<<<<<< @@ -16674,7 +16780,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":421 + /* "src/lxml/proxy.pxi":429 * if is_prefixed_attr and not ns_map.new.prefix: * # avoid dropping prefix from attributes * continue # <<<<<<<<<<<<<< @@ -16683,7 +16789,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ goto __pyx_L5_continue; - /* "src/lxml/proxy.pxi":419 + /* "src/lxml/proxy.pxi":427 * for ns_map in c_ns_cache.ns_map[:c_ns_cache.last]: * if c_node.ns is ns_map.old: * if is_prefixed_attr and not ns_map.new.prefix: # <<<<<<<<<<<<<< @@ -16692,7 +16798,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ } - /* "src/lxml/proxy.pxi":422 + /* "src/lxml/proxy.pxi":430 * # avoid dropping prefix from attributes * continue * c_ns = ns_map.new # <<<<<<<<<<<<<< @@ -16702,7 +16808,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_t_6 = __pyx_v_ns_map.new; __pyx_v_c_ns = __pyx_t_6; - /* "src/lxml/proxy.pxi":423 + /* "src/lxml/proxy.pxi":431 * continue * c_ns = ns_map.new * break # <<<<<<<<<<<<<< @@ -16711,7 +16817,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ goto __pyx_L6_break; - /* "src/lxml/proxy.pxi":418 + /* "src/lxml/proxy.pxi":426 * * for ns_map in c_ns_cache.ns_map[:c_ns_cache.last]: * if c_node.ns is ns_map.old: # <<<<<<<<<<<<<< @@ -16723,7 +16829,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod } __pyx_L6_break:; - /* "src/lxml/proxy.pxi":425 + /* "src/lxml/proxy.pxi":433 * break * * if c_ns: # <<<<<<<<<<<<<< @@ -16733,7 +16839,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_t_1 = (__pyx_v_c_ns != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":426 + /* "src/lxml/proxy.pxi":434 * * if c_ns: * c_node.ns = c_ns # <<<<<<<<<<<<<< @@ -16742,7 +16848,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ __pyx_v_c_node->ns = __pyx_v_c_ns; - /* "src/lxml/proxy.pxi":425 + /* "src/lxml/proxy.pxi":433 * break * * if c_ns: # <<<<<<<<<<<<<< @@ -16752,7 +16858,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod goto __pyx_L11; } - /* "src/lxml/proxy.pxi":430 + /* "src/lxml/proxy.pxi":438 * # not in cache or not acceptable * # => find a replacement from this document * try: # <<<<<<<<<<<<<< @@ -16769,17 +16875,17 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __Pyx_XGOTREF(__pyx_t_9); /*try:*/ { - /* "src/lxml/proxy.pxi":431 + /* "src/lxml/proxy.pxi":439 * # => find a replacement from this document * try: * c_ns = doc._findOrBuildNodeNs( # <<<<<<<<<<<<<< * c_start_node, c_node.ns.href, c_node.ns.prefix, * c_node.type == tree.XML_ATTRIBUTE_NODE) */ - __pyx_t_6 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node->ns->href, __pyx_v_c_node->ns->prefix, (__pyx_v_c_node->type == XML_ATTRIBUTE_NODE)); if (unlikely(__pyx_t_6 == ((xmlNs *)NULL))) __PYX_ERR(4, 431, __pyx_L12_error) + __pyx_t_6 = __pyx_f_4lxml_5etree_9_Document__findOrBuildNodeNs(__pyx_v_doc, __pyx_v_c_start_node, __pyx_v_c_node->ns->href, __pyx_v_c_node->ns->prefix, (__pyx_v_c_node->type == XML_ATTRIBUTE_NODE)); if (unlikely(__pyx_t_6 == ((xmlNs *)NULL))) __PYX_ERR(4, 439, __pyx_L12_error) __pyx_v_c_ns = __pyx_t_6; - /* "src/lxml/proxy.pxi":434 + /* "src/lxml/proxy.pxi":442 * c_start_node, c_node.ns.href, c_node.ns.prefix, * c_node.type == tree.XML_ATTRIBUTE_NODE) * c_node.ns = c_ns # <<<<<<<<<<<<<< @@ -16788,16 +16894,16 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ __pyx_v_c_node->ns = __pyx_v_c_ns; - /* "src/lxml/proxy.pxi":435 + /* "src/lxml/proxy.pxi":443 * c_node.type == tree.XML_ATTRIBUTE_NODE) * c_node.ns = c_ns * _appendToNsCache(c_ns_cache, c_node.ns, c_ns) # <<<<<<<<<<<<<< * except: * _cleanUpFromNamespaceAdaptation(c_start_node, c_ns_cache, c_del_ns_list) */ - __pyx_t_10 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, __pyx_v_c_node->ns, __pyx_v_c_ns); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(4, 435, __pyx_L12_error) + __pyx_t_10 = __pyx_f_4lxml_5etree__appendToNsCache(__pyx_v_c_ns_cache, __pyx_v_c_node->ns, __pyx_v_c_ns); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(4, 443, __pyx_L12_error) - /* "src/lxml/proxy.pxi":430 + /* "src/lxml/proxy.pxi":438 * # not in cache or not acceptable * # => find a replacement from this document * try: # <<<<<<<<<<<<<< @@ -16811,7 +16917,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod goto __pyx_L17_try_end; __pyx_L12_error:; - /* "src/lxml/proxy.pxi":436 + /* "src/lxml/proxy.pxi":444 * c_node.ns = c_ns * _appendToNsCache(c_ns_cache, c_node.ns, c_ns) * except: # <<<<<<<<<<<<<< @@ -16820,12 +16926,12 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ /*except:*/ { __Pyx_AddTraceback("lxml.etree._fixCNs", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0) __PYX_ERR(4, 436, __pyx_L14_except_error) + if (__Pyx_GetException(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13) < 0) __PYX_ERR(4, 444, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GOTREF(__pyx_t_12); __Pyx_GOTREF(__pyx_t_13); - /* "src/lxml/proxy.pxi":437 + /* "src/lxml/proxy.pxi":445 * _appendToNsCache(c_ns_cache, c_node.ns, c_ns) * except: * _cleanUpFromNamespaceAdaptation(c_start_node, c_ns_cache, c_del_ns_list) # <<<<<<<<<<<<<< @@ -16834,7 +16940,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod */ __pyx_f_4lxml_5etree__cleanUpFromNamespaceAdaptation(__pyx_v_c_start_node, __pyx_v_c_ns_cache, __pyx_v_c_del_ns_list); - /* "src/lxml/proxy.pxi":438 + /* "src/lxml/proxy.pxi":446 * except: * _cleanUpFromNamespaceAdaptation(c_start_node, c_ns_cache, c_del_ns_list) * raise # <<<<<<<<<<<<<< @@ -16846,11 +16952,11 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __Pyx_XGIVEREF(__pyx_t_13); __Pyx_ErrRestoreWithState(__pyx_t_11, __pyx_t_12, __pyx_t_13); __pyx_t_11 = 0; __pyx_t_12 = 0; __pyx_t_13 = 0; - __PYX_ERR(4, 438, __pyx_L14_except_error) + __PYX_ERR(4, 446, __pyx_L14_except_error) } __pyx_L14_except_error:; - /* "src/lxml/proxy.pxi":430 + /* "src/lxml/proxy.pxi":438 * # not in cache or not acceptable * # => find a replacement from this document * try: # <<<<<<<<<<<<<< @@ -16867,7 +16973,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod } __pyx_L11:; - /* "src/lxml/proxy.pxi":439 + /* "src/lxml/proxy.pxi":447 * _cleanUpFromNamespaceAdaptation(c_start_node, c_ns_cache, c_del_ns_list) * raise * return 0 # <<<<<<<<<<<<<< @@ -16877,7 +16983,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/proxy.pxi":412 + /* "src/lxml/proxy.pxi":420 * * * cdef int _fixCNs(_Document doc, xmlNode* c_start_node, xmlNode* c_node, # <<<<<<<<<<<<<< @@ -16897,7 +17003,7 @@ static int __pyx_f_4lxml_5etree__fixCNs(struct LxmlDocument *__pyx_v_doc, xmlNod return __pyx_r; } -/* "src/lxml/proxy.pxi":442 +/* "src/lxml/proxy.pxi":450 * * * cdef void fixElementDocument(xmlNode* c_element, _Document doc, # <<<<<<<<<<<<<< @@ -16914,7 +17020,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, int __pyx_t_3; __Pyx_RefNannySetupContext("fixElementDocument", 0); - /* "src/lxml/proxy.pxi":444 + /* "src/lxml/proxy.pxi":452 * cdef void fixElementDocument(xmlNode* c_element, _Document doc, * size_t proxy_count): * cdef xmlNode* c_node = c_element # <<<<<<<<<<<<<< @@ -16923,7 +17029,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ __pyx_v_c_node = __pyx_v_c_element; - /* "src/lxml/proxy.pxi":445 + /* "src/lxml/proxy.pxi":453 * size_t proxy_count): * cdef xmlNode* c_node = c_element * cdef _Element proxy = None # init-to-None required due to fake-loop below # <<<<<<<<<<<<<< @@ -16933,7 +17039,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __Pyx_INCREF(Py_None); __pyx_v_proxy = ((struct LxmlElement *)Py_None); - /* "src/lxml/proxy.pxi":446 + /* "src/lxml/proxy.pxi":454 * cdef xmlNode* c_node = c_element * cdef _Element proxy = None # init-to-None required due to fake-loop below * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) # <<<<<<<<<<<<<< @@ -16942,7 +17048,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1); - /* "src/lxml/proxy.pxi":447 + /* "src/lxml/proxy.pxi":455 * cdef _Element proxy = None # init-to-None required due to fake-loop below * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node._private is not NULL: # <<<<<<<<<<<<<< @@ -16952,19 +17058,19 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __pyx_t_1 = ((__pyx_v_c_node->_private != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":448 + /* "src/lxml/proxy.pxi":456 * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node._private is not NULL: * proxy = getProxy(c_node) # <<<<<<<<<<<<<< * if proxy is not None: * if proxy._doc is not doc: */ - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 448, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_proxy, ((struct LxmlElement *)__pyx_t_2)); __pyx_t_2 = 0; - /* "src/lxml/proxy.pxi":449 + /* "src/lxml/proxy.pxi":457 * if c_node._private is not NULL: * proxy = getProxy(c_node) * if proxy is not None: # <<<<<<<<<<<<<< @@ -16975,7 +17081,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":450 + /* "src/lxml/proxy.pxi":458 * proxy = getProxy(c_node) * if proxy is not None: * if proxy._doc is not doc: # <<<<<<<<<<<<<< @@ -16986,7 +17092,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":451 + /* "src/lxml/proxy.pxi":459 * if proxy is not None: * if proxy._doc is not doc: * proxy._doc = doc # <<<<<<<<<<<<<< @@ -16999,7 +17105,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __Pyx_DECREF(((PyObject *)__pyx_v_proxy->_doc)); __pyx_v_proxy->_doc = __pyx_v_doc; - /* "src/lxml/proxy.pxi":450 + /* "src/lxml/proxy.pxi":458 * proxy = getProxy(c_node) * if proxy is not None: * if proxy._doc is not doc: # <<<<<<<<<<<<<< @@ -17008,7 +17114,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":452 + /* "src/lxml/proxy.pxi":460 * if proxy._doc is not doc: * proxy._doc = doc * proxy_count -= 1 # <<<<<<<<<<<<<< @@ -17017,7 +17123,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ __pyx_v_proxy_count = (__pyx_v_proxy_count - 1); - /* "src/lxml/proxy.pxi":453 + /* "src/lxml/proxy.pxi":461 * proxy._doc = doc * proxy_count -= 1 * if proxy_count == 0: # <<<<<<<<<<<<<< @@ -17027,7 +17133,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __pyx_t_1 = ((__pyx_v_proxy_count == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":454 + /* "src/lxml/proxy.pxi":462 * proxy_count -= 1 * if proxy_count == 0: * return # <<<<<<<<<<<<<< @@ -17036,7 +17142,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ goto __pyx_L0; - /* "src/lxml/proxy.pxi":453 + /* "src/lxml/proxy.pxi":461 * proxy._doc = doc * proxy_count -= 1 * if proxy_count == 0: # <<<<<<<<<<<<<< @@ -17045,7 +17151,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":449 + /* "src/lxml/proxy.pxi":457 * if c_node._private is not NULL: * proxy = getProxy(c_node) * if proxy is not None: # <<<<<<<<<<<<<< @@ -17054,7 +17160,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":447 + /* "src/lxml/proxy.pxi":455 * cdef _Element proxy = None # init-to-None required due to fake-loop below * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node._private is not NULL: # <<<<<<<<<<<<<< @@ -17063,7 +17169,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":455 + /* "src/lxml/proxy.pxi":463 * if proxy_count == 0: * return * tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<< @@ -17072,7 +17178,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, */ END_FOR_EACH_FROM(__pyx_v_c_node); - /* "src/lxml/proxy.pxi":442 + /* "src/lxml/proxy.pxi":450 * * * cdef void fixElementDocument(xmlNode* c_element, _Document doc, # <<<<<<<<<<<<<< @@ -17090,7 +17196,7 @@ static void __pyx_f_4lxml_5etree_fixElementDocument(xmlNode *__pyx_v_c_element, __Pyx_RefNannyFinishContext(); } -/* "src/lxml/proxy.pxi":458 +/* "src/lxml/proxy.pxi":466 * * * cdef void fixThreadDictNames(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -17102,7 +17208,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, int __pyx_t_1; xmlNode *__pyx_t_2; - /* "src/lxml/proxy.pxi":465 + /* "src/lxml/proxy.pxi":473 * # this should only be called when the element is based on a * # different libxml2 tag name dictionary * if c_element.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<< @@ -17113,7 +17219,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, case XML_DOCUMENT_NODE: case XML_HTML_DOCUMENT_NODE: - /* "src/lxml/proxy.pxi":466 + /* "src/lxml/proxy.pxi":474 * # different libxml2 tag name dictionary * if c_element.type == tree.XML_DOCUMENT_NODE or \ * c_element.type == tree.XML_HTML_DOCUMENT_NODE: # <<<<<<<<<<<<<< @@ -17122,7 +17228,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_t_1 = 1; - /* "src/lxml/proxy.pxi":465 + /* "src/lxml/proxy.pxi":473 * # this should only be called when the element is based on a * # different libxml2 tag name dictionary * if c_element.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<< @@ -17136,7 +17242,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, } if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":468 + /* "src/lxml/proxy.pxi":476 * c_element.type == tree.XML_HTML_DOCUMENT_NODE: * # may define "xml" namespace * fixThreadDictNsForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17145,7 +17251,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":469 + /* "src/lxml/proxy.pxi":477 * # may define "xml" namespace * fixThreadDictNsForNode(c_element, c_src_dict, c_dict) * if c_element.doc.extSubset: # <<<<<<<<<<<<<< @@ -17155,7 +17261,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_t_1 = (__pyx_v_c_element->doc->extSubset != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":470 + /* "src/lxml/proxy.pxi":478 * fixThreadDictNsForNode(c_element, c_src_dict, c_dict) * if c_element.doc.extSubset: * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17164,7 +17270,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(__pyx_v_c_element->doc->extSubset, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":469 + /* "src/lxml/proxy.pxi":477 * # may define "xml" namespace * fixThreadDictNsForNode(c_element, c_src_dict, c_dict) * if c_element.doc.extSubset: # <<<<<<<<<<<<<< @@ -17173,7 +17279,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":471 + /* "src/lxml/proxy.pxi":479 * if c_element.doc.extSubset: * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) * if c_element.doc.intSubset: # <<<<<<<<<<<<<< @@ -17183,7 +17289,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_t_1 = (__pyx_v_c_element->doc->intSubset != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":472 + /* "src/lxml/proxy.pxi":480 * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) * if c_element.doc.intSubset: * fixThreadDictNamesForDtd(c_element.doc.intSubset, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17192,7 +17298,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(__pyx_v_c_element->doc->intSubset, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":471 + /* "src/lxml/proxy.pxi":479 * if c_element.doc.extSubset: * fixThreadDictNamesForDtd(c_element.doc.extSubset, c_src_dict, c_dict) * if c_element.doc.intSubset: # <<<<<<<<<<<<<< @@ -17201,7 +17307,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ } - /* "src/lxml/proxy.pxi":473 + /* "src/lxml/proxy.pxi":481 * if c_element.doc.intSubset: * fixThreadDictNamesForDtd(c_element.doc.intSubset, c_src_dict, c_dict) * c_element = c_element.children # <<<<<<<<<<<<<< @@ -17211,7 +17317,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_t_2 = __pyx_v_c_element->children; __pyx_v_c_element = __pyx_t_2; - /* "src/lxml/proxy.pxi":474 + /* "src/lxml/proxy.pxi":482 * fixThreadDictNamesForDtd(c_element.doc.intSubset, c_src_dict, c_dict) * c_element = c_element.children * while c_element is not NULL: # <<<<<<<<<<<<<< @@ -17222,7 +17328,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_t_1 = ((__pyx_v_c_element != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/proxy.pxi":475 + /* "src/lxml/proxy.pxi":483 * c_element = c_element.children * while c_element is not NULL: * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17231,7 +17337,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":476 + /* "src/lxml/proxy.pxi":484 * while c_element is not NULL: * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) * c_element = c_element.next # <<<<<<<<<<<<<< @@ -17242,7 +17348,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_v_c_element = __pyx_t_2; } - /* "src/lxml/proxy.pxi":465 + /* "src/lxml/proxy.pxi":473 * # this should only be called when the element is based on a * # different libxml2 tag name dictionary * if c_element.type == tree.XML_DOCUMENT_NODE or \ # <<<<<<<<<<<<<< @@ -17252,7 +17358,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, goto __pyx_L3; } - /* "src/lxml/proxy.pxi":477 + /* "src/lxml/proxy.pxi":485 * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) * c_element = c_element.next * elif tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<< @@ -17262,7 +17368,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, __pyx_t_1 = (_isElementOrXInclude(__pyx_v_c_element) != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":478 + /* "src/lxml/proxy.pxi":486 * c_element = c_element.next * elif tree._isElementOrXInclude(c_element): * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17271,7 +17377,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, */ __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(__pyx_v_c_element, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":477 + /* "src/lxml/proxy.pxi":485 * fixThreadDictNamesForNode(c_element, c_src_dict, c_dict) * c_element = c_element.next * elif tree._isElementOrXInclude(c_element): # <<<<<<<<<<<<<< @@ -17281,7 +17387,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, } __pyx_L3:; - /* "src/lxml/proxy.pxi":458 + /* "src/lxml/proxy.pxi":466 * * * cdef void fixThreadDictNames(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -17292,7 +17398,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNames(xmlNode *__pyx_v_c_element, /* function exit code */ } -/* "src/lxml/proxy.pxi":481 +/* "src/lxml/proxy.pxi":489 * * * cdef inline void _fixThreadDictPtr(const_xmlChar** c_ptr, # <<<<<<<<<<<<<< @@ -17305,7 +17411,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * int __pyx_t_1; int __pyx_t_2; - /* "src/lxml/proxy.pxi":484 + /* "src/lxml/proxy.pxi":492 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * c_str = c_ptr[0] # <<<<<<<<<<<<<< @@ -17314,7 +17420,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ __pyx_v_c_str = (__pyx_v_c_ptr[0]); - /* "src/lxml/proxy.pxi":485 + /* "src/lxml/proxy.pxi":493 * tree.xmlDict* c_dict) nogil: * c_str = c_ptr[0] * if c_str and c_src_dict and tree.xmlDictOwns(c_src_dict, c_str): # <<<<<<<<<<<<<< @@ -17338,7 +17444,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":487 + /* "src/lxml/proxy.pxi":495 * if c_str and c_src_dict and tree.xmlDictOwns(c_src_dict, c_str): * # return value can be NULL on memory error, but we don't handle that here * c_str = tree.xmlDictLookup(c_dict, c_str, -1) # <<<<<<<<<<<<<< @@ -17347,7 +17453,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ __pyx_v_c_str = xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_str, -1); - /* "src/lxml/proxy.pxi":488 + /* "src/lxml/proxy.pxi":496 * # return value can be NULL on memory error, but we don't handle that here * c_str = tree.xmlDictLookup(c_dict, c_str, -1) * if c_str: # <<<<<<<<<<<<<< @@ -17357,7 +17463,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * __pyx_t_1 = (__pyx_v_c_str != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":489 + /* "src/lxml/proxy.pxi":497 * c_str = tree.xmlDictLookup(c_dict, c_str, -1) * if c_str: * c_ptr[0] = c_str # <<<<<<<<<<<<<< @@ -17366,7 +17472,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ (__pyx_v_c_ptr[0]) = __pyx_v_c_str; - /* "src/lxml/proxy.pxi":488 + /* "src/lxml/proxy.pxi":496 * # return value can be NULL on memory error, but we don't handle that here * c_str = tree.xmlDictLookup(c_dict, c_str, -1) * if c_str: # <<<<<<<<<<<<<< @@ -17375,7 +17481,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ } - /* "src/lxml/proxy.pxi":485 + /* "src/lxml/proxy.pxi":493 * tree.xmlDict* c_dict) nogil: * c_str = c_ptr[0] * if c_str and c_src_dict and tree.xmlDictOwns(c_src_dict, c_str): # <<<<<<<<<<<<<< @@ -17384,7 +17490,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * */ } - /* "src/lxml/proxy.pxi":481 + /* "src/lxml/proxy.pxi":489 * * * cdef inline void _fixThreadDictPtr(const_xmlChar** c_ptr, # <<<<<<<<<<<<<< @@ -17395,7 +17501,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * /* function exit code */ } -/* "src/lxml/proxy.pxi":492 +/* "src/lxml/proxy.pxi":500 * * * cdef void fixThreadDictNamesForNode(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -17406,7 +17512,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree__fixThreadDictPtr(const xmlChar * static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_element, xmlDict *__pyx_v_c_src_dict, xmlDict *__pyx_v_c_dict) { xmlNode *__pyx_v_c_node; - /* "src/lxml/proxy.pxi":495 + /* "src/lxml/proxy.pxi":503 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * cdef xmlNode* c_node = c_element # <<<<<<<<<<<<<< @@ -17415,7 +17521,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ __pyx_v_c_node = __pyx_v_c_element; - /* "src/lxml/proxy.pxi":496 + /* "src/lxml/proxy.pxi":504 * tree.xmlDict* c_dict) nogil: * cdef xmlNode* c_node = c_element * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) # <<<<<<<<<<<<<< @@ -17424,7 +17530,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ BEGIN_FOR_EACH_FROM(__pyx_v_c_element, __pyx_v_c_node, 1); - /* "src/lxml/proxy.pxi":497 + /* "src/lxml/proxy.pxi":505 * cdef xmlNode* c_node = c_element * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): # <<<<<<<<<<<<<< @@ -17435,7 +17541,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el case XML_ELEMENT_NODE: case XML_XINCLUDE_START: - /* "src/lxml/proxy.pxi":498 + /* "src/lxml/proxy.pxi":506 * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): * fixThreadDictNamesForAttributes( # <<<<<<<<<<<<<< @@ -17444,7 +17550,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(__pyx_v_c_node->properties, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":500 + /* "src/lxml/proxy.pxi":508 * fixThreadDictNamesForAttributes( * c_node.properties, c_src_dict, c_dict) * fixThreadDictNsForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17453,7 +17559,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ __pyx_f_4lxml_5etree_fixThreadDictNsForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":501 + /* "src/lxml/proxy.pxi":509 * c_node.properties, c_src_dict, c_dict) * fixThreadDictNsForNode(c_node, c_src_dict, c_dict) * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17462,7 +17568,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_node->name), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":497 + /* "src/lxml/proxy.pxi":505 * cdef xmlNode* c_node = c_element * tree.BEGIN_FOR_EACH_FROM(c_element, c_node, 1) * if c_node.type in (tree.XML_ELEMENT_NODE, tree.XML_XINCLUDE_START): # <<<<<<<<<<<<<< @@ -17472,7 +17578,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el break; case XML_TEXT_NODE: - /* "src/lxml/proxy.pxi":504 + /* "src/lxml/proxy.pxi":512 * elif c_node.type == tree.XML_TEXT_NODE: * # libxml2's SAX2 parser interns some indentation space * fixThreadDictContentForNode(c_node, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17481,7 +17587,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ __pyx_f_4lxml_5etree_fixThreadDictContentForNode(__pyx_v_c_node, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":502 + /* "src/lxml/proxy.pxi":510 * fixThreadDictNsForNode(c_node, c_src_dict, c_dict) * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) * elif c_node.type == tree.XML_TEXT_NODE: # <<<<<<<<<<<<<< @@ -17491,7 +17597,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el break; case XML_COMMENT_NODE: - /* "src/lxml/proxy.pxi":505 + /* "src/lxml/proxy.pxi":513 * # libxml2's SAX2 parser interns some indentation space * fixThreadDictContentForNode(c_node, c_src_dict, c_dict) * elif c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< @@ -17501,7 +17607,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el break; default: - /* "src/lxml/proxy.pxi":508 + /* "src/lxml/proxy.pxi":516 * pass # don't touch c_node.name * else: * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17512,7 +17618,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el break; } - /* "src/lxml/proxy.pxi":509 + /* "src/lxml/proxy.pxi":517 * else: * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) * tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<< @@ -17521,7 +17627,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el */ END_FOR_EACH_FROM(__pyx_v_c_node); - /* "src/lxml/proxy.pxi":492 + /* "src/lxml/proxy.pxi":500 * * * cdef void fixThreadDictNamesForNode(xmlNode* c_element, # <<<<<<<<<<<<<< @@ -17532,7 +17638,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForNode(xmlNode *__pyx_v_c_el /* function exit code */ } -/* "src/lxml/proxy.pxi":512 +/* "src/lxml/proxy.pxi":520 * * * cdef inline void fixThreadDictNamesForAttributes(tree.xmlAttr* c_attr, # <<<<<<<<<<<<<< @@ -17547,7 +17653,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x int __pyx_t_2; xmlNode *__pyx_t_3; - /* "src/lxml/proxy.pxi":516 + /* "src/lxml/proxy.pxi":524 * tree.xmlDict* c_dict) nogil: * cdef xmlNode* c_child * cdef xmlNode* c_node = c_attr # <<<<<<<<<<<<<< @@ -17556,7 +17662,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ __pyx_v_c_node = ((xmlNode *)__pyx_v_c_attr); - /* "src/lxml/proxy.pxi":517 + /* "src/lxml/proxy.pxi":525 * cdef xmlNode* c_child * cdef xmlNode* c_node = c_attr * while c_node is not NULL: # <<<<<<<<<<<<<< @@ -17567,7 +17673,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_t_1 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_1) break; - /* "src/lxml/proxy.pxi":518 + /* "src/lxml/proxy.pxi":526 * cdef xmlNode* c_node = c_attr * while c_node is not NULL: * if c_node.type not in (tree.XML_TEXT_NODE, tree.XML_COMMENT_NODE): # <<<<<<<<<<<<<< @@ -17586,7 +17692,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/proxy.pxi":519 + /* "src/lxml/proxy.pxi":527 * while c_node is not NULL: * if c_node.type not in (tree.XML_TEXT_NODE, tree.XML_COMMENT_NODE): * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17595,7 +17701,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_node->name), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":518 + /* "src/lxml/proxy.pxi":526 * cdef xmlNode* c_node = c_attr * while c_node is not NULL: * if c_node.type not in (tree.XML_TEXT_NODE, tree.XML_COMMENT_NODE): # <<<<<<<<<<<<<< @@ -17604,7 +17710,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ } - /* "src/lxml/proxy.pxi":521 + /* "src/lxml/proxy.pxi":529 * _fixThreadDictPtr(&c_node.name, c_src_dict, c_dict) * # libxml2 keeps some (!) attribute values in the dict * c_child = c_node.children # <<<<<<<<<<<<<< @@ -17614,7 +17720,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_t_3 = __pyx_v_c_node->children; __pyx_v_c_child = __pyx_t_3; - /* "src/lxml/proxy.pxi":522 + /* "src/lxml/proxy.pxi":530 * # libxml2 keeps some (!) attribute values in the dict * c_child = c_node.children * while c_child is not NULL: # <<<<<<<<<<<<<< @@ -17625,7 +17731,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_t_2 = ((__pyx_v_c_child != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/proxy.pxi":523 + /* "src/lxml/proxy.pxi":531 * c_child = c_node.children * while c_child is not NULL: * fixThreadDictContentForNode(c_child, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17634,7 +17740,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x */ __pyx_f_4lxml_5etree_fixThreadDictContentForNode(__pyx_v_c_child, __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":524 + /* "src/lxml/proxy.pxi":532 * while c_child is not NULL: * fixThreadDictContentForNode(c_child, c_src_dict, c_dict) * c_child = c_child.next # <<<<<<<<<<<<<< @@ -17645,7 +17751,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_v_c_child = __pyx_t_3; } - /* "src/lxml/proxy.pxi":525 + /* "src/lxml/proxy.pxi":533 * fixThreadDictContentForNode(c_child, c_src_dict, c_dict) * c_child = c_child.next * c_node = c_node.next # <<<<<<<<<<<<<< @@ -17656,7 +17762,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x __pyx_v_c_node = __pyx_t_3; } - /* "src/lxml/proxy.pxi":512 + /* "src/lxml/proxy.pxi":520 * * * cdef inline void fixThreadDictNamesForAttributes(tree.xmlAttr* c_attr, # <<<<<<<<<<<<<< @@ -17667,7 +17773,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNamesForAttributes(x /* function exit code */ } -/* "src/lxml/proxy.pxi":528 +/* "src/lxml/proxy.pxi":536 * * * cdef inline void fixThreadDictContentForNode(xmlNode* c_node, # <<<<<<<<<<<<<< @@ -17679,7 +17785,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo int __pyx_t_1; int __pyx_t_2; - /* "src/lxml/proxy.pxi":531 + /* "src/lxml/proxy.pxi":539 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * if c_node.content is not NULL and \ # <<<<<<<<<<<<<< @@ -17693,7 +17799,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo goto __pyx_L4_bool_binop_done; } - /* "src/lxml/proxy.pxi":532 + /* "src/lxml/proxy.pxi":540 * tree.xmlDict* c_dict) nogil: * if c_node.content is not NULL and \ * c_node.content is not &c_node.properties: # <<<<<<<<<<<<<< @@ -17704,7 +17810,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; - /* "src/lxml/proxy.pxi":531 + /* "src/lxml/proxy.pxi":539 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * if c_node.content is not NULL and \ # <<<<<<<<<<<<<< @@ -17713,7 +17819,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo */ if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":533 + /* "src/lxml/proxy.pxi":541 * if c_node.content is not NULL and \ * c_node.content is not &c_node.properties: * if tree.xmlDictOwns(c_src_dict, c_node.content): # <<<<<<<<<<<<<< @@ -17723,7 +17829,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo __pyx_t_1 = (xmlDictOwns(__pyx_v_c_src_dict, __pyx_v_c_node->content) != 0); if (__pyx_t_1) { - /* "src/lxml/proxy.pxi":535 + /* "src/lxml/proxy.pxi":543 * if tree.xmlDictOwns(c_src_dict, c_node.content): * # result can be NULL on memory error, but we don't handle that here * c_node.content = tree.xmlDictLookup(c_dict, c_node.content, -1) # <<<<<<<<<<<<<< @@ -17732,7 +17838,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo */ __pyx_v_c_node->content = ((xmlChar *)xmlDictLookup(__pyx_v_c_dict, __pyx_v_c_node->content, -1)); - /* "src/lxml/proxy.pxi":533 + /* "src/lxml/proxy.pxi":541 * if c_node.content is not NULL and \ * c_node.content is not &c_node.properties: * if tree.xmlDictOwns(c_src_dict, c_node.content): # <<<<<<<<<<<<<< @@ -17741,7 +17847,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo */ } - /* "src/lxml/proxy.pxi":531 + /* "src/lxml/proxy.pxi":539 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * if c_node.content is not NULL and \ # <<<<<<<<<<<<<< @@ -17750,7 +17856,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo */ } - /* "src/lxml/proxy.pxi":528 + /* "src/lxml/proxy.pxi":536 * * * cdef inline void fixThreadDictContentForNode(xmlNode* c_node, # <<<<<<<<<<<<<< @@ -17761,7 +17867,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictContentForNode(xmlNo /* function exit code */ } -/* "src/lxml/proxy.pxi":538 +/* "src/lxml/proxy.pxi":546 * * * cdef inline void fixThreadDictNsForNode(xmlNode* c_node, # <<<<<<<<<<<<<< @@ -17774,7 +17880,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ xmlNs *__pyx_t_1; int __pyx_t_2; - /* "src/lxml/proxy.pxi":541 + /* "src/lxml/proxy.pxi":549 * tree.xmlDict* c_src_dict, * tree.xmlDict* c_dict) nogil: * cdef xmlNs* c_ns = c_node.nsDef # <<<<<<<<<<<<<< @@ -17784,7 +17890,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ __pyx_t_1 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_1; - /* "src/lxml/proxy.pxi":542 + /* "src/lxml/proxy.pxi":550 * tree.xmlDict* c_dict) nogil: * cdef xmlNs* c_ns = c_node.nsDef * while c_ns is not NULL: # <<<<<<<<<<<<<< @@ -17795,7 +17901,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ __pyx_t_2 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_2) break; - /* "src/lxml/proxy.pxi":543 + /* "src/lxml/proxy.pxi":551 * cdef xmlNs* c_ns = c_node.nsDef * while c_ns is not NULL: * _fixThreadDictPtr(&c_ns.href, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17804,7 +17910,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_ns->href), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":544 + /* "src/lxml/proxy.pxi":552 * while c_ns is not NULL: * _fixThreadDictPtr(&c_ns.href, c_src_dict, c_dict) * _fixThreadDictPtr(&c_ns.prefix, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17813,7 +17919,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_ns->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":545 + /* "src/lxml/proxy.pxi":553 * _fixThreadDictPtr(&c_ns.href, c_src_dict, c_dict) * _fixThreadDictPtr(&c_ns.prefix, c_src_dict, c_dict) * c_ns = c_ns.next # <<<<<<<<<<<<<< @@ -17824,7 +17930,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ __pyx_v_c_ns = __pyx_t_1; } - /* "src/lxml/proxy.pxi":538 + /* "src/lxml/proxy.pxi":546 * * * cdef inline void fixThreadDictNsForNode(xmlNode* c_node, # <<<<<<<<<<<<<< @@ -17835,7 +17941,7 @@ static CYTHON_INLINE void __pyx_f_4lxml_5etree_fixThreadDictNsForNode(xmlNode *_ /* function exit code */ } -/* "src/lxml/proxy.pxi":548 +/* "src/lxml/proxy.pxi":556 * * * cdef void fixThreadDictNamesForDtd(tree.xmlDtd* c_dtd, # <<<<<<<<<<<<<< @@ -17852,7 +17958,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, int __pyx_t_2; xmlAttribute *__pyx_t_3; - /* "src/lxml/proxy.pxi":556 + /* "src/lxml/proxy.pxi":564 * cdef tree.xmlEntity* c_entity * * c_node = c_dtd.children # <<<<<<<<<<<<<< @@ -17862,7 +17968,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_t_1 = __pyx_v_c_dtd->children; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/proxy.pxi":557 + /* "src/lxml/proxy.pxi":565 * * c_node = c_dtd.children * while c_node: # <<<<<<<<<<<<<< @@ -17873,7 +17979,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_t_2 = (__pyx_v_c_node != 0); if (!__pyx_t_2) break; - /* "src/lxml/proxy.pxi":558 + /* "src/lxml/proxy.pxi":566 * c_node = c_dtd.children * while c_node: * if c_node.type == tree.XML_ELEMENT_DECL: # <<<<<<<<<<<<<< @@ -17883,7 +17989,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, switch (__pyx_v_c_node->type) { case XML_ELEMENT_DECL: - /* "src/lxml/proxy.pxi":559 + /* "src/lxml/proxy.pxi":567 * while c_node: * if c_node.type == tree.XML_ELEMENT_DECL: * c_element = c_node # <<<<<<<<<<<<<< @@ -17892,7 +17998,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_v_c_element = ((xmlElement *)__pyx_v_c_node); - /* "src/lxml/proxy.pxi":560 + /* "src/lxml/proxy.pxi":568 * if c_node.type == tree.XML_ELEMENT_DECL: * c_element = c_node * if c_element.content: # <<<<<<<<<<<<<< @@ -17902,7 +18008,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_t_2 = (__pyx_v_c_element->content != 0); if (__pyx_t_2) { - /* "src/lxml/proxy.pxi":561 + /* "src/lxml/proxy.pxi":569 * c_element = c_node * if c_element.content: * _fixThreadDictPtr(&c_element.content.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17911,7 +18017,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_element->content->name), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":562 + /* "src/lxml/proxy.pxi":570 * if c_element.content: * _fixThreadDictPtr(&c_element.content.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_element.content.prefix, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17920,7 +18026,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_element->content->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":560 + /* "src/lxml/proxy.pxi":568 * if c_node.type == tree.XML_ELEMENT_DECL: * c_element = c_node * if c_element.content: # <<<<<<<<<<<<<< @@ -17929,7 +18035,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ } - /* "src/lxml/proxy.pxi":563 + /* "src/lxml/proxy.pxi":571 * _fixThreadDictPtr(&c_element.content.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_element.content.prefix, c_src_dict, c_dict) * c_attribute = c_element.attributes # <<<<<<<<<<<<<< @@ -17939,7 +18045,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_t_3 = __pyx_v_c_element->attributes; __pyx_v_c_attribute = __pyx_t_3; - /* "src/lxml/proxy.pxi":564 + /* "src/lxml/proxy.pxi":572 * _fixThreadDictPtr(&c_element.content.prefix, c_src_dict, c_dict) * c_attribute = c_element.attributes * while c_attribute: # <<<<<<<<<<<<<< @@ -17950,7 +18056,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_t_2 = (__pyx_v_c_attribute != 0); if (!__pyx_t_2) break; - /* "src/lxml/proxy.pxi":565 + /* "src/lxml/proxy.pxi":573 * c_attribute = c_element.attributes * while c_attribute: * _fixThreadDictPtr(&c_attribute.defaultValue, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17959,7 +18065,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->defaultValue), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":566 + /* "src/lxml/proxy.pxi":574 * while c_attribute: * _fixThreadDictPtr(&c_attribute.defaultValue, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17968,7 +18074,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->name), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":567 + /* "src/lxml/proxy.pxi":575 * _fixThreadDictPtr(&c_attribute.defaultValue, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17977,7 +18083,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->prefix), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":568 + /* "src/lxml/proxy.pxi":576 * _fixThreadDictPtr(&c_attribute.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -17986,7 +18092,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_attribute->elem), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":569 + /* "src/lxml/proxy.pxi":577 * _fixThreadDictPtr(&c_attribute.prefix, c_src_dict, c_dict) * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) * c_attribute = c_attribute.nexth # <<<<<<<<<<<<<< @@ -17997,7 +18103,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_v_c_attribute = __pyx_t_3; } - /* "src/lxml/proxy.pxi":558 + /* "src/lxml/proxy.pxi":566 * c_node = c_dtd.children * while c_node: * if c_node.type == tree.XML_ELEMENT_DECL: # <<<<<<<<<<<<<< @@ -18007,7 +18113,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, break; case XML_ENTITY_DECL: - /* "src/lxml/proxy.pxi":571 + /* "src/lxml/proxy.pxi":579 * c_attribute = c_attribute.nexth * elif c_node.type == tree.XML_ENTITY_DECL: * c_entity = c_node # <<<<<<<<<<<<<< @@ -18016,7 +18122,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_v_c_entity = ((xmlEntity *)__pyx_v_c_node); - /* "src/lxml/proxy.pxi":572 + /* "src/lxml/proxy.pxi":580 * elif c_node.type == tree.XML_ENTITY_DECL: * c_entity = c_node * _fixThreadDictPtr(&c_entity.name, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -18025,7 +18131,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->name), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":573 + /* "src/lxml/proxy.pxi":581 * c_entity = c_node * _fixThreadDictPtr(&c_entity.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.ExternalID, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -18034,7 +18140,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->ExternalID), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":574 + /* "src/lxml/proxy.pxi":582 * _fixThreadDictPtr(&c_entity.name, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.ExternalID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.SystemID, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -18043,7 +18149,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr((&__pyx_v_c_entity->SystemID), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":575 + /* "src/lxml/proxy.pxi":583 * _fixThreadDictPtr(&c_entity.ExternalID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.SystemID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.content, c_src_dict, c_dict) # <<<<<<<<<<<<<< @@ -18052,7 +18158,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, */ __pyx_f_4lxml_5etree__fixThreadDictPtr(((const xmlChar **)(&__pyx_v_c_entity->content)), __pyx_v_c_src_dict, __pyx_v_c_dict); - /* "src/lxml/proxy.pxi":570 + /* "src/lxml/proxy.pxi":578 * _fixThreadDictPtr(&c_attribute.elem, c_src_dict, c_dict) * c_attribute = c_attribute.nexth * elif c_node.type == tree.XML_ENTITY_DECL: # <<<<<<<<<<<<<< @@ -18063,7 +18169,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, default: break; } - /* "src/lxml/proxy.pxi":576 + /* "src/lxml/proxy.pxi":584 * _fixThreadDictPtr(&c_entity.SystemID, c_src_dict, c_dict) * _fixThreadDictPtr(&c_entity.content, c_src_dict, c_dict) * c_node = c_node.next # <<<<<<<<<<<<<< @@ -18074,7 +18180,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, __pyx_v_c_node = __pyx_t_1; } - /* "src/lxml/proxy.pxi":548 + /* "src/lxml/proxy.pxi":556 * * * cdef void fixThreadDictNamesForDtd(tree.xmlDtd* c_dtd, # <<<<<<<<<<<<<< @@ -18085,7 +18191,7 @@ static void __pyx_f_4lxml_5etree_fixThreadDictNamesForDtd(xmlDtd *__pyx_v_c_dtd, /* function exit code */ } -/* "src/lxml/proxy.pxi":582 +/* "src/lxml/proxy.pxi":590 * # adopt an xmlDoc from an external libxml2 document source * * cdef _Document _adoptForeignDoc(xmlDoc* c_doc, _BaseParser parser=None, bint is_owned=True): # <<<<<<<<<<<<<< @@ -18115,7 +18221,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ } } - /* "src/lxml/proxy.pxi":587 + /* "src/lxml/proxy.pxi":595 * dereference into lxml proxy objects. * """ * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -18125,20 +18231,20 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/proxy.pxi":588 + /* "src/lxml/proxy.pxi":596 * """ * if c_doc is NULL: * raise ValueError("Illegal document provided: NULL") # <<<<<<<<<<<<<< * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 588, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(4, 588, __pyx_L1_error) + __PYX_ERR(4, 596, __pyx_L1_error) - /* "src/lxml/proxy.pxi":587 + /* "src/lxml/proxy.pxi":595 * dereference into lxml proxy objects. * """ * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -18147,7 +18253,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ } - /* "src/lxml/proxy.pxi":589 + /* "src/lxml/proxy.pxi":597 * if c_doc is NULL: * raise ValueError("Illegal document provided: NULL") * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): # <<<<<<<<<<<<<< @@ -18166,7 +18272,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":590 + /* "src/lxml/proxy.pxi":598 * raise ValueError("Illegal document provided: NULL") * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type # <<<<<<<<<<<<<< @@ -18176,7 +18282,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_4 = __pyx_v_c_doc->type; __pyx_v_doc_type = __pyx_t_4; - /* "src/lxml/proxy.pxi":591 + /* "src/lxml/proxy.pxi":599 * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type * if is_owned: # <<<<<<<<<<<<<< @@ -18186,7 +18292,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_3 = (__pyx_v_is_owned != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":592 + /* "src/lxml/proxy.pxi":600 * doc_type = c_doc.type * if is_owned: * tree.xmlFreeDoc(c_doc) # <<<<<<<<<<<<<< @@ -18195,7 +18301,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ xmlFreeDoc(__pyx_v_c_doc); - /* "src/lxml/proxy.pxi":591 + /* "src/lxml/proxy.pxi":599 * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type * if is_owned: # <<<<<<<<<<<<<< @@ -18204,26 +18310,26 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ } - /* "src/lxml/proxy.pxi":593 + /* "src/lxml/proxy.pxi":601 * if is_owned: * tree.xmlFreeDoc(c_doc) * raise ValueError(f"Illegal document provided: expected XML or HTML, found {doc_type}") # <<<<<<<<<<<<<< * * cdef xmlNode* c_node = c_doc */ - __pyx_t_2 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_doc_type, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 593, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_From_xmlElementType(__pyx_v_doc_type, 0, ' ', 'd'); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Illegal_document_provided_expect, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 593, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Illegal_document_provided_expect, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(4, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 593, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(4, 593, __pyx_L1_error) + __PYX_ERR(4, 601, __pyx_L1_error) - /* "src/lxml/proxy.pxi":589 + /* "src/lxml/proxy.pxi":597 * if c_doc is NULL: * raise ValueError("Illegal document provided: NULL") * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): # <<<<<<<<<<<<<< @@ -18232,7 +18338,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ } - /* "src/lxml/proxy.pxi":595 + /* "src/lxml/proxy.pxi":603 * raise ValueError(f"Illegal document provided: expected XML or HTML, found {doc_type}") * * cdef xmlNode* c_node = c_doc # <<<<<<<<<<<<<< @@ -18241,7 +18347,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ __pyx_v_c_node = ((xmlNode *)__pyx_v_c_doc); - /* "src/lxml/proxy.pxi":597 + /* "src/lxml/proxy.pxi":605 * cdef xmlNode* c_node = c_doc * * if is_owned: # <<<<<<<<<<<<<< @@ -18251,7 +18357,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_3 = (__pyx_v_is_owned != 0); if (__pyx_t_3) { - /* "src/lxml/proxy.pxi":598 + /* "src/lxml/proxy.pxi":606 * * if is_owned: * tree.BEGIN_FOR_EACH_FROM(c_doc, c_node, 1) # <<<<<<<<<<<<<< @@ -18260,7 +18366,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ BEGIN_FOR_EACH_FROM(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node, 1); - /* "src/lxml/proxy.pxi":599 + /* "src/lxml/proxy.pxi":607 * if is_owned: * tree.BEGIN_FOR_EACH_FROM(c_doc, c_node, 1) * c_node._private = NULL # <<<<<<<<<<<<<< @@ -18269,7 +18375,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ __pyx_v_c_node->_private = NULL; - /* "src/lxml/proxy.pxi":600 + /* "src/lxml/proxy.pxi":608 * tree.BEGIN_FOR_EACH_FROM(c_doc, c_node, 1) * c_node._private = NULL * tree.END_FOR_EACH_FROM(c_node) # <<<<<<<<<<<<<< @@ -18278,7 +18384,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ */ END_FOR_EACH_FROM(__pyx_v_c_node); - /* "src/lxml/proxy.pxi":597 + /* "src/lxml/proxy.pxi":605 * cdef xmlNode* c_node = c_doc * * if is_owned: # <<<<<<<<<<<<<< @@ -18288,7 +18394,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ goto __pyx_L6; } - /* "src/lxml/proxy.pxi":603 + /* "src/lxml/proxy.pxi":611 * else: * # create a fresh copy that lxml owns * c_doc = tree.xmlCopyDoc(c_doc, 1) # <<<<<<<<<<<<<< @@ -18298,7 +18404,7 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ /*else*/ { __pyx_v_c_doc = xmlCopyDoc(__pyx_v_c_doc, 1); - /* "src/lxml/proxy.pxi":604 + /* "src/lxml/proxy.pxi":612 * # create a fresh copy that lxml owns * c_doc = tree.xmlCopyDoc(c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -18308,16 +18414,16 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ __pyx_t_3 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_3)) { - /* "src/lxml/proxy.pxi":605 + /* "src/lxml/proxy.pxi":613 * c_doc = tree.xmlCopyDoc(c_doc, 1) * if c_doc is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * * return _documentFactory(c_doc, parser) */ - PyErr_NoMemory(); __PYX_ERR(4, 605, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(4, 613, __pyx_L1_error) - /* "src/lxml/proxy.pxi":604 + /* "src/lxml/proxy.pxi":612 * # create a fresh copy that lxml owns * c_doc = tree.xmlCopyDoc(c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -18328,19 +18434,19 @@ static struct LxmlDocument *__pyx_f_4lxml_5etree__adoptForeignDoc(xmlDoc *__pyx_ } __pyx_L6:; - /* "src/lxml/proxy.pxi":607 + /* "src/lxml/proxy.pxi":615 * raise MemoryError() * * return _documentFactory(c_doc, parser) # <<<<<<<<<<<<<< */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 607, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_2)) __PYX_ERR(4, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = ((struct LxmlDocument *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/proxy.pxi":582 + /* "src/lxml/proxy.pxi":590 * # adopt an xmlDoc from an external libxml2 document source * * cdef _Document _adoptForeignDoc(xmlDoc* c_doc, _BaseParser parser=None, bint is_owned=True): # <<<<<<<<<<<<<< @@ -31678,7 +31784,7 @@ static int __pyx_f_4lxml_5etree__replaceSlice(struct LxmlElement *__pyx_v_parent * * * cdef int _linkChild(xmlNode* c_parent, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< - * """Simple version of 'xmlAddChild()' that does not deep-fix the document links. + * """Adaptation of 'xmlAddChild()' that deep-fix the document links iteratively. * """ */ @@ -31690,7 +31796,7 @@ static int __pyx_f_4lxml_5etree__linkChild(xmlNode *__pyx_v_c_parent, xmlNode *_ __Pyx_RefNannySetupContext("_linkChild", 0); /* "src/lxml/apihelpers.pxi":1274 - * """Simple version of 'xmlAddChild()' that does not deep-fix the document links. + * """Adaptation of 'xmlAddChild()' that deep-fix the document links iteratively. * """ * assert _isElement(c_node) # <<<<<<<<<<<<<< * c_node.parent = c_parent @@ -31760,7 +31866,7 @@ static int __pyx_f_4lxml_5etree__linkChild(xmlNode *__pyx_v_c_parent, xmlNode *_ * c_node.prev = c_parent.last * c_parent.last.next = c_node # <<<<<<<<<<<<<< * c_parent.last = c_node - * return 0 + * */ __pyx_v_c_parent->last->next = __pyx_v_c_node; @@ -31768,16 +31874,25 @@ static int __pyx_f_4lxml_5etree__linkChild(xmlNode *__pyx_v_c_parent, xmlNode *_ * c_node.prev = c_parent.last * c_parent.last.next = c_node * c_parent.last = c_node # <<<<<<<<<<<<<< - * return 0 * + * _setTreeDoc(c_node, c_parent.doc) */ __pyx_v_c_parent->last = __pyx_v_c_node; } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1282 - * c_parent.last.next = c_node + /* "src/lxml/apihelpers.pxi":1283 * c_parent.last = c_node + * + * _setTreeDoc(c_node, c_parent.doc) # <<<<<<<<<<<<<< + * return 0 + * + */ + __pyx_f_4lxml_5etree__setTreeDoc(__pyx_v_c_node, __pyx_v_c_parent->doc); + + /* "src/lxml/apihelpers.pxi":1284 + * + * _setTreeDoc(c_node, c_parent.doc) * return 0 # <<<<<<<<<<<<<< * * @@ -31789,7 +31904,7 @@ static int __pyx_f_4lxml_5etree__linkChild(xmlNode *__pyx_v_c_parent, xmlNode *_ * * * cdef int _linkChild(xmlNode* c_parent, xmlNode* c_node) except -1: # <<<<<<<<<<<<<< - * """Simple version of 'xmlAddChild()' that does not deep-fix the document links. + * """Adaptation of 'xmlAddChild()' that deep-fix the document links iteratively. * """ */ @@ -31802,7 +31917,7 @@ static int __pyx_f_4lxml_5etree__linkChild(xmlNode *__pyx_v_c_parent, xmlNode *_ return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1285 +/* "src/lxml/apihelpers.pxi":1287 * * * cdef int _appendChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -31823,7 +31938,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, int __pyx_t_5; __Pyx_RefNannySetupContext("_appendChild", 0); - /* "src/lxml/apihelpers.pxi":1288 + /* "src/lxml/apihelpers.pxi":1290 * u"""Append a new child to a parent element. * """ * c_node = child._c_node # <<<<<<<<<<<<<< @@ -31833,7 +31948,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __pyx_t_1 = __pyx_v_child->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1289 + /* "src/lxml/apihelpers.pxi":1291 * """ * c_node = child._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< @@ -31843,7 +31958,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1291 + /* "src/lxml/apihelpers.pxi":1293 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -31853,20 +31968,20 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __pyx_t_3 = (__pyx_f_4lxml_5etree__isAncestorOrSame(__pyx_v_c_node, __pyx_v_parent->_c_node) != 0); if (unlikely(__pyx_t_3)) { - /* "src/lxml/apihelpers.pxi":1292 + /* "src/lxml/apihelpers.pxi":1294 * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): * raise ValueError("cannot append parent to itself") # <<<<<<<<<<<<<< * # store possible text node * c_next = c_node.next */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1292, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(5, 1292, __pyx_L1_error) + __PYX_ERR(5, 1294, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1291 + /* "src/lxml/apihelpers.pxi":1293 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -31875,7 +31990,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, */ } - /* "src/lxml/apihelpers.pxi":1294 + /* "src/lxml/apihelpers.pxi":1296 * raise ValueError("cannot append parent to itself") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< @@ -31885,7 +32000,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1296 + /* "src/lxml/apihelpers.pxi":1298 * c_next = c_node.next * # move node itself * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< @@ -31894,16 +32009,16 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, */ xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1298 + /* "src/lxml/apihelpers.pxi":1300 * tree.xmlUnlinkNode(c_node) * # do not call xmlAddChild() here since it would deep-traverse the tree * _linkChild(parent._c_node, c_node) # <<<<<<<<<<<<<< * _moveTail(c_next, c_node) * # uh oh, elements may be pointing to different doc when */ - __pyx_t_5 = __pyx_f_4lxml_5etree__linkChild(__pyx_v_parent->_c_node, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1298, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__linkChild(__pyx_v_parent->_c_node, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1300, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1299 + /* "src/lxml/apihelpers.pxi":1301 * # do not call xmlAddChild() here since it would deep-traverse the tree * _linkChild(parent._c_node, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< @@ -31912,7 +32027,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, */ __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1302 + /* "src/lxml/apihelpers.pxi":1304 * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) # <<<<<<<<<<<<<< @@ -31921,10 +32036,10 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, */ __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1302, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1303 + /* "src/lxml/apihelpers.pxi":1305 * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< @@ -31934,7 +32049,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1285 + /* "src/lxml/apihelpers.pxi":1287 * * * cdef int _appendChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -31952,7 +32067,7 @@ static int __pyx_f_4lxml_5etree__appendChild(struct LxmlElement *__pyx_v_parent, return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1305 +/* "src/lxml/apihelpers.pxi":1307 * return 0 * * cdef int _prependChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -31974,7 +32089,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent int __pyx_t_5; __Pyx_RefNannySetupContext("_prependChild", 0); - /* "src/lxml/apihelpers.pxi":1308 + /* "src/lxml/apihelpers.pxi":1310 * u"""Prepend a new child to a parent element. * """ * c_node = child._c_node # <<<<<<<<<<<<<< @@ -31984,7 +32099,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_t_1 = __pyx_v_child->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1309 + /* "src/lxml/apihelpers.pxi":1311 * """ * c_node = child._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< @@ -31994,7 +32109,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1311 + /* "src/lxml/apihelpers.pxi":1313 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -32004,20 +32119,20 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_t_3 = (__pyx_f_4lxml_5etree__isAncestorOrSame(__pyx_v_c_node, __pyx_v_parent->_c_node) != 0); if (unlikely(__pyx_t_3)) { - /* "src/lxml/apihelpers.pxi":1312 + /* "src/lxml/apihelpers.pxi":1314 * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): * raise ValueError("cannot append parent to itself") # <<<<<<<<<<<<<< * # store possible text node * c_next = c_node.next */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1312, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(5, 1312, __pyx_L1_error) + __PYX_ERR(5, 1314, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1311 + /* "src/lxml/apihelpers.pxi":1313 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): # <<<<<<<<<<<<<< @@ -32026,7 +32141,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ } - /* "src/lxml/apihelpers.pxi":1314 + /* "src/lxml/apihelpers.pxi":1316 * raise ValueError("cannot append parent to itself") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< @@ -32036,7 +32151,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1316 + /* "src/lxml/apihelpers.pxi":1318 * c_next = c_node.next * # move node itself * c_child = _findChildForwards(parent._c_node, 0) # <<<<<<<<<<<<<< @@ -32045,7 +32160,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ __pyx_v_c_child = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_parent->_c_node, 0); - /* "src/lxml/apihelpers.pxi":1317 + /* "src/lxml/apihelpers.pxi":1319 * # move node itself * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: # <<<<<<<<<<<<<< @@ -32055,7 +32170,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_t_3 = ((__pyx_v_c_child == NULL) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1318 + /* "src/lxml/apihelpers.pxi":1320 * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: * tree.xmlUnlinkNode(c_node) # <<<<<<<<<<<<<< @@ -32064,16 +32179,16 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ xmlUnlinkNode(__pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1320 + /* "src/lxml/apihelpers.pxi":1322 * tree.xmlUnlinkNode(c_node) * # do not call xmlAddChild() here since it would deep-traverse the tree * _linkChild(parent._c_node, c_node) # <<<<<<<<<<<<<< * else: * tree.xmlAddPrevSibling(c_child, c_node) */ - __pyx_t_5 = __pyx_f_4lxml_5etree__linkChild(__pyx_v_parent->_c_node, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1320, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__linkChild(__pyx_v_parent->_c_node, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1322, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1317 + /* "src/lxml/apihelpers.pxi":1319 * # move node itself * c_child = _findChildForwards(parent._c_node, 0) * if c_child is NULL: # <<<<<<<<<<<<<< @@ -32083,7 +32198,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent goto __pyx_L4; } - /* "src/lxml/apihelpers.pxi":1322 + /* "src/lxml/apihelpers.pxi":1324 * _linkChild(parent._c_node, c_node) * else: * tree.xmlAddPrevSibling(c_child, c_node) # <<<<<<<<<<<<<< @@ -32095,7 +32210,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent } __pyx_L4:; - /* "src/lxml/apihelpers.pxi":1323 + /* "src/lxml/apihelpers.pxi":1325 * else: * tree.xmlAddPrevSibling(c_child, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< @@ -32104,7 +32219,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1326 + /* "src/lxml/apihelpers.pxi":1328 * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) # <<<<<<<<<<<<<< @@ -32113,10 +32228,10 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent */ __pyx_t_4 = ((PyObject *)__pyx_v_parent->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1326, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1328, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1327 + /* "src/lxml/apihelpers.pxi":1329 * # parent element has moved; change them too.. * moveNodeToDocument(parent._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< @@ -32126,7 +32241,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1305 + /* "src/lxml/apihelpers.pxi":1307 * return 0 * * cdef int _prependChild(_Element parent, _Element child) except -1: # <<<<<<<<<<<<<< @@ -32144,7 +32259,7 @@ static int __pyx_f_4lxml_5etree__prependChild(struct LxmlElement *__pyx_v_parent return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1329 +/* "src/lxml/apihelpers.pxi":1331 * return 0 * * cdef int _appendSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -32158,18 +32273,18 @@ static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *__pyx_v_eleme int __pyx_t_1; __Pyx_RefNannySetupContext("_appendSibling", 0); - /* "src/lxml/apihelpers.pxi":1332 + /* "src/lxml/apihelpers.pxi":1334 * u"""Add a new sibling behind an element. * """ * return _addSibling(element, sibling, as_next=True) # <<<<<<<<<<<<<< * * cdef int _prependSibling(_Element element, _Element sibling) except -1: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__addSibling(__pyx_v_element, __pyx_v_sibling, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1332, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__addSibling(__pyx_v_element, __pyx_v_sibling, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1334, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1329 + /* "src/lxml/apihelpers.pxi":1331 * return 0 * * cdef int _appendSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -32186,7 +32301,7 @@ static int __pyx_f_4lxml_5etree__appendSibling(struct LxmlElement *__pyx_v_eleme return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1334 +/* "src/lxml/apihelpers.pxi":1336 * return _addSibling(element, sibling, as_next=True) * * cdef int _prependSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -32200,18 +32315,18 @@ static int __pyx_f_4lxml_5etree__prependSibling(struct LxmlElement *__pyx_v_elem int __pyx_t_1; __Pyx_RefNannySetupContext("_prependSibling", 0); - /* "src/lxml/apihelpers.pxi":1337 + /* "src/lxml/apihelpers.pxi":1339 * u"""Add a new sibling before an element. * """ * return _addSibling(element, sibling, as_next=False) # <<<<<<<<<<<<<< * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__addSibling(__pyx_v_element, __pyx_v_sibling, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1337, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__addSibling(__pyx_v_element, __pyx_v_sibling, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(5, 1339, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1334 + /* "src/lxml/apihelpers.pxi":1336 * return _addSibling(element, sibling, as_next=True) * * cdef int _prependSibling(_Element element, _Element sibling) except -1: # <<<<<<<<<<<<<< @@ -32228,7 +32343,7 @@ static int __pyx_f_4lxml_5etree__prependSibling(struct LxmlElement *__pyx_v_elem return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1339 +/* "src/lxml/apihelpers.pxi":1341 * return _addSibling(element, sibling, as_next=False) * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: # <<<<<<<<<<<<<< @@ -32249,7 +32364,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, int __pyx_t_5; __Pyx_RefNannySetupContext("_addSibling", 0); - /* "src/lxml/apihelpers.pxi":1340 + /* "src/lxml/apihelpers.pxi":1342 * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: * c_node = sibling._c_node # <<<<<<<<<<<<<< @@ -32259,7 +32374,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_1 = __pyx_v_sibling->_c_node; __pyx_v_c_node = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1341 + /* "src/lxml/apihelpers.pxi":1343 * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: * c_node = sibling._c_node * c_source_doc = c_node.doc # <<<<<<<<<<<<<< @@ -32269,7 +32384,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_2 = __pyx_v_c_node->doc; __pyx_v_c_source_doc = __pyx_t_2; - /* "src/lxml/apihelpers.pxi":1343 + /* "src/lxml/apihelpers.pxi":1345 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): # <<<<<<<<<<<<<< @@ -32279,7 +32394,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_3 = (__pyx_f_4lxml_5etree__isAncestorOrSame(__pyx_v_c_node, __pyx_v_element->_c_node) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1344 + /* "src/lxml/apihelpers.pxi":1346 * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): * if element._c_node is c_node: # <<<<<<<<<<<<<< @@ -32289,7 +32404,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_3 = ((__pyx_v_element->_c_node == __pyx_v_c_node) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1345 + /* "src/lxml/apihelpers.pxi":1347 * if _isAncestorOrSame(c_node, element._c_node): * if element._c_node is c_node: * return 0 # nothing to do # <<<<<<<<<<<<<< @@ -32299,7 +32414,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1344 + /* "src/lxml/apihelpers.pxi":1346 * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): * if element._c_node is c_node: # <<<<<<<<<<<<<< @@ -32308,20 +32423,20 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ } - /* "src/lxml/apihelpers.pxi":1346 + /* "src/lxml/apihelpers.pxi":1348 * if element._c_node is c_node: * return 0 # nothing to do * raise ValueError("cannot add ancestor as sibling, please break cycle first") # <<<<<<<<<<<<<< * # store possible text node * c_next = c_node.next */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1346, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(5, 1346, __pyx_L1_error) + __PYX_ERR(5, 1348, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1343 + /* "src/lxml/apihelpers.pxi":1345 * c_source_doc = c_node.doc * # prevent cycles * if _isAncestorOrSame(c_node, element._c_node): # <<<<<<<<<<<<<< @@ -32330,7 +32445,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ } - /* "src/lxml/apihelpers.pxi":1348 + /* "src/lxml/apihelpers.pxi":1350 * raise ValueError("cannot add ancestor as sibling, please break cycle first") * # store possible text node * c_next = c_node.next # <<<<<<<<<<<<<< @@ -32340,7 +32455,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_1 = __pyx_v_c_node->next; __pyx_v_c_next = __pyx_t_1; - /* "src/lxml/apihelpers.pxi":1350 + /* "src/lxml/apihelpers.pxi":1352 * c_next = c_node.next * # move node itself * if as_next: # <<<<<<<<<<<<<< @@ -32350,7 +32465,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_t_3 = (__pyx_v_as_next != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1351 + /* "src/lxml/apihelpers.pxi":1353 * # move node itself * if as_next: * tree.xmlAddNextSibling(element._c_node, c_node) # <<<<<<<<<<<<<< @@ -32359,7 +32474,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ (void)(xmlAddNextSibling(__pyx_v_element->_c_node, __pyx_v_c_node)); - /* "src/lxml/apihelpers.pxi":1350 + /* "src/lxml/apihelpers.pxi":1352 * c_next = c_node.next * # move node itself * if as_next: # <<<<<<<<<<<<<< @@ -32369,7 +32484,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, goto __pyx_L5; } - /* "src/lxml/apihelpers.pxi":1353 + /* "src/lxml/apihelpers.pxi":1355 * tree.xmlAddNextSibling(element._c_node, c_node) * else: * tree.xmlAddPrevSibling(element._c_node, c_node) # <<<<<<<<<<<<<< @@ -32381,7 +32496,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, } __pyx_L5:; - /* "src/lxml/apihelpers.pxi":1354 + /* "src/lxml/apihelpers.pxi":1356 * else: * tree.xmlAddPrevSibling(element._c_node, c_node) * _moveTail(c_next, c_node) # <<<<<<<<<<<<<< @@ -32390,7 +32505,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ __pyx_f_4lxml_5etree__moveTail(__pyx_v_c_next, __pyx_v_c_node); - /* "src/lxml/apihelpers.pxi":1357 + /* "src/lxml/apihelpers.pxi":1359 * # uh oh, elements may be pointing to different doc when * # parent element has moved; change them too.. * moveNodeToDocument(element._doc, c_source_doc, c_node) # <<<<<<<<<<<<<< @@ -32399,10 +32514,10 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, */ __pyx_t_4 = ((PyObject *)__pyx_v_element->_doc); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1357, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_moveNodeToDocument(((struct LxmlDocument *)__pyx_t_4), __pyx_v_c_source_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(5, 1359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1358 + /* "src/lxml/apihelpers.pxi":1360 * # parent element has moved; change them too.. * moveNodeToDocument(element._doc, c_source_doc, c_node) * return 0 # <<<<<<<<<<<<<< @@ -32412,7 +32527,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1339 + /* "src/lxml/apihelpers.pxi":1341 * return _addSibling(element, sibling, as_next=False) * * cdef int _addSibling(_Element element, _Element sibling, bint as_next) except -1: # <<<<<<<<<<<<<< @@ -32430,7 +32545,7 @@ static int __pyx_f_4lxml_5etree__addSibling(struct LxmlElement *__pyx_v_element, return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1360 +/* "src/lxml/apihelpers.pxi":1362 * return 0 * * cdef inline bint isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -32445,7 +32560,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { int __pyx_t_1; __Pyx_RefNannySetupContext("isutf8", 0); - /* "src/lxml/apihelpers.pxi":1361 + /* "src/lxml/apihelpers.pxi":1363 * * cdef inline bint isutf8(const_xmlChar* s): * cdef xmlChar c = s[0] # <<<<<<<<<<<<<< @@ -32454,7 +32569,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { */ __pyx_v_c = (__pyx_v_s[0]); - /* "src/lxml/apihelpers.pxi":1362 + /* "src/lxml/apihelpers.pxi":1364 * cdef inline bint isutf8(const_xmlChar* s): * cdef xmlChar c = s[0] * while c != c'\0': # <<<<<<<<<<<<<< @@ -32465,7 +32580,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { __pyx_t_1 = ((__pyx_v_c != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1363 + /* "src/lxml/apihelpers.pxi":1365 * cdef xmlChar c = s[0] * while c != c'\0': * if c & 0x80: # <<<<<<<<<<<<<< @@ -32475,7 +32590,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { __pyx_t_1 = ((__pyx_v_c & 0x80) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1364 + /* "src/lxml/apihelpers.pxi":1366 * while c != c'\0': * if c & 0x80: * return True # <<<<<<<<<<<<<< @@ -32485,7 +32600,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1363 + /* "src/lxml/apihelpers.pxi":1365 * cdef xmlChar c = s[0] * while c != c'\0': * if c & 0x80: # <<<<<<<<<<<<<< @@ -32494,7 +32609,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1365 + /* "src/lxml/apihelpers.pxi":1367 * if c & 0x80: * return True * s += 1 # <<<<<<<<<<<<<< @@ -32503,7 +32618,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { */ __pyx_v_s = (__pyx_v_s + 1); - /* "src/lxml/apihelpers.pxi":1366 + /* "src/lxml/apihelpers.pxi":1368 * return True * s += 1 * c = s[0] # <<<<<<<<<<<<<< @@ -32513,7 +32628,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { __pyx_v_c = (__pyx_v_s[0]); } - /* "src/lxml/apihelpers.pxi":1367 + /* "src/lxml/apihelpers.pxi":1369 * s += 1 * c = s[0] * return False # <<<<<<<<<<<<<< @@ -32523,7 +32638,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1360 + /* "src/lxml/apihelpers.pxi":1362 * return 0 * * cdef inline bint isutf8(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -32537,7 +32652,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_isutf8(const xmlChar *__pyx_v_s) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1369 +/* "src/lxml/apihelpers.pxi":1371 * return False * * cdef bint isutf8l(const_xmlChar* s, size_t length): # <<<<<<<<<<<<<< @@ -32559,7 +32674,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v int __pyx_t_5; __Pyx_RefNannySetupContext("isutf8l", 0); - /* "src/lxml/apihelpers.pxi":1375 + /* "src/lxml/apihelpers.pxi":1377 * cdef int i * cdef unsigned long non_ascii_mask * cdef const unsigned long *lptr = s # <<<<<<<<<<<<<< @@ -32568,7 +32683,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ __pyx_v_lptr = ((unsigned long const *)__pyx_v_s); - /* "src/lxml/apihelpers.pxi":1377 + /* "src/lxml/apihelpers.pxi":1379 * cdef const unsigned long *lptr = s * * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) # <<<<<<<<<<<<<< @@ -32578,11 +32693,11 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_1 = (sizeof(unsigned long)); if (unlikely(__pyx_t_1 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); - __PYX_ERR(5, 1377, __pyx_L1_error) + __PYX_ERR(5, 1379, __pyx_L1_error) } __pyx_v_end = (__pyx_v_lptr + (__pyx_v_length / __pyx_t_1)); - /* "src/lxml/apihelpers.pxi":1378 + /* "src/lxml/apihelpers.pxi":1380 * * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) * if length >= sizeof(non_ascii_mask): # <<<<<<<<<<<<<< @@ -32592,7 +32707,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_2 = ((__pyx_v_length >= (sizeof(__pyx_v_non_ascii_mask))) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1380 + /* "src/lxml/apihelpers.pxi":1382 * if length >= sizeof(non_ascii_mask): * # Build constant 0x80808080... mask (and let the C compiler fold it). * non_ascii_mask = 0 # <<<<<<<<<<<<<< @@ -32601,7 +32716,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ __pyx_v_non_ascii_mask = 0; - /* "src/lxml/apihelpers.pxi":1381 + /* "src/lxml/apihelpers.pxi":1383 * # Build constant 0x80808080... mask (and let the C compiler fold it). * non_ascii_mask = 0 * for i in range(sizeof(non_ascii_mask) // 2): # <<<<<<<<<<<<<< @@ -32613,7 +32728,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "src/lxml/apihelpers.pxi":1382 + /* "src/lxml/apihelpers.pxi":1384 * non_ascii_mask = 0 * for i in range(sizeof(non_ascii_mask) // 2): * non_ascii_mask = (non_ascii_mask << 16) | 0x8080 # <<<<<<<<<<<<<< @@ -32623,7 +32738,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_v_non_ascii_mask = ((__pyx_v_non_ascii_mask << 16) | 0x8080); } - /* "src/lxml/apihelpers.pxi":1385 + /* "src/lxml/apihelpers.pxi":1387 * * # Advance to long-aligned character before we start reading longs. * while (s) % sizeof(unsigned long) and s < end: # <<<<<<<<<<<<<< @@ -32634,7 +32749,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_1 = (sizeof(unsigned long)); if (unlikely(__pyx_t_1 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); - __PYX_ERR(5, 1385, __pyx_L1_error) + __PYX_ERR(5, 1387, __pyx_L1_error) } __pyx_t_5 = ((((size_t)__pyx_v_s) % __pyx_t_1) != 0); if (__pyx_t_5) { @@ -32647,7 +32762,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_L8_bool_binop_done:; if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1386 + /* "src/lxml/apihelpers.pxi":1388 * # Advance to long-aligned character before we start reading longs. * while (s) % sizeof(unsigned long) and s < end: * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -32657,7 +32772,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1387 + /* "src/lxml/apihelpers.pxi":1389 * while (s) % sizeof(unsigned long) and s < end: * if s[0] & 0x80: * return True # <<<<<<<<<<<<<< @@ -32667,7 +32782,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1386 + /* "src/lxml/apihelpers.pxi":1388 * # Advance to long-aligned character before we start reading longs. * while (s) % sizeof(unsigned long) and s < end: * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -32676,7 +32791,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ } - /* "src/lxml/apihelpers.pxi":1388 + /* "src/lxml/apihelpers.pxi":1390 * if s[0] & 0x80: * return True * s += 1 # <<<<<<<<<<<<<< @@ -32686,7 +32801,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1391 + /* "src/lxml/apihelpers.pxi":1393 * * # Read one long at a time * lptr = s # <<<<<<<<<<<<<< @@ -32695,7 +32810,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ __pyx_v_lptr = ((unsigned long const *)__pyx_v_s); - /* "src/lxml/apihelpers.pxi":1392 + /* "src/lxml/apihelpers.pxi":1394 * # Read one long at a time * lptr = s * while lptr < end: # <<<<<<<<<<<<<< @@ -32706,7 +32821,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_2 = ((__pyx_v_lptr < __pyx_v_end) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1393 + /* "src/lxml/apihelpers.pxi":1395 * lptr = s * while lptr < end: * if lptr[0] & non_ascii_mask: # <<<<<<<<<<<<<< @@ -32716,7 +32831,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_2 = (((__pyx_v_lptr[0]) & __pyx_v_non_ascii_mask) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1394 + /* "src/lxml/apihelpers.pxi":1396 * while lptr < end: * if lptr[0] & non_ascii_mask: * return True # <<<<<<<<<<<<<< @@ -32726,7 +32841,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1393 + /* "src/lxml/apihelpers.pxi":1395 * lptr = s * while lptr < end: * if lptr[0] & non_ascii_mask: # <<<<<<<<<<<<<< @@ -32735,7 +32850,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ } - /* "src/lxml/apihelpers.pxi":1395 + /* "src/lxml/apihelpers.pxi":1397 * if lptr[0] & non_ascii_mask: * return True * lptr += 1 # <<<<<<<<<<<<<< @@ -32745,7 +32860,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_v_lptr = (__pyx_v_lptr + 1); } - /* "src/lxml/apihelpers.pxi":1396 + /* "src/lxml/apihelpers.pxi":1398 * return True * lptr += 1 * s = lptr # <<<<<<<<<<<<<< @@ -32754,7 +32869,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ __pyx_v_s = ((const xmlChar *)__pyx_v_lptr); - /* "src/lxml/apihelpers.pxi":1378 + /* "src/lxml/apihelpers.pxi":1380 * * cdef const unsigned long *end = lptr + length // sizeof(unsigned long) * if length >= sizeof(non_ascii_mask): # <<<<<<<<<<<<<< @@ -32763,7 +32878,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ } - /* "src/lxml/apihelpers.pxi":1398 + /* "src/lxml/apihelpers.pxi":1400 * s = lptr * * while s < (end + length % sizeof(unsigned long)): # <<<<<<<<<<<<<< @@ -32774,12 +32889,12 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_1 = (sizeof(unsigned long)); if (unlikely(__pyx_t_1 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "integer division or modulo by zero"); - __PYX_ERR(5, 1398, __pyx_L1_error) + __PYX_ERR(5, 1400, __pyx_L1_error) } __pyx_t_2 = ((__pyx_v_s < (((const xmlChar *)__pyx_v_end) + (__pyx_v_length % __pyx_t_1))) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1399 + /* "src/lxml/apihelpers.pxi":1401 * * while s < (end + length % sizeof(unsigned long)): * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -32789,7 +32904,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1400 + /* "src/lxml/apihelpers.pxi":1402 * while s < (end + length % sizeof(unsigned long)): * if s[0] & 0x80: * return True # <<<<<<<<<<<<<< @@ -32799,7 +32914,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1399 + /* "src/lxml/apihelpers.pxi":1401 * * while s < (end + length % sizeof(unsigned long)): * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -32808,7 +32923,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v */ } - /* "src/lxml/apihelpers.pxi":1401 + /* "src/lxml/apihelpers.pxi":1403 * if s[0] & 0x80: * return True * s += 1 # <<<<<<<<<<<<<< @@ -32818,7 +32933,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1403 + /* "src/lxml/apihelpers.pxi":1405 * s += 1 * * return False # <<<<<<<<<<<<<< @@ -32828,7 +32943,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1369 + /* "src/lxml/apihelpers.pxi":1371 * return False * * cdef bint isutf8l(const_xmlChar* s, size_t length): # <<<<<<<<<<<<<< @@ -32845,7 +32960,7 @@ static int __pyx_f_4lxml_5etree_isutf8l(const xmlChar *__pyx_v_s, size_t __pyx_v return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1405 +/* "src/lxml/apihelpers.pxi":1407 * return False * * cdef int _is_valid_xml_ascii(bytes pystring): # <<<<<<<<<<<<<< @@ -32865,7 +32980,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) int __pyx_t_6; __Pyx_RefNannySetupContext("_is_valid_xml_ascii", 0); - /* "src/lxml/apihelpers.pxi":1410 + /* "src/lxml/apihelpers.pxi":1412 * # When ch is a *signed* char, non-ascii characters are negative integers * # and xmlIsChar_ch does not accept them. * for ch in pystring: # <<<<<<<<<<<<<< @@ -32874,7 +32989,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) */ if (unlikely(__pyx_v_pystring == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); - __PYX_ERR(5, 1410, __pyx_L1_error) + __PYX_ERR(5, 1412, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_pystring); __pyx_t_1 = __pyx_v_pystring; @@ -32884,7 +32999,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) __pyx_t_2 = __pyx_t_5; __pyx_v_ch = (__pyx_t_2[0]); - /* "src/lxml/apihelpers.pxi":1411 + /* "src/lxml/apihelpers.pxi":1413 * # and xmlIsChar_ch does not accept them. * for ch in pystring: * if not tree.xmlIsChar_ch(ch): # <<<<<<<<<<<<<< @@ -32894,7 +33009,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) __pyx_t_6 = ((!(xmlIsChar_ch(__pyx_v_ch) != 0)) != 0); if (__pyx_t_6) { - /* "src/lxml/apihelpers.pxi":1412 + /* "src/lxml/apihelpers.pxi":1414 * for ch in pystring: * if not tree.xmlIsChar_ch(ch): * return 0 # <<<<<<<<<<<<<< @@ -32905,7 +33020,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1411 + /* "src/lxml/apihelpers.pxi":1413 * # and xmlIsChar_ch does not accept them. * for ch in pystring: * if not tree.xmlIsChar_ch(ch): # <<<<<<<<<<<<<< @@ -32916,7 +33031,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/apihelpers.pxi":1413 + /* "src/lxml/apihelpers.pxi":1415 * if not tree.xmlIsChar_ch(ch): * return 0 * return 1 # <<<<<<<<<<<<<< @@ -32926,7 +33041,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1405 + /* "src/lxml/apihelpers.pxi":1407 * return False * * cdef int _is_valid_xml_ascii(bytes pystring): # <<<<<<<<<<<<<< @@ -32944,7 +33059,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_ascii(PyObject *__pyx_v_pystring) return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1415 +/* "src/lxml/apihelpers.pxi":1417 * return 1 * * cdef bint _is_valid_xml_utf8(bytes pystring): # <<<<<<<<<<<<<< @@ -32963,7 +33078,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { int __pyx_t_3; __Pyx_RefNannySetupContext("_is_valid_xml_utf8", 0); - /* "src/lxml/apihelpers.pxi":1417 + /* "src/lxml/apihelpers.pxi":1419 * cdef bint _is_valid_xml_utf8(bytes pystring): * u"""Check if a string is like valid UTF-8 XML content.""" * cdef const_xmlChar* s = _xcstr(pystring) # <<<<<<<<<<<<<< @@ -32972,7 +33087,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ __pyx_v_s = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_pystring); - /* "src/lxml/apihelpers.pxi":1418 + /* "src/lxml/apihelpers.pxi":1420 * u"""Check if a string is like valid UTF-8 XML content.""" * cdef const_xmlChar* s = _xcstr(pystring) * cdef const_xmlChar* c_end = s + len(pystring) # <<<<<<<<<<<<<< @@ -32981,12 +33096,12 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ if (unlikely(__pyx_v_pystring == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1418, __pyx_L1_error) + __PYX_ERR(5, 1420, __pyx_L1_error) } - __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_pystring); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1418, __pyx_L1_error) + __pyx_t_1 = PyBytes_GET_SIZE(__pyx_v_pystring); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1420, __pyx_L1_error) __pyx_v_c_end = (__pyx_v_s + __pyx_t_1); - /* "src/lxml/apihelpers.pxi":1419 + /* "src/lxml/apihelpers.pxi":1421 * cdef const_xmlChar* s = _xcstr(pystring) * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 # <<<<<<<<<<<<<< @@ -32995,7 +33110,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ __pyx_v_next3 = 0; - /* "src/lxml/apihelpers.pxi":1420 + /* "src/lxml/apihelpers.pxi":1422 * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 * if s < c_end - 2: # <<<<<<<<<<<<<< @@ -33005,7 +33120,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_2 = ((__pyx_v_s < (__pyx_v_c_end - 2)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1421 + /* "src/lxml/apihelpers.pxi":1423 * cdef unsigned long next3 = 0 * if s < c_end - 2: * next3 = (s[0] << 8) | (s[1]) # <<<<<<<<<<<<<< @@ -33014,7 +33129,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ __pyx_v_next3 = (((__pyx_v_s[0]) << 8) | (__pyx_v_s[1])); - /* "src/lxml/apihelpers.pxi":1420 + /* "src/lxml/apihelpers.pxi":1422 * cdef const_xmlChar* c_end = s + len(pystring) * cdef unsigned long next3 = 0 * if s < c_end - 2: # <<<<<<<<<<<<<< @@ -33023,7 +33138,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1423 + /* "src/lxml/apihelpers.pxi":1425 * next3 = (s[0] << 8) | (s[1]) * * while s < c_end - 2: # <<<<<<<<<<<<<< @@ -33034,7 +33149,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_2 = ((__pyx_v_s < (__pyx_v_c_end - 2)) != 0); if (!__pyx_t_2) break; - /* "src/lxml/apihelpers.pxi":1424 + /* "src/lxml/apihelpers.pxi":1426 * * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) # <<<<<<<<<<<<<< @@ -33043,7 +33158,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ __pyx_v_next3 = (0x00ffffff & ((__pyx_v_next3 << 8) | (__pyx_v_s[2]))); - /* "src/lxml/apihelpers.pxi":1425 + /* "src/lxml/apihelpers.pxi":1427 * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -33053,7 +33168,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_2 = (((__pyx_v_s[0]) & 0x80) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1428 + /* "src/lxml/apihelpers.pxi":1430 * # 0xefbfbe and 0xefbfbf are utf-8 encodings of * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: # <<<<<<<<<<<<<< @@ -33064,7 +33179,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { case 0x00efbfbe: case 0x00efbfbf: - /* "src/lxml/apihelpers.pxi":1429 + /* "src/lxml/apihelpers.pxi":1431 * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: * return 0 # <<<<<<<<<<<<<< @@ -33074,7 +33189,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1428 + /* "src/lxml/apihelpers.pxi":1430 * # 0xefbfbe and 0xefbfbf are utf-8 encodings of * # forbidden characters \ufffe and \uffff * if next3 == 0x00efbfbe or next3 == 0x00efbfbf: # <<<<<<<<<<<<<< @@ -33085,7 +33200,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { default: break; } - /* "src/lxml/apihelpers.pxi":1433 + /* "src/lxml/apihelpers.pxi":1435 * # \ud800 and \udfff. Anything between them (inclusive) * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: # <<<<<<<<<<<<<< @@ -33099,7 +33214,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1434 + /* "src/lxml/apihelpers.pxi":1436 * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 # <<<<<<<<<<<<<< @@ -33109,7 +33224,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1433 + /* "src/lxml/apihelpers.pxi":1435 * # \ud800 and \udfff. Anything between them (inclusive) * # is forbidden, because they are surrogate blocks in utf-16. * if 0x00eda080 <= next3 <= 0x00edbfbf: # <<<<<<<<<<<<<< @@ -33118,7 +33233,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1425 + /* "src/lxml/apihelpers.pxi":1427 * while s < c_end - 2: * next3 = 0x00ffffff & ((next3 << 8) | s[2]) * if s[0] & 0x80: # <<<<<<<<<<<<<< @@ -33128,7 +33243,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { goto __pyx_L6; } - /* "src/lxml/apihelpers.pxi":1435 + /* "src/lxml/apihelpers.pxi":1437 * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 * elif not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -33138,7 +33253,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_3 = ((!(xmlIsChar_ch((__pyx_v_s[0])) != 0)) != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1436 + /* "src/lxml/apihelpers.pxi":1438 * return 0 * elif not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char # <<<<<<<<<<<<<< @@ -33148,7 +33263,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1435 + /* "src/lxml/apihelpers.pxi":1437 * if 0x00eda080 <= next3 <= 0x00edbfbf: * return 0 * elif not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -33158,7 +33273,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { } __pyx_L6:; - /* "src/lxml/apihelpers.pxi":1437 + /* "src/lxml/apihelpers.pxi":1439 * elif not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char * s += 1 # <<<<<<<<<<<<<< @@ -33168,7 +33283,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1439 + /* "src/lxml/apihelpers.pxi":1441 * s += 1 * * while s < c_end: # <<<<<<<<<<<<<< @@ -33179,7 +33294,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_t_3 = ((__pyx_v_s < __pyx_v_c_end) != 0); if (!__pyx_t_3) break; - /* "src/lxml/apihelpers.pxi":1440 + /* "src/lxml/apihelpers.pxi":1442 * * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -33197,7 +33312,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_L11_bool_binop_done:; if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1441 + /* "src/lxml/apihelpers.pxi":1443 * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char # <<<<<<<<<<<<<< @@ -33207,7 +33322,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1440 + /* "src/lxml/apihelpers.pxi":1442 * * while s < c_end: * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): # <<<<<<<<<<<<<< @@ -33216,7 +33331,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { */ } - /* "src/lxml/apihelpers.pxi":1442 + /* "src/lxml/apihelpers.pxi":1444 * if not s[0] & 0x80 and not tree.xmlIsChar_ch(s[0]): * return 0 # invalid ascii char * s += 1 # <<<<<<<<<<<<<< @@ -33226,7 +33341,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_v_s = (__pyx_v_s + 1); } - /* "src/lxml/apihelpers.pxi":1444 + /* "src/lxml/apihelpers.pxi":1446 * s += 1 * * return 1 # <<<<<<<<<<<<<< @@ -33236,7 +33351,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1415 + /* "src/lxml/apihelpers.pxi":1417 * return 1 * * cdef bint _is_valid_xml_utf8(bytes pystring): # <<<<<<<<<<<<<< @@ -33253,7 +33368,7 @@ static int __pyx_f_4lxml_5etree__is_valid_xml_utf8(PyObject *__pyx_v_pystring) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1446 +/* "src/lxml/apihelpers.pxi":1448 * return 1 * * cdef inline object funicodeOrNone(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33268,7 +33383,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicodeOrNone", 0); - /* "src/lxml/apihelpers.pxi":1447 + /* "src/lxml/apihelpers.pxi":1449 * * cdef inline object funicodeOrNone(const_xmlChar* s): * return funicode(s) if s is not NULL else None # <<<<<<<<<<<<<< @@ -33277,7 +33392,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_s != NULL) != 0)) { - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1447, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -33289,7 +33404,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1446 + /* "src/lxml/apihelpers.pxi":1448 * return 1 * * cdef inline object funicodeOrNone(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33309,7 +33424,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrNone(const xmlChar return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1449 +/* "src/lxml/apihelpers.pxi":1451 * return funicode(s) if s is not NULL else None * * cdef inline object funicodeOrEmpty(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33324,7 +33439,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlCha PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicodeOrEmpty", 0); - /* "src/lxml/apihelpers.pxi":1450 + /* "src/lxml/apihelpers.pxi":1452 * * cdef inline object funicodeOrEmpty(const_xmlChar* s): * return funicode(s) if s is not NULL else '' # <<<<<<<<<<<<<< @@ -33333,7 +33448,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlCha */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_s != NULL) != 0)) { - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1450, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -33345,7 +33460,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlCha __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1449 + /* "src/lxml/apihelpers.pxi":1451 * return funicode(s) if s is not NULL else None * * cdef inline object funicodeOrEmpty(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33365,7 +33480,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree_funicodeOrEmpty(const xmlCha return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1452 +/* "src/lxml/apihelpers.pxi":1454 * return funicode(s) if s is not NULL else '' * * cdef object funicode(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33383,7 +33498,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("funicode", 0); - /* "src/lxml/apihelpers.pxi":1456 + /* "src/lxml/apihelpers.pxi":1458 * cdef const_xmlChar* spos * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: # <<<<<<<<<<<<<< @@ -33393,7 +33508,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_t_1 = (LXML_UNICODE_STRINGS != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1457 + /* "src/lxml/apihelpers.pxi":1459 * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: * return s.decode('UTF-8') # <<<<<<<<<<<<<< @@ -33401,13 +33516,13 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { * is_non_ascii = 0 */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, strlen(((char const *)__pyx_v_s)), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1457, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, strlen(((char const *)__pyx_v_s)), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1456 + /* "src/lxml/apihelpers.pxi":1458 * cdef const_xmlChar* spos * cdef bint is_non_ascii * if python.LXML_UNICODE_STRINGS: # <<<<<<<<<<<<<< @@ -33416,7 +33531,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1458 + /* "src/lxml/apihelpers.pxi":1460 * if python.LXML_UNICODE_STRINGS: * return s.decode('UTF-8') * spos = s # <<<<<<<<<<<<<< @@ -33425,7 +33540,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ __pyx_v_spos = __pyx_v_s; - /* "src/lxml/apihelpers.pxi":1459 + /* "src/lxml/apihelpers.pxi":1461 * return s.decode('UTF-8') * spos = s * is_non_ascii = 0 # <<<<<<<<<<<<<< @@ -33434,7 +33549,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ __pyx_v_is_non_ascii = 0; - /* "src/lxml/apihelpers.pxi":1460 + /* "src/lxml/apihelpers.pxi":1462 * spos = s * is_non_ascii = 0 * while spos[0] != c'\0': # <<<<<<<<<<<<<< @@ -33445,7 +33560,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_t_1 = (((__pyx_v_spos[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1461 + /* "src/lxml/apihelpers.pxi":1463 * is_non_ascii = 0 * while spos[0] != c'\0': * if spos[0] & 0x80: # <<<<<<<<<<<<<< @@ -33455,7 +33570,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_t_1 = (((__pyx_v_spos[0]) & 0x80) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1462 + /* "src/lxml/apihelpers.pxi":1464 * while spos[0] != c'\0': * if spos[0] & 0x80: * is_non_ascii = 1 # <<<<<<<<<<<<<< @@ -33464,7 +33579,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ __pyx_v_is_non_ascii = 1; - /* "src/lxml/apihelpers.pxi":1463 + /* "src/lxml/apihelpers.pxi":1465 * if spos[0] & 0x80: * is_non_ascii = 1 * break # <<<<<<<<<<<<<< @@ -33473,7 +33588,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ goto __pyx_L5_break; - /* "src/lxml/apihelpers.pxi":1461 + /* "src/lxml/apihelpers.pxi":1463 * is_non_ascii = 0 * while spos[0] != c'\0': * if spos[0] & 0x80: # <<<<<<<<<<<<<< @@ -33482,7 +33597,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1464 + /* "src/lxml/apihelpers.pxi":1466 * is_non_ascii = 1 * break * spos += 1 # <<<<<<<<<<<<<< @@ -33493,7 +33608,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { } __pyx_L5_break:; - /* "src/lxml/apihelpers.pxi":1465 + /* "src/lxml/apihelpers.pxi":1467 * break * spos += 1 * slen = spos - s # <<<<<<<<<<<<<< @@ -33502,7 +33617,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ __pyx_v_slen = (__pyx_v_spos - __pyx_v_s); - /* "src/lxml/apihelpers.pxi":1466 + /* "src/lxml/apihelpers.pxi":1468 * spos += 1 * slen = spos - s * if spos[0] != c'\0': # <<<<<<<<<<<<<< @@ -33512,7 +33627,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_t_1 = (((__pyx_v_spos[0]) != '\x00') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1467 + /* "src/lxml/apihelpers.pxi":1469 * slen = spos - s * if spos[0] != c'\0': * slen += cstring_h.strlen( spos) # <<<<<<<<<<<<<< @@ -33521,7 +33636,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ __pyx_v_slen = (__pyx_v_slen + strlen(((char const *)__pyx_v_spos))); - /* "src/lxml/apihelpers.pxi":1466 + /* "src/lxml/apihelpers.pxi":1468 * spos += 1 * slen = spos - s * if spos[0] != c'\0': # <<<<<<<<<<<<<< @@ -33530,7 +33645,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1468 + /* "src/lxml/apihelpers.pxi":1470 * if spos[0] != c'\0': * slen += cstring_h.strlen( spos) * if is_non_ascii: # <<<<<<<<<<<<<< @@ -33540,7 +33655,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { __pyx_t_1 = (__pyx_v_is_non_ascii != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1469 + /* "src/lxml/apihelpers.pxi":1471 * slen += cstring_h.strlen( spos) * if is_non_ascii: * return s[:slen].decode('UTF-8') # <<<<<<<<<<<<<< @@ -33548,13 +33663,13 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, __pyx_v_slen, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1469, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_c_string(((char const *)__pyx_v_s), 0, __pyx_v_slen, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1468 + /* "src/lxml/apihelpers.pxi":1470 * if spos[0] != c'\0': * slen += cstring_h.strlen( spos) * if is_non_ascii: # <<<<<<<<<<<<<< @@ -33563,7 +33678,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1470 + /* "src/lxml/apihelpers.pxi":1472 * if is_non_ascii: * return s[:slen].decode('UTF-8') * return s[:slen] # <<<<<<<<<<<<<< @@ -33571,14 +33686,14 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { * cdef bytes _utf8(object s): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_s) + 0, __pyx_v_slen - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1470, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_FromStringAndSize(((const char*)__pyx_v_s) + 0, __pyx_v_slen - 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject*)__pyx_t_2)); __pyx_r = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1452 + /* "src/lxml/apihelpers.pxi":1454 * return funicode(s) if s is not NULL else '' * * cdef object funicode(const_xmlChar* s): # <<<<<<<<<<<<<< @@ -33597,7 +33712,7 @@ static PyObject *__pyx_f_4lxml_5etree_funicode(const xmlChar *__pyx_v_s) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1472 +/* "src/lxml/apihelpers.pxi":1474 * return s[:slen] * * cdef bytes _utf8(object s): # <<<<<<<<<<<<<< @@ -33617,7 +33732,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("_utf8", 0); - /* "src/lxml/apihelpers.pxi":1479 + /* "src/lxml/apihelpers.pxi":1481 * cdef int valid * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: # <<<<<<<<<<<<<< @@ -33636,7 +33751,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1480 + /* "src/lxml/apihelpers.pxi":1482 * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: * utf8_string = s # <<<<<<<<<<<<<< @@ -33648,7 +33763,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1481 + /* "src/lxml/apihelpers.pxi":1483 * if python.IS_PYTHON2 and type(s) is bytes: * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) # <<<<<<<<<<<<<< @@ -33657,7 +33772,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_ascii(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1479 + /* "src/lxml/apihelpers.pxi":1481 * cdef int valid * cdef bytes utf8_string * if python.IS_PYTHON2 and type(s) is bytes: # <<<<<<<<<<<<<< @@ -33667,7 +33782,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1482 + /* "src/lxml/apihelpers.pxi":1484 * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): # <<<<<<<<<<<<<< @@ -33678,7 +33793,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "src/lxml/apihelpers.pxi":1483 + /* "src/lxml/apihelpers.pxi":1485 * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): * utf8_string = (s).encode('utf8') # <<<<<<<<<<<<<< @@ -33687,14 +33802,14 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(5, 1483, __pyx_L1_error) + __PYX_ERR(5, 1485, __pyx_L1_error) } - __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_s)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1483, __pyx_L1_error) + __pyx_t_4 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_s)); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1484 + /* "src/lxml/apihelpers.pxi":1486 * elif isinstance(s, unicode): * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) # <<<<<<<<<<<<<< @@ -33703,7 +33818,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_utf8(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1482 + /* "src/lxml/apihelpers.pxi":1484 * utf8_string = s * valid = _is_valid_xml_ascii(utf8_string) * elif isinstance(s, unicode): # <<<<<<<<<<<<<< @@ -33713,7 +33828,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1485 + /* "src/lxml/apihelpers.pxi":1487 * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): # <<<<<<<<<<<<<< @@ -33734,19 +33849,19 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_t_1 = (__pyx_t_3 != 0); if (likely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1486 + /* "src/lxml/apihelpers.pxi":1488 * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): * utf8_string = bytes(s) # <<<<<<<<<<<<<< * valid = _is_valid_xml_ascii(utf8_string) * else: */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1486, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyBytes_Type)), __pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_utf8_string = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1487 + /* "src/lxml/apihelpers.pxi":1489 * elif isinstance(s, (bytes, bytearray)): * utf8_string = bytes(s) * valid = _is_valid_xml_ascii(utf8_string) # <<<<<<<<<<<<<< @@ -33755,7 +33870,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ __pyx_v_valid = __pyx_f_4lxml_5etree__is_valid_xml_ascii(__pyx_v_utf8_string); - /* "src/lxml/apihelpers.pxi":1485 + /* "src/lxml/apihelpers.pxi":1487 * utf8_string = (s).encode('utf8') * valid = _is_valid_xml_utf8(utf8_string) * elif isinstance(s, (bytes, bytearray)): # <<<<<<<<<<<<<< @@ -33765,7 +33880,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1489 + /* "src/lxml/apihelpers.pxi":1491 * valid = _is_valid_xml_ascii(utf8_string) * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) # <<<<<<<<<<<<<< @@ -33773,21 +33888,21 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { * raise ValueError( */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_s)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1489, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_s)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Argument_must_be_bytes_or_unicod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1489, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyString_FormatSafe(__pyx_kp_s_Argument_must_be_bytes_or_unicod, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1489, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1491, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(5, 1489, __pyx_L1_error) + __PYX_ERR(5, 1491, __pyx_L1_error) } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1490 + /* "src/lxml/apihelpers.pxi":1492 * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) * if not valid: # <<<<<<<<<<<<<< @@ -33797,20 +33912,20 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_t_1 = ((!(__pyx_v_valid != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1491 + /* "src/lxml/apihelpers.pxi":1493 * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) * if not valid: * raise ValueError( # <<<<<<<<<<<<<< * "All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters") * return utf8_string */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1491, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(5, 1491, __pyx_L1_error) + __PYX_ERR(5, 1493, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1490 + /* "src/lxml/apihelpers.pxi":1492 * else: * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) * if not valid: # <<<<<<<<<<<<<< @@ -33819,7 +33934,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { */ } - /* "src/lxml/apihelpers.pxi":1493 + /* "src/lxml/apihelpers.pxi":1495 * raise ValueError( * "All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters") * return utf8_string # <<<<<<<<<<<<<< @@ -33831,7 +33946,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { __pyx_r = __pyx_v_utf8_string; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1472 + /* "src/lxml/apihelpers.pxi":1474 * return s[:slen] * * cdef bytes _utf8(object s): # <<<<<<<<<<<<<< @@ -33852,7 +33967,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8(PyObject *__pyx_v_s) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1496 +/* "src/lxml/apihelpers.pxi":1498 * * * cdef bytes _utf8orNone(object s): # <<<<<<<<<<<<<< @@ -33868,7 +33983,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_utf8orNone", 0); - /* "src/lxml/apihelpers.pxi":1497 + /* "src/lxml/apihelpers.pxi":1499 * * cdef bytes _utf8orNone(object s): * return _utf8(s) if s is not None else None # <<<<<<<<<<<<<< @@ -33878,7 +33993,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { __Pyx_XDECREF(__pyx_r); __pyx_t_2 = (__pyx_v_s != Py_None); if ((__pyx_t_2 != 0)) { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1497, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_s); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -33890,7 +34005,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1496 + /* "src/lxml/apihelpers.pxi":1498 * * * cdef bytes _utf8orNone(object s): # <<<<<<<<<<<<<< @@ -33910,7 +34025,7 @@ static PyObject *__pyx_f_4lxml_5etree__utf8orNone(PyObject *__pyx_v_s) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1500 +/* "src/lxml/apihelpers.pxi":1502 * * * cdef strrepr(s): # <<<<<<<<<<<<<< @@ -33927,7 +34042,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("strrepr", 0); - /* "src/lxml/apihelpers.pxi":1504 + /* "src/lxml/apihelpers.pxi":1506 * methods, e.g. _Element.__repr__(). * """ * return s.encode('unicode-escape') if python.IS_PYTHON2 else s # <<<<<<<<<<<<<< @@ -33936,7 +34051,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { */ __Pyx_XDECREF(__pyx_r); if ((IS_PYTHON2 != 0)) { - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1504, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_s, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -33950,7 +34065,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_s_unicode_escape) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_unicode_escape); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1504, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = __pyx_t_2; @@ -33963,7 +34078,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1500 + /* "src/lxml/apihelpers.pxi":1502 * * * cdef strrepr(s): # <<<<<<<<<<<<<< @@ -33985,7 +34100,7 @@ static PyObject *__pyx_f_4lxml_5etree_strrepr(PyObject *__pyx_v_s) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1507 +/* "src/lxml/apihelpers.pxi":1509 * * * cdef bint _isFilePath(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -34001,7 +34116,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { int __pyx_t_3; __Pyx_RefNannySetupContext("_isFilePath", 0); - /* "src/lxml/apihelpers.pxi":1511 + /* "src/lxml/apihelpers.pxi":1513 * cdef xmlChar c * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': # <<<<<<<<<<<<<< @@ -34011,7 +34126,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_t_1 = (((__pyx_v_c_path[0]) == '/') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1512 + /* "src/lxml/apihelpers.pxi":1514 * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': * return 1 # <<<<<<<<<<<<<< @@ -34021,7 +34136,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1511 + /* "src/lxml/apihelpers.pxi":1513 * cdef xmlChar c * # test if it looks like an absolute Unix path or a Windows network path * if c_path[0] == c'/': # <<<<<<<<<<<<<< @@ -34030,7 +34145,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1515 + /* "src/lxml/apihelpers.pxi":1517 * * # test if it looks like an absolute Windows path or URL * if c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': # <<<<<<<<<<<<<< @@ -34056,7 +34171,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_L5_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1516 + /* "src/lxml/apihelpers.pxi":1518 * # test if it looks like an absolute Windows path or URL * if c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 # <<<<<<<<<<<<<< @@ -34065,7 +34180,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ __pyx_v_c_path = (__pyx_v_c_path + 1); - /* "src/lxml/apihelpers.pxi":1517 + /* "src/lxml/apihelpers.pxi":1519 * if c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 * if c_path[0] == c':' and c_path[1] in b'\0\\': # <<<<<<<<<<<<<< @@ -34092,7 +34207,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1518 + /* "src/lxml/apihelpers.pxi":1520 * c_path += 1 * if c_path[0] == c':' and c_path[1] in b'\0\\': * return 1 # C: or C:\... # <<<<<<<<<<<<<< @@ -34102,7 +34217,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1517 + /* "src/lxml/apihelpers.pxi":1519 * if c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 * if c_path[0] == c':' and c_path[1] in b'\0\\': # <<<<<<<<<<<<<< @@ -34111,7 +34226,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1521 + /* "src/lxml/apihelpers.pxi":1523 * * # test if it looks like a URL with scheme:// * while c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': # <<<<<<<<<<<<<< @@ -34138,7 +34253,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_L12_bool_binop_done:; if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1522 + /* "src/lxml/apihelpers.pxi":1524 * # test if it looks like a URL with scheme:// * while c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 # <<<<<<<<<<<<<< @@ -34148,7 +34263,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_v_c_path = (__pyx_v_c_path + 1); } - /* "src/lxml/apihelpers.pxi":1523 + /* "src/lxml/apihelpers.pxi":1525 * while c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': # <<<<<<<<<<<<<< @@ -34172,7 +34287,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_L15_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1524 + /* "src/lxml/apihelpers.pxi":1526 * c_path += 1 * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': * return 0 # <<<<<<<<<<<<<< @@ -34182,7 +34297,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1523 + /* "src/lxml/apihelpers.pxi":1525 * while c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': * c_path += 1 * if c_path[0] == c':' and c_path[1] == c'/' and c_path[2] == c'/': # <<<<<<<<<<<<<< @@ -34191,7 +34306,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1515 + /* "src/lxml/apihelpers.pxi":1517 * * # test if it looks like an absolute Windows path or URL * if c'a' <= c_path[0] <= c'z' or c'A' <= c_path[0] <= c'Z': # <<<<<<<<<<<<<< @@ -34200,7 +34315,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { */ } - /* "src/lxml/apihelpers.pxi":1527 + /* "src/lxml/apihelpers.pxi":1529 * * # assume it's a relative path * return 1 # <<<<<<<<<<<<<< @@ -34210,7 +34325,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1507 + /* "src/lxml/apihelpers.pxi":1509 * * * cdef bint _isFilePath(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -34224,7 +34339,7 @@ static int __pyx_f_4lxml_5etree__isFilePath(const xmlChar *__pyx_v_c_path) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1529 +/* "src/lxml/apihelpers.pxi":1531 * return 1 * * cdef object _encodeFilename(object filename): # <<<<<<<<<<<<<< @@ -34246,7 +34361,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename int __pyx_t_8; __Pyx_RefNannySetupContext("_encodeFilename", 0); - /* "src/lxml/apihelpers.pxi":1532 + /* "src/lxml/apihelpers.pxi":1534 * u"""Make sure a filename is 8-bit encoded (or None). * """ * if filename is None: # <<<<<<<<<<<<<< @@ -34257,7 +34372,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1533 + /* "src/lxml/apihelpers.pxi":1535 * """ * if filename is None: * return None # <<<<<<<<<<<<<< @@ -34268,7 +34383,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1532 + /* "src/lxml/apihelpers.pxi":1534 * u"""Make sure a filename is 8-bit encoded (or None). * """ * if filename is None: # <<<<<<<<<<<<<< @@ -34277,7 +34392,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1534 + /* "src/lxml/apihelpers.pxi":1536 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< @@ -34288,7 +34403,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1535 + /* "src/lxml/apihelpers.pxi":1537 * return None * elif isinstance(filename, bytes): * return filename # <<<<<<<<<<<<<< @@ -34300,7 +34415,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_r = __pyx_v_filename; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1534 + /* "src/lxml/apihelpers.pxi":1536 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< @@ -34309,7 +34424,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1536 + /* "src/lxml/apihelpers.pxi":1538 * elif isinstance(filename, bytes): * return filename * elif isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -34320,7 +34435,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":1537 + /* "src/lxml/apihelpers.pxi":1539 * return filename * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') # <<<<<<<<<<<<<< @@ -34329,25 +34444,25 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(5, 1537, __pyx_L1_error) + __PYX_ERR(5, 1539, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1537, __pyx_L1_error) + __pyx_t_3 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_filename8 = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":1538 + /* "src/lxml/apihelpers.pxi":1540 * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): # <<<<<<<<<<<<<< * try: * return python.PyUnicode_AsEncodedString( */ - __pyx_t_4 = __Pyx_PyObject_AsWritableUString(__pyx_v_filename8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1538, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_AsWritableUString(__pyx_v_filename8); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1540, __pyx_L1_error) __pyx_t_2 = (__pyx_f_4lxml_5etree__isFilePath(((unsigned char *)__pyx_t_4)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1539 + /* "src/lxml/apihelpers.pxi":1541 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< @@ -34363,7 +34478,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1540 + /* "src/lxml/apihelpers.pxi":1542 * if _isFilePath(filename8): * try: * return python.PyUnicode_AsEncodedString( # <<<<<<<<<<<<<< @@ -34372,20 +34487,20 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ __Pyx_XDECREF(__pyx_r); - /* "src/lxml/apihelpers.pxi":1541 + /* "src/lxml/apihelpers.pxi":1543 * try: * return python.PyUnicode_AsEncodedString( * filename, _C_FILENAME_ENCODING, NULL) # <<<<<<<<<<<<<< * except UnicodeEncodeError: * pass */ - __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_filename, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1540, __pyx_L5_error) + __pyx_t_3 = PyUnicode_AsEncodedString(__pyx_v_filename, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1542, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "src/lxml/apihelpers.pxi":1539 + /* "src/lxml/apihelpers.pxi":1541 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< @@ -34396,7 +34511,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/apihelpers.pxi":1542 + /* "src/lxml/apihelpers.pxi":1544 * return python.PyUnicode_AsEncodedString( * filename, _C_FILENAME_ENCODING, NULL) * except UnicodeEncodeError: # <<<<<<<<<<<<<< @@ -34411,7 +34526,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "src/lxml/apihelpers.pxi":1539 + /* "src/lxml/apihelpers.pxi":1541 * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): * try: # <<<<<<<<<<<<<< @@ -34436,7 +34551,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7); } - /* "src/lxml/apihelpers.pxi":1538 + /* "src/lxml/apihelpers.pxi":1540 * elif isinstance(filename, unicode): * filename8 = (filename).encode('utf8') * if _isFilePath(filename8): # <<<<<<<<<<<<<< @@ -34445,7 +34560,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1544 + /* "src/lxml/apihelpers.pxi":1546 * except UnicodeEncodeError: * pass * return filename8 # <<<<<<<<<<<<<< @@ -34457,7 +34572,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename __pyx_r = __pyx_v_filename8; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1536 + /* "src/lxml/apihelpers.pxi":1538 * elif isinstance(filename, bytes): * return filename * elif isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -34466,7 +34581,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename */ } - /* "src/lxml/apihelpers.pxi":1546 + /* "src/lxml/apihelpers.pxi":1548 * return filename8 * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< @@ -34474,14 +34589,14 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename * cdef object _decodeFilename(const_xmlChar* c_path): */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1546, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1546, __pyx_L1_error) + __PYX_ERR(5, 1548, __pyx_L1_error) } - /* "src/lxml/apihelpers.pxi":1529 + /* "src/lxml/apihelpers.pxi":1531 * return 1 * * cdef object _encodeFilename(object filename): # <<<<<<<<<<<<<< @@ -34501,7 +34616,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilename(PyObject *__pyx_v_filename return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1548 +/* "src/lxml/apihelpers.pxi":1550 * raise TypeError("Argument must be string or unicode.") * * cdef object _decodeFilename(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -34515,7 +34630,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_decodeFilename", 0); - /* "src/lxml/apihelpers.pxi":1551 + /* "src/lxml/apihelpers.pxi":1553 * u"""Make the filename a unicode string if we are in Py3. * """ * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) # <<<<<<<<<<<<<< @@ -34523,13 +34638,13 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_p * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__decodeFilenameWithLength(__pyx_v_c_path, xmlStrlen(__pyx_v_c_path)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1551, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__decodeFilenameWithLength(__pyx_v_c_path, xmlStrlen(__pyx_v_c_path)); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1548 + /* "src/lxml/apihelpers.pxi":1550 * raise TypeError("Argument must be string or unicode.") * * cdef object _decodeFilename(const_xmlChar* c_path): # <<<<<<<<<<<<<< @@ -34548,7 +34663,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilename(const xmlChar *__pyx_v_c_p return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1553 +/* "src/lxml/apihelpers.pxi":1555 * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) * * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): # <<<<<<<<<<<<<< @@ -34570,7 +34685,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_decodeFilenameWithLength", 0); - /* "src/lxml/apihelpers.pxi":1556 + /* "src/lxml/apihelpers.pxi":1558 * u"""Make the filename a unicode string if we are in Py3. * """ * if _isFilePath(c_path): # <<<<<<<<<<<<<< @@ -34580,7 +34695,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __pyx_t_1 = (__pyx_f_4lxml_5etree__isFilePath(__pyx_v_c_path) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1557 + /* "src/lxml/apihelpers.pxi":1559 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< @@ -34596,7 +34711,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1558 + /* "src/lxml/apihelpers.pxi":1560 * if _isFilePath(c_path): * try: * return python.PyUnicode_Decode( # <<<<<<<<<<<<<< @@ -34605,20 +34720,20 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ */ __Pyx_XDECREF(__pyx_r); - /* "src/lxml/apihelpers.pxi":1559 + /* "src/lxml/apihelpers.pxi":1561 * try: * return python.PyUnicode_Decode( * c_path, c_len, _C_FILENAME_ENCODING, NULL) # <<<<<<<<<<<<<< * except UnicodeDecodeError: * pass */ - __pyx_t_5 = PyUnicode_Decode(((const char *)__pyx_v_c_path), __pyx_v_c_len, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1558, __pyx_L4_error) + __pyx_t_5 = PyUnicode_Decode(((const char *)__pyx_v_c_path), __pyx_v_c_len, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1560, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L8_try_return; - /* "src/lxml/apihelpers.pxi":1557 + /* "src/lxml/apihelpers.pxi":1559 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< @@ -34629,7 +34744,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":1560 + /* "src/lxml/apihelpers.pxi":1562 * return python.PyUnicode_Decode( * c_path, c_len, _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError: # <<<<<<<<<<<<<< @@ -34644,7 +34759,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "src/lxml/apihelpers.pxi":1557 + /* "src/lxml/apihelpers.pxi":1559 * """ * if _isFilePath(c_path): * try: # <<<<<<<<<<<<<< @@ -34669,7 +34784,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4); } - /* "src/lxml/apihelpers.pxi":1556 + /* "src/lxml/apihelpers.pxi":1558 * u"""Make the filename a unicode string if we are in Py3. * """ * if _isFilePath(c_path): # <<<<<<<<<<<<<< @@ -34678,7 +34793,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1562 + /* "src/lxml/apihelpers.pxi":1564 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< @@ -34694,7 +34809,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __Pyx_XGOTREF(__pyx_t_2); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1563 + /* "src/lxml/apihelpers.pxi":1565 * pass * try: * return (c_path)[:c_len].decode('UTF-8') # <<<<<<<<<<<<<< @@ -34702,13 +34817,13 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ * # this is a stupid fallback, but it might still work... */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_decode_c_string(((char const *)((unsigned char *)__pyx_v_c_path)), 0, __pyx_v_c_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1563, __pyx_L10_error) + __pyx_t_5 = __Pyx_decode_c_string(((char const *)((unsigned char *)__pyx_v_c_path)), 0, __pyx_v_c_len, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1565, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L14_try_return; - /* "src/lxml/apihelpers.pxi":1562 + /* "src/lxml/apihelpers.pxi":1564 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< @@ -34719,7 +34834,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __pyx_L10_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":1564 + /* "src/lxml/apihelpers.pxi":1566 * try: * return (c_path)[:c_len].decode('UTF-8') * except UnicodeDecodeError: # <<<<<<<<<<<<<< @@ -34729,12 +34844,12 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree._decodeFilenameWithLength", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 1564, __pyx_L12_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(5, 1566, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); - /* "src/lxml/apihelpers.pxi":1566 + /* "src/lxml/apihelpers.pxi":1568 * except UnicodeDecodeError: * # this is a stupid fallback, but it might still work... * return (c_path)[:c_len].decode('latin-1', 'replace') # <<<<<<<<<<<<<< @@ -34742,7 +34857,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ * cdef object _encodeFilenameUTF8(object filename): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_decode_c_string(((char const *)((unsigned char *)__pyx_v_c_path)), 0, __pyx_v_c_len, NULL, ((char const *)"replace"), PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1566, __pyx_L12_except_error) + __pyx_t_9 = __Pyx_decode_c_string(((char const *)((unsigned char *)__pyx_v_c_path)), 0, __pyx_v_c_len, NULL, ((char const *)"replace"), PyUnicode_DecodeLatin1); if (unlikely(!__pyx_t_9)) __PYX_ERR(5, 1568, __pyx_L12_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -34754,7 +34869,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L12_except_error; __pyx_L12_except_error:; - /* "src/lxml/apihelpers.pxi":1562 + /* "src/lxml/apihelpers.pxi":1564 * except UnicodeDecodeError: * pass * try: # <<<<<<<<<<<<<< @@ -34780,7 +34895,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ goto __pyx_L0; } - /* "src/lxml/apihelpers.pxi":1553 + /* "src/lxml/apihelpers.pxi":1555 * return _decodeFilenameWithLength(c_path, tree.xmlStrlen(c_path)) * * cdef object _decodeFilenameWithLength(const_xmlChar* c_path, size_t c_len): # <<<<<<<<<<<<<< @@ -34802,7 +34917,7 @@ static PyObject *__pyx_f_4lxml_5etree__decodeFilenameWithLength(const xmlChar *_ return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1568 +/* "src/lxml/apihelpers.pxi":1570 * return (c_path)[:c_len].decode('latin-1', 'replace') * * cdef object _encodeFilenameUTF8(object filename): # <<<<<<<<<<<<<< @@ -34835,7 +34950,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_RefNannySetupContext("_encodeFilenameUTF8", 0); __Pyx_INCREF(__pyx_v_filename); - /* "src/lxml/apihelpers.pxi":1573 + /* "src/lxml/apihelpers.pxi":1575 * """ * cdef char* c_filename * if filename is None: # <<<<<<<<<<<<<< @@ -34846,7 +34961,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1574 + /* "src/lxml/apihelpers.pxi":1576 * cdef char* c_filename * if filename is None: * return None # <<<<<<<<<<<<<< @@ -34857,7 +34972,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1573 + /* "src/lxml/apihelpers.pxi":1575 * """ * cdef char* c_filename * if filename is None: # <<<<<<<<<<<<<< @@ -34866,7 +34981,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1575 + /* "src/lxml/apihelpers.pxi":1577 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< @@ -34877,7 +34992,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1576 + /* "src/lxml/apihelpers.pxi":1578 * return None * elif isinstance(filename, bytes): * if not isutf8l(filename, len(filename)): # <<<<<<<<<<<<<< @@ -34886,18 +35001,18 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(5, 1576, __pyx_L1_error) + __PYX_ERR(5, 1578, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(5, 1576, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_AsUString(__pyx_v_filename); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(5, 1578, __pyx_L1_error) if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1576, __pyx_L1_error) + __PYX_ERR(5, 1578, __pyx_L1_error) } - __pyx_t_4 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1576, __pyx_L1_error) + __pyx_t_4 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1578, __pyx_L1_error) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree_isutf8l(__pyx_t_3, __pyx_t_4) != 0)) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1578 + /* "src/lxml/apihelpers.pxi":1580 * if not isutf8l(filename, len(filename)): * # plain ASCII! * return filename # <<<<<<<<<<<<<< @@ -34909,7 +35024,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_r = __pyx_v_filename; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1576 + /* "src/lxml/apihelpers.pxi":1578 * return None * elif isinstance(filename, bytes): * if not isutf8l(filename, len(filename)): # <<<<<<<<<<<<<< @@ -34918,7 +35033,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1579 + /* "src/lxml/apihelpers.pxi":1581 * # plain ASCII! * return filename * c_filename = _cstr(filename) # <<<<<<<<<<<<<< @@ -34927,7 +35042,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ __pyx_v_c_filename = PyBytes_AS_STRING(__pyx_v_filename); - /* "src/lxml/apihelpers.pxi":1580 + /* "src/lxml/apihelpers.pxi":1582 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< @@ -34943,7 +35058,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_XGOTREF(__pyx_t_7); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1583 + /* "src/lxml/apihelpers.pxi":1585 * # try to decode with default encoding * filename = python.PyUnicode_Decode( * c_filename, len(filename), # <<<<<<<<<<<<<< @@ -34952,23 +35067,23 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ if (unlikely(__pyx_v_filename == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1583, __pyx_L5_error) + __PYX_ERR(5, 1585, __pyx_L5_error) } - __pyx_t_4 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1583, __pyx_L5_error) + __pyx_t_4 = PyBytes_GET_SIZE(((PyObject*)__pyx_v_filename)); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1585, __pyx_L5_error) - /* "src/lxml/apihelpers.pxi":1582 + /* "src/lxml/apihelpers.pxi":1584 * try: * # try to decode with default encoding * filename = python.PyUnicode_Decode( # <<<<<<<<<<<<<< * c_filename, len(filename), * _C_FILENAME_ENCODING, NULL) */ - __pyx_t_8 = PyUnicode_Decode(__pyx_v_c_filename, __pyx_t_4, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1582, __pyx_L5_error) + __pyx_t_8 = PyUnicode_Decode(__pyx_v_c_filename, __pyx_t_4, __pyx_v_4lxml_5etree__C_FILENAME_ENCODING, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(5, 1584, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_8); __pyx_t_8 = 0; - /* "src/lxml/apihelpers.pxi":1580 + /* "src/lxml/apihelpers.pxi":1582 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< @@ -34983,7 +35098,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "src/lxml/apihelpers.pxi":1585 + /* "src/lxml/apihelpers.pxi":1587 * c_filename, len(filename), * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: # <<<<<<<<<<<<<< @@ -34993,14 +35108,14 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_9) { __Pyx_AddTraceback("lxml.etree._encodeFilenameUTF8", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(5, 1585, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_10, &__pyx_t_11) < 0) __PYX_ERR(5, 1587, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_v_decode_exc = __pyx_t_10; - /* "src/lxml/apihelpers.pxi":1586 + /* "src/lxml/apihelpers.pxi":1588 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< @@ -35016,7 +35131,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_XGOTREF(__pyx_t_14); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1588 + /* "src/lxml/apihelpers.pxi":1590 * try: * # try if it's proper UTF-8 * (filename).decode('utf8') # <<<<<<<<<<<<<< @@ -35025,13 +35140,13 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1588, __pyx_L13_error) + __PYX_ERR(5, 1590, __pyx_L13_error) } - __pyx_t_15 = __Pyx_decode_bytes(((PyObject*)__pyx_v_filename), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 1588, __pyx_L13_error) + __pyx_t_15 = __Pyx_decode_bytes(((PyObject*)__pyx_v_filename), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_15)) __PYX_ERR(5, 1590, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "src/lxml/apihelpers.pxi":1589 + /* "src/lxml/apihelpers.pxi":1591 * # try if it's proper UTF-8 * (filename).decode('utf8') * return filename # <<<<<<<<<<<<<< @@ -35046,7 +35161,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L17_try_return; - /* "src/lxml/apihelpers.pxi":1586 + /* "src/lxml/apihelpers.pxi":1588 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< @@ -35057,7 +35172,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_L13_error:; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "src/lxml/apihelpers.pxi":1590 + /* "src/lxml/apihelpers.pxi":1592 * (filename).decode('utf8') * return filename * except UnicodeDecodeError: # <<<<<<<<<<<<<< @@ -35067,12 +35182,12 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_9) { __Pyx_AddTraceback("lxml.etree._encodeFilenameUTF8", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0) __PYX_ERR(5, 1590, __pyx_L15_except_error) + if (__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0) __PYX_ERR(5, 1592, __pyx_L15_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GOTREF(__pyx_t_16); __Pyx_GOTREF(__pyx_t_17); - /* "src/lxml/apihelpers.pxi":1591 + /* "src/lxml/apihelpers.pxi":1593 * return filename * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception # <<<<<<<<<<<<<< @@ -35080,12 +35195,12 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file * return (filename).encode('utf8') */ __Pyx_Raise(__pyx_v_decode_exc, 0, 0, 0); - __PYX_ERR(5, 1591, __pyx_L15_except_error) + __PYX_ERR(5, 1593, __pyx_L15_except_error) } goto __pyx_L15_except_error; __pyx_L15_except_error:; - /* "src/lxml/apihelpers.pxi":1586 + /* "src/lxml/apihelpers.pxi":1588 * _C_FILENAME_ENCODING, NULL) * except UnicodeDecodeError as decode_exc: * try: # <<<<<<<<<<<<<< @@ -35108,7 +35223,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "src/lxml/apihelpers.pxi":1580 + /* "src/lxml/apihelpers.pxi":1582 * return filename * c_filename = _cstr(filename) * try: # <<<<<<<<<<<<<< @@ -35129,7 +35244,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_L10_try_end:; } - /* "src/lxml/apihelpers.pxi":1575 + /* "src/lxml/apihelpers.pxi":1577 * if filename is None: * return None * elif isinstance(filename, bytes): # <<<<<<<<<<<<<< @@ -35138,7 +35253,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1592 + /* "src/lxml/apihelpers.pxi":1594 * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -35149,7 +35264,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "src/lxml/apihelpers.pxi":1593 + /* "src/lxml/apihelpers.pxi":1595 * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): * return (filename).encode('utf8') # <<<<<<<<<<<<<< @@ -35159,15 +35274,15 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "encode"); - __PYX_ERR(5, 1593, __pyx_L1_error) + __PYX_ERR(5, 1595, __pyx_L1_error) } - __pyx_t_11 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1593, __pyx_L1_error) + __pyx_t_11 = PyUnicode_AsUTF8String(((PyObject*)__pyx_v_filename)); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_r = __pyx_t_11; __pyx_t_11 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1592 + /* "src/lxml/apihelpers.pxi":1594 * except UnicodeDecodeError: * raise decode_exc # otherwise re-raise original exception * if isinstance(filename, unicode): # <<<<<<<<<<<<<< @@ -35176,7 +35291,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file */ } - /* "src/lxml/apihelpers.pxi":1595 + /* "src/lxml/apihelpers.pxi":1597 * return (filename).encode('utf8') * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< @@ -35184,14 +35299,14 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file * cdef tuple _getNsTag(tag): */ /*else*/ { - __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1595, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(5, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_Raise(__pyx_t_11, 0, 0, 0); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __PYX_ERR(5, 1595, __pyx_L1_error) + __PYX_ERR(5, 1597, __pyx_L1_error) } - /* "src/lxml/apihelpers.pxi":1568 + /* "src/lxml/apihelpers.pxi":1570 * return (c_path)[:c_len].decode('latin-1', 'replace') * * cdef object _encodeFilenameUTF8(object filename): # <<<<<<<<<<<<<< @@ -35217,7 +35332,7 @@ static PyObject *__pyx_f_4lxml_5etree__encodeFilenameUTF8(PyObject *__pyx_v_file return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1597 +/* "src/lxml/apihelpers.pxi":1599 * raise TypeError("Argument must be string or unicode.") * * cdef tuple _getNsTag(tag): # <<<<<<<<<<<<<< @@ -35231,7 +35346,7 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_getNsTag", 0); - /* "src/lxml/apihelpers.pxi":1601 + /* "src/lxml/apihelpers.pxi":1603 * Return None for NS uri if no namespace URI provided. * """ * return __getNsTag(tag, 0) # <<<<<<<<<<<<<< @@ -35239,13 +35354,13 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { * cdef tuple _getNsTagWithEmptyNs(tag): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1601, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1597 + /* "src/lxml/apihelpers.pxi":1599 * raise TypeError("Argument must be string or unicode.") * * cdef tuple _getNsTag(tag): # <<<<<<<<<<<<<< @@ -35264,7 +35379,7 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTag(PyObject *__pyx_v_tag) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1603 +/* "src/lxml/apihelpers.pxi":1605 * return __getNsTag(tag, 0) * * cdef tuple _getNsTagWithEmptyNs(tag): # <<<<<<<<<<<<<< @@ -35278,7 +35393,7 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTagWithEmptyNs(PyObject *__pyx_v_tag PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_getNsTagWithEmptyNs", 0); - /* "src/lxml/apihelpers.pxi":1608 + /* "src/lxml/apihelpers.pxi":1610 * part is '{}'. * """ * return __getNsTag(tag, 1) # <<<<<<<<<<<<<< @@ -35286,13 +35401,13 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTagWithEmptyNs(PyObject *__pyx_v_tag * cdef tuple __getNsTag(tag, bint empty_ns): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1608, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree___getNsTag(__pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1603 + /* "src/lxml/apihelpers.pxi":1605 * return __getNsTag(tag, 0) * * cdef tuple _getNsTagWithEmptyNs(tag): # <<<<<<<<<<<<<< @@ -35311,7 +35426,7 @@ static PyObject *__pyx_f_4lxml_5etree__getNsTagWithEmptyNs(PyObject *__pyx_v_tag return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1610 +/* "src/lxml/apihelpers.pxi":1612 * return __getNsTag(tag, 1) * * cdef tuple __getNsTag(tag, bint empty_ns): # <<<<<<<<<<<<<< @@ -35335,7 +35450,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_RefNannySetupContext("__getNsTag", 0); __Pyx_INCREF(__pyx_v_tag); - /* "src/lxml/apihelpers.pxi":1615 + /* "src/lxml/apihelpers.pxi":1617 * cdef Py_ssize_t taglen * cdef Py_ssize_t nslen * cdef bytes ns = None # <<<<<<<<<<<<<< @@ -35345,7 +35460,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_INCREF(Py_None); __pyx_v_ns = ((PyObject*)Py_None); - /* "src/lxml/apihelpers.pxi":1617 + /* "src/lxml/apihelpers.pxi":1619 * cdef bytes ns = None * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): # <<<<<<<<<<<<<< @@ -35364,7 +35479,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1618 + /* "src/lxml/apihelpers.pxi":1620 * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): * tag = (tag).text # <<<<<<<<<<<<<< @@ -35376,7 +35491,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1617 + /* "src/lxml/apihelpers.pxi":1619 * cdef bytes ns = None * # _isString() is much faster than isinstance() * if not _isString(tag) and isinstance(tag, QName): # <<<<<<<<<<<<<< @@ -35385,19 +35500,19 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1619 + /* "src/lxml/apihelpers.pxi":1621 * if not _isString(tag) and isinstance(tag, QName): * tag = (tag).text * tag = _utf8(tag) # <<<<<<<<<<<<<< * c_tag = _cstr(tag) * if c_tag[0] == c'{': */ - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1619, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1620 + /* "src/lxml/apihelpers.pxi":1622 * tag = (tag).text * tag = _utf8(tag) * c_tag = _cstr(tag) # <<<<<<<<<<<<<< @@ -35406,7 +35521,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ __pyx_v_c_tag = PyBytes_AS_STRING(__pyx_v_tag); - /* "src/lxml/apihelpers.pxi":1621 + /* "src/lxml/apihelpers.pxi":1623 * tag = _utf8(tag) * c_tag = _cstr(tag) * if c_tag[0] == c'{': # <<<<<<<<<<<<<< @@ -35416,7 +35531,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = (((__pyx_v_c_tag[0]) == '{') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1622 + /* "src/lxml/apihelpers.pxi":1624 * c_tag = _cstr(tag) * if c_tag[0] == c'{': * c_tag += 1 # <<<<<<<<<<<<<< @@ -35425,7 +35540,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ __pyx_v_c_tag = (__pyx_v_c_tag + 1); - /* "src/lxml/apihelpers.pxi":1623 + /* "src/lxml/apihelpers.pxi":1625 * if c_tag[0] == c'{': * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') # <<<<<<<<<<<<<< @@ -35434,7 +35549,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ __pyx_v_c_ns_end = strchr(__pyx_v_c_tag, '}'); - /* "src/lxml/apihelpers.pxi":1624 + /* "src/lxml/apihelpers.pxi":1626 * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: # <<<<<<<<<<<<<< @@ -35444,7 +35559,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = ((__pyx_v_c_ns_end == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1625 + /* "src/lxml/apihelpers.pxi":1627 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: * raise ValueError, u"Invalid tag name" # <<<<<<<<<<<<<< @@ -35452,9 +35567,9 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Invalid_tag_name, 0, 0); - __PYX_ERR(5, 1625, __pyx_L1_error) + __PYX_ERR(5, 1627, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1624 + /* "src/lxml/apihelpers.pxi":1626 * c_tag += 1 * c_ns_end = cstring_h.strchr(c_tag, c'}') * if c_ns_end is NULL: # <<<<<<<<<<<<<< @@ -35463,7 +35578,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1626 + /* "src/lxml/apihelpers.pxi":1628 * if c_ns_end is NULL: * raise ValueError, u"Invalid tag name" * nslen = c_ns_end - c_tag # <<<<<<<<<<<<<< @@ -35472,7 +35587,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ __pyx_v_nslen = (__pyx_v_c_ns_end - __pyx_v_c_tag); - /* "src/lxml/apihelpers.pxi":1627 + /* "src/lxml/apihelpers.pxi":1629 * raise ValueError, u"Invalid tag name" * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 # <<<<<<<<<<<<<< @@ -35481,7 +35596,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ __pyx_v_taglen = ((PyBytes_GET_SIZE(__pyx_v_tag) - __pyx_v_nslen) - 2); - /* "src/lxml/apihelpers.pxi":1628 + /* "src/lxml/apihelpers.pxi":1630 * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: # <<<<<<<<<<<<<< @@ -35491,7 +35606,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = ((__pyx_v_taglen == 0) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1629 + /* "src/lxml/apihelpers.pxi":1631 * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: * raise ValueError, u"Empty tag name" # <<<<<<<<<<<<<< @@ -35499,9 +35614,9 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py * ns = c_tag[:nslen] */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Empty_tag_name, 0, 0); - __PYX_ERR(5, 1629, __pyx_L1_error) + __PYX_ERR(5, 1631, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1628 + /* "src/lxml/apihelpers.pxi":1630 * nslen = c_ns_end - c_tag * taglen = python.PyBytes_GET_SIZE(tag) - nslen - 2 * if taglen == 0: # <<<<<<<<<<<<<< @@ -35510,7 +35625,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py */ } - /* "src/lxml/apihelpers.pxi":1630 + /* "src/lxml/apihelpers.pxi":1632 * if taglen == 0: * raise ValueError, u"Empty tag name" * if nslen > 0: # <<<<<<<<<<<<<< @@ -35520,14 +35635,14 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = ((__pyx_v_nslen > 0) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1631 + /* "src/lxml/apihelpers.pxi":1633 * raise ValueError, u"Empty tag name" * if nslen > 0: * ns = c_tag[:nslen] # <<<<<<<<<<<<<< * elif empty_ns: * ns = b'' */ - __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_tag + 0, __pyx_v_nslen - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1631, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_tag + 0, __pyx_v_nslen - 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5); @@ -35535,7 +35650,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_DECREF_SET(__pyx_v_ns, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "src/lxml/apihelpers.pxi":1630 + /* "src/lxml/apihelpers.pxi":1632 * if taglen == 0: * raise ValueError, u"Empty tag name" * if nslen > 0: # <<<<<<<<<<<<<< @@ -35545,7 +35660,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py goto __pyx_L9; } - /* "src/lxml/apihelpers.pxi":1632 + /* "src/lxml/apihelpers.pxi":1634 * if nslen > 0: * ns = c_tag[:nslen] * elif empty_ns: # <<<<<<<<<<<<<< @@ -35555,7 +35670,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = (__pyx_v_empty_ns != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1633 + /* "src/lxml/apihelpers.pxi":1635 * ns = c_tag[:nslen] * elif empty_ns: * ns = b'' # <<<<<<<<<<<<<< @@ -35565,7 +35680,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_INCREF(__pyx_kp_b__11); __Pyx_DECREF_SET(__pyx_v_ns, __pyx_kp_b__11); - /* "src/lxml/apihelpers.pxi":1632 + /* "src/lxml/apihelpers.pxi":1634 * if nslen > 0: * ns = c_tag[:nslen] * elif empty_ns: # <<<<<<<<<<<<<< @@ -35575,14 +35690,14 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py } __pyx_L9:; - /* "src/lxml/apihelpers.pxi":1634 + /* "src/lxml/apihelpers.pxi":1636 * elif empty_ns: * ns = b'' * tag = c_ns_end[1:taglen+1] # <<<<<<<<<<<<<< * elif python.PyBytes_GET_SIZE(tag) == 0: * raise ValueError, u"Empty tag name" */ - __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_ns_end + 1, (__pyx_v_taglen + 1) - 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1634, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBytes_FromStringAndSize(__pyx_v_c_ns_end + 1, (__pyx_v_taglen + 1) - 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1636, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); @@ -35590,7 +35705,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1621 + /* "src/lxml/apihelpers.pxi":1623 * tag = _utf8(tag) * c_tag = _cstr(tag) * if c_tag[0] == c'{': # <<<<<<<<<<<<<< @@ -35600,7 +35715,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py goto __pyx_L6; } - /* "src/lxml/apihelpers.pxi":1635 + /* "src/lxml/apihelpers.pxi":1637 * ns = b'' * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: # <<<<<<<<<<<<<< @@ -35610,7 +35725,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_1 = ((PyBytes_GET_SIZE(__pyx_v_tag) == 0) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1636 + /* "src/lxml/apihelpers.pxi":1638 * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: * raise ValueError, u"Empty tag name" # <<<<<<<<<<<<<< @@ -35618,9 +35733,9 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Empty_tag_name, 0, 0); - __PYX_ERR(5, 1636, __pyx_L1_error) + __PYX_ERR(5, 1638, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1635 + /* "src/lxml/apihelpers.pxi":1637 * ns = b'' * tag = c_ns_end[1:taglen+1] * elif python.PyBytes_GET_SIZE(tag) == 0: # <<<<<<<<<<<<<< @@ -35630,7 +35745,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py } __pyx_L6:; - /* "src/lxml/apihelpers.pxi":1637 + /* "src/lxml/apihelpers.pxi":1639 * elif python.PyBytes_GET_SIZE(tag) == 0: * raise ValueError, u"Empty tag name" * return ns, tag # <<<<<<<<<<<<<< @@ -35638,7 +35753,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py * cdef inline int _pyXmlNameIsValid(name_utf8): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1637, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_ns); __Pyx_GIVEREF(__pyx_v_ns); @@ -35650,7 +35765,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py __pyx_t_4 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1610 + /* "src/lxml/apihelpers.pxi":1612 * return __getNsTag(tag, 1) * * cdef tuple __getNsTag(tag, bint empty_ns): # <<<<<<<<<<<<<< @@ -35672,7 +35787,7 @@ static PyObject *__pyx_f_4lxml_5etree___getNsTag(PyObject *__pyx_v_tag, int __py return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1639 +/* "src/lxml/apihelpers.pxi":1641 * return ns, tag * * cdef inline int _pyXmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -35688,7 +35803,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_ int __pyx_t_3; __Pyx_RefNannySetupContext("_pyXmlNameIsValid", 0); - /* "src/lxml/apihelpers.pxi":1640 + /* "src/lxml/apihelpers.pxi":1642 * * cdef inline int _pyXmlNameIsValid(name_utf8): * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 # <<<<<<<<<<<<<< @@ -35701,13 +35816,13 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_ __pyx_t_1 = __pyx_t_2; goto __pyx_L3_bool_binop_done; } - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__16, __pyx_v_name_utf8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 1640, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__16, __pyx_v_name_utf8, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(5, 1642, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L3_bool_binop_done:; __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1639 + /* "src/lxml/apihelpers.pxi":1641 * return ns, tag * * cdef inline int _pyXmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -35724,7 +35839,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyXmlNameIsValid(PyObject *__pyx_ return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1642 +/* "src/lxml/apihelpers.pxi":1644 * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 * * cdef inline int _pyHtmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -35737,7 +35852,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_pyHtmlNameIsValid", 0); - /* "src/lxml/apihelpers.pxi":1643 + /* "src/lxml/apihelpers.pxi":1645 * * cdef inline int _pyHtmlNameIsValid(name_utf8): * return _htmlNameIsValid(_xcstr(name_utf8)) # <<<<<<<<<<<<<< @@ -35747,7 +35862,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx __pyx_r = __pyx_f_4lxml_5etree__htmlNameIsValid((const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf8)); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1642 + /* "src/lxml/apihelpers.pxi":1644 * return _xmlNameIsValid(_xcstr(name_utf8)) and b':' not in name_utf8 * * cdef inline int _pyHtmlNameIsValid(name_utf8): # <<<<<<<<<<<<<< @@ -35761,7 +35876,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__pyHtmlNameIsValid(PyObject *__pyx return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1645 +/* "src/lxml/apihelpers.pxi":1647 * return _htmlNameIsValid(_xcstr(name_utf8)) * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -35774,7 +35889,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__p __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_xmlNameIsValid", 0); - /* "src/lxml/apihelpers.pxi":1646 + /* "src/lxml/apihelpers.pxi":1648 * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): * return tree.xmlValidateNameValue(c_name) # <<<<<<<<<<<<<< @@ -35784,7 +35899,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__p __pyx_r = xmlValidateNameValue(__pyx_v_c_name); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1645 + /* "src/lxml/apihelpers.pxi":1647 * return _htmlNameIsValid(_xcstr(name_utf8)) * * cdef inline int _xmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -35798,7 +35913,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree__xmlNameIsValid(const xmlChar *__p return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1648 +/* "src/lxml/apihelpers.pxi":1650 * return tree.xmlValidateNameValue(c_name) * * cdef int _htmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -35813,7 +35928,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) int __pyx_t_2; __Pyx_RefNannySetupContext("_htmlNameIsValid", 0); - /* "src/lxml/apihelpers.pxi":1649 + /* "src/lxml/apihelpers.pxi":1651 * * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -35831,7 +35946,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1650 + /* "src/lxml/apihelpers.pxi":1652 * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': * return 0 # <<<<<<<<<<<<<< @@ -35841,7 +35956,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1649 + /* "src/lxml/apihelpers.pxi":1651 * * cdef int _htmlNameIsValid(const_xmlChar* c_name): * if c_name is NULL or c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -35850,7 +35965,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) */ } - /* "src/lxml/apihelpers.pxi":1651 + /* "src/lxml/apihelpers.pxi":1653 * if c_name is NULL or c_name[0] == c'\0': * return 0 * while c_name[0] != c'\0': # <<<<<<<<<<<<<< @@ -35861,7 +35976,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_t_1 = (((__pyx_v_c_name[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1652 + /* "src/lxml/apihelpers.pxi":1654 * return 0 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': # <<<<<<<<<<<<<< @@ -35882,7 +35997,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) case '<': case '>': - /* "src/lxml/apihelpers.pxi":1653 + /* "src/lxml/apihelpers.pxi":1655 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': * return 0 # <<<<<<<<<<<<<< @@ -35892,7 +36007,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1652 + /* "src/lxml/apihelpers.pxi":1654 * return 0 * while c_name[0] != c'\0': * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': # <<<<<<<<<<<<<< @@ -35903,7 +36018,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) default: break; } - /* "src/lxml/apihelpers.pxi":1654 + /* "src/lxml/apihelpers.pxi":1656 * if c_name[0] in b'&<>/"\'\t\n\x0B\x0C\r ': * return 0 * c_name += 1 # <<<<<<<<<<<<<< @@ -35913,7 +36028,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_v_c_name = (__pyx_v_c_name + 1); } - /* "src/lxml/apihelpers.pxi":1655 + /* "src/lxml/apihelpers.pxi":1657 * return 0 * c_name += 1 * return 1 # <<<<<<<<<<<<<< @@ -35923,7 +36038,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1648 + /* "src/lxml/apihelpers.pxi":1650 * return tree.xmlValidateNameValue(c_name) * * cdef int _htmlNameIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -35937,7 +36052,7 @@ static int __pyx_f_4lxml_5etree__htmlNameIsValid(const xmlChar *__pyx_v_c_name) return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1657 +/* "src/lxml/apihelpers.pxi":1659 * return 1 * * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -35953,7 +36068,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ int __pyx_t_2; __Pyx_RefNannySetupContext("_characterReferenceIsValid", 0); - /* "src/lxml/apihelpers.pxi":1659 + /* "src/lxml/apihelpers.pxi":1661 * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): * cdef bint is_hex * if c_name[0] == c'x': # <<<<<<<<<<<<<< @@ -35963,7 +36078,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_1 = (((__pyx_v_c_name[0]) == 'x') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1660 + /* "src/lxml/apihelpers.pxi":1662 * cdef bint is_hex * if c_name[0] == c'x': * c_name += 1 # <<<<<<<<<<<<<< @@ -35972,7 +36087,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ __pyx_v_c_name = (__pyx_v_c_name + 1); - /* "src/lxml/apihelpers.pxi":1661 + /* "src/lxml/apihelpers.pxi":1663 * if c_name[0] == c'x': * c_name += 1 * is_hex = 1 # <<<<<<<<<<<<<< @@ -35981,7 +36096,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ __pyx_v_is_hex = 1; - /* "src/lxml/apihelpers.pxi":1659 + /* "src/lxml/apihelpers.pxi":1661 * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): * cdef bint is_hex * if c_name[0] == c'x': # <<<<<<<<<<<<<< @@ -35991,7 +36106,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ goto __pyx_L3; } - /* "src/lxml/apihelpers.pxi":1663 + /* "src/lxml/apihelpers.pxi":1665 * is_hex = 1 * else: * is_hex = 0 # <<<<<<<<<<<<<< @@ -36003,7 +36118,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ } __pyx_L3:; - /* "src/lxml/apihelpers.pxi":1664 + /* "src/lxml/apihelpers.pxi":1666 * else: * is_hex = 0 * if c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -36013,7 +36128,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_1 = (((__pyx_v_c_name[0]) == '\x00') != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1665 + /* "src/lxml/apihelpers.pxi":1667 * is_hex = 0 * if c_name[0] == c'\0': * return 0 # <<<<<<<<<<<<<< @@ -36023,7 +36138,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1664 + /* "src/lxml/apihelpers.pxi":1666 * else: * is_hex = 0 * if c_name[0] == c'\0': # <<<<<<<<<<<<<< @@ -36032,7 +36147,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1666 + /* "src/lxml/apihelpers.pxi":1668 * if c_name[0] == c'\0': * return 0 * while c_name[0] != c'\0': # <<<<<<<<<<<<<< @@ -36043,7 +36158,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_1 = (((__pyx_v_c_name[0]) != '\x00') != 0); if (!__pyx_t_1) break; - /* "src/lxml/apihelpers.pxi":1667 + /* "src/lxml/apihelpers.pxi":1669 * return 0 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': # <<<<<<<<<<<<<< @@ -36061,7 +36176,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_L8_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1668 + /* "src/lxml/apihelpers.pxi":1670 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: # <<<<<<<<<<<<<< @@ -36071,7 +36186,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_1 = ((!(__pyx_v_is_hex != 0)) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1669 + /* "src/lxml/apihelpers.pxi":1671 * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: * return 0 # <<<<<<<<<<<<<< @@ -36081,7 +36196,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1668 + /* "src/lxml/apihelpers.pxi":1670 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': * if not is_hex: # <<<<<<<<<<<<<< @@ -36090,7 +36205,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1670 + /* "src/lxml/apihelpers.pxi":1672 * if not is_hex: * return 0 * if not (c'a' <= c_name[0] <= c'f'): # <<<<<<<<<<<<<< @@ -36104,7 +36219,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (__pyx_t_2) { - /* "src/lxml/apihelpers.pxi":1671 + /* "src/lxml/apihelpers.pxi":1673 * return 0 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): # <<<<<<<<<<<<<< @@ -36118,7 +36233,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1672 + /* "src/lxml/apihelpers.pxi":1674 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): * return 0 # <<<<<<<<<<<<<< @@ -36128,7 +36243,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1671 + /* "src/lxml/apihelpers.pxi":1673 * return 0 * if not (c'a' <= c_name[0] <= c'f'): * if not (c'A' <= c_name[0] <= c'F'): # <<<<<<<<<<<<<< @@ -36137,7 +36252,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1670 + /* "src/lxml/apihelpers.pxi":1672 * if not is_hex: * return 0 * if not (c'a' <= c_name[0] <= c'f'): # <<<<<<<<<<<<<< @@ -36146,7 +36261,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1667 + /* "src/lxml/apihelpers.pxi":1669 * return 0 * while c_name[0] != c'\0': * if c_name[0] < c'0' or c_name[0] > c'9': # <<<<<<<<<<<<<< @@ -36155,7 +36270,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ */ } - /* "src/lxml/apihelpers.pxi":1673 + /* "src/lxml/apihelpers.pxi":1675 * if not (c'A' <= c_name[0] <= c'F'): * return 0 * c_name += 1 # <<<<<<<<<<<<<< @@ -36165,7 +36280,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_v_c_name = (__pyx_v_c_name + 1); } - /* "src/lxml/apihelpers.pxi":1674 + /* "src/lxml/apihelpers.pxi":1676 * return 0 * c_name += 1 * return 1 # <<<<<<<<<<<<<< @@ -36175,7 +36290,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ __pyx_r = 1; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1657 + /* "src/lxml/apihelpers.pxi":1659 * return 1 * * cdef bint _characterReferenceIsValid(const_xmlChar* c_name): # <<<<<<<<<<<<<< @@ -36189,7 +36304,7 @@ static int __pyx_f_4lxml_5etree__characterReferenceIsValid(const xmlChar *__pyx_ return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1676 +/* "src/lxml/apihelpers.pxi":1678 * return 1 * * cdef int _tagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36205,7 +36320,7 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_tagValidOrRaise", 0); - /* "src/lxml/apihelpers.pxi":1677 + /* "src/lxml/apihelpers.pxi":1679 * * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36215,7 +36330,7 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1678 + /* "src/lxml/apihelpers.pxi":1680 * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid tag name {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< @@ -36224,24 +36339,24 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { */ if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1678, __pyx_L1_error) + __PYX_ERR(5, 1680, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1678, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1678, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_tag_name_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1678, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_tag_name_2, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1678, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1678, __pyx_L1_error) + __PYX_ERR(5, 1680, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1677 + /* "src/lxml/apihelpers.pxi":1679 * * cdef int _tagValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36250,7 +36365,7 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { */ } - /* "src/lxml/apihelpers.pxi":1679 + /* "src/lxml/apihelpers.pxi":1681 * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid tag name {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< @@ -36260,7 +36375,7 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1676 + /* "src/lxml/apihelpers.pxi":1678 * return 1 * * cdef int _tagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36279,7 +36394,7 @@ static int __pyx_f_4lxml_5etree__tagValidOrRaise(PyObject *__pyx_v_tag_utf) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1681 +/* "src/lxml/apihelpers.pxi":1683 * return 0 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36295,7 +36410,7 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_htmlTagValidOrRaise", 0); - /* "src/lxml/apihelpers.pxi":1682 + /* "src/lxml/apihelpers.pxi":1684 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36305,7 +36420,7 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyHtmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1683 + /* "src/lxml/apihelpers.pxi":1685 * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): * raise ValueError(f"Invalid HTML tag name {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< @@ -36314,24 +36429,24 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) */ if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1683, __pyx_L1_error) + __PYX_ERR(5, 1685, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1683, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1683, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_HTML_tag_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1683, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_HTML_tag_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1683, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1683, __pyx_L1_error) + __PYX_ERR(5, 1685, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1682 + /* "src/lxml/apihelpers.pxi":1684 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: * if not _pyHtmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36340,7 +36455,7 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) */ } - /* "src/lxml/apihelpers.pxi":1684 + /* "src/lxml/apihelpers.pxi":1686 * if not _pyHtmlNameIsValid(tag_utf): * raise ValueError(f"Invalid HTML tag name {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< @@ -36350,7 +36465,7 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1681 + /* "src/lxml/apihelpers.pxi":1683 * return 0 * * cdef int _htmlTagValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36369,7 +36484,7 @@ static int __pyx_f_4lxml_5etree__htmlTagValidOrRaise(PyObject *__pyx_v_tag_utf) return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1686 +/* "src/lxml/apihelpers.pxi":1688 * return 0 * * cdef int _attributeValidOrRaise(name_utf) except -1: # <<<<<<<<<<<<<< @@ -36385,7 +36500,7 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_attributeValidOrRaise", 0); - /* "src/lxml/apihelpers.pxi":1687 + /* "src/lxml/apihelpers.pxi":1689 * * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): # <<<<<<<<<<<<<< @@ -36395,7 +36510,7 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_name_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1688 + /* "src/lxml/apihelpers.pxi":1690 * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): * raise ValueError(f"Invalid attribute name {(name_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< @@ -36404,24 +36519,24 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut */ if (unlikely(__pyx_v_name_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1688, __pyx_L1_error) + __PYX_ERR(5, 1690, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_name_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1688, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_name_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1688, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_attribute_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1688, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_attribute_name, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1688, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1688, __pyx_L1_error) + __PYX_ERR(5, 1690, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1687 + /* "src/lxml/apihelpers.pxi":1689 * * cdef int _attributeValidOrRaise(name_utf) except -1: * if not _pyXmlNameIsValid(name_utf): # <<<<<<<<<<<<<< @@ -36430,7 +36545,7 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut */ } - /* "src/lxml/apihelpers.pxi":1689 + /* "src/lxml/apihelpers.pxi":1691 * if not _pyXmlNameIsValid(name_utf): * raise ValueError(f"Invalid attribute name {(name_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< @@ -36440,7 +36555,7 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1686 + /* "src/lxml/apihelpers.pxi":1688 * return 0 * * cdef int _attributeValidOrRaise(name_utf) except -1: # <<<<<<<<<<<<<< @@ -36459,7 +36574,7 @@ static int __pyx_f_4lxml_5etree__attributeValidOrRaise(PyObject *__pyx_v_name_ut return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1691 +/* "src/lxml/apihelpers.pxi":1693 * return 0 * * cdef int _prefixValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36475,7 +36590,7 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_prefixValidOrRaise", 0); - /* "src/lxml/apihelpers.pxi":1692 + /* "src/lxml/apihelpers.pxi":1694 * * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36485,7 +36600,7 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { __pyx_t_1 = ((!(__pyx_f_4lxml_5etree__pyXmlNameIsValid(__pyx_v_tag_utf) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1693 + /* "src/lxml/apihelpers.pxi":1695 * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid namespace prefix {(tag_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< @@ -36494,24 +36609,24 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { */ if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1693, __pyx_L1_error) + __PYX_ERR(5, 1695, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1693, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1693, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_namespace_prefix, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1693, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_namespace_prefix, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1693, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1693, __pyx_L1_error) + __PYX_ERR(5, 1695, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1692 + /* "src/lxml/apihelpers.pxi":1694 * * cdef int _prefixValidOrRaise(tag_utf) except -1: * if not _pyXmlNameIsValid(tag_utf): # <<<<<<<<<<<<<< @@ -36520,7 +36635,7 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { */ } - /* "src/lxml/apihelpers.pxi":1694 + /* "src/lxml/apihelpers.pxi":1696 * if not _pyXmlNameIsValid(tag_utf): * raise ValueError(f"Invalid namespace prefix {(tag_utf).decode('utf8')!r}") * return 0 # <<<<<<<<<<<<<< @@ -36530,7 +36645,7 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1691 + /* "src/lxml/apihelpers.pxi":1693 * return 0 * * cdef int _prefixValidOrRaise(tag_utf) except -1: # <<<<<<<<<<<<<< @@ -36549,7 +36664,7 @@ static int __pyx_f_4lxml_5etree__prefixValidOrRaise(PyObject *__pyx_v_tag_utf) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1696 +/* "src/lxml/apihelpers.pxi":1698 * return 0 * * cdef int _uriValidOrRaise(uri_utf) except -1: # <<<<<<<<<<<<<< @@ -36566,7 +36681,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_uriValidOrRaise", 0); - /* "src/lxml/apihelpers.pxi":1697 + /* "src/lxml/apihelpers.pxi":1699 * * cdef int _uriValidOrRaise(uri_utf) except -1: * cdef uri.xmlURI* c_uri = uri.xmlParseURI(_cstr(uri_utf)) # <<<<<<<<<<<<<< @@ -36575,7 +36690,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { */ __pyx_v_c_uri = xmlParseURI(PyBytes_AS_STRING(__pyx_v_uri_utf)); - /* "src/lxml/apihelpers.pxi":1698 + /* "src/lxml/apihelpers.pxi":1700 * cdef int _uriValidOrRaise(uri_utf) except -1: * cdef uri.xmlURI* c_uri = uri.xmlParseURI(_cstr(uri_utf)) * if c_uri is NULL: # <<<<<<<<<<<<<< @@ -36585,7 +36700,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { __pyx_t_1 = ((__pyx_v_c_uri == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "src/lxml/apihelpers.pxi":1699 + /* "src/lxml/apihelpers.pxi":1701 * cdef uri.xmlURI* c_uri = uri.xmlParseURI(_cstr(uri_utf)) * if c_uri is NULL: * raise ValueError(f"Invalid namespace URI {(uri_utf).decode('utf8')!r}") # <<<<<<<<<<<<<< @@ -36594,24 +36709,24 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { */ if (unlikely(__pyx_v_uri_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1699, __pyx_L1_error) + __PYX_ERR(5, 1701, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_uri_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1699, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_uri_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_t_2), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_namespace_URI, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_namespace_URI, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1699, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(5, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(5, 1699, __pyx_L1_error) + __PYX_ERR(5, 1701, __pyx_L1_error) - /* "src/lxml/apihelpers.pxi":1698 + /* "src/lxml/apihelpers.pxi":1700 * cdef int _uriValidOrRaise(uri_utf) except -1: * cdef uri.xmlURI* c_uri = uri.xmlParseURI(_cstr(uri_utf)) * if c_uri is NULL: # <<<<<<<<<<<<<< @@ -36620,7 +36735,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { */ } - /* "src/lxml/apihelpers.pxi":1700 + /* "src/lxml/apihelpers.pxi":1702 * if c_uri is NULL: * raise ValueError(f"Invalid namespace URI {(uri_utf).decode('utf8')!r}") * uri.xmlFreeURI(c_uri) # <<<<<<<<<<<<<< @@ -36629,7 +36744,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { */ xmlFreeURI(__pyx_v_c_uri); - /* "src/lxml/apihelpers.pxi":1701 + /* "src/lxml/apihelpers.pxi":1703 * raise ValueError(f"Invalid namespace URI {(uri_utf).decode('utf8')!r}") * uri.xmlFreeURI(c_uri) * return 0 # <<<<<<<<<<<<<< @@ -36639,7 +36754,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1696 + /* "src/lxml/apihelpers.pxi":1698 * return 0 * * cdef int _uriValidOrRaise(uri_utf) except -1: # <<<<<<<<<<<<<< @@ -36658,7 +36773,7 @@ static int __pyx_f_4lxml_5etree__uriValidOrRaise(PyObject *__pyx_v_uri_utf) { return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1703 +/* "src/lxml/apihelpers.pxi":1705 * return 0 * * cdef inline object _namespacedName(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -36672,7 +36787,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_namespacedName", 0); - /* "src/lxml/apihelpers.pxi":1704 + /* "src/lxml/apihelpers.pxi":1706 * * cdef inline object _namespacedName(xmlNode* c_node): * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) # <<<<<<<<<<<<<< @@ -36680,13 +36795,13 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__p * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(_getNs(__pyx_v_c_node), __pyx_v_c_node->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1704, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(_getNs(__pyx_v_c_node), __pyx_v_c_node->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 1706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1703 + /* "src/lxml/apihelpers.pxi":1705 * return 0 * * cdef inline object _namespacedName(xmlNode* c_node): # <<<<<<<<<<<<<< @@ -36705,7 +36820,7 @@ static CYTHON_INLINE PyObject *__pyx_f_4lxml_5etree__namespacedName(xmlNode *__p return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1706 +/* "src/lxml/apihelpers.pxi":1708 * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -36724,7 +36839,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ Py_ssize_t __pyx_t_5; __Pyx_RefNannySetupContext("_namespacedNameFromNsName", 0); - /* "src/lxml/apihelpers.pxi":1707 + /* "src/lxml/apihelpers.pxi":1709 * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: # <<<<<<<<<<<<<< @@ -36734,7 +36849,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __pyx_t_1 = ((__pyx_v_href == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1708 + /* "src/lxml/apihelpers.pxi":1710 * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: * return funicode(name) # <<<<<<<<<<<<<< @@ -36742,13 +36857,13 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ * return python.PyUnicode_FromFormat("{%s}%s", href, name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1708, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1707 + /* "src/lxml/apihelpers.pxi":1709 * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): * if href is NULL: # <<<<<<<<<<<<<< @@ -36757,7 +36872,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1709 + /* "src/lxml/apihelpers.pxi":1711 * if href is NULL: * return funicode(name) * elif not python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(name) or isutf8(href)): # <<<<<<<<<<<<<< @@ -36787,7 +36902,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1710 + /* "src/lxml/apihelpers.pxi":1712 * return funicode(name) * elif not python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(name) or isutf8(href)): * return python.PyUnicode_FromFormat("{%s}%s", href, name) # <<<<<<<<<<<<<< @@ -36795,13 +36910,13 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ * s = python.PyBytes_FromFormat("{%s}%s", href, name) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyUnicode_FromFormat(((char *)"{%s}%s"), __pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1710, __pyx_L1_error) + __pyx_t_2 = PyUnicode_FromFormat(((char *)"{%s}%s"), __pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1709 + /* "src/lxml/apihelpers.pxi":1711 * if href is NULL: * return funicode(name) * elif not python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8(name) or isutf8(href)): # <<<<<<<<<<<<<< @@ -36810,7 +36925,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1712 + /* "src/lxml/apihelpers.pxi":1714 * return python.PyUnicode_FromFormat("{%s}%s", href, name) * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) # <<<<<<<<<<<<<< @@ -36818,12 +36933,12 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ * return (s).decode('utf8') */ /*else*/ { - __pyx_t_2 = PyBytes_FromFormat(((char *)"{%s}%s"), __pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1712, __pyx_L1_error) + __pyx_t_2 = PyBytes_FromFormat(((char *)"{%s}%s"), __pyx_v_href, __pyx_v_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_s = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/apihelpers.pxi":1713 + /* "src/lxml/apihelpers.pxi":1715 * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): # <<<<<<<<<<<<<< @@ -36844,20 +36959,20 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ } if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(5, 1713, __pyx_L1_error) + __PYX_ERR(5, 1715, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyBytes_AsUString(__pyx_v_s); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1713, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBytes_AsUString(__pyx_v_s); if (unlikely((!__pyx_t_4) && PyErr_Occurred())) __PYX_ERR(5, 1715, __pyx_L1_error) if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(5, 1713, __pyx_L1_error) + __PYX_ERR(5, 1715, __pyx_L1_error) } - __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1713, __pyx_L1_error) + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_v_s); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(5, 1715, __pyx_L1_error) __pyx_t_3 = (__pyx_f_4lxml_5etree_isutf8l(__pyx_t_4, __pyx_t_5) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/apihelpers.pxi":1714 + /* "src/lxml/apihelpers.pxi":1716 * s = python.PyBytes_FromFormat("{%s}%s", href, name) * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): * return (s).decode('utf8') # <<<<<<<<<<<<<< @@ -36867,15 +36982,15 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_s == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(5, 1714, __pyx_L1_error) + __PYX_ERR(5, 1716, __pyx_L1_error) } - __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_s), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1714, __pyx_L1_error) + __pyx_t_2 = __Pyx_decode_bytes(((PyObject*)__pyx_v_s), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(5, 1716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1713 + /* "src/lxml/apihelpers.pxi":1715 * else: * s = python.PyBytes_FromFormat("{%s}%s", href, name) * if python.IS_PYPY and (python.LXML_UNICODE_STRINGS or isutf8l(s, len(s))): # <<<<<<<<<<<<<< @@ -36884,7 +36999,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ */ } - /* "src/lxml/apihelpers.pxi":1716 + /* "src/lxml/apihelpers.pxi":1718 * return (s).decode('utf8') * else: * return s # <<<<<<<<<<<<<< @@ -36899,7 +37014,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ } } - /* "src/lxml/apihelpers.pxi":1706 + /* "src/lxml/apihelpers.pxi":1708 * return _namespacedNameFromNsName(_getNs(c_node), c_node.name) * * cdef object _namespacedNameFromNsName(const_xmlChar* href, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -36919,7 +37034,7 @@ static PyObject *__pyx_f_4lxml_5etree__namespacedNameFromNsName(const xmlChar *_ return __pyx_r; } -/* "src/lxml/apihelpers.pxi":1718 +/* "src/lxml/apihelpers.pxi":1720 * return s * * cdef _getFilenameForFile(source): # <<<<<<<<<<<<<< @@ -36940,7 +37055,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour int __pyx_t_7; __Pyx_RefNannySetupContext("_getFilenameForFile", 0); - /* "src/lxml/apihelpers.pxi":1724 + /* "src/lxml/apihelpers.pxi":1726 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< @@ -36956,7 +37071,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1725 + /* "src/lxml/apihelpers.pxi":1727 * # urllib2 provides a geturl() method * try: * return source.geturl() # <<<<<<<<<<<<<< @@ -36964,7 +37079,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour * pass */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_geturl); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1725, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_geturl); if (unlikely(!__pyx_t_5)) __PYX_ERR(5, 1727, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -36978,14 +37093,14 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1725, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1727, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "src/lxml/apihelpers.pxi":1724 + /* "src/lxml/apihelpers.pxi":1726 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< @@ -36998,7 +37113,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/apihelpers.pxi":1726 + /* "src/lxml/apihelpers.pxi":1728 * try: * return source.geturl() * except: # <<<<<<<<<<<<<< @@ -37011,7 +37126,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_L7_try_return:; - /* "src/lxml/apihelpers.pxi":1724 + /* "src/lxml/apihelpers.pxi":1726 * """ * # urllib2 provides a geturl() method * try: # <<<<<<<<<<<<<< @@ -37030,7 +37145,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); } - /* "src/lxml/apihelpers.pxi":1729 + /* "src/lxml/apihelpers.pxi":1731 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< @@ -37046,19 +37161,19 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_1); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1730 + /* "src/lxml/apihelpers.pxi":1732 * # file instances have a name attribute * try: * filename = source.name # <<<<<<<<<<<<<< * if _isString(filename): * return os_path_abspath(filename) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1730, __pyx_L9_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1732, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_filename = __pyx_t_4; __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1731 + /* "src/lxml/apihelpers.pxi":1733 * try: * filename = source.name * if _isString(filename): # <<<<<<<<<<<<<< @@ -37068,7 +37183,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_t_7 = (_isString(__pyx_v_filename) != 0); if (__pyx_t_7) { - /* "src/lxml/apihelpers.pxi":1732 + /* "src/lxml/apihelpers.pxi":1734 * filename = source.name * if _isString(filename): * return os_path_abspath(filename) # <<<<<<<<<<<<<< @@ -37089,14 +37204,14 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1732, __pyx_L9_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1734, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L13_try_return; - /* "src/lxml/apihelpers.pxi":1731 + /* "src/lxml/apihelpers.pxi":1733 * try: * filename = source.name * if _isString(filename): # <<<<<<<<<<<<<< @@ -37105,7 +37220,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour */ } - /* "src/lxml/apihelpers.pxi":1729 + /* "src/lxml/apihelpers.pxi":1731 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< @@ -37122,7 +37237,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/apihelpers.pxi":1733 + /* "src/lxml/apihelpers.pxi":1735 * if _isString(filename): * return os_path_abspath(filename) * except: # <<<<<<<<<<<<<< @@ -37135,7 +37250,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_L13_try_return:; - /* "src/lxml/apihelpers.pxi":1729 + /* "src/lxml/apihelpers.pxi":1731 * pass * # file instances have a name attribute * try: # <<<<<<<<<<<<<< @@ -37155,7 +37270,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_L14_try_end:; } - /* "src/lxml/apihelpers.pxi":1736 + /* "src/lxml/apihelpers.pxi":1738 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< @@ -37171,19 +37286,19 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "src/lxml/apihelpers.pxi":1737 + /* "src/lxml/apihelpers.pxi":1739 * # gzip file instances have a filename attribute (before Py3k) * try: * filename = source.filename # <<<<<<<<<<<<<< * if _isString(filename): * return os_path_abspath(filename) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1737, __pyx_L16_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_source, __pyx_n_s_filename); if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1739, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_filename, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/apihelpers.pxi":1738 + /* "src/lxml/apihelpers.pxi":1740 * try: * filename = source.filename * if _isString(filename): # <<<<<<<<<<<<<< @@ -37193,7 +37308,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_t_7 = (_isString(__pyx_v_filename) != 0); if (__pyx_t_7) { - /* "src/lxml/apihelpers.pxi":1739 + /* "src/lxml/apihelpers.pxi":1741 * filename = source.filename * if _isString(filename): * return os_path_abspath(filename) # <<<<<<<<<<<<<< @@ -37214,14 +37329,14 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1739, __pyx_L16_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(5, 1741, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L20_try_return; - /* "src/lxml/apihelpers.pxi":1738 + /* "src/lxml/apihelpers.pxi":1740 * try: * filename = source.filename * if _isString(filename): # <<<<<<<<<<<<<< @@ -37230,7 +37345,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour */ } - /* "src/lxml/apihelpers.pxi":1736 + /* "src/lxml/apihelpers.pxi":1738 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< @@ -37247,7 +37362,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/apihelpers.pxi":1740 + /* "src/lxml/apihelpers.pxi":1742 * if _isString(filename): * return os_path_abspath(filename) * except: # <<<<<<<<<<<<<< @@ -37260,7 +37375,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour } __pyx_L20_try_return:; - /* "src/lxml/apihelpers.pxi":1736 + /* "src/lxml/apihelpers.pxi":1738 * pass * # gzip file instances have a filename attribute (before Py3k) * try: # <<<<<<<<<<<<<< @@ -37280,7 +37395,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_L21_try_end:; } - /* "src/lxml/apihelpers.pxi":1743 + /* "src/lxml/apihelpers.pxi":1745 * pass * # can't determine filename * return None # <<<<<<<<<<<<<< @@ -37289,7 +37404,7 @@ static PyObject *__pyx_f_4lxml_5etree__getFilenameForFile(PyObject *__pyx_v_sour __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/apihelpers.pxi":1718 + /* "src/lxml/apihelpers.pxi":1720 * return s * * cdef _getFilenameForFile(source): # <<<<<<<<<<<<<< @@ -38074,7 +38189,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx * self.filename, self.line, self.column, self.level_name, * self.domain_name, self.type_name, self.message) # <<<<<<<<<<<<<< * - * property domain_name: + * @property */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_domain_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -38150,12 +38265,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_2__repr__(struct __pyx_obj_4lx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":118 +/* "src/lxml/xmlerror.pxi":116 + * + * @property + * def domain_name(self): # <<<<<<<<<<<<<< * """The name of the error domain. See lxml.etree.ErrorDomains * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return ErrorDomains._getName(self.domain, u"unknown") - * */ /* Python wrapper */ @@ -38183,11 +38298,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xmlerror.pxi":119 + * """The name of the error domain. See lxml.etree.ErrorDomains * """ - * def __get__(self): - * return ErrorDomains._getName(self.domain, u"unknown") # <<<<<<<<<<<<<< + * return ErrorDomains._getName(self.domain, u"unknown") # <<<<<<<<<<<<<< * - * property type_name: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 119, __pyx_L1_error) @@ -38248,12 +38363,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":118 + /* "src/lxml/xmlerror.pxi":116 + * + * @property + * def domain_name(self): # <<<<<<<<<<<<<< * """The name of the error domain. See lxml.etree.ErrorDomains * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return ErrorDomains._getName(self.domain, u"unknown") - * */ /* function exit code */ @@ -38271,12 +38386,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_11domain_name___get__(struct _ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":124 +/* "src/lxml/xmlerror.pxi":122 + * + * @property + * def type_name(self): # <<<<<<<<<<<<<< * """The name of the error type. See lxml.etree.ErrorTypes * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self.domain == ErrorDomains.RELAXNGV: - * getName = RelaxNGErrorTypes._getName */ /* Python wrapper */ @@ -38306,11 +38421,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xmlerror.pxi":125 + * """The name of the error type. See lxml.etree.ErrorTypes * """ - * def __get__(self): - * if self.domain == ErrorDomains.RELAXNGV: # <<<<<<<<<<<<<< - * getName = RelaxNGErrorTypes._getName - * else: + * if self.domain == ErrorDomains.RELAXNGV: # <<<<<<<<<<<<<< + * getName = RelaxNGErrorTypes._getName + * else: */ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -38327,11 +38442,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py if (__pyx_t_4) { /* "src/lxml/xmlerror.pxi":126 - * def __get__(self): - * if self.domain == ErrorDomains.RELAXNGV: - * getName = RelaxNGErrorTypes._getName # <<<<<<<<<<<<<< - * else: - * getName = ErrorTypes._getName + * """ + * if self.domain == ErrorDomains.RELAXNGV: + * getName = RelaxNGErrorTypes._getName # <<<<<<<<<<<<<< + * else: + * getName = ErrorTypes._getName */ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_RelaxNGErrorTypes); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -38342,20 +38457,20 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py __pyx_t_3 = 0; /* "src/lxml/xmlerror.pxi":125 + * """The name of the error type. See lxml.etree.ErrorTypes * """ - * def __get__(self): - * if self.domain == ErrorDomains.RELAXNGV: # <<<<<<<<<<<<<< - * getName = RelaxNGErrorTypes._getName - * else: + * if self.domain == ErrorDomains.RELAXNGV: # <<<<<<<<<<<<<< + * getName = RelaxNGErrorTypes._getName + * else: */ goto __pyx_L3; } /* "src/lxml/xmlerror.pxi":128 - * getName = RelaxNGErrorTypes._getName - * else: - * getName = ErrorTypes._getName # <<<<<<<<<<<<<< - * return getName(self.type, u"unknown") + * getName = RelaxNGErrorTypes._getName + * else: + * getName = ErrorTypes._getName # <<<<<<<<<<<<<< + * return getName(self.type, u"unknown") * */ /*else*/ { @@ -38370,11 +38485,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py __pyx_L3:; /* "src/lxml/xmlerror.pxi":129 - * else: - * getName = ErrorTypes._getName - * return getName(self.type, u"unknown") # <<<<<<<<<<<<<< + * else: + * getName = ErrorTypes._getName + * return getName(self.type, u"unknown") # <<<<<<<<<<<<<< * - * property level_name: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->type); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 129, __pyx_L1_error) @@ -38431,12 +38546,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":124 + /* "src/lxml/xmlerror.pxi":122 + * + * @property + * def type_name(self): # <<<<<<<<<<<<<< * """The name of the error type. See lxml.etree.ErrorTypes * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self.domain == ErrorDomains.RELAXNGV: - * getName = RelaxNGErrorTypes._getName */ /* function exit code */ @@ -38455,12 +38570,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_9type_name___get__(struct __py return __pyx_r; } -/* "src/lxml/xmlerror.pxi":134 +/* "src/lxml/xmlerror.pxi":132 + * + * @property + * def level_name(self): # <<<<<<<<<<<<<< * """The name of the error level. See lxml.etree.ErrorLevels * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return ErrorLevels._getName(self.level, u"unknown") - * */ /* Python wrapper */ @@ -38488,11 +38603,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xmlerror.pxi":135 + * """The name of the error level. See lxml.etree.ErrorLevels * """ - * def __get__(self): - * return ErrorLevels._getName(self.level, u"unknown") # <<<<<<<<<<<<<< + * return ErrorLevels._getName(self.level, u"unknown") # <<<<<<<<<<<<<< * - * property message: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 135, __pyx_L1_error) @@ -38553,12 +38668,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":134 + /* "src/lxml/xmlerror.pxi":132 + * + * @property + * def level_name(self): # <<<<<<<<<<<<<< * """The name of the error level. See lxml.etree.ErrorLevels * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return ErrorLevels._getName(self.level, u"unknown") - * */ /* function exit code */ @@ -38578,10 +38693,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_10level_name___get__(struct __ /* "src/lxml/xmlerror.pxi":138 * - * property message: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef size_t size - * if self._message is not None: + * @property + * def message(self): # <<<<<<<<<<<<<< + * """The log message string. + * """ */ /* Python wrapper */ @@ -38618,83 +38733,83 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ PyObject *__pyx_t_15 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "src/lxml/xmlerror.pxi":140 - * def __get__(self): - * cdef size_t size - * if self._message is not None: # <<<<<<<<<<<<<< - * return self._message - * if self._c_message is NULL: + /* "src/lxml/xmlerror.pxi":142 + * """ + * cdef size_t size + * if self._message is not None: # <<<<<<<<<<<<<< + * return self._message + * if self._c_message is NULL: */ __pyx_t_1 = (__pyx_v_self->_message != ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":141 - * cdef size_t size - * if self._message is not None: - * return self._message # <<<<<<<<<<<<<< - * if self._c_message is NULL: - * return None + /* "src/lxml/xmlerror.pxi":143 + * cdef size_t size + * if self._message is not None: + * return self._message # <<<<<<<<<<<<<< + * if self._c_message is NULL: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_message); __pyx_r = __pyx_v_self->_message; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":140 - * def __get__(self): - * cdef size_t size - * if self._message is not None: # <<<<<<<<<<<<<< - * return self._message - * if self._c_message is NULL: + /* "src/lxml/xmlerror.pxi":142 + * """ + * cdef size_t size + * if self._message is not None: # <<<<<<<<<<<<<< + * return self._message + * if self._c_message is NULL: */ } - /* "src/lxml/xmlerror.pxi":142 - * if self._message is not None: - * return self._message - * if self._c_message is NULL: # <<<<<<<<<<<<<< - * return None - * size = cstring_h.strlen(self._c_message) + /* "src/lxml/xmlerror.pxi":144 + * if self._message is not None: + * return self._message + * if self._c_message is NULL: # <<<<<<<<<<<<<< + * return None + * size = cstring_h.strlen(self._c_message) */ __pyx_t_2 = ((__pyx_v_self->_c_message == NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":143 - * return self._message - * if self._c_message is NULL: - * return None # <<<<<<<<<<<<<< - * size = cstring_h.strlen(self._c_message) - * if size > 0 and self._c_message[size-1] == '\n': + /* "src/lxml/xmlerror.pxi":145 + * return self._message + * if self._c_message is NULL: + * return None # <<<<<<<<<<<<<< + * size = cstring_h.strlen(self._c_message) + * if size > 0 and self._c_message[size-1] == '\n': */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":142 - * if self._message is not None: - * return self._message - * if self._c_message is NULL: # <<<<<<<<<<<<<< - * return None - * size = cstring_h.strlen(self._c_message) + /* "src/lxml/xmlerror.pxi":144 + * if self._message is not None: + * return self._message + * if self._c_message is NULL: # <<<<<<<<<<<<<< + * return None + * size = cstring_h.strlen(self._c_message) */ } - /* "src/lxml/xmlerror.pxi":144 - * if self._c_message is NULL: - * return None - * size = cstring_h.strlen(self._c_message) # <<<<<<<<<<<<<< - * if size > 0 and self._c_message[size-1] == '\n': - * size -= 1 # strip EOL + /* "src/lxml/xmlerror.pxi":146 + * if self._c_message is NULL: + * return None + * size = cstring_h.strlen(self._c_message) # <<<<<<<<<<<<<< + * if size > 0 and self._c_message[size-1] == '\n': + * size -= 1 # strip EOL */ __pyx_v_size = strlen(__pyx_v_self->_c_message); - /* "src/lxml/xmlerror.pxi":145 - * return None - * size = cstring_h.strlen(self._c_message) - * if size > 0 and self._c_message[size-1] == '\n': # <<<<<<<<<<<<<< - * size -= 1 # strip EOL - * # cannot use funicode() here because the message may contain + /* "src/lxml/xmlerror.pxi":147 + * return None + * size = cstring_h.strlen(self._c_message) + * if size > 0 and self._c_message[size-1] == '\n': # <<<<<<<<<<<<<< + * size -= 1 # strip EOL + * # cannot use funicode() here because the message may contain */ __pyx_t_1 = ((__pyx_v_size > 0) != 0); if (__pyx_t_1) { @@ -38707,30 +38822,30 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __pyx_L6_bool_binop_done:; if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":146 - * size = cstring_h.strlen(self._c_message) - * if size > 0 and self._c_message[size-1] == '\n': - * size -= 1 # strip EOL # <<<<<<<<<<<<<< - * # cannot use funicode() here because the message may contain - * # byte encoded file paths etc. + /* "src/lxml/xmlerror.pxi":148 + * size = cstring_h.strlen(self._c_message) + * if size > 0 and self._c_message[size-1] == '\n': + * size -= 1 # strip EOL # <<<<<<<<<<<<<< + * # cannot use funicode() here because the message may contain + * # byte encoded file paths etc. */ __pyx_v_size = (__pyx_v_size - 1); - /* "src/lxml/xmlerror.pxi":145 - * return None - * size = cstring_h.strlen(self._c_message) - * if size > 0 and self._c_message[size-1] == '\n': # <<<<<<<<<<<<<< - * size -= 1 # strip EOL - * # cannot use funicode() here because the message may contain + /* "src/lxml/xmlerror.pxi":147 + * return None + * size = cstring_h.strlen(self._c_message) + * if size > 0 and self._c_message[size-1] == '\n': # <<<<<<<<<<<<<< + * size -= 1 # strip EOL + * # cannot use funicode() here because the message may contain */ } - /* "src/lxml/xmlerror.pxi":149 - * # cannot use funicode() here because the message may contain - * # byte encoded file paths etc. - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: + /* "src/lxml/xmlerror.pxi":151 + * # cannot use funicode() here because the message may contain + * # byte encoded file paths etc. + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: */ { __Pyx_PyThreadState_declare @@ -38741,28 +38856,28 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __Pyx_XGOTREF(__pyx_t_5); /*try:*/ { - /* "src/lxml/xmlerror.pxi":150 - * # byte encoded file paths etc. + /* "src/lxml/xmlerror.pxi":152 + * # byte encoded file paths etc. + * try: + * self._message = self._c_message[:size].decode('utf8') # <<<<<<<<<<<<<< + * except UnicodeDecodeError: * try: - * self._message = self._c_message[:size].decode('utf8') # <<<<<<<<<<<<<< - * except UnicodeDecodeError: - * try: */ - __pyx_t_6 = __Pyx_decode_c_string(__pyx_v_self->_c_message, 0, __pyx_v_size, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 150, __pyx_L8_error) + __pyx_t_6 = __Pyx_decode_c_string(__pyx_v_self->_c_message, 0, __pyx_v_size, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 152, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_6); - if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_6))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(1, 150, __pyx_L8_error) + if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_6))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(1, 152, __pyx_L8_error) __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_message); __Pyx_DECREF(__pyx_v_self->_message); __pyx_v_self->_message = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/xmlerror.pxi":149 - * # cannot use funicode() here because the message may contain - * # byte encoded file paths etc. - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: + /* "src/lxml/xmlerror.pxi":151 + * # cannot use funicode() here because the message may contain + * # byte encoded file paths etc. + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: */ } __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -38772,27 +38887,27 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/xmlerror.pxi":151 + /* "src/lxml/xmlerror.pxi":153 + * try: + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< * try: - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: # <<<<<<<<<<<<<< - * try: - * self._message = self._c_message[:size].decode( + * self._message = self._c_message[:size].decode( */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree._LogEntry.message.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(1, 151, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(1, 153, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); - /* "src/lxml/xmlerror.pxi":152 - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode( - * 'ascii', 'backslashreplace') + /* "src/lxml/xmlerror.pxi":154 + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode( + * 'ascii', 'backslashreplace') */ { __Pyx_PyThreadState_declare @@ -38803,28 +38918,28 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "src/lxml/xmlerror.pxi":153 + /* "src/lxml/xmlerror.pxi":155 + * except UnicodeDecodeError: + * try: + * self._message = self._c_message[:size].decode( # <<<<<<<<<<<<<< + * 'ascii', 'backslashreplace') * except UnicodeDecodeError: - * try: - * self._message = self._c_message[:size].decode( # <<<<<<<<<<<<<< - * 'ascii', 'backslashreplace') - * except UnicodeDecodeError: */ - __pyx_t_13 = __Pyx_decode_c_string(__pyx_v_self->_c_message, 0, __pyx_v_size, NULL, ((char const *)"backslashreplace"), PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 153, __pyx_L16_error) + __pyx_t_13 = __Pyx_decode_c_string(__pyx_v_self->_c_message, 0, __pyx_v_size, NULL, ((char const *)"backslashreplace"), PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_13)) __PYX_ERR(1, 155, __pyx_L16_error) __Pyx_GOTREF(__pyx_t_13); - if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_13))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(1, 153, __pyx_L16_error) + if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_13))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(1, 155, __pyx_L16_error) __Pyx_GIVEREF(__pyx_t_13); __Pyx_GOTREF(__pyx_v_self->_message); __Pyx_DECREF(__pyx_v_self->_message); __pyx_v_self->_message = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - /* "src/lxml/xmlerror.pxi":152 - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode( - * 'ascii', 'backslashreplace') + /* "src/lxml/xmlerror.pxi":154 + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode( + * 'ascii', 'backslashreplace') */ } __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -38834,27 +38949,27 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __pyx_L16_error:; __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "src/lxml/xmlerror.pxi":155 - * self._message = self._c_message[:size].decode( - * 'ascii', 'backslashreplace') - * except UnicodeDecodeError: # <<<<<<<<<<<<<< - * self._message = u'' - * if self._c_message: + /* "src/lxml/xmlerror.pxi":157 + * self._message = self._c_message[:size].decode( + * 'ascii', 'backslashreplace') + * except UnicodeDecodeError: # <<<<<<<<<<<<<< + * self._message = u'' + * if self._c_message: */ __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree._LogEntry.message.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0) __PYX_ERR(1, 155, __pyx_L18_except_error) + if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15) < 0) __PYX_ERR(1, 157, __pyx_L18_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_15); - /* "src/lxml/xmlerror.pxi":156 - * 'ascii', 'backslashreplace') - * except UnicodeDecodeError: - * self._message = u'' # <<<<<<<<<<<<<< - * if self._c_message: - * # clean up early + /* "src/lxml/xmlerror.pxi":158 + * 'ascii', 'backslashreplace') + * except UnicodeDecodeError: + * self._message = u'' # <<<<<<<<<<<<<< + * if self._c_message: + * # clean up early */ __Pyx_INCREF(__pyx_kp_u_undecodable_error_message); __Pyx_GIVEREF(__pyx_kp_u_undecodable_error_message); @@ -38869,12 +38984,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ goto __pyx_L18_except_error; __pyx_L18_except_error:; - /* "src/lxml/xmlerror.pxi":152 - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode( - * 'ascii', 'backslashreplace') + /* "src/lxml/xmlerror.pxi":154 + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode( + * 'ascii', 'backslashreplace') */ __Pyx_XGIVEREF(__pyx_t_10); __Pyx_XGIVEREF(__pyx_t_11); @@ -38896,12 +39011,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "src/lxml/xmlerror.pxi":149 - * # cannot use funicode() here because the message may contain - * # byte encoded file paths etc. - * try: # <<<<<<<<<<<<<< - * self._message = self._c_message[:size].decode('utf8') - * except UnicodeDecodeError: + /* "src/lxml/xmlerror.pxi":151 + * # cannot use funicode() here because the message may contain + * # byte encoded file paths etc. + * try: # <<<<<<<<<<<<<< + * self._message = self._c_message[:size].decode('utf8') + * except UnicodeDecodeError: */ __Pyx_XGIVEREF(__pyx_t_3); __Pyx_XGIVEREF(__pyx_t_4); @@ -38916,49 +39031,49 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ __pyx_L13_try_end:; } - /* "src/lxml/xmlerror.pxi":157 - * except UnicodeDecodeError: - * self._message = u'' - * if self._c_message: # <<<<<<<<<<<<<< - * # clean up early - * tree.xmlFree(self._c_message) + /* "src/lxml/xmlerror.pxi":159 + * except UnicodeDecodeError: + * self._message = u'' + * if self._c_message: # <<<<<<<<<<<<<< + * # clean up early + * tree.xmlFree(self._c_message) */ __pyx_t_2 = (__pyx_v_self->_c_message != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":159 - * if self._c_message: - * # clean up early - * tree.xmlFree(self._c_message) # <<<<<<<<<<<<<< - * self._c_message = NULL - * return self._message + /* "src/lxml/xmlerror.pxi":161 + * if self._c_message: + * # clean up early + * tree.xmlFree(self._c_message) # <<<<<<<<<<<<<< + * self._c_message = NULL + * return self._message */ xmlFree(__pyx_v_self->_c_message); - /* "src/lxml/xmlerror.pxi":160 - * # clean up early - * tree.xmlFree(self._c_message) - * self._c_message = NULL # <<<<<<<<<<<<<< - * return self._message + /* "src/lxml/xmlerror.pxi":162 + * # clean up early + * tree.xmlFree(self._c_message) + * self._c_message = NULL # <<<<<<<<<<<<<< + * return self._message * */ __pyx_v_self->_c_message = NULL; - /* "src/lxml/xmlerror.pxi":157 - * except UnicodeDecodeError: - * self._message = u'' - * if self._c_message: # <<<<<<<<<<<<<< - * # clean up early - * tree.xmlFree(self._c_message) + /* "src/lxml/xmlerror.pxi":159 + * except UnicodeDecodeError: + * self._message = u'' + * if self._c_message: # <<<<<<<<<<<<<< + * # clean up early + * tree.xmlFree(self._c_message) */ } - /* "src/lxml/xmlerror.pxi":161 - * tree.xmlFree(self._c_message) - * self._c_message = NULL - * return self._message # <<<<<<<<<<<<<< + /* "src/lxml/xmlerror.pxi":163 + * tree.xmlFree(self._c_message) + * self._c_message = NULL + * return self._message # <<<<<<<<<<<<<< * - * property filename: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_message); @@ -38967,10 +39082,10 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ /* "src/lxml/xmlerror.pxi":138 * - * property message: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef size_t size - * if self._message is not None: + * @property + * def message(self): # <<<<<<<<<<<<<< + * """The log message string. + * """ */ /* function exit code */ @@ -38989,12 +39104,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_7message___get__(struct __pyx_ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":164 +/* "src/lxml/xmlerror.pxi":166 * - * property filename: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._filename is None: - * if self._c_filename is not NULL: + * @property + * def filename(self): # <<<<<<<<<<<<<< + * """The file path where the report originated, if any. + * """ */ /* Python wrapper */ @@ -39018,97 +39133,97 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "src/lxml/xmlerror.pxi":165 - * property filename: - * def __get__(self): - * if self._filename is None: # <<<<<<<<<<<<<< - * if self._c_filename is not NULL: - * self._filename = _decodeFilename(self._c_filename) + /* "src/lxml/xmlerror.pxi":169 + * """The file path where the report originated, if any. + * """ + * if self._filename is None: # <<<<<<<<<<<<<< + * if self._c_filename is not NULL: + * self._filename = _decodeFilename(self._c_filename) */ __pyx_t_1 = (__pyx_v_self->_filename == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":166 - * def __get__(self): - * if self._filename is None: - * if self._c_filename is not NULL: # <<<<<<<<<<<<<< - * self._filename = _decodeFilename(self._c_filename) - * # clean up early + /* "src/lxml/xmlerror.pxi":170 + * """ + * if self._filename is None: + * if self._c_filename is not NULL: # <<<<<<<<<<<<<< + * self._filename = _decodeFilename(self._c_filename) + * # clean up early */ __pyx_t_2 = ((__pyx_v_self->_c_filename != NULL) != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":167 - * if self._filename is None: - * if self._c_filename is not NULL: - * self._filename = _decodeFilename(self._c_filename) # <<<<<<<<<<<<<< - * # clean up early - * tree.xmlFree(self._c_filename) + /* "src/lxml/xmlerror.pxi":171 + * if self._filename is None: + * if self._c_filename is not NULL: + * self._filename = _decodeFilename(self._c_filename) # <<<<<<<<<<<<<< + * # clean up early + * tree.xmlFree(self._c_filename) */ - __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_c_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 167, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__decodeFilename(__pyx_v_self->_c_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 167, __pyx_L1_error) + if (!(likely(__Pyx_PyBaseString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", (PY_MAJOR_VERSION < 3 ? "basestring" : "str"), Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 171, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_filename); __Pyx_DECREF(__pyx_v_self->_filename); __pyx_v_self->_filename = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":169 - * self._filename = _decodeFilename(self._c_filename) - * # clean up early - * tree.xmlFree(self._c_filename) # <<<<<<<<<<<<<< - * self._c_filename = NULL - * return self._filename + /* "src/lxml/xmlerror.pxi":173 + * self._filename = _decodeFilename(self._c_filename) + * # clean up early + * tree.xmlFree(self._c_filename) # <<<<<<<<<<<<<< + * self._c_filename = NULL + * return self._filename */ xmlFree(__pyx_v_self->_c_filename); - /* "src/lxml/xmlerror.pxi":170 - * # clean up early - * tree.xmlFree(self._c_filename) - * self._c_filename = NULL # <<<<<<<<<<<<<< - * return self._filename + /* "src/lxml/xmlerror.pxi":174 + * # clean up early + * tree.xmlFree(self._c_filename) + * self._c_filename = NULL # <<<<<<<<<<<<<< + * return self._filename * */ __pyx_v_self->_c_filename = NULL; - /* "src/lxml/xmlerror.pxi":166 - * def __get__(self): - * if self._filename is None: - * if self._c_filename is not NULL: # <<<<<<<<<<<<<< - * self._filename = _decodeFilename(self._c_filename) - * # clean up early + /* "src/lxml/xmlerror.pxi":170 + * """ + * if self._filename is None: + * if self._c_filename is not NULL: # <<<<<<<<<<<<<< + * self._filename = _decodeFilename(self._c_filename) + * # clean up early */ } - /* "src/lxml/xmlerror.pxi":165 - * property filename: - * def __get__(self): - * if self._filename is None: # <<<<<<<<<<<<<< - * if self._c_filename is not NULL: - * self._filename = _decodeFilename(self._c_filename) + /* "src/lxml/xmlerror.pxi":169 + * """The file path where the report originated, if any. + * """ + * if self._filename is None: # <<<<<<<<<<<<<< + * if self._c_filename is not NULL: + * self._filename = _decodeFilename(self._c_filename) */ } - /* "src/lxml/xmlerror.pxi":171 - * tree.xmlFree(self._c_filename) - * self._c_filename = NULL - * return self._filename # <<<<<<<<<<<<<< + /* "src/lxml/xmlerror.pxi":175 + * tree.xmlFree(self._c_filename) + * self._c_filename = NULL + * return self._filename # <<<<<<<<<<<<<< * - * property path: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_self->_filename); __pyx_r = __pyx_v_self->_filename; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":164 + /* "src/lxml/xmlerror.pxi":166 * - * property filename: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._filename is None: - * if self._c_filename is not NULL: + * @property + * def filename(self): # <<<<<<<<<<<<<< + * """The file path where the report originated, if any. + * """ */ /* function exit code */ @@ -39122,12 +39237,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_8filename___get__(struct __pyx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":176 +/* "src/lxml/xmlerror.pxi":178 + * + * @property + * def path(self): # <<<<<<<<<<<<<< * """The XPath for the node where the error was detected. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return funicode(self._c_path) if self._c_path is not NULL else None - * */ /* Python wrapper */ @@ -39150,16 +39265,16 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4path___get__(struct __pyx_obj PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "src/lxml/xmlerror.pxi":177 + /* "src/lxml/xmlerror.pxi":181 + * """The XPath for the node where the error was detected. * """ - * def __get__(self): - * return funicode(self._c_path) if self._c_path is not NULL else None # <<<<<<<<<<<<<< + * return funicode(self._c_path) if self._c_path is not NULL else None # <<<<<<<<<<<<<< * * */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_path != NULL) != 0)) { - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 177, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->_c_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -39171,12 +39286,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_4path___get__(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":176 + /* "src/lxml/xmlerror.pxi":178 + * + * @property + * def path(self): # <<<<<<<<<<<<<< * """The XPath for the node where the error was detected. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return funicode(self._c_path) if self._c_path is not NULL else None - * */ /* function exit code */ @@ -39411,7 +39526,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_LogEntry_6column___get__(struct __pyx_o return __pyx_r; } -/* "src/lxml/xmlerror.pxi":183 +/* "src/lxml/xmlerror.pxi":187 * cdef _LogEntry _first_error * cdef readonly object last_error * def __init__(self, first_error, last_error): # <<<<<<<<<<<<<< @@ -39450,11 +39565,11 @@ static int __pyx_pw_4lxml_5etree_13_BaseErrorLog_1__init__(PyObject *__pyx_v_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_error)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(1, 187, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 183, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 187, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -39467,7 +39582,7 @@ static int __pyx_pw_4lxml_5etree_13_BaseErrorLog_1__init__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 183, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 187, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._BaseErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -39486,14 +39601,14 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "src/lxml/xmlerror.pxi":184 + /* "src/lxml/xmlerror.pxi":188 * cdef readonly object last_error * def __init__(self, first_error, last_error): * self._first_error = first_error # <<<<<<<<<<<<<< * self.last_error = last_error * */ - if (!(likely(((__pyx_v_first_error) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_first_error, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 184, __pyx_L1_error) + if (!(likely(((__pyx_v_first_error) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_first_error, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 188, __pyx_L1_error) __pyx_t_1 = __pyx_v_first_error; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -39502,7 +39617,7 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml __pyx_v_self->_first_error = ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":185 + /* "src/lxml/xmlerror.pxi":189 * def __init__(self, first_error, last_error): * self._first_error = first_error * self.last_error = last_error # <<<<<<<<<<<<<< @@ -39515,7 +39630,7 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_v_self->last_error); __pyx_v_self->last_error = __pyx_v_last_error; - /* "src/lxml/xmlerror.pxi":183 + /* "src/lxml/xmlerror.pxi":187 * cdef _LogEntry _first_error * cdef readonly object last_error * def __init__(self, first_error, last_error): # <<<<<<<<<<<<<< @@ -39535,7 +39650,7 @@ static int __pyx_pf_4lxml_5etree_13_BaseErrorLog___init__(struct __pyx_obj_4lxml return __pyx_r; } -/* "src/lxml/xmlerror.pxi":187 +/* "src/lxml/xmlerror.pxi":191 * self.last_error = last_error * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -39556,12 +39671,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_13_BaseErrorLog_3copy)) { __Pyx_XDECREF(__pyx_r); @@ -39578,7 +39693,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 187, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -39586,7 +39701,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -39594,12 +39709,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":188 + /* "src/lxml/xmlerror.pxi":192 * * cpdef copy(self): * return _BaseErrorLog(self._first_error, self.last_error) # <<<<<<<<<<<<<< @@ -39607,7 +39722,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 188, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->_first_error)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_first_error)); @@ -39615,14 +39730,14 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_copy(struct __pyx_obj_4lxm __Pyx_INCREF(__pyx_v_self->last_error); __Pyx_GIVEREF(__pyx_v_self->last_error); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->last_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 188, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 192, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":187 + /* "src/lxml/xmlerror.pxi":191 * self.last_error = last_error * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -39664,7 +39779,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_2copy(struct __pyx_obj_4l PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39681,7 +39796,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_2copy(struct __pyx_obj_4l return __pyx_r; } -/* "src/lxml/xmlerror.pxi":190 +/* "src/lxml/xmlerror.pxi":194 * return _BaseErrorLog(self._first_error, self.last_error) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -39707,7 +39822,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__", 0); - /* "src/lxml/xmlerror.pxi":191 + /* "src/lxml/xmlerror.pxi":195 * * def __repr__(self): * return u'' # <<<<<<<<<<<<<< @@ -39719,7 +39834,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s __pyx_r = __pyx_kp_u__11; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":190 + /* "src/lxml/xmlerror.pxi":194 * return _BaseErrorLog(self._first_error, self.last_error) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -39734,7 +39849,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_4__repr__(CYTHON_UNUSED s return __pyx_r; } -/* "src/lxml/xmlerror.pxi":193 +/* "src/lxml/xmlerror.pxi":197 * return u'' * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -39755,12 +39870,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive)) { __Pyx_XDECREF(__pyx_r); @@ -39777,7 +39892,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_entry)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 193, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -39785,7 +39900,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -39793,12 +39908,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":194 + /* "src/lxml/xmlerror.pxi":198 * * cpdef receive(self, _LogEntry entry): * pass # <<<<<<<<<<<<<< @@ -39822,7 +39937,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog_receive(CYTHON_UNUSED stru return __pyx_r; } -/* "src/lxml/xmlerror.pxi":193 +/* "src/lxml/xmlerror.pxi":197 * return u'' * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -39837,7 +39952,7 @@ static PyObject *__pyx_pw_4lxml_5etree_13_BaseErrorLog_7receive(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("receive (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 193, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 197, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_13_BaseErrorLog_6receive(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_v_entry)); /* function exit code */ @@ -39855,7 +39970,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_6receive(struct __pyx_obj PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("receive", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39872,7 +39987,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_6receive(struct __pyx_obj return __pyx_r; } -/* "src/lxml/xmlerror.pxi":197 +/* "src/lxml/xmlerror.pxi":201 * * @cython.final * cdef void _receive(self, xmlerror.xmlError* error): # <<<<<<<<<<<<<< @@ -39890,30 +40005,30 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml int __pyx_t_3; __Pyx_RefNannySetupContext("_receive", 0); - /* "src/lxml/xmlerror.pxi":201 + /* "src/lxml/xmlerror.pxi":205 * cdef _LogEntry entry * cdef _BaseErrorLog global_log * entry = _LogEntry.__new__(_LogEntry) # <<<<<<<<<<<<<< * entry._setError(error) * is_error = error.level == xmlerror.XML_ERR_ERROR or \ */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__LogEntry(((PyTypeObject *)__pyx_ptype_4lxml_5etree__LogEntry), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 201, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__LogEntry(((PyTypeObject *)__pyx_ptype_4lxml_5etree__LogEntry), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_entry = ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":202 + /* "src/lxml/xmlerror.pxi":206 * cdef _BaseErrorLog global_log * entry = _LogEntry.__new__(_LogEntry) * entry._setError(error) # <<<<<<<<<<<<<< * is_error = error.level == xmlerror.XML_ERR_ERROR or \ * error.level == xmlerror.XML_ERR_FATAL */ - __pyx_t_1 = __pyx_f_4lxml_5etree_9_LogEntry__setError(__pyx_v_entry, __pyx_v_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 202, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_LogEntry__setError(__pyx_v_entry, __pyx_v_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":203 + /* "src/lxml/xmlerror.pxi":207 * entry = _LogEntry.__new__(_LogEntry) * entry._setError(error) * is_error = error.level == xmlerror.XML_ERR_ERROR or \ # <<<<<<<<<<<<<< @@ -39924,7 +40039,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml case XML_ERR_ERROR: case XML_ERR_FATAL: - /* "src/lxml/xmlerror.pxi":204 + /* "src/lxml/xmlerror.pxi":208 * entry._setError(error) * is_error = error.level == xmlerror.XML_ERR_ERROR or \ * error.level == xmlerror.XML_ERR_FATAL # <<<<<<<<<<<<<< @@ -39933,7 +40048,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml */ __pyx_t_2 = 1; - /* "src/lxml/xmlerror.pxi":203 + /* "src/lxml/xmlerror.pxi":207 * entry = _LogEntry.__new__(_LogEntry) * entry._setError(error) * is_error = error.level == xmlerror.XML_ERR_ERROR or \ # <<<<<<<<<<<<<< @@ -39947,19 +40062,19 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml } __pyx_v_is_error = __pyx_t_2; - /* "src/lxml/xmlerror.pxi":205 + /* "src/lxml/xmlerror.pxi":209 * is_error = error.level == xmlerror.XML_ERR_ERROR or \ * error.level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) # <<<<<<<<<<<<<< * if global_log is not self: * global_log.receive(entry) */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 205, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_global_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":206 + /* "src/lxml/xmlerror.pxi":210 * error.level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: # <<<<<<<<<<<<<< @@ -39970,18 +40085,18 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":207 + /* "src/lxml/xmlerror.pxi":211 * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: * global_log.receive(entry) # <<<<<<<<<<<<<< * if is_error: * global_log.last_error = entry */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_global_log->__pyx_vtab)->receive(__pyx_v_global_log, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 207, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_global_log->__pyx_vtab)->receive(__pyx_v_global_log, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":208 + /* "src/lxml/xmlerror.pxi":212 * if global_log is not self: * global_log.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -39991,7 +40106,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":209 + /* "src/lxml/xmlerror.pxi":213 * global_log.receive(entry) * if is_error: * global_log.last_error = entry # <<<<<<<<<<<<<< @@ -40004,7 +40119,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_v_global_log->last_error); __pyx_v_global_log->last_error = ((PyObject *)__pyx_v_entry); - /* "src/lxml/xmlerror.pxi":208 + /* "src/lxml/xmlerror.pxi":212 * if global_log is not self: * global_log.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40013,7 +40128,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":206 + /* "src/lxml/xmlerror.pxi":210 * error.level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: # <<<<<<<<<<<<<< @@ -40022,18 +40137,18 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":210 + /* "src/lxml/xmlerror.pxi":214 * if is_error: * global_log.last_error = entry * self.receive(entry) # <<<<<<<<<<<<<< * if is_error: * self.last_error = entry */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_vtab)->receive(__pyx_v_self, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 210, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_vtab)->receive(__pyx_v_self, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":211 + /* "src/lxml/xmlerror.pxi":215 * global_log.last_error = entry * self.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40043,7 +40158,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":212 + /* "src/lxml/xmlerror.pxi":216 * self.receive(entry) * if is_error: * self.last_error = entry # <<<<<<<<<<<<<< @@ -40056,7 +40171,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_v_self->last_error); __pyx_v_self->last_error = ((PyObject *)__pyx_v_entry); - /* "src/lxml/xmlerror.pxi":211 + /* "src/lxml/xmlerror.pxi":215 * global_log.last_error = entry * self.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40065,7 +40180,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":197 + /* "src/lxml/xmlerror.pxi":201 * * @cython.final * cdef void _receive(self, xmlerror.xmlError* error): # <<<<<<<<<<<<<< @@ -40084,7 +40199,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(struct __pyx_obj_4lxml __Pyx_RefNannyFinishContext(); } -/* "src/lxml/xmlerror.pxi":215 +/* "src/lxml/xmlerror.pxi":219 * * @cython.final * cdef void _receiveGeneric(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -40102,30 +40217,30 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob int __pyx_t_3; __Pyx_RefNannySetupContext("_receiveGeneric", 0); - /* "src/lxml/xmlerror.pxi":220 + /* "src/lxml/xmlerror.pxi":224 * cdef _LogEntry entry * cdef _BaseErrorLog global_log * entry = _LogEntry.__new__(_LogEntry) # <<<<<<<<<<<<<< * entry._setGeneric(domain, type, level, line, message, filename) * is_error = level == xmlerror.XML_ERR_ERROR or \ */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__LogEntry(((PyTypeObject *)__pyx_ptype_4lxml_5etree__LogEntry), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 220, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__LogEntry(((PyTypeObject *)__pyx_ptype_4lxml_5etree__LogEntry), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_entry = ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":221 + /* "src/lxml/xmlerror.pxi":225 * cdef _BaseErrorLog global_log * entry = _LogEntry.__new__(_LogEntry) * entry._setGeneric(domain, type, level, line, message, filename) # <<<<<<<<<<<<<< * is_error = level == xmlerror.XML_ERR_ERROR or \ * level == xmlerror.XML_ERR_FATAL */ - __pyx_t_1 = __pyx_f_4lxml_5etree_9_LogEntry__setGeneric(__pyx_v_entry, __pyx_v_domain, __pyx_v_type, __pyx_v_level, __pyx_v_line, __pyx_v_message, __pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 221, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_LogEntry__setGeneric(__pyx_v_entry, __pyx_v_domain, __pyx_v_type, __pyx_v_level, __pyx_v_line, __pyx_v_message, __pyx_v_filename); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":222 + /* "src/lxml/xmlerror.pxi":226 * entry = _LogEntry.__new__(_LogEntry) * entry._setGeneric(domain, type, level, line, message, filename) * is_error = level == xmlerror.XML_ERR_ERROR or \ # <<<<<<<<<<<<<< @@ -40136,7 +40251,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob case XML_ERR_ERROR: case XML_ERR_FATAL: - /* "src/lxml/xmlerror.pxi":223 + /* "src/lxml/xmlerror.pxi":227 * entry._setGeneric(domain, type, level, line, message, filename) * is_error = level == xmlerror.XML_ERR_ERROR or \ * level == xmlerror.XML_ERR_FATAL # <<<<<<<<<<<<<< @@ -40145,7 +40260,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob */ __pyx_t_2 = 1; - /* "src/lxml/xmlerror.pxi":222 + /* "src/lxml/xmlerror.pxi":226 * entry = _LogEntry.__new__(_LogEntry) * entry._setGeneric(domain, type, level, line, message, filename) * is_error = level == xmlerror.XML_ERR_ERROR or \ # <<<<<<<<<<<<<< @@ -40159,19 +40274,19 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob } __pyx_v_is_error = __pyx_t_2; - /* "src/lxml/xmlerror.pxi":224 + /* "src/lxml/xmlerror.pxi":228 * is_error = level == xmlerror.XML_ERR_ERROR or \ * level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) # <<<<<<<<<<<<<< * if global_log is not self: * global_log.receive(entry) */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 224, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_global_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":225 + /* "src/lxml/xmlerror.pxi":229 * level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: # <<<<<<<<<<<<<< @@ -40182,18 +40297,18 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":226 + /* "src/lxml/xmlerror.pxi":230 * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: * global_log.receive(entry) # <<<<<<<<<<<<<< * if is_error: * global_log.last_error = entry */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_global_log->__pyx_vtab)->receive(__pyx_v_global_log, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 226, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_global_log->__pyx_vtab)->receive(__pyx_v_global_log, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":227 + /* "src/lxml/xmlerror.pxi":231 * if global_log is not self: * global_log.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40203,7 +40318,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":228 + /* "src/lxml/xmlerror.pxi":232 * global_log.receive(entry) * if is_error: * global_log.last_error = entry # <<<<<<<<<<<<<< @@ -40216,7 +40331,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __Pyx_DECREF(__pyx_v_global_log->last_error); __pyx_v_global_log->last_error = ((PyObject *)__pyx_v_entry); - /* "src/lxml/xmlerror.pxi":227 + /* "src/lxml/xmlerror.pxi":231 * if global_log is not self: * global_log.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40225,7 +40340,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob */ } - /* "src/lxml/xmlerror.pxi":225 + /* "src/lxml/xmlerror.pxi":229 * level == xmlerror.XML_ERR_FATAL * global_log = _getThreadErrorLog(GLOBAL_ERROR_LOG) * if global_log is not self: # <<<<<<<<<<<<<< @@ -40234,18 +40349,18 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob */ } - /* "src/lxml/xmlerror.pxi":229 + /* "src/lxml/xmlerror.pxi":233 * if is_error: * global_log.last_error = entry * self.receive(entry) # <<<<<<<<<<<<<< * if is_error: * self.last_error = entry */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_vtab)->receive(__pyx_v_self, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 229, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)__pyx_v_self->__pyx_vtab)->receive(__pyx_v_self, __pyx_v_entry, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":230 + /* "src/lxml/xmlerror.pxi":234 * global_log.last_error = entry * self.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40255,7 +40370,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __pyx_t_3 = (__pyx_v_is_error != 0); if (__pyx_t_3) { - /* "src/lxml/xmlerror.pxi":231 + /* "src/lxml/xmlerror.pxi":235 * self.receive(entry) * if is_error: * self.last_error = entry # <<<<<<<<<<<<<< @@ -40268,7 +40383,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __Pyx_DECREF(__pyx_v_self->last_error); __pyx_v_self->last_error = ((PyObject *)__pyx_v_entry); - /* "src/lxml/xmlerror.pxi":230 + /* "src/lxml/xmlerror.pxi":234 * global_log.last_error = entry * self.receive(entry) * if is_error: # <<<<<<<<<<<<<< @@ -40277,7 +40392,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob */ } - /* "src/lxml/xmlerror.pxi":215 + /* "src/lxml/xmlerror.pxi":219 * * @cython.final * cdef void _receiveGeneric(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -40296,7 +40411,7 @@ static void __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(struct __pyx_ob __Pyx_RefNannyFinishContext(); } -/* "src/lxml/xmlerror.pxi":234 +/* "src/lxml/xmlerror.pxi":238 * * @cython.final * cdef _buildParseException(self, exctype, default_message): # <<<<<<<<<<<<<< @@ -40326,7 +40441,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc PyObject *__pyx_t_12 = NULL; __Pyx_RefNannySetupContext("_buildParseException", 0); - /* "src/lxml/xmlerror.pxi":235 + /* "src/lxml/xmlerror.pxi":239 * @cython.final * cdef _buildParseException(self, exctype, default_message): * code = xmlerror.XML_ERR_INTERNAL_ERROR # <<<<<<<<<<<<<< @@ -40335,7 +40450,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc */ __pyx_v_code = XML_ERR_INTERNAL_ERROR; - /* "src/lxml/xmlerror.pxi":236 + /* "src/lxml/xmlerror.pxi":240 * cdef _buildParseException(self, exctype, default_message): * code = xmlerror.XML_ERR_INTERNAL_ERROR * if self._first_error is None: # <<<<<<<<<<<<<< @@ -40346,7 +40461,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":237 + /* "src/lxml/xmlerror.pxi":241 * code = xmlerror.XML_ERR_INTERNAL_ERROR * if self._first_error is None: * return exctype(default_message, code, 0, 0) # <<<<<<<<<<<<<< @@ -40354,7 +40469,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * if message: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_exctype); __pyx_t_5 = __pyx_v_exctype; __pyx_t_6 = NULL; @@ -40372,7 +40487,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_default_message, __pyx_t_4, __pyx_int_0, __pyx_int_0}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -40381,14 +40496,14 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_default_message, __pyx_t_4, __pyx_int_0, __pyx_int_0}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 4+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(4+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -40405,7 +40520,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_int_0); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 237, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -40414,7 +40529,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_3 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":236 + /* "src/lxml/xmlerror.pxi":240 * cdef _buildParseException(self, exctype, default_message): * code = xmlerror.XML_ERR_INTERNAL_ERROR * if self._first_error is None: # <<<<<<<<<<<<<< @@ -40423,29 +40538,29 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc */ } - /* "src/lxml/xmlerror.pxi":238 + /* "src/lxml/xmlerror.pxi":242 * if self._first_error is None: * return exctype(default_message, code, 0, 0) * message = self._first_error.message # <<<<<<<<<<<<<< * if message: * code = self._first_error.type */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 238, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_message = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":239 + /* "src/lxml/xmlerror.pxi":243 * return exctype(default_message, code, 0, 0) * message = self._first_error.message * if message: # <<<<<<<<<<<<<< * code = self._first_error.type * else: */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_message); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_message); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 243, __pyx_L1_error) if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":240 + /* "src/lxml/xmlerror.pxi":244 * message = self._first_error.message * if message: * code = self._first_error.type # <<<<<<<<<<<<<< @@ -40455,7 +40570,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_7 = __pyx_v_self->_first_error->type; __pyx_v_code = __pyx_t_7; - /* "src/lxml/xmlerror.pxi":239 + /* "src/lxml/xmlerror.pxi":243 * return exctype(default_message, code, 0, 0) * message = self._first_error.message * if message: # <<<<<<<<<<<<<< @@ -40465,7 +40580,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc goto __pyx_L4; } - /* "src/lxml/xmlerror.pxi":242 + /* "src/lxml/xmlerror.pxi":246 * code = self._first_error.type * else: * message = default_message # <<<<<<<<<<<<<< @@ -40478,7 +40593,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc } __pyx_L4:; - /* "src/lxml/xmlerror.pxi":243 + /* "src/lxml/xmlerror.pxi":247 * else: * message = default_message * line = self._first_error.line # <<<<<<<<<<<<<< @@ -40488,7 +40603,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_7 = __pyx_v_self->_first_error->line; __pyx_v_line = __pyx_t_7; - /* "src/lxml/xmlerror.pxi":244 + /* "src/lxml/xmlerror.pxi":248 * message = default_message * line = self._first_error.line * column = self._first_error.column # <<<<<<<<<<<<<< @@ -40498,19 +40613,19 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_7 = __pyx_v_self->_first_error->column; __pyx_v_column = __pyx_t_7; - /* "src/lxml/xmlerror.pxi":245 + /* "src/lxml/xmlerror.pxi":249 * line = self._first_error.line * column = self._first_error.column * filename = self._first_error.filename # <<<<<<<<<<<<<< * if line > 0: * if column > 0: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_filename = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":246 + /* "src/lxml/xmlerror.pxi":250 * column = self._first_error.column * filename = self._first_error.filename * if line > 0: # <<<<<<<<<<<<<< @@ -40520,7 +40635,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_2 = ((__pyx_v_line > 0) != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":247 + /* "src/lxml/xmlerror.pxi":251 * filename = self._first_error.filename * if line > 0: * if column > 0: # <<<<<<<<<<<<<< @@ -40530,18 +40645,18 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_2 = ((__pyx_v_column > 0) != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":248 + /* "src/lxml/xmlerror.pxi":252 * if line > 0: * if column > 0: * message = f"{message}, line {line}, column {column}" # <<<<<<<<<<<<<< * else: * message = f"{message}, line {line}" */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 248, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = 0; __pyx_t_10 = 127; - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 248, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -40552,7 +40667,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_9 += 7; __Pyx_GIVEREF(__pyx_kp_u_line); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_line); - __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_line, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 248, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_line, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); @@ -40562,19 +40677,19 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_9 += 9; __Pyx_GIVEREF(__pyx_kp_u_column); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_column); - __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_column, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 248, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_From_int(__pyx_v_column, 0, ' ', 'd'); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 248, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":247 + /* "src/lxml/xmlerror.pxi":251 * filename = self._first_error.filename * if line > 0: * if column > 0: # <<<<<<<<<<<<<< @@ -40584,7 +40699,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc goto __pyx_L6; } - /* "src/lxml/xmlerror.pxi":250 + /* "src/lxml/xmlerror.pxi":254 * message = f"{message}, line {line}, column {column}" * else: * message = f"{message}, line {line}" # <<<<<<<<<<<<<< @@ -40592,11 +40707,11 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * */ /*else*/ { - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 250, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_9 = 0; __pyx_t_10 = 127; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10; __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -40607,13 +40722,13 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_9 += 7; __Pyx_GIVEREF(__pyx_kp_u_line); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_kp_u_line); - __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_line, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_line, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 250, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_3); @@ -40621,7 +40736,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc } __pyx_L6:; - /* "src/lxml/xmlerror.pxi":246 + /* "src/lxml/xmlerror.pxi":250 * column = self._first_error.column * filename = self._first_error.filename * if line > 0: # <<<<<<<<<<<<<< @@ -40630,7 +40745,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc */ } - /* "src/lxml/xmlerror.pxi":251 + /* "src/lxml/xmlerror.pxi":255 * else: * message = f"{message}, line {line}" * return exctype(message, code, line, column, filename) # <<<<<<<<<<<<<< @@ -40638,11 +40753,11 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc * @cython.final */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_column); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_exctype); __pyx_t_6 = __pyx_v_exctype; __pyx_t_11 = NULL; @@ -40660,7 +40775,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_v_message, __pyx_t_5, __pyx_t_8, __pyx_t_4, __pyx_v_filename}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -40671,7 +40786,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[6] = {__pyx_t_11, __pyx_v_message, __pyx_t_5, __pyx_t_8, __pyx_t_4, __pyx_v_filename}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 5+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -40680,7 +40795,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc } else #endif { - __pyx_t_12 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(5+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -40700,7 +40815,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_5 = 0; __pyx_t_8 = 0; __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 251, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 255, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -40709,7 +40824,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc __pyx_t_3 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":234 + /* "src/lxml/xmlerror.pxi":238 * * @cython.final * cdef _buildParseException(self, exctype, default_message): # <<<<<<<<<<<<<< @@ -40736,7 +40851,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException(struc return __pyx_r; } -/* "src/lxml/xmlerror.pxi":254 +/* "src/lxml/xmlerror.pxi":258 * * @cython.final * cdef _buildExceptionMessage(self, default_message): # <<<<<<<<<<<<<< @@ -40756,7 +40871,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_buildExceptionMessage", 0); - /* "src/lxml/xmlerror.pxi":255 + /* "src/lxml/xmlerror.pxi":259 * @cython.final * cdef _buildExceptionMessage(self, default_message): * if self._first_error is None: # <<<<<<<<<<<<<< @@ -40767,7 +40882,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":256 + /* "src/lxml/xmlerror.pxi":260 * cdef _buildExceptionMessage(self, default_message): * if self._first_error is None: * return default_message # <<<<<<<<<<<<<< @@ -40779,7 +40894,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_r = __pyx_v_default_message; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":255 + /* "src/lxml/xmlerror.pxi":259 * @cython.final * cdef _buildExceptionMessage(self, default_message): * if self._first_error is None: # <<<<<<<<<<<<<< @@ -40788,32 +40903,32 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str */ } - /* "src/lxml/xmlerror.pxi":257 + /* "src/lxml/xmlerror.pxi":261 * if self._first_error is None: * return default_message * if self._first_error.message: # <<<<<<<<<<<<<< * message = self._first_error.message * elif default_message is None: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 257, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 257, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 261, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":258 + /* "src/lxml/xmlerror.pxi":262 * return default_message * if self._first_error.message: * message = self._first_error.message # <<<<<<<<<<<<<< * elif default_message is None: * return None */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 258, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_first_error), __pyx_n_s_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_message = __pyx_t_3; __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":257 + /* "src/lxml/xmlerror.pxi":261 * if self._first_error is None: * return default_message * if self._first_error.message: # <<<<<<<<<<<<<< @@ -40823,7 +40938,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str goto __pyx_L4; } - /* "src/lxml/xmlerror.pxi":259 + /* "src/lxml/xmlerror.pxi":263 * if self._first_error.message: * message = self._first_error.message * elif default_message is None: # <<<<<<<<<<<<<< @@ -40834,7 +40949,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":260 + /* "src/lxml/xmlerror.pxi":264 * message = self._first_error.message * elif default_message is None: * return None # <<<<<<<<<<<<<< @@ -40845,7 +40960,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":259 + /* "src/lxml/xmlerror.pxi":263 * if self._first_error.message: * message = self._first_error.message * elif default_message is None: # <<<<<<<<<<<<<< @@ -40854,7 +40969,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str */ } - /* "src/lxml/xmlerror.pxi":262 + /* "src/lxml/xmlerror.pxi":266 * return None * else: * message = default_message # <<<<<<<<<<<<<< @@ -40867,7 +40982,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str } __pyx_L4:; - /* "src/lxml/xmlerror.pxi":263 + /* "src/lxml/xmlerror.pxi":267 * else: * message = default_message * if self._first_error.line > 0: # <<<<<<<<<<<<<< @@ -40877,7 +40992,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_1 = ((__pyx_v_self->_first_error->line > 0) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":264 + /* "src/lxml/xmlerror.pxi":268 * message = default_message * if self._first_error.line > 0: * if self._first_error.column > 0: # <<<<<<<<<<<<<< @@ -40887,18 +41002,18 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_1 = ((__pyx_v_self->_first_error->column > 0) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":265 + /* "src/lxml/xmlerror.pxi":269 * if self._first_error.line > 0: * if self._first_error.column > 0: * message = f"{message}, line {self._first_error.line}, column {self._first_error.column}" # <<<<<<<<<<<<<< * else: * message = f"{message}, line {self._first_error.line}" */ - __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = 0; __pyx_t_5 = 127; - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5; __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); @@ -40909,7 +41024,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_4 += 7; __Pyx_GIVEREF(__pyx_kp_u_line); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_line); - __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->line, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->line, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); @@ -40919,19 +41034,19 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_4 += 9; __Pyx_GIVEREF(__pyx_kp_u_column); PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_column); - __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->column, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->column, 0, ' ', 'd'); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_6); __pyx_t_6 = 0; - /* "src/lxml/xmlerror.pxi":264 + /* "src/lxml/xmlerror.pxi":268 * message = default_message * if self._first_error.line > 0: * if self._first_error.column > 0: # <<<<<<<<<<<<<< @@ -40941,7 +41056,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str goto __pyx_L6; } - /* "src/lxml/xmlerror.pxi":267 + /* "src/lxml/xmlerror.pxi":271 * message = f"{message}, line {self._first_error.line}, column {self._first_error.column}" * else: * message = f"{message}, line {self._first_error.line}" # <<<<<<<<<<<<<< @@ -40949,11 +41064,11 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str * */ /*else*/ { - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 267, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = 0; __pyx_t_5 = 127; - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 267, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_message, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5; __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -40964,13 +41079,13 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_t_4 += 7; __Pyx_GIVEREF(__pyx_kp_u_line); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_line); - __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->line, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 267, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_From_int(__pyx_v_self->_first_error->line, 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 267, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_message, __pyx_t_3); @@ -40978,7 +41093,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str } __pyx_L6:; - /* "src/lxml/xmlerror.pxi":263 + /* "src/lxml/xmlerror.pxi":267 * else: * message = default_message * if self._first_error.line > 0: # <<<<<<<<<<<<<< @@ -40987,7 +41102,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str */ } - /* "src/lxml/xmlerror.pxi":268 + /* "src/lxml/xmlerror.pxi":272 * else: * message = f"{message}, line {self._first_error.line}" * return message # <<<<<<<<<<<<<< @@ -40999,7 +41114,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str __pyx_r = __pyx_v_message; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":254 + /* "src/lxml/xmlerror.pxi":258 * * @cython.final * cdef _buildExceptionMessage(self, default_message): # <<<<<<<<<<<<<< @@ -41020,7 +41135,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(str return __pyx_r; } -/* "src/lxml/xmlerror.pxi":182 +/* "src/lxml/xmlerror.pxi":186 * cdef class _BaseErrorLog: * cdef _LogEntry _first_error * cdef readonly object last_error # <<<<<<<<<<<<<< @@ -41057,7 +41172,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_BaseErrorLog_10last_error___get__(stru return __pyx_r; } -/* "src/lxml/xmlerror.pxi":274 +/* "src/lxml/xmlerror.pxi":278 * cdef list _entries * cdef int _offset * def __init__(self, entries, first_error, last_error): # <<<<<<<<<<<<<< @@ -41099,17 +41214,17 @@ static int __pyx_pw_4lxml_5etree_13_ListErrorLog_1__init__(PyObject *__pyx_v_sel case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_first_error)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(1, 274, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(1, 278, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_last_error)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(1, 274, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(1, 278, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 274, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 278, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -41124,7 +41239,7 @@ static int __pyx_pw_4lxml_5etree_13_ListErrorLog_1__init__(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 274, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 278, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ListErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -41151,17 +41266,17 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_v_first_error); __Pyx_INCREF(__pyx_v_last_error); - /* "src/lxml/xmlerror.pxi":275 + /* "src/lxml/xmlerror.pxi":279 * cdef int _offset * def __init__(self, entries, first_error, last_error): * if entries: # <<<<<<<<<<<<<< * if first_error is None: * first_error = entries[0] */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_entries); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 275, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_entries); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 279, __pyx_L1_error) if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":276 + /* "src/lxml/xmlerror.pxi":280 * def __init__(self, entries, first_error, last_error): * if entries: * if first_error is None: # <<<<<<<<<<<<<< @@ -41172,19 +41287,19 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":277 + /* "src/lxml/xmlerror.pxi":281 * if entries: * if first_error is None: * first_error = entries[0] # <<<<<<<<<<<<<< * if last_error is None: * last_error = entries[-1] */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entries, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 277, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entries, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_first_error, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":276 + /* "src/lxml/xmlerror.pxi":280 * def __init__(self, entries, first_error, last_error): * if entries: * if first_error is None: # <<<<<<<<<<<<<< @@ -41193,7 +41308,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":278 + /* "src/lxml/xmlerror.pxi":282 * if first_error is None: * first_error = entries[0] * if last_error is None: # <<<<<<<<<<<<<< @@ -41204,19 +41319,19 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":279 + /* "src/lxml/xmlerror.pxi":283 * first_error = entries[0] * if last_error is None: * last_error = entries[-1] # <<<<<<<<<<<<<< * _BaseErrorLog.__init__(self, first_error, last_error) * self._entries = entries */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entries, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 279, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_entries, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_last_error, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":278 + /* "src/lxml/xmlerror.pxi":282 * if first_error is None: * first_error = entries[0] * if last_error is None: # <<<<<<<<<<<<<< @@ -41225,7 +41340,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":275 + /* "src/lxml/xmlerror.pxi":279 * cdef int _offset * def __init__(self, entries, first_error, last_error): * if entries: # <<<<<<<<<<<<<< @@ -41234,14 +41349,14 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml */ } - /* "src/lxml/xmlerror.pxi":280 + /* "src/lxml/xmlerror.pxi":284 * if last_error is None: * last_error = entries[-1] * _BaseErrorLog.__init__(self, first_error, last_error) # <<<<<<<<<<<<<< * self._entries = entries * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -41258,7 +41373,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_first_error, __pyx_v_last_error}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -41266,13 +41381,13 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_first_error, __pyx_v_last_error}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -41286,21 +41401,21 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __Pyx_INCREF(__pyx_v_last_error); __Pyx_GIVEREF(__pyx_v_last_error); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_last_error); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 280, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":281 + /* "src/lxml/xmlerror.pxi":285 * last_error = entries[-1] * _BaseErrorLog.__init__(self, first_error, last_error) * self._entries = entries # <<<<<<<<<<<<<< * * cpdef copy(self): */ - if (!(likely(PyList_CheckExact(__pyx_v_entries))||((__pyx_v_entries) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_entries)->tp_name), 0))) __PYX_ERR(1, 281, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_entries))||((__pyx_v_entries) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_entries)->tp_name), 0))) __PYX_ERR(1, 285, __pyx_L1_error) __pyx_t_3 = __pyx_v_entries; __Pyx_INCREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); @@ -41309,7 +41424,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml __pyx_v_self->_entries = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":274 + /* "src/lxml/xmlerror.pxi":278 * cdef list _entries * cdef int _offset * def __init__(self, entries, first_error, last_error): # <<<<<<<<<<<<<< @@ -41334,7 +41449,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog___init__(struct __pyx_obj_4lxml return __pyx_r; } -/* "src/lxml/xmlerror.pxi":283 +/* "src/lxml/xmlerror.pxi":287 * self._entries = entries * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -41357,12 +41472,12 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_13_ListErrorLog_3copy)) { __Pyx_XDECREF(__pyx_r); @@ -41379,7 +41494,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 283, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -41387,7 +41502,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -41395,19 +41510,19 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":287 + /* "src/lxml/xmlerror.pxi":291 * entries. * """ * cdef _ListErrorLog log = _ListErrorLog( # <<<<<<<<<<<<<< * self._entries, self._first_error, self.last_error) * log._offset = self._offset */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->_entries); __Pyx_GIVEREF(__pyx_v_self->_entries); @@ -41418,13 +41533,13 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm __Pyx_INCREF(__pyx_v_self->__pyx_base.last_error); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.last_error); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->__pyx_base.last_error); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 287, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_log = ((struct __pyx_obj_4lxml_5etree__ListErrorLog *)__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":289 + /* "src/lxml/xmlerror.pxi":293 * cdef _ListErrorLog log = _ListErrorLog( * self._entries, self._first_error, self.last_error) * log._offset = self._offset # <<<<<<<<<<<<<< @@ -41434,7 +41549,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm __pyx_t_5 = __pyx_v_self->_offset; __pyx_v_log->_offset = __pyx_t_5; - /* "src/lxml/xmlerror.pxi":290 + /* "src/lxml/xmlerror.pxi":294 * self._entries, self._first_error, self.last_error) * log._offset = self._offset * return log # <<<<<<<<<<<<<< @@ -41446,7 +41561,7 @@ static PyObject *__pyx_f_4lxml_5etree_13_ListErrorLog_copy(struct __pyx_obj_4lxm __pyx_r = ((PyObject *)__pyx_v_log); goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":283 + /* "src/lxml/xmlerror.pxi":287 * self._entries = entries * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -41490,7 +41605,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_2copy(struct __pyx_obj_4l PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_13_ListErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_13_ListErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41507,7 +41622,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_2copy(struct __pyx_obj_4l return __pyx_r; } -/* "src/lxml/xmlerror.pxi":292 +/* "src/lxml/xmlerror.pxi":296 * return log * * def __iter__(self): # <<<<<<<<<<<<<< @@ -41541,7 +41656,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - /* "src/lxml/xmlerror.pxi":293 + /* "src/lxml/xmlerror.pxi":297 * * def __iter__(self): * entries = self._entries # <<<<<<<<<<<<<< @@ -41553,7 +41668,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob __pyx_v_entries = __pyx_t_1; __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":294 + /* "src/lxml/xmlerror.pxi":298 * def __iter__(self): * entries = self._entries * if self._offset: # <<<<<<<<<<<<<< @@ -41563,14 +41678,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob __pyx_t_2 = (__pyx_v_self->_offset != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":295 + /* "src/lxml/xmlerror.pxi":299 * entries = self._entries * if self._offset: * entries = islice(entries, self._offset) # <<<<<<<<<<<<<< * return iter(entries) * */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_4lxml_5etree_islice); __pyx_t_4 = __pyx_v_4lxml_5etree_islice; __pyx_t_5 = NULL; @@ -41588,7 +41703,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_entries, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -41597,14 +41712,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_entries, __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -41615,7 +41730,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 295, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -41623,7 +41738,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob __Pyx_DECREF_SET(__pyx_v_entries, __pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":294 + /* "src/lxml/xmlerror.pxi":298 * def __iter__(self): * entries = self._entries * if self._offset: # <<<<<<<<<<<<<< @@ -41632,7 +41747,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob */ } - /* "src/lxml/xmlerror.pxi":296 + /* "src/lxml/xmlerror.pxi":300 * if self._offset: * entries = islice(entries, self._offset) * return iter(entries) # <<<<<<<<<<<<<< @@ -41640,13 +41755,13 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 296, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_v_entries); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":292 + /* "src/lxml/xmlerror.pxi":296 * return log * * def __iter__(self): # <<<<<<<<<<<<<< @@ -41670,7 +41785,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_4__iter__(struct __pyx_ob return __pyx_r; } -/* "src/lxml/xmlerror.pxi":298 +/* "src/lxml/xmlerror.pxi":302 * return iter(entries) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -41702,7 +41817,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "src/lxml/xmlerror.pxi":299 + /* "src/lxml/xmlerror.pxi":303 * * def __repr__(self): * return u'\n'.join([repr(entry) for entry in self]) # <<<<<<<<<<<<<< @@ -41710,32 +41825,32 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob * def __getitem__(self, index): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 303, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 303, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 303, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -41745,7 +41860,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 299, __pyx_L1_error) + else __PYX_ERR(1, 303, __pyx_L1_error) } break; } @@ -41753,20 +41868,20 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob } __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Repr(__pyx_v_entry); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_5 = PyObject_Repr(__pyx_v_entry); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 299, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__18, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 299, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__18, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":298 + /* "src/lxml/xmlerror.pxi":302 * return iter(entries) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -41788,7 +41903,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_6__repr__(struct __pyx_ob return __pyx_r; } -/* "src/lxml/xmlerror.pxi":301 +/* "src/lxml/xmlerror.pxi":305 * return u'\n'.join([repr(entry) for entry in self]) * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -41818,7 +41933,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx __Pyx_RefNannySetupContext("__getitem__", 0); __Pyx_INCREF(__pyx_v_index); - /* "src/lxml/xmlerror.pxi":302 + /* "src/lxml/xmlerror.pxi":306 * * def __getitem__(self, index): * if self._offset: # <<<<<<<<<<<<<< @@ -41828,22 +41943,22 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx __pyx_t_1 = (__pyx_v_self->_offset != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":303 + /* "src/lxml/xmlerror.pxi":307 * def __getitem__(self, index): * if self._offset: * index += self._offset # <<<<<<<<<<<<<< * return self._entries[index] * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->_offset); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_index, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 303, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_index, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":302 + /* "src/lxml/xmlerror.pxi":306 * * def __getitem__(self, index): * if self._offset: # <<<<<<<<<<<<<< @@ -41852,7 +41967,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx */ } - /* "src/lxml/xmlerror.pxi":304 + /* "src/lxml/xmlerror.pxi":308 * if self._offset: * index += self._offset * return self._entries[index] # <<<<<<<<<<<<<< @@ -41862,15 +41977,15 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->_entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 304, __pyx_L1_error) + __PYX_ERR(1, 308, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_entries, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 304, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_entries, __pyx_v_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":301 + /* "src/lxml/xmlerror.pxi":305 * return u'\n'.join([repr(entry) for entry in self]) * * def __getitem__(self, index): # <<<<<<<<<<<<<< @@ -41891,7 +42006,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_8__getitem__(struct __pyx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":306 +/* "src/lxml/xmlerror.pxi":310 * return self._entries[index] * * def __len__(self): # <<<<<<<<<<<<<< @@ -41919,7 +42034,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_o Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__len__", 0); - /* "src/lxml/xmlerror.pxi":307 + /* "src/lxml/xmlerror.pxi":311 * * def __len__(self): * return len(self._entries) - self._offset # <<<<<<<<<<<<<< @@ -41930,14 +42045,14 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_o __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 307, __pyx_L1_error) + __PYX_ERR(1, 311, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 307, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = (__pyx_t_2 - __pyx_v_self->_offset); goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":306 + /* "src/lxml/xmlerror.pxi":310 * return self._entries[index] * * def __len__(self): # <<<<<<<<<<<<<< @@ -41955,7 +42070,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_13_ListErrorLog_10__len__(struct __pyx_o return __pyx_r; } -/* "src/lxml/xmlerror.pxi":309 +/* "src/lxml/xmlerror.pxi":313 * return len(self._entries) - self._offset * * def __contains__(self, error_type): # <<<<<<<<<<<<<< @@ -41989,7 +42104,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__contains__", 0); - /* "src/lxml/xmlerror.pxi":311 + /* "src/lxml/xmlerror.pxi":315 * def __contains__(self, error_type): * cdef Py_ssize_t i * for i, entry in enumerate(self._entries): # <<<<<<<<<<<<<< @@ -42001,9 +42116,9 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 311, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 315, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 311, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_entry, __pyx_t_4); @@ -42011,7 +42126,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj __pyx_v_i = __pyx_t_1; __pyx_t_1 = (__pyx_t_1 + 1); - /* "src/lxml/xmlerror.pxi":312 + /* "src/lxml/xmlerror.pxi":316 * cdef Py_ssize_t i * for i, entry in enumerate(self._entries): * if i < self._offset: # <<<<<<<<<<<<<< @@ -42021,7 +42136,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj __pyx_t_5 = ((__pyx_v_i < __pyx_v_self->_offset) != 0); if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":313 + /* "src/lxml/xmlerror.pxi":317 * for i, entry in enumerate(self._entries): * if i < self._offset: * continue # <<<<<<<<<<<<<< @@ -42030,7 +42145,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj */ goto __pyx_L3_continue; - /* "src/lxml/xmlerror.pxi":312 + /* "src/lxml/xmlerror.pxi":316 * cdef Py_ssize_t i * for i, entry in enumerate(self._entries): * if i < self._offset: # <<<<<<<<<<<<<< @@ -42039,22 +42154,22 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj */ } - /* "src/lxml/xmlerror.pxi":314 + /* "src/lxml/xmlerror.pxi":318 * if i < self._offset: * continue * if entry.type == error_type: # <<<<<<<<<<<<<< * return True * return False */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 314, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_entry, __pyx_n_s_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_error_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 314, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_4, __pyx_v_error_type, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 314, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":315 + /* "src/lxml/xmlerror.pxi":319 * continue * if entry.type == error_type: * return True # <<<<<<<<<<<<<< @@ -42065,7 +42180,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":314 + /* "src/lxml/xmlerror.pxi":318 * if i < self._offset: * continue * if entry.type == error_type: # <<<<<<<<<<<<<< @@ -42074,7 +42189,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj */ } - /* "src/lxml/xmlerror.pxi":311 + /* "src/lxml/xmlerror.pxi":315 * def __contains__(self, error_type): * cdef Py_ssize_t i * for i, entry in enumerate(self._entries): # <<<<<<<<<<<<<< @@ -42085,7 +42200,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":316 + /* "src/lxml/xmlerror.pxi":320 * if entry.type == error_type: * return True * return False # <<<<<<<<<<<<<< @@ -42095,7 +42210,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":309 + /* "src/lxml/xmlerror.pxi":313 * return len(self._entries) - self._offset * * def __contains__(self, error_type): # <<<<<<<<<<<<<< @@ -42116,7 +42231,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_12__contains__(struct __pyx_obj return __pyx_r; } -/* "src/lxml/xmlerror.pxi":318 +/* "src/lxml/xmlerror.pxi":322 * return False * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -42144,7 +42259,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__nonzero__", 0); - /* "src/lxml/xmlerror.pxi":319 + /* "src/lxml/xmlerror.pxi":323 * * def __nonzero__(self): * return len(self._entries) > self._offset # <<<<<<<<<<<<<< @@ -42155,14 +42270,14 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 319, __pyx_L1_error) + __PYX_ERR(1, 323, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 319, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(1, 323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = (__pyx_t_2 > __pyx_v_self->_offset); goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":318 + /* "src/lxml/xmlerror.pxi":322 * return False * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -42180,7 +42295,7 @@ static int __pyx_pf_4lxml_5etree_13_ListErrorLog_14__nonzero__(struct __pyx_obj_ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":321 +/* "src/lxml/xmlerror.pxi":325 * return len(self._entries) > self._offset * * def filter_domains(self, domains): # <<<<<<<<<<<<<< @@ -42219,7 +42334,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ __Pyx_RefNannySetupContext("filter_domains", 0); __Pyx_INCREF(__pyx_v_domains); - /* "src/lxml/xmlerror.pxi":326 + /* "src/lxml/xmlerror.pxi":330 * """ * cdef _LogEntry entry * if isinstance(domains, (int, long)): # <<<<<<<<<<<<<< @@ -42240,14 +42355,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":327 + /* "src/lxml/xmlerror.pxi":331 * cdef _LogEntry entry * if isinstance(domains, (int, long)): * domains = (domains,) # <<<<<<<<<<<<<< * filtered = [entry for entry in self if entry.domain in domains] * return _ListErrorLog(filtered, None, None) */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 327, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_domains); __Pyx_GIVEREF(__pyx_v_domains); @@ -42255,7 +42370,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ __Pyx_DECREF_SET(__pyx_v_domains, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":326 + /* "src/lxml/xmlerror.pxi":330 * """ * cdef _LogEntry entry * if isinstance(domains, (int, long)): # <<<<<<<<<<<<<< @@ -42264,39 +42379,39 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ */ } - /* "src/lxml/xmlerror.pxi":328 + /* "src/lxml/xmlerror.pxi":332 * if isinstance(domains, (int, long)): * domains = (domains,) * filtered = [entry for entry in self if entry.domain in domains] # <<<<<<<<<<<<<< * return _ListErrorLog(filtered, None, None) * */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { __pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 332, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 332, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 332, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -42306,29 +42421,29 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 328, __pyx_L1_error) + else __PYX_ERR(1, 332, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 328, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_entry, ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_8)); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->domain); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->domain); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_domains, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 328, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_domains, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 328, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 332, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_filtered = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":329 + /* "src/lxml/xmlerror.pxi":333 * domains = (domains,) * filtered = [entry for entry in self if entry.domain in domains] * return _ListErrorLog(filtered, None, None) # <<<<<<<<<<<<<< @@ -42336,7 +42451,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ * def filter_types(self, types): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 329, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_filtered); __Pyx_GIVEREF(__pyx_v_filtered); @@ -42347,14 +42462,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 329, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":321 + /* "src/lxml/xmlerror.pxi":325 * return len(self._entries) > self._offset * * def filter_domains(self, domains): # <<<<<<<<<<<<<< @@ -42378,7 +42493,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_16filter_domains(struct _ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":331 +/* "src/lxml/xmlerror.pxi":335 * return _ListErrorLog(filtered, None, None) * * def filter_types(self, types): # <<<<<<<<<<<<<< @@ -42417,7 +42532,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p __Pyx_RefNannySetupContext("filter_types", 0); __Pyx_INCREF(__pyx_v_types); - /* "src/lxml/xmlerror.pxi":338 + /* "src/lxml/xmlerror.pxi":342 * """ * cdef _LogEntry entry * if isinstance(types, (int, long)): # <<<<<<<<<<<<<< @@ -42438,14 +42553,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":339 + /* "src/lxml/xmlerror.pxi":343 * cdef _LogEntry entry * if isinstance(types, (int, long)): * types = (types,) # <<<<<<<<<<<<<< * filtered = [entry for entry in self if entry.type in types] * return _ListErrorLog(filtered, None, None) */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 339, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_types); __Pyx_GIVEREF(__pyx_v_types); @@ -42453,7 +42568,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p __Pyx_DECREF_SET(__pyx_v_types, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":338 + /* "src/lxml/xmlerror.pxi":342 * """ * cdef _LogEntry entry * if isinstance(types, (int, long)): # <<<<<<<<<<<<<< @@ -42462,39 +42577,39 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p */ } - /* "src/lxml/xmlerror.pxi":340 + /* "src/lxml/xmlerror.pxi":344 * if isinstance(types, (int, long)): * types = (types,) * filtered = [entry for entry in self if entry.type in types] # <<<<<<<<<<<<<< * return _ListErrorLog(filtered, None, None) * */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { __pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 344, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 344, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 344, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -42504,29 +42619,29 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 340, __pyx_L1_error) + else __PYX_ERR(1, 344, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 340, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_entry, ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_8)); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->type); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_types, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 340, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_types, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 340, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 344, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_filtered = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":341 + /* "src/lxml/xmlerror.pxi":345 * types = (types,) * filtered = [entry for entry in self if entry.type in types] * return _ListErrorLog(filtered, None, None) # <<<<<<<<<<<<<< @@ -42534,7 +42649,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p * def filter_levels(self, levels): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 341, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_filtered); __Pyx_GIVEREF(__pyx_v_filtered); @@ -42545,14 +42660,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 341, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":331 + /* "src/lxml/xmlerror.pxi":335 * return _ListErrorLog(filtered, None, None) * * def filter_types(self, types): # <<<<<<<<<<<<<< @@ -42576,7 +42691,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_18filter_types(struct __p return __pyx_r; } -/* "src/lxml/xmlerror.pxi":343 +/* "src/lxml/xmlerror.pxi":347 * return _ListErrorLog(filtered, None, None) * * def filter_levels(self, levels): # <<<<<<<<<<<<<< @@ -42615,7 +42730,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ __Pyx_RefNannySetupContext("filter_levels", 0); __Pyx_INCREF(__pyx_v_levels); - /* "src/lxml/xmlerror.pxi":350 + /* "src/lxml/xmlerror.pxi":354 * """ * cdef _LogEntry entry * if isinstance(levels, (int, long)): # <<<<<<<<<<<<<< @@ -42636,14 +42751,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "src/lxml/xmlerror.pxi":351 + /* "src/lxml/xmlerror.pxi":355 * cdef _LogEntry entry * if isinstance(levels, (int, long)): * levels = (levels,) # <<<<<<<<<<<<<< * filtered = [entry for entry in self if entry.level in levels] * return _ListErrorLog(filtered, None, None) */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 351, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_levels); __Pyx_GIVEREF(__pyx_v_levels); @@ -42651,7 +42766,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ __Pyx_DECREF_SET(__pyx_v_levels, __pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":350 + /* "src/lxml/xmlerror.pxi":354 * """ * cdef _LogEntry entry * if isinstance(levels, (int, long)): # <<<<<<<<<<<<<< @@ -42660,39 +42775,39 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ */ } - /* "src/lxml/xmlerror.pxi":352 + /* "src/lxml/xmlerror.pxi":356 * if isinstance(levels, (int, long)): * levels = (levels,) * filtered = [entry for entry in self if entry.level in levels] # <<<<<<<<<<<<<< * return _ListErrorLog(filtered, None, None) * */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { __pyx_t_5 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 356, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 356, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 356, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif } @@ -42702,29 +42817,29 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 352, __pyx_L1_error) + else __PYX_ERR(1, 356, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_8); } - if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 352, __pyx_L1_error) + if (!(likely(((__pyx_t_8) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_8, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_entry, ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_8)); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->level); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_entry->level); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_levels, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 352, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_v_levels, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(1, 356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 352, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 356, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_filtered = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "src/lxml/xmlerror.pxi":353 + /* "src/lxml/xmlerror.pxi":357 * levels = (levels,) * filtered = [entry for entry in self if entry.level in levels] * return _ListErrorLog(filtered, None, None) # <<<<<<<<<<<<<< @@ -42732,7 +42847,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ * def filter_from_level(self, level): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 353, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_filtered); __Pyx_GIVEREF(__pyx_v_filtered); @@ -42743,14 +42858,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 353, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":343 + /* "src/lxml/xmlerror.pxi":347 * return _ListErrorLog(filtered, None, None) * * def filter_levels(self, levels): # <<<<<<<<<<<<<< @@ -42774,7 +42889,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_20filter_levels(struct __ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":355 +/* "src/lxml/xmlerror.pxi":359 * return _ListErrorLog(filtered, None, None) * * def filter_from_level(self, level): # <<<<<<<<<<<<<< @@ -42811,39 +42926,39 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc int __pyx_t_7; __Pyx_RefNannySetupContext("filter_from_level", 0); - /* "src/lxml/xmlerror.pxi":361 + /* "src/lxml/xmlerror.pxi":365 * """ * cdef _LogEntry entry * filtered = [entry for entry in self if entry.level >= level] # <<<<<<<<<<<<<< * return _ListErrorLog(filtered, None, None) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(((PyObject *)__pyx_v_self))) || PyTuple_CheckExact(((PyObject *)__pyx_v_self))) { __pyx_t_2 = ((PyObject *)__pyx_v_self); __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 365, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 365, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(1, 365, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -42853,30 +42968,30 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 361, __pyx_L1_error) + else __PYX_ERR(1, 365, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_5); } - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 361, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__LogEntry))))) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_entry, ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_entry->level); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_entry->level); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_level, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_v_level, Py_GE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 361, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 365, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_7) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 361, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_entry))) __PYX_ERR(1, 365, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_filtered = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":362 + /* "src/lxml/xmlerror.pxi":366 * cdef _LogEntry entry * filtered = [entry for entry in self if entry.level >= level] * return _ListErrorLog(filtered, None, None) # <<<<<<<<<<<<<< @@ -42884,7 +42999,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc * def filter_from_fatals(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 362, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_filtered); __Pyx_GIVEREF(__pyx_v_filtered); @@ -42895,14 +43010,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":355 + /* "src/lxml/xmlerror.pxi":359 * return _ListErrorLog(filtered, None, None) * * def filter_from_level(self, level): # <<<<<<<<<<<<<< @@ -42926,7 +43041,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_22filter_from_level(struc return __pyx_r; } -/* "src/lxml/xmlerror.pxi":364 +/* "src/lxml/xmlerror.pxi":368 * return _ListErrorLog(filtered, None, None) * * def filter_from_fatals(self): # <<<<<<<<<<<<<< @@ -42958,7 +43073,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("filter_from_fatals", 0); - /* "src/lxml/xmlerror.pxi":369 + /* "src/lxml/xmlerror.pxi":373 * Convenience method to get all fatal error messages. * """ * return self.filter_from_level(ErrorLevels.FATAL) # <<<<<<<<<<<<<< @@ -42966,11 +43081,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru * def filter_from_errors(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 369, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 369, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_FATAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 369, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_FATAL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -42986,14 +43101,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 369, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":364 + /* "src/lxml/xmlerror.pxi":368 * return _ListErrorLog(filtered, None, None) * * def filter_from_fatals(self): # <<<<<<<<<<<<<< @@ -43015,7 +43130,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_24filter_from_fatals(stru return __pyx_r; } -/* "src/lxml/xmlerror.pxi":371 +/* "src/lxml/xmlerror.pxi":375 * return self.filter_from_level(ErrorLevels.FATAL) * * def filter_from_errors(self): # <<<<<<<<<<<<<< @@ -43047,7 +43162,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("filter_from_errors", 0); - /* "src/lxml/xmlerror.pxi":376 + /* "src/lxml/xmlerror.pxi":380 * Convenience method to get all error messages or worse. * """ * return self.filter_from_level(ErrorLevels.ERROR) # <<<<<<<<<<<<<< @@ -43055,11 +43170,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru * def filter_from_warnings(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 376, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 376, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43075,14 +43190,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 376, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":371 + /* "src/lxml/xmlerror.pxi":375 * return self.filter_from_level(ErrorLevels.FATAL) * * def filter_from_errors(self): # <<<<<<<<<<<<<< @@ -43104,7 +43219,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_26filter_from_errors(stru return __pyx_r; } -/* "src/lxml/xmlerror.pxi":378 +/* "src/lxml/xmlerror.pxi":382 * return self.filter_from_level(ErrorLevels.ERROR) * * def filter_from_warnings(self): # <<<<<<<<<<<<<< @@ -43136,7 +43251,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("filter_from_warnings", 0); - /* "src/lxml/xmlerror.pxi":383 + /* "src/lxml/xmlerror.pxi":387 * Convenience method to get all warnings or worse. * """ * return self.filter_from_level(ErrorLevels.WARNING) # <<<<<<<<<<<<<< @@ -43144,11 +43259,11 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 383, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_filter_from_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 383, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 383, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -43164,14 +43279,14 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 383, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":378 + /* "src/lxml/xmlerror.pxi":382 * return self.filter_from_level(ErrorLevels.ERROR) * * def filter_from_warnings(self): # <<<<<<<<<<<<<< @@ -43193,7 +43308,7 @@ static PyObject *__pyx_pf_4lxml_5etree_13_ListErrorLog_28filter_from_warnings(st return __pyx_r; } -/* "src/lxml/xmlerror.pxi":400 +/* "src/lxml/xmlerror.pxi":404 * cdef _BaseErrorLog old_xslt_error_log * * cdef int push_error_log(self, _BaseErrorLog log) except -1: # <<<<<<<<<<<<<< @@ -43207,7 +43322,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("push_error_log", 0); - /* "src/lxml/xmlerror.pxi":401 + /* "src/lxml/xmlerror.pxi":405 * * cdef int push_error_log(self, _BaseErrorLog log) except -1: * self.old_error_func = xmlerror.xmlStructuredError # <<<<<<<<<<<<<< @@ -43216,7 +43331,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ __pyx_v_self->old_error_func = xmlStructuredError; - /* "src/lxml/xmlerror.pxi":402 + /* "src/lxml/xmlerror.pxi":406 * cdef int push_error_log(self, _BaseErrorLog log) except -1: * self.old_error_func = xmlerror.xmlStructuredError * self.old_error_context = xmlerror.xmlStructuredErrorContext # <<<<<<<<<<<<<< @@ -43225,7 +43340,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ __pyx_v_self->old_error_context = xmlStructuredErrorContext; - /* "src/lxml/xmlerror.pxi":403 + /* "src/lxml/xmlerror.pxi":407 * self.old_error_func = xmlerror.xmlStructuredError * self.old_error_context = xmlerror.xmlStructuredErrorContext * xmlerror.xmlSetStructuredErrorFunc( # <<<<<<<<<<<<<< @@ -43234,7 +43349,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ xmlSetStructuredErrorFunc(((void *)__pyx_v_log), ((xmlStructuredErrorFunc)__pyx_f_4lxml_5etree__receiveError)); - /* "src/lxml/xmlerror.pxi":407 + /* "src/lxml/xmlerror.pxi":411 * * # xslt.xsltSetGenericErrorFunc() is not thread-local => keep error log in TLS * self.old_xslt_error_func = xslt.xsltGenericError # <<<<<<<<<<<<<< @@ -43243,7 +43358,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ __pyx_v_self->old_xslt_error_func = xsltGenericError; - /* "src/lxml/xmlerror.pxi":408 + /* "src/lxml/xmlerror.pxi":412 * # xslt.xsltSetGenericErrorFunc() is not thread-local => keep error log in TLS * self.old_xslt_error_func = xslt.xsltGenericError * self.old_xslt_error_context = xslt.xsltGenericErrorContext # <<<<<<<<<<<<<< @@ -43252,14 +43367,14 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ __pyx_v_self->old_xslt_error_context = xsltGenericErrorContext; - /* "src/lxml/xmlerror.pxi":409 + /* "src/lxml/xmlerror.pxi":413 * self.old_xslt_error_func = xslt.xsltGenericError * self.old_xslt_error_context = xslt.xsltGenericErrorContext * self.old_xslt_error_log = _getThreadErrorLog(XSLT_ERROR_LOG) # <<<<<<<<<<<<<< * _setThreadErrorLog(XSLT_ERROR_LOG, log) * xslt.xsltSetGenericErrorFunc( */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_XSLTErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 409, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_XSLTErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->old_xslt_error_log); @@ -43267,18 +43382,18 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o __pyx_v_self->old_xslt_error_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":410 + /* "src/lxml/xmlerror.pxi":414 * self.old_xslt_error_context = xslt.xsltGenericErrorContext * self.old_xslt_error_log = _getThreadErrorLog(XSLT_ERROR_LOG) * _setThreadErrorLog(XSLT_ERROR_LOG, log) # <<<<<<<<<<<<<< * xslt.xsltSetGenericErrorFunc( * NULL, _receiveXSLTError) */ - __pyx_t_1 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_XSLTErrorLog, __pyx_v_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 410, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_XSLTErrorLog, __pyx_v_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 414, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":411 + /* "src/lxml/xmlerror.pxi":415 * self.old_xslt_error_log = _getThreadErrorLog(XSLT_ERROR_LOG) * _setThreadErrorLog(XSLT_ERROR_LOG, log) * xslt.xsltSetGenericErrorFunc( # <<<<<<<<<<<<<< @@ -43287,7 +43402,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o */ xsltSetGenericErrorFunc(NULL, ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError)); - /* "src/lxml/xmlerror.pxi":413 + /* "src/lxml/xmlerror.pxi":417 * xslt.xsltSetGenericErrorFunc( * NULL, _receiveXSLTError) * return 0 # <<<<<<<<<<<<<< @@ -43297,7 +43412,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":400 + /* "src/lxml/xmlerror.pxi":404 * cdef _BaseErrorLog old_xslt_error_log * * cdef int push_error_log(self, _BaseErrorLog log) except -1: # <<<<<<<<<<<<<< @@ -43315,7 +43430,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(struct __pyx_o return __pyx_r; } -/* "src/lxml/xmlerror.pxi":415 +/* "src/lxml/xmlerror.pxi":419 * return 0 * * cdef int pop_error_log(self) except -1: # <<<<<<<<<<<<<< @@ -43330,7 +43445,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("pop_error_log", 0); - /* "src/lxml/xmlerror.pxi":416 + /* "src/lxml/xmlerror.pxi":420 * * cdef int pop_error_log(self) except -1: * xmlerror.xmlSetStructuredErrorFunc( # <<<<<<<<<<<<<< @@ -43339,7 +43454,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob */ xmlSetStructuredErrorFunc(__pyx_v_self->old_error_context, __pyx_v_self->old_error_func); - /* "src/lxml/xmlerror.pxi":418 + /* "src/lxml/xmlerror.pxi":422 * xmlerror.xmlSetStructuredErrorFunc( * self.old_error_context, self.old_error_func) * xslt.xsltSetGenericErrorFunc( # <<<<<<<<<<<<<< @@ -43348,7 +43463,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob */ xsltSetGenericErrorFunc(__pyx_v_self->old_xslt_error_context, __pyx_v_self->old_xslt_error_func); - /* "src/lxml/xmlerror.pxi":420 + /* "src/lxml/xmlerror.pxi":424 * xslt.xsltSetGenericErrorFunc( * self.old_xslt_error_context, self.old_xslt_error_func) * _setThreadErrorLog(XSLT_ERROR_LOG, self.old_xslt_error_log) # <<<<<<<<<<<<<< @@ -43357,12 +43472,12 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob */ __pyx_t_1 = ((PyObject *)__pyx_v_self->old_xslt_error_log); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_XSLTErrorLog, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 420, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_XSLTErrorLog, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":421 + /* "src/lxml/xmlerror.pxi":425 * self.old_xslt_error_context, self.old_xslt_error_func) * _setThreadErrorLog(XSLT_ERROR_LOG, self.old_xslt_error_log) * self.old_xslt_error_log= None # <<<<<<<<<<<<<< @@ -43375,7 +43490,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob __Pyx_DECREF(((PyObject *)__pyx_v_self->old_xslt_error_log)); __pyx_v_self->old_xslt_error_log = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)Py_None); - /* "src/lxml/xmlerror.pxi":422 + /* "src/lxml/xmlerror.pxi":426 * _setThreadErrorLog(XSLT_ERROR_LOG, self.old_xslt_error_log) * self.old_xslt_error_log= None * return 0 # <<<<<<<<<<<<<< @@ -43385,7 +43500,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":415 + /* "src/lxml/xmlerror.pxi":419 * return 0 * * cdef int pop_error_log(self) except -1: # <<<<<<<<<<<<<< @@ -43404,7 +43519,7 @@ static int __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(struct __pyx_ob return __pyx_r; } -/* "src/lxml/xmlerror.pxi":427 +/* "src/lxml/xmlerror.pxi":431 * cdef class _ErrorLog(_ListErrorLog): * cdef list _logContexts * def __cinit__(self): # <<<<<<<<<<<<<< @@ -43434,14 +43549,14 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5et PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "src/lxml/xmlerror.pxi":428 + /* "src/lxml/xmlerror.pxi":432 * cdef list _logContexts * def __cinit__(self): * self._logContexts = [] # <<<<<<<<<<<<<< * * def __init__(self): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 428, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_logContexts); @@ -43449,7 +43564,7 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5et __pyx_v_self->_logContexts = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":427 + /* "src/lxml/xmlerror.pxi":431 * cdef class _ErrorLog(_ListErrorLog): * cdef list _logContexts * def __cinit__(self): # <<<<<<<<<<<<<< @@ -43469,7 +43584,7 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog___cinit__(struct __pyx_obj_4lxml_5et return __pyx_r; } -/* "src/lxml/xmlerror.pxi":430 +/* "src/lxml/xmlerror.pxi":434 * self._logContexts = [] * * def __init__(self): # <<<<<<<<<<<<<< @@ -43504,16 +43619,16 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "src/lxml/xmlerror.pxi":431 + /* "src/lxml/xmlerror.pxi":435 * * def __init__(self): * _ListErrorLog.__init__(self, [], None, None) # <<<<<<<<<<<<<< * * @cython.final */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -43530,7 +43645,7 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_t_3, Py_None, Py_None}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -43539,14 +43654,14 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[5] = {__pyx_t_4, ((PyObject *)__pyx_v_self), __pyx_t_3, Py_None, Py_None}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 4+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -43563,14 +43678,14 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, Py_None); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":430 + /* "src/lxml/xmlerror.pxi":434 * self._logContexts = [] * * def __init__(self): # <<<<<<<<<<<<<< @@ -43594,7 +43709,7 @@ static int __pyx_pf_4lxml_5etree_9_ErrorLog_2__init__(struct __pyx_obj_4lxml_5et return __pyx_r; } -/* "src/lxml/xmlerror.pxi":434 +/* "src/lxml/xmlerror.pxi":438 * * @cython.final * cdef int __enter__(self) except -1: # <<<<<<<<<<<<<< @@ -43608,18 +43723,18 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etr int __pyx_t_1; __Pyx_RefNannySetupContext("__enter__", 0); - /* "src/lxml/xmlerror.pxi":435 + /* "src/lxml/xmlerror.pxi":439 * @cython.final * cdef int __enter__(self) except -1: * return self.connect() # <<<<<<<<<<<<<< * * def __exit__(self, *args): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_connect(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 435, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_connect(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 439, __pyx_L1_error) __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":434 + /* "src/lxml/xmlerror.pxi":438 * * @cython.final * cdef int __enter__(self) except -1: # <<<<<<<<<<<<<< @@ -43636,7 +43751,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog___enter__(struct __pyx_obj_4lxml_5etr return __pyx_r; } -/* "src/lxml/xmlerror.pxi":437 +/* "src/lxml/xmlerror.pxi":441 * return self.connect() * * def __exit__(self, *args): # <<<<<<<<<<<<<< @@ -43669,16 +43784,16 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lx int __pyx_t_1; __Pyx_RefNannySetupContext("__exit__", 0); - /* "src/lxml/xmlerror.pxi":439 + /* "src/lxml/xmlerror.pxi":443 * def __exit__(self, *args): * # TODO: make this a cdef function when Cython supports it * self.disconnect() # <<<<<<<<<<<<<< * * @cython.final */ - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 439, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(1, 443, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":437 + /* "src/lxml/xmlerror.pxi":441 * return self.connect() * * def __exit__(self, *args): # <<<<<<<<<<<<<< @@ -43698,7 +43813,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_4__exit__(struct __pyx_obj_4lx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":442 +/* "src/lxml/xmlerror.pxi":446 * * @cython.final * cdef int connect(self) except -1: # <<<<<<<<<<<<<< @@ -43715,7 +43830,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree int __pyx_t_3; __Pyx_RefNannySetupContext("connect", 0); - /* "src/lxml/xmlerror.pxi":443 + /* "src/lxml/xmlerror.pxi":447 * @cython.final * cdef int connect(self) except -1: * self._first_error = None # <<<<<<<<<<<<<< @@ -43728,7 +43843,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._first_error)); __pyx_v_self->__pyx_base.__pyx_base._first_error = ((struct __pyx_obj_4lxml_5etree__LogEntry *)Py_None); - /* "src/lxml/xmlerror.pxi":444 + /* "src/lxml/xmlerror.pxi":448 * cdef int connect(self) except -1: * self._first_error = None * del self._entries[:] # <<<<<<<<<<<<<< @@ -43737,32 +43852,32 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree */ if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 444, __pyx_L1_error) + __PYX_ERR(1, 448, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base._entries, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 444, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base._entries, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 448, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":446 + /* "src/lxml/xmlerror.pxi":450 * del self._entries[:] * * cdef _ErrorLogContext context = _ErrorLogContext.__new__(_ErrorLogContext) # <<<<<<<<<<<<<< * context.push_error_log(self) * self._logContexts.append(context) */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ErrorLogContext(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ErrorLogContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 446, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_5etree__ErrorLogContext(((PyTypeObject *)__pyx_ptype_4lxml_5etree__ErrorLogContext), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 450, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ErrorLogContext *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":447 + /* "src/lxml/xmlerror.pxi":451 * * cdef _ErrorLogContext context = _ErrorLogContext.__new__(_ErrorLogContext) * context.push_error_log(self) # <<<<<<<<<<<<<< * self._logContexts.append(context) * return 0 */ - __pyx_t_2 = __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 447, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log(__pyx_v_context, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 451, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":448 + /* "src/lxml/xmlerror.pxi":452 * cdef _ErrorLogContext context = _ErrorLogContext.__new__(_ErrorLogContext) * context.push_error_log(self) * self._logContexts.append(context) # <<<<<<<<<<<<<< @@ -43771,11 +43886,11 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree */ if (unlikely(__pyx_v_self->_logContexts == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(1, 448, __pyx_L1_error) + __PYX_ERR(1, 452, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_self->_logContexts, ((PyObject *)__pyx_v_context)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 448, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_self->_logContexts, ((PyObject *)__pyx_v_context)); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(1, 452, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":449 + /* "src/lxml/xmlerror.pxi":453 * context.push_error_log(self) * self._logContexts.append(context) * return 0 # <<<<<<<<<<<<<< @@ -43785,7 +43900,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":442 + /* "src/lxml/xmlerror.pxi":446 * * @cython.final * cdef int connect(self) except -1: # <<<<<<<<<<<<<< @@ -43804,7 +43919,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_connect(struct __pyx_obj_4lxml_5etree return __pyx_r; } -/* "src/lxml/xmlerror.pxi":452 +/* "src/lxml/xmlerror.pxi":456 * * @cython.final * cdef int disconnect(self) except -1: # <<<<<<<<<<<<<< @@ -43820,7 +43935,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et int __pyx_t_2; __Pyx_RefNannySetupContext("disconnect", 0); - /* "src/lxml/xmlerror.pxi":453 + /* "src/lxml/xmlerror.pxi":457 * @cython.final * cdef int disconnect(self) except -1: * cdef _ErrorLogContext context = self._logContexts.pop() # <<<<<<<<<<<<<< @@ -43829,24 +43944,24 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et */ if (unlikely(__pyx_v_self->_logContexts == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(1, 453, __pyx_L1_error) + __PYX_ERR(1, 457, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_logContexts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 453, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_Pop(__pyx_v_self->_logContexts); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ErrorLogContext))))) __PYX_ERR(1, 453, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ErrorLogContext))))) __PYX_ERR(1, 457, __pyx_L1_error) __pyx_v_context = ((struct __pyx_obj_4lxml_5etree__ErrorLogContext *)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":454 + /* "src/lxml/xmlerror.pxi":458 * cdef int disconnect(self) except -1: * cdef _ErrorLogContext context = self._logContexts.pop() * context.pop_error_log() # <<<<<<<<<<<<<< * return 0 * */ - __pyx_t_2 = __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(__pyx_v_context); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 454, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log(__pyx_v_context); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(1, 458, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":455 + /* "src/lxml/xmlerror.pxi":459 * cdef _ErrorLogContext context = self._logContexts.pop() * context.pop_error_log() * return 0 # <<<<<<<<<<<<<< @@ -43856,7 +43971,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et __pyx_r = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":452 + /* "src/lxml/xmlerror.pxi":456 * * @cython.final * cdef int disconnect(self) except -1: # <<<<<<<<<<<<<< @@ -43875,7 +43990,7 @@ static int __pyx_f_4lxml_5etree_9_ErrorLog_disconnect(struct __pyx_obj_4lxml_5et return __pyx_r; } -/* "src/lxml/xmlerror.pxi":457 +/* "src/lxml/xmlerror.pxi":461 * return 0 * * cpdef clear(self): # <<<<<<<<<<<<<< @@ -43896,12 +44011,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 457, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_9_ErrorLog_7clear)) { __Pyx_XDECREF(__pyx_r); @@ -43918,7 +44033,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 457, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -43926,7 +44041,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -43934,12 +44049,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":458 + /* "src/lxml/xmlerror.pxi":462 * * cpdef clear(self): * self._first_error = None # <<<<<<<<<<<<<< @@ -43952,7 +44067,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._first_error)); __pyx_v_self->__pyx_base.__pyx_base._first_error = ((struct __pyx_obj_4lxml_5etree__LogEntry *)Py_None); - /* "src/lxml/xmlerror.pxi":459 + /* "src/lxml/xmlerror.pxi":463 * cpdef clear(self): * self._first_error = None * self.last_error = None # <<<<<<<<<<<<<< @@ -43965,7 +44080,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e __Pyx_DECREF(__pyx_v_self->__pyx_base.__pyx_base.last_error); __pyx_v_self->__pyx_base.__pyx_base.last_error = Py_None; - /* "src/lxml/xmlerror.pxi":460 + /* "src/lxml/xmlerror.pxi":464 * self._first_error = None * self.last_error = None * self._offset = 0 # <<<<<<<<<<<<<< @@ -43974,7 +44089,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e */ __pyx_v_self->__pyx_base._offset = 0; - /* "src/lxml/xmlerror.pxi":461 + /* "src/lxml/xmlerror.pxi":465 * self.last_error = None * self._offset = 0 * del self._entries[:] # <<<<<<<<<<<<<< @@ -43983,11 +44098,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_clear(struct __pyx_obj_4lxml_5e */ if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 461, __pyx_L1_error) + __PYX_ERR(1, 465, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base._entries, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 461, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base._entries, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(1, 465, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":457 + /* "src/lxml/xmlerror.pxi":461 * return 0 * * cpdef clear(self): # <<<<<<<<<<<<<< @@ -44031,7 +44146,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_6clear(struct __pyx_obj_4lxml_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("clear", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_clear(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 457, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_clear(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44048,7 +44163,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_6clear(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":463 +/* "src/lxml/xmlerror.pxi":467 * del self._entries[:] * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -44069,12 +44184,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_9_ErrorLog_9copy)) { __Pyx_XDECREF(__pyx_r); @@ -44091,7 +44206,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 463, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -44099,7 +44214,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -44107,12 +44222,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":466 + /* "src/lxml/xmlerror.pxi":470 * u"""Creates a shallow copy of this error log and the list of entries. * """ * return _ListErrorLog( # <<<<<<<<<<<<<< @@ -44121,7 +44236,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et */ __Pyx_XDECREF(__pyx_r); - /* "src/lxml/xmlerror.pxi":467 + /* "src/lxml/xmlerror.pxi":471 * """ * return _ListErrorLog( * self._entries[self._offset:], # <<<<<<<<<<<<<< @@ -44130,19 +44245,19 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et */ if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 467, __pyx_L1_error) + __PYX_ERR(1, 471, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_self->__pyx_base._entries, __pyx_v_self->__pyx_base._offset, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_self->__pyx_base._entries, __pyx_v_self->__pyx_base._offset, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "src/lxml/xmlerror.pxi":466 + /* "src/lxml/xmlerror.pxi":470 * u"""Creates a shallow copy of this error log and the list of entries. * """ * return _ListErrorLog( # <<<<<<<<<<<<<< * self._entries[self._offset:], * self._first_error, self.last_error) */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 466, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -44153,14 +44268,14 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_copy(struct __pyx_obj_4lxml_5et __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.last_error); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_self->__pyx_base.__pyx_base.last_error); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 466, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":463 + /* "src/lxml/xmlerror.pxi":467 * del self._entries[:] * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -44203,7 +44318,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_8copy(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 463, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44220,7 +44335,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_8copy(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "src/lxml/xmlerror.pxi":470 +/* "src/lxml/xmlerror.pxi":474 * self._first_error, self.last_error) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -44248,7 +44363,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - /* "src/lxml/xmlerror.pxi":471 + /* "src/lxml/xmlerror.pxi":475 * * def __iter__(self): * return iter(self._entries[self._offset:]) # <<<<<<<<<<<<<< @@ -44258,18 +44373,18 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 471, __pyx_L1_error) + __PYX_ERR(1, 475, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_self->__pyx_base._entries, __pyx_v_self->__pyx_base._offset, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 471, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_self->__pyx_base._entries, __pyx_v_self->__pyx_base._offset, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 471, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":470 + /* "src/lxml/xmlerror.pxi":474 * self._first_error, self.last_error) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -44289,7 +44404,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_10__iter__(struct __pyx_obj_4l return __pyx_r; } -/* "src/lxml/xmlerror.pxi":473 +/* "src/lxml/xmlerror.pxi":477 * return iter(self._entries[self._offset:]) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -44314,12 +44429,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_9_ErrorLog_13receive)) { __Pyx_XDECREF(__pyx_r); @@ -44336,7 +44451,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_entry)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 473, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -44344,7 +44459,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -44352,12 +44467,12 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":474 + /* "src/lxml/xmlerror.pxi":478 * * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: # <<<<<<<<<<<<<< @@ -44376,7 +44491,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ __pyx_L4_bool_binop_done:; if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":475 + /* "src/lxml/xmlerror.pxi":479 * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry # <<<<<<<<<<<<<< @@ -44389,7 +44504,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._first_error)); __pyx_v_self->__pyx_base.__pyx_base._first_error = __pyx_v_entry; - /* "src/lxml/xmlerror.pxi":474 + /* "src/lxml/xmlerror.pxi":478 * * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: # <<<<<<<<<<<<<< @@ -44398,7 +44513,7 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ */ } - /* "src/lxml/xmlerror.pxi":476 + /* "src/lxml/xmlerror.pxi":480 * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry * self._entries.append(entry) # <<<<<<<<<<<<<< @@ -44407,11 +44522,11 @@ static PyObject *__pyx_f_4lxml_5etree_9_ErrorLog_receive(struct __pyx_obj_4lxml_ */ if (unlikely(__pyx_v_self->__pyx_base._entries == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(1, 476, __pyx_L1_error) + __PYX_ERR(1, 480, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 476, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 480, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":473 + /* "src/lxml/xmlerror.pxi":477 * return iter(self._entries[self._offset:]) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -44442,7 +44557,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9_ErrorLog_13receive(PyObject *__pyx_v_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("receive (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 473, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 477, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_9_ErrorLog_12receive(((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_v_entry)); /* function exit code */ @@ -44460,7 +44575,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_12receive(struct __pyx_obj_4lx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("receive", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_ErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44477,7 +44592,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9_ErrorLog_12receive(struct __pyx_obj_4lx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":479 +/* "src/lxml/xmlerror.pxi":483 * * cdef class _DomainErrorLog(_ErrorLog): * def __init__(self, domains): # <<<<<<<<<<<<<< @@ -44511,7 +44626,7 @@ static int __pyx_pw_4lxml_5etree_15_DomainErrorLog_1__init__(PyObject *__pyx_v_s else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 479, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 483, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -44522,7 +44637,7 @@ static int __pyx_pw_4lxml_5etree_15_DomainErrorLog_1__init__(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 479, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 483, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._DomainErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -44543,14 +44658,14 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "src/lxml/xmlerror.pxi":480 + /* "src/lxml/xmlerror.pxi":484 * cdef class _DomainErrorLog(_ErrorLog): * def __init__(self, domains): * _ErrorLog.__init__(self) # <<<<<<<<<<<<<< * self._accepted_domains = tuple(domains) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 480, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -44564,24 +44679,24 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 480, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":481 + /* "src/lxml/xmlerror.pxi":485 * def __init__(self, domains): * _ErrorLog.__init__(self) * self._accepted_domains = tuple(domains) # <<<<<<<<<<<<<< * * cpdef receive(self, _LogEntry entry): */ - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_domains); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 481, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_v_domains); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accepted_domains, __pyx_t_1) < 0) __PYX_ERR(1, 481, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accepted_domains, __pyx_t_1) < 0) __PYX_ERR(1, 485, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":479 + /* "src/lxml/xmlerror.pxi":483 * * cdef class _DomainErrorLog(_ErrorLog): * def __init__(self, domains): # <<<<<<<<<<<<<< @@ -44603,7 +44718,7 @@ static int __pyx_pf_4lxml_5etree_15_DomainErrorLog___init__(struct __pyx_obj_4lx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":483 +/* "src/lxml/xmlerror.pxi":487 * self._accepted_domains = tuple(domains) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -44626,12 +44741,12 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive)) { __Pyx_XDECREF(__pyx_r); @@ -44648,7 +44763,7 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_entry)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 483, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -44656,7 +44771,7 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -44664,40 +44779,40 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":484 + /* "src/lxml/xmlerror.pxi":488 * * cpdef receive(self, _LogEntry entry): * if entry.domain in self._accepted_domains: # <<<<<<<<<<<<<< * _ErrorLog.receive(self, entry) * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_entry->domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 484, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_entry->domain); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accepted_domains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 484, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_accepted_domains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 484, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(1, 488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "src/lxml/xmlerror.pxi":485 + /* "src/lxml/xmlerror.pxi":489 * cpdef receive(self, _LogEntry entry): * if entry.domain in self._accepted_domains: * _ErrorLog.receive(self, entry) # <<<<<<<<<<<<<< * * cdef class _RotatingErrorLog(_ErrorLog): */ - __pyx_t_2 = __pyx_f_4lxml_5etree_9_ErrorLog_receive(((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_v_self), __pyx_v_entry, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 485, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_9_ErrorLog_receive(((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_v_self), __pyx_v_entry, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":484 + /* "src/lxml/xmlerror.pxi":488 * * cpdef receive(self, _LogEntry entry): * if entry.domain in self._accepted_domains: # <<<<<<<<<<<<<< @@ -44706,7 +44821,7 @@ static PyObject *__pyx_f_4lxml_5etree_15_DomainErrorLog_receive(struct __pyx_obj */ } - /* "src/lxml/xmlerror.pxi":483 + /* "src/lxml/xmlerror.pxi":487 * self._accepted_domains = tuple(domains) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -44737,7 +44852,7 @@ static PyObject *__pyx_pw_4lxml_5etree_15_DomainErrorLog_3receive(PyObject *__py PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("receive (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 483, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 487, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_15_DomainErrorLog_2receive(((struct __pyx_obj_4lxml_5etree__DomainErrorLog *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_v_entry)); /* function exit code */ @@ -44755,7 +44870,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DomainErrorLog_2receive(struct __pyx_o PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("receive", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_15_DomainErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 483, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_15_DomainErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44772,7 +44887,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DomainErrorLog_2receive(struct __pyx_o return __pyx_r; } -/* "src/lxml/xmlerror.pxi":489 +/* "src/lxml/xmlerror.pxi":493 * cdef class _RotatingErrorLog(_ErrorLog): * cdef int _max_len * def __init__(self, max_len): # <<<<<<<<<<<<<< @@ -44806,7 +44921,7 @@ static int __pyx_pw_4lxml_5etree_17_RotatingErrorLog_1__init__(PyObject *__pyx_v else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 489, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 493, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -44817,7 +44932,7 @@ static int __pyx_pw_4lxml_5etree_17_RotatingErrorLog_1__init__(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 489, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 493, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._RotatingErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -44839,14 +44954,14 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 int __pyx_t_4; __Pyx_RefNannySetupContext("__init__", 0); - /* "src/lxml/xmlerror.pxi":490 + /* "src/lxml/xmlerror.pxi":494 * cdef int _max_len * def __init__(self, max_len): * _ErrorLog.__init__(self) # <<<<<<<<<<<<<< * self._max_len = max_len * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 490, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -44860,22 +44975,22 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 490, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":491 + /* "src/lxml/xmlerror.pxi":495 * def __init__(self, max_len): * _ErrorLog.__init__(self) * self._max_len = max_len # <<<<<<<<<<<<<< * * cpdef receive(self, _LogEntry entry): */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_max_len); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 491, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_max_len); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 495, __pyx_L1_error) __pyx_v_self->_max_len = __pyx_t_4; - /* "src/lxml/xmlerror.pxi":489 + /* "src/lxml/xmlerror.pxi":493 * cdef class _RotatingErrorLog(_ErrorLog): * cdef int _max_len * def __init__(self, max_len): # <<<<<<<<<<<<<< @@ -44897,7 +45012,7 @@ static int __pyx_pf_4lxml_5etree_17_RotatingErrorLog___init__(struct __pyx_obj_4 return __pyx_r; } -/* "src/lxml/xmlerror.pxi":493 +/* "src/lxml/xmlerror.pxi":497 * self._max_len = max_len * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -44925,12 +45040,12 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive)) { __Pyx_XDECREF(__pyx_r); @@ -44947,7 +45062,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_entry)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_entry)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 493, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -44955,7 +45070,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -44963,12 +45078,12 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":494 + /* "src/lxml/xmlerror.pxi":498 * * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: # <<<<<<<<<<<<<< @@ -44987,7 +45102,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __pyx_L4_bool_binop_done:; if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":495 + /* "src/lxml/xmlerror.pxi":499 * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry # <<<<<<<<<<<<<< @@ -45000,7 +45115,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.__pyx_base._first_error)); __pyx_v_self->__pyx_base.__pyx_base.__pyx_base._first_error = __pyx_v_entry; - /* "src/lxml/xmlerror.pxi":494 + /* "src/lxml/xmlerror.pxi":498 * * cpdef receive(self, _LogEntry entry): * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: # <<<<<<<<<<<<<< @@ -45009,7 +45124,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ } - /* "src/lxml/xmlerror.pxi":496 + /* "src/lxml/xmlerror.pxi":500 * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry * self._entries.append(entry) # <<<<<<<<<<<<<< @@ -45018,11 +45133,11 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ if (unlikely(__pyx_v_self->__pyx_base.__pyx_base._entries == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(1, 496, __pyx_L1_error) + __PYX_ERR(1, 500, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 496, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_self->__pyx_base.__pyx_base._entries, ((PyObject *)__pyx_v_entry)); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(1, 500, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":498 + /* "src/lxml/xmlerror.pxi":502 * self._entries.append(entry) * * if len(self._entries) > self._max_len: # <<<<<<<<<<<<<< @@ -45033,14 +45148,14 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(1, 498, __pyx_L1_error) + __PYX_ERR(1, 502, __pyx_L1_error) } - __pyx_t_9 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 498, __pyx_L1_error) + __pyx_t_9 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(1, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((__pyx_t_9 > __pyx_v_self->_max_len) != 0); if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":499 + /* "src/lxml/xmlerror.pxi":503 * * if len(self._entries) > self._max_len: * self._offset += 1 # <<<<<<<<<<<<<< @@ -45049,7 +45164,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ __pyx_v_self->__pyx_base.__pyx_base._offset = (__pyx_v_self->__pyx_base.__pyx_base._offset + 1); - /* "src/lxml/xmlerror.pxi":500 + /* "src/lxml/xmlerror.pxi":504 * if len(self._entries) > self._max_len: * self._offset += 1 * if self._offset > self._max_len // 3: # <<<<<<<<<<<<<< @@ -45059,7 +45174,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __pyx_t_5 = ((__pyx_v_self->__pyx_base.__pyx_base._offset > __Pyx_div_long(__pyx_v_self->_max_len, 3)) != 0); if (__pyx_t_5) { - /* "src/lxml/xmlerror.pxi":501 + /* "src/lxml/xmlerror.pxi":505 * self._offset += 1 * if self._offset > self._max_len // 3: * offset = self._offset # <<<<<<<<<<<<<< @@ -45069,7 +45184,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o __pyx_t_10 = __pyx_v_self->__pyx_base.__pyx_base._offset; __pyx_v_offset = __pyx_t_10; - /* "src/lxml/xmlerror.pxi":502 + /* "src/lxml/xmlerror.pxi":506 * if self._offset > self._max_len // 3: * offset = self._offset * self._offset = 0 # <<<<<<<<<<<<<< @@ -45078,7 +45193,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ __pyx_v_self->__pyx_base.__pyx_base._offset = 0; - /* "src/lxml/xmlerror.pxi":503 + /* "src/lxml/xmlerror.pxi":507 * offset = self._offset * self._offset = 0 * del self._entries[:offset] # <<<<<<<<<<<<<< @@ -45087,11 +45202,11 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ if (unlikely(__pyx_v_self->__pyx_base.__pyx_base._entries == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(1, 503, __pyx_L1_error) + __PYX_ERR(1, 507, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base.__pyx_base._entries, 0, __pyx_v_offset, NULL, NULL, NULL, 0, 1, 1) < 0) __PYX_ERR(1, 503, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->__pyx_base.__pyx_base._entries, 0, __pyx_v_offset, NULL, NULL, NULL, 0, 1, 1) < 0) __PYX_ERR(1, 507, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":500 + /* "src/lxml/xmlerror.pxi":504 * if len(self._entries) > self._max_len: * self._offset += 1 * if self._offset > self._max_len // 3: # <<<<<<<<<<<<<< @@ -45100,7 +45215,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ } - /* "src/lxml/xmlerror.pxi":498 + /* "src/lxml/xmlerror.pxi":502 * self._entries.append(entry) * * if len(self._entries) > self._max_len: # <<<<<<<<<<<<<< @@ -45109,7 +45224,7 @@ static PyObject *__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(struct __pyx_o */ } - /* "src/lxml/xmlerror.pxi":493 + /* "src/lxml/xmlerror.pxi":497 * self._max_len = max_len * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< @@ -45140,7 +45255,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17_RotatingErrorLog_3receive(PyObject *__ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("receive (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 493, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "entry", 0))) __PYX_ERR(1, 497, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_17_RotatingErrorLog_2receive(((struct __pyx_obj_4lxml_5etree__RotatingErrorLog *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_v_entry)); /* function exit code */ @@ -45158,7 +45273,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_RotatingErrorLog_2receive(struct __pyx PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("receive", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_17_RotatingErrorLog_receive(__pyx_v_self, __pyx_v_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45175,7 +45290,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_RotatingErrorLog_2receive(struct __pyx return __pyx_r; } -/* "src/lxml/xmlerror.pxi":528 +/* "src/lxml/xmlerror.pxi":532 * cdef object _map_level * cdef object _log * def __init__(self, logger_name=None, logger=None): # <<<<<<<<<<<<<< @@ -45222,7 +45337,7 @@ static int __pyx_pw_4lxml_5etree_10PyErrorLog_1__init__(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 528, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(1, 532, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -45239,7 +45354,7 @@ static int __pyx_pw_4lxml_5etree_10PyErrorLog_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 528, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 532, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.PyErrorLog.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -45266,14 +45381,14 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_logger); - /* "src/lxml/xmlerror.pxi":529 + /* "src/lxml/xmlerror.pxi":533 * cdef object _log * def __init__(self, logger_name=None, logger=None): * _BaseErrorLog.__init__(self, None, None) # <<<<<<<<<<<<<< * import logging * self.level_map = { */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -45290,7 +45405,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), Py_None, Py_None}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -45298,13 +45413,13 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), Py_None, Py_None}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -45318,82 +45433,82 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, Py_None); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 529, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":530 + /* "src/lxml/xmlerror.pxi":534 * def __init__(self, logger_name=None, logger=None): * _BaseErrorLog.__init__(self, None, None) * import logging # <<<<<<<<<<<<<< * self.level_map = { * ErrorLevels.WARNING : logging.WARNING, */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 530, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_logging = __pyx_t_1; __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":532 + /* "src/lxml/xmlerror.pxi":536 * import logging * self.level_map = { * ErrorLevels.WARNING : logging.WARNING, # <<<<<<<<<<<<<< * ErrorLevels.ERROR : logging.ERROR, * ErrorLevels.FATAL : logging.CRITICAL */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 532, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 532, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 532, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 532, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_WARNING); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":533 + /* "src/lxml/xmlerror.pxi":537 * self.level_map = { * ErrorLevels.WARNING : logging.WARNING, * ErrorLevels.ERROR : logging.ERROR, # <<<<<<<<<<<<<< * ErrorLevels.FATAL : logging.CRITICAL * } */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 533, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 533, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_ERROR); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":534 + /* "src/lxml/xmlerror.pxi":538 * ErrorLevels.WARNING : logging.WARNING, * ErrorLevels.ERROR : logging.ERROR, * ErrorLevels.FATAL : logging.CRITICAL # <<<<<<<<<<<<<< * } * self._map_level = self.level_map.get */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FATAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 534, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_FATAL); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_CRITICAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 534, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_CRITICAL); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 532, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, __pyx_t_2) < 0) __PYX_ERR(1, 536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":531 + /* "src/lxml/xmlerror.pxi":535 * _BaseErrorLog.__init__(self, None, None) * import logging * self.level_map = { # <<<<<<<<<<<<<< @@ -45406,14 +45521,14 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __pyx_v_self->level_map = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":536 + /* "src/lxml/xmlerror.pxi":540 * ErrorLevels.FATAL : logging.CRITICAL * } * self._map_level = self.level_map.get # <<<<<<<<<<<<<< * if logger is None: * if logger_name: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->level_map, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 536, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->level_map, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_map_level); @@ -45421,7 +45536,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __pyx_v_self->_map_level = __pyx_t_1; __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":537 + /* "src/lxml/xmlerror.pxi":541 * } * self._map_level = self.level_map.get * if logger is None: # <<<<<<<<<<<<<< @@ -45432,24 +45547,24 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "src/lxml/xmlerror.pxi":538 + /* "src/lxml/xmlerror.pxi":542 * self._map_level = self.level_map.get * if logger is None: * if logger_name: # <<<<<<<<<<<<<< * logger = logging.getLogger(logger_name) * else: */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_logger_name); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 538, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_logger_name); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(1, 542, __pyx_L1_error) if (__pyx_t_7) { - /* "src/lxml/xmlerror.pxi":539 + /* "src/lxml/xmlerror.pxi":543 * if logger is None: * if logger_name: * logger = logging.getLogger(logger_name) # <<<<<<<<<<<<<< * else: * logger = logging.getLogger() */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -45463,13 +45578,13 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_v_logger_name) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_logger_name); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 539, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_logger, __pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":538 + /* "src/lxml/xmlerror.pxi":542 * self._map_level = self.level_map.get * if logger is None: * if logger_name: # <<<<<<<<<<<<<< @@ -45479,7 +45594,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e goto __pyx_L4; } - /* "src/lxml/xmlerror.pxi":541 + /* "src/lxml/xmlerror.pxi":545 * logger = logging.getLogger(logger_name) * else: * logger = logging.getLogger() # <<<<<<<<<<<<<< @@ -45487,7 +45602,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e * */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 541, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_logging, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -45501,7 +45616,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 541, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_logger, __pyx_t_1); @@ -45509,7 +45624,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e } __pyx_L4:; - /* "src/lxml/xmlerror.pxi":537 + /* "src/lxml/xmlerror.pxi":541 * } * self._map_level = self.level_map.get * if logger is None: # <<<<<<<<<<<<<< @@ -45518,14 +45633,14 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e */ } - /* "src/lxml/xmlerror.pxi":542 + /* "src/lxml/xmlerror.pxi":546 * else: * logger = logging.getLogger() * self._log = logger.log # <<<<<<<<<<<<<< * * cpdef copy(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_logger, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 542, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_logger, __pyx_n_s_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_log); @@ -45533,7 +45648,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e __pyx_v_self->_log = __pyx_t_1; __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":528 + /* "src/lxml/xmlerror.pxi":532 * cdef object _map_level * cdef object _log * def __init__(self, logger_name=None, logger=None): # <<<<<<<<<<<<<< @@ -45558,7 +45673,7 @@ static int __pyx_pf_4lxml_5etree_10PyErrorLog___init__(struct __pyx_obj_4lxml_5e return __pyx_r; } -/* "src/lxml/xmlerror.pxi":544 +/* "src/lxml/xmlerror.pxi":548 * self._log = logger.log * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -45579,12 +45694,12 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_10PyErrorLog_3copy)) { __Pyx_XDECREF(__pyx_r); @@ -45601,7 +45716,7 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 544, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -45609,7 +45724,7 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -45617,12 +45732,12 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":547 + /* "src/lxml/xmlerror.pxi":551 * u"""Dummy method that returns an empty error log. * """ * return _ListErrorLog([], None, None) # <<<<<<<<<<<<<< @@ -45630,9 +45745,9 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p * def log(self, log_entry, message, *args): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 547, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -45643,14 +45758,14 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_copy(CYTHON_UNUSED struct __p __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_2, 2, Py_None); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 547, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":544 + /* "src/lxml/xmlerror.pxi":548 * self._log = logger.log * * cpdef copy(self): # <<<<<<<<<<<<<< @@ -45693,7 +45808,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_2copy(struct __pyx_obj_4lxml PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("copy", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_10PyErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 544, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10PyErrorLog_copy(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -45710,7 +45825,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_2copy(struct __pyx_obj_4lxml return __pyx_r; } -/* "src/lxml/xmlerror.pxi":549 +/* "src/lxml/xmlerror.pxi":553 * return _ListErrorLog([], None, None) * * def log(self, log_entry, message, *args): # <<<<<<<<<<<<<< @@ -45762,12 +45877,12 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_5log(PyObject *__pyx_v_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("log", 0, 2, 2, 1); __PYX_ERR(1, 549, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("log", 0, 2, 2, 1); __PYX_ERR(1, 553, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 2) ? pos_args : 2; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "log") < 0)) __PYX_ERR(1, 549, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "log") < 0)) __PYX_ERR(1, 553, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 2) { goto __pyx_L5_argtuple_error; @@ -45780,7 +45895,7 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_5log(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("log", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 549, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("log", 0, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(1, 553, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_AddTraceback("lxml.etree.PyErrorLog.log", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -45806,14 +45921,14 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("log", 0); - /* "src/lxml/xmlerror.pxi":562 + /* "src/lxml/xmlerror.pxi":566 * """ * self._log( * self._map_level(log_entry.level, 0), # <<<<<<<<<<<<<< * message, *args * ) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_log_entry, __pyx_n_s_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 562, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_log_entry, __pyx_n_s_level); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->_map_level); __pyx_t_3 = __pyx_v_self->_map_level; __pyx_t_4 = NULL; @@ -45831,7 +45946,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_int_0}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -45840,14 +45955,14 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_int_0}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 562, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -45858,20 +45973,20 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ __Pyx_GIVEREF(__pyx_int_0); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_0); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":561 + /* "src/lxml/xmlerror.pxi":565 * override the .receive() method instead of this one. * """ * self._log( # <<<<<<<<<<<<<< * self._map_level(log_entry.level, 0), * message, *args */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 561, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -45880,30 +45995,30 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_message); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":563 + /* "src/lxml/xmlerror.pxi":567 * self._log( * self._map_level(log_entry.level, 0), * message, *args # <<<<<<<<<<<<<< * ) * */ - __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 561, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":561 + /* "src/lxml/xmlerror.pxi":565 * override the .receive() method instead of this one. * """ * self._log( # <<<<<<<<<<<<<< * self._map_level(log_entry.level, 0), * message, *args */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_log, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 561, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_self->_log, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":549 + /* "src/lxml/xmlerror.pxi":553 * return _ListErrorLog([], None, None) * * def log(self, log_entry, message, *args): # <<<<<<<<<<<<<< @@ -45928,7 +46043,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_4log(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":566 +/* "src/lxml/xmlerror.pxi":570 * ) * * cpdef receive(self, _LogEntry log_entry): # <<<<<<<<<<<<<< @@ -45951,12 +46066,12 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_receive); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_10PyErrorLog_7receive)) { __Pyx_XDECREF(__pyx_r); @@ -45973,7 +46088,7 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_log_entry)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_log_entry)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 566, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -45981,7 +46096,7 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -45989,21 +46104,21 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "src/lxml/xmlerror.pxi":577 + /* "src/lxml/xmlerror.pxi":581 * format. * """ * self.log(log_entry, repr(log_entry)) # <<<<<<<<<<<<<< * * # thread-local, global list log to collect error output messages from */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Repr(((PyObject *)__pyx_v_log_entry)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(((PyObject *)__pyx_v_log_entry)); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -46020,7 +46135,7 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_log_entry), __pyx_t_3}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -46029,14 +46144,14 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_4, ((PyObject *)__pyx_v_log_entry), __pyx_t_3}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -46047,14 +46162,14 @@ static PyObject *__pyx_f_4lxml_5etree_10PyErrorLog_receive(struct __pyx_obj_4lxm __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 577, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":566 + /* "src/lxml/xmlerror.pxi":570 * ) * * cpdef receive(self, _LogEntry log_entry): # <<<<<<<<<<<<<< @@ -46087,7 +46202,7 @@ static PyObject *__pyx_pw_4lxml_5etree_10PyErrorLog_7receive(PyObject *__pyx_v_s PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("receive (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "log_entry", 0))) __PYX_ERR(1, 566, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log_entry), __pyx_ptype_4lxml_5etree__LogEntry, 1, "log_entry", 0))) __PYX_ERR(1, 570, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_10PyErrorLog_6receive(((struct __pyx_obj_4lxml_5etree_PyErrorLog *)__pyx_v_self), ((struct __pyx_obj_4lxml_5etree__LogEntry *)__pyx_v_log_entry)); /* function exit code */ @@ -46105,7 +46220,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_6receive(struct __pyx_obj_4l PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("receive", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_10PyErrorLog_receive(__pyx_v_self, __pyx_v_log_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10PyErrorLog_receive(__pyx_v_self, __pyx_v_log_entry, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -46122,7 +46237,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_6receive(struct __pyx_obj_4l return __pyx_r; } -/* "src/lxml/xmlerror.pxi":525 +/* "src/lxml/xmlerror.pxi":529 * with appropriate data. * """ * cdef readonly dict level_map # <<<<<<<<<<<<<< @@ -46159,7 +46274,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10PyErrorLog_9level_map___get__(struct __ return __pyx_r; } -/* "src/lxml/xmlerror.pxi":585 +/* "src/lxml/xmlerror.pxi":589 * * * cdef _BaseErrorLog _getThreadErrorLog(name): # <<<<<<<<<<<<<< @@ -46183,7 +46298,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("_getThreadErrorLog", 0); - /* "src/lxml/xmlerror.pxi":588 + /* "src/lxml/xmlerror.pxi":592 * u"""Retrieve the current error log with name 'name' of this thread.""" * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() # <<<<<<<<<<<<<< @@ -46192,7 +46307,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr */ __pyx_v_thread_dict = PyThreadState_GetDict(); - /* "src/lxml/xmlerror.pxi":589 + /* "src/lxml/xmlerror.pxi":593 * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: # <<<<<<<<<<<<<< @@ -46202,7 +46317,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __pyx_t_1 = ((__pyx_v_thread_dict == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":590 + /* "src/lxml/xmlerror.pxi":594 * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: * return __GLOBAL_ERROR_LOG # <<<<<<<<<<<<<< @@ -46214,7 +46329,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __pyx_r = __pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":589 + /* "src/lxml/xmlerror.pxi":593 * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: # <<<<<<<<<<<<<< @@ -46223,7 +46338,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr */ } - /* "src/lxml/xmlerror.pxi":591 + /* "src/lxml/xmlerror.pxi":595 * if thread_dict is NULL: * return __GLOBAL_ERROR_LOG * try: # <<<<<<<<<<<<<< @@ -46239,7 +46354,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __Pyx_XGOTREF(__pyx_t_4); /*try:*/ { - /* "src/lxml/xmlerror.pxi":592 + /* "src/lxml/xmlerror.pxi":596 * return __GLOBAL_ERROR_LOG * try: * return (thread_dict)[name] # <<<<<<<<<<<<<< @@ -46247,14 +46362,14 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr * log = (thread_dict)[name] = \ */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 592, __pyx_L4_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 596, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_5); - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__BaseErrorLog))))) __PYX_ERR(1, 592, __pyx_L4_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__BaseErrorLog))))) __PYX_ERR(1, 596, __pyx_L4_error) __pyx_r = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L8_try_return; - /* "src/lxml/xmlerror.pxi":591 + /* "src/lxml/xmlerror.pxi":595 * if thread_dict is NULL: * return __GLOBAL_ERROR_LOG * try: # <<<<<<<<<<<<<< @@ -46265,7 +46380,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":593 + /* "src/lxml/xmlerror.pxi":597 * try: * return (thread_dict)[name] * except KeyError: # <<<<<<<<<<<<<< @@ -46275,34 +46390,34 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_6) { __Pyx_AddTraceback("lxml.etree._getThreadErrorLog", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 593, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(1, 597, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); - /* "src/lxml/xmlerror.pxi":595 + /* "src/lxml/xmlerror.pxi":599 * except KeyError: * log = (thread_dict)[name] = \ * _RotatingErrorLog(__MAX_LOG_SIZE) # <<<<<<<<<<<<<< * return log * */ - __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 595, __pyx_L6_except_error) + __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(1, 599, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_9); __pyx_v_log = ((struct __pyx_obj_4lxml_5etree__RotatingErrorLog *)__pyx_t_9); - /* "src/lxml/xmlerror.pxi":594 + /* "src/lxml/xmlerror.pxi":598 * return (thread_dict)[name] * except KeyError: * log = (thread_dict)[name] = \ # <<<<<<<<<<<<<< * _RotatingErrorLog(__MAX_LOG_SIZE) * return log */ - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name, __pyx_t_9) < 0)) __PYX_ERR(1, 594, __pyx_L6_except_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name, __pyx_t_9) < 0)) __PYX_ERR(1, 598, __pyx_L6_except_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "src/lxml/xmlerror.pxi":596 + /* "src/lxml/xmlerror.pxi":600 * log = (thread_dict)[name] = \ * _RotatingErrorLog(__MAX_LOG_SIZE) * return log # <<<<<<<<<<<<<< @@ -46320,7 +46435,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "src/lxml/xmlerror.pxi":591 + /* "src/lxml/xmlerror.pxi":595 * if thread_dict is NULL: * return __GLOBAL_ERROR_LOG * try: # <<<<<<<<<<<<<< @@ -46346,7 +46461,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr goto __pyx_L0; } - /* "src/lxml/xmlerror.pxi":585 + /* "src/lxml/xmlerror.pxi":589 * * * cdef _BaseErrorLog _getThreadErrorLog(name): # <<<<<<<<<<<<<< @@ -46369,7 +46484,7 @@ static struct __pyx_obj_4lxml_5etree__BaseErrorLog *__pyx_f_4lxml_5etree__getThr return __pyx_r; } -/* "src/lxml/xmlerror.pxi":599 +/* "src/lxml/xmlerror.pxi":603 * * * cdef _setThreadErrorLog(name, _BaseErrorLog log): # <<<<<<<<<<<<<< @@ -46384,7 +46499,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, int __pyx_t_1; __Pyx_RefNannySetupContext("_setThreadErrorLog", 0); - /* "src/lxml/xmlerror.pxi":602 + /* "src/lxml/xmlerror.pxi":606 * u"""Set the global error log of this thread.""" * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() # <<<<<<<<<<<<<< @@ -46393,7 +46508,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, */ __pyx_v_thread_dict = PyThreadState_GetDict(); - /* "src/lxml/xmlerror.pxi":603 + /* "src/lxml/xmlerror.pxi":607 * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: # <<<<<<<<<<<<<< @@ -46403,17 +46518,17 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, __pyx_t_1 = ((__pyx_v_thread_dict == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":604 + /* "src/lxml/xmlerror.pxi":608 * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: * if name == GLOBAL_ERROR_LOG: # <<<<<<<<<<<<<< * global __GLOBAL_ERROR_LOG * __GLOBAL_ERROR_LOG = log */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_GlobalErrorLog, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 604, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_GlobalErrorLog, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(1, 608, __pyx_L1_error) if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":606 + /* "src/lxml/xmlerror.pxi":610 * if name == GLOBAL_ERROR_LOG: * global __GLOBAL_ERROR_LOG * __GLOBAL_ERROR_LOG = log # <<<<<<<<<<<<<< @@ -46425,7 +46540,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG, __pyx_v_log); __Pyx_GIVEREF(((PyObject *)__pyx_v_log)); - /* "src/lxml/xmlerror.pxi":604 + /* "src/lxml/xmlerror.pxi":608 * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: * if name == GLOBAL_ERROR_LOG: # <<<<<<<<<<<<<< @@ -46434,7 +46549,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, */ } - /* "src/lxml/xmlerror.pxi":603 + /* "src/lxml/xmlerror.pxi":607 * cdef python.PyObject* thread_dict * thread_dict = python.PyThreadState_GetDict() * if thread_dict is NULL: # <<<<<<<<<<<<<< @@ -46444,7 +46559,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, goto __pyx_L3; } - /* "src/lxml/xmlerror.pxi":608 + /* "src/lxml/xmlerror.pxi":612 * __GLOBAL_ERROR_LOG = log * else: * (thread_dict)[name] = log # <<<<<<<<<<<<<< @@ -46452,11 +46567,11 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, * */ /*else*/ { - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name, ((PyObject *)__pyx_v_log)) < 0)) __PYX_ERR(1, 608, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_thread_dict), __pyx_v_name, ((PyObject *)__pyx_v_log)) < 0)) __PYX_ERR(1, 612, __pyx_L1_error) } __pyx_L3:; - /* "src/lxml/xmlerror.pxi":599 + /* "src/lxml/xmlerror.pxi":603 * * * cdef _setThreadErrorLog(name, _BaseErrorLog log): # <<<<<<<<<<<<<< @@ -46476,7 +46591,7 @@ static PyObject *__pyx_f_4lxml_5etree__setThreadErrorLog(PyObject *__pyx_v_name, return __pyx_r; } -/* "src/lxml/xmlerror.pxi":611 +/* "src/lxml/xmlerror.pxi":615 * * * cdef __copyGlobalErrorLog(): # <<<<<<<<<<<<<< @@ -46491,7 +46606,7 @@ static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__copyGlobalErrorLog", 0); - /* "src/lxml/xmlerror.pxi":613 + /* "src/lxml/xmlerror.pxi":617 * cdef __copyGlobalErrorLog(): * u"Helper function for properties in exceptions." * return _getThreadErrorLog(GLOBAL_ERROR_LOG).copy() # <<<<<<<<<<<<<< @@ -46499,16 +46614,16 @@ static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 613, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1)->__pyx_vtab)->copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 613, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__BaseErrorLog *)((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1)->__pyx_vtab)->copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 617, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":611 + /* "src/lxml/xmlerror.pxi":615 * * * cdef __copyGlobalErrorLog(): # <<<<<<<<<<<<<< @@ -46528,7 +46643,7 @@ static PyObject *__pyx_f_4lxml_5etree___copyGlobalErrorLog(void) { return __pyx_r; } -/* "src/lxml/xmlerror.pxi":616 +/* "src/lxml/xmlerror.pxi":620 * * * def use_global_python_log(PyErrorLog log not None): # <<<<<<<<<<<<<< @@ -46544,7 +46659,7 @@ static PyObject *__pyx_pw_4lxml_5etree_5use_global_python_log(PyObject *__pyx_se PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("use_global_python_log (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log), __pyx_ptype_4lxml_5etree_PyErrorLog, 0, "log", 0))) __PYX_ERR(1, 616, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_log), __pyx_ptype_4lxml_5etree_PyErrorLog, 0, "log", 0))) __PYX_ERR(1, 620, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_4use_global_python_log(__pyx_self, ((struct __pyx_obj_4lxml_5etree_PyErrorLog *)__pyx_v_log)); /* function exit code */ @@ -46562,18 +46677,18 @@ static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyOb PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("use_global_python_log", 0); - /* "src/lxml/xmlerror.pxi":629 + /* "src/lxml/xmlerror.pxi":633 * function will only set the global error log of the current thread. * """ * _setThreadErrorLog(GLOBAL_ERROR_LOG, log) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_GlobalErrorLog, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_log)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 629, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__setThreadErrorLog(__pyx_n_u_GlobalErrorLog, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_log)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 633, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":616 + /* "src/lxml/xmlerror.pxi":620 * * * def use_global_python_log(PyErrorLog log not None): # <<<<<<<<<<<<<< @@ -46594,7 +46709,7 @@ static PyObject *__pyx_pf_4lxml_5etree_4use_global_python_log(CYTHON_UNUSED PyOb return __pyx_r; } -/* "src/lxml/xmlerror.pxi":633 +/* "src/lxml/xmlerror.pxi":637 * * # local log functions: forward error to logger object * cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil: # <<<<<<<<<<<<<< @@ -46612,7 +46727,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE #endif __Pyx_RefNannySetupContext("_forwardError", 0); - /* "src/lxml/xmlerror.pxi":635 + /* "src/lxml/xmlerror.pxi":639 * cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil: * cdef _BaseErrorLog log_handler * if c_log_handler is not NULL: # <<<<<<<<<<<<<< @@ -46622,7 +46737,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE __pyx_t_1 = ((__pyx_v_c_log_handler != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":636 + /* "src/lxml/xmlerror.pxi":640 * cdef _BaseErrorLog log_handler * if c_log_handler is not NULL: * log_handler = <_BaseErrorLog>c_log_handler # <<<<<<<<<<<<<< @@ -46634,7 +46749,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE __pyx_v_log_handler = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":635 + /* "src/lxml/xmlerror.pxi":639 * cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil: * cdef _BaseErrorLog log_handler * if c_log_handler is not NULL: # <<<<<<<<<<<<<< @@ -46644,7 +46759,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE goto __pyx_L3; } - /* "src/lxml/xmlerror.pxi":637 + /* "src/lxml/xmlerror.pxi":641 * if c_log_handler is not NULL: * log_handler = <_BaseErrorLog>c_log_handler * elif error.domain == xmlerror.XML_FROM_XSLT: # <<<<<<<<<<<<<< @@ -46654,19 +46769,19 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE __pyx_t_1 = ((__pyx_v_error->domain == XML_FROM_XSLT) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":638 + /* "src/lxml/xmlerror.pxi":642 * log_handler = <_BaseErrorLog>c_log_handler * elif error.domain == xmlerror.XML_FROM_XSLT: * log_handler = _getThreadErrorLog(XSLT_ERROR_LOG) # <<<<<<<<<<<<<< * else: * log_handler = _getThreadErrorLog(GLOBAL_ERROR_LOG) */ - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_XSLTErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 638, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_XSLTErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_log_handler = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":637 + /* "src/lxml/xmlerror.pxi":641 * if c_log_handler is not NULL: * log_handler = <_BaseErrorLog>c_log_handler * elif error.domain == xmlerror.XML_FROM_XSLT: # <<<<<<<<<<<<<< @@ -46676,7 +46791,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE goto __pyx_L3; } - /* "src/lxml/xmlerror.pxi":640 + /* "src/lxml/xmlerror.pxi":644 * log_handler = _getThreadErrorLog(XSLT_ERROR_LOG) * else: * log_handler = _getThreadErrorLog(GLOBAL_ERROR_LOG) # <<<<<<<<<<<<<< @@ -46684,14 +46799,14 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE * */ /*else*/ { - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 640, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__getThreadErrorLog(__pyx_n_u_GlobalErrorLog)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_log_handler = ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "src/lxml/xmlerror.pxi":641 + /* "src/lxml/xmlerror.pxi":645 * else: * log_handler = _getThreadErrorLog(GLOBAL_ERROR_LOG) * log_handler._receive(error) # <<<<<<<<<<<<<< @@ -46700,7 +46815,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE */ __pyx_f_4lxml_5etree_13_BaseErrorLog__receive(__pyx_v_log_handler, __pyx_v_error); - /* "src/lxml/xmlerror.pxi":633 + /* "src/lxml/xmlerror.pxi":637 * * # local log functions: forward error to logger object * cdef void _forwardError(void* c_log_handler, xmlerror.xmlError* error) with gil: # <<<<<<<<<<<<<< @@ -46721,7 +46836,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE #endif } -/* "src/lxml/xmlerror.pxi":644 +/* "src/lxml/xmlerror.pxi":648 * * * cdef void _receiveError(void* c_log_handler, xmlerror.xmlError* error) nogil: # <<<<<<<<<<<<<< @@ -46731,7 +46846,7 @@ static void __pyx_f_4lxml_5etree__forwardError(void *__pyx_v_c_log_handler, xmlE static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlError *__pyx_v_error) { - /* "src/lxml/xmlerror.pxi":647 + /* "src/lxml/xmlerror.pxi":651 * # no Python objects here, may be called without thread context ! * if __DEBUG: * _forwardError(c_log_handler, error) # <<<<<<<<<<<<<< @@ -46740,7 +46855,7 @@ static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlE */ __pyx_f_4lxml_5etree__forwardError(__pyx_v_c_log_handler, __pyx_v_error); - /* "src/lxml/xmlerror.pxi":644 + /* "src/lxml/xmlerror.pxi":648 * * * cdef void _receiveError(void* c_log_handler, xmlerror.xmlError* error) nogil: # <<<<<<<<<<<<<< @@ -46751,7 +46866,7 @@ static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlE /* function exit code */ } -/* "src/lxml/xmlerror.pxi":650 +/* "src/lxml/xmlerror.pxi":654 * * * cdef void _receiveXSLTError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46762,7 +46877,7 @@ static void __pyx_f_4lxml_5etree__receiveError(void *__pyx_v_c_log_handler, xmlE static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, char *__pyx_v_msg, ...) { va_list __pyx_v_args; - /* "src/lxml/xmlerror.pxi":653 + /* "src/lxml/xmlerror.pxi":657 * # no Python objects here, may be called without thread context ! * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) # <<<<<<<<<<<<<< @@ -46771,7 +46886,7 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, */ va_start(__pyx_v_args, __pyx_v_msg); - /* "src/lxml/xmlerror.pxi":654 + /* "src/lxml/xmlerror.pxi":658 * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_XSLT, msg, args) # <<<<<<<<<<<<<< @@ -46780,7 +46895,7 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, */ __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_XSLT, __pyx_v_msg, __pyx_v_args); - /* "src/lxml/xmlerror.pxi":655 + /* "src/lxml/xmlerror.pxi":659 * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_XSLT, msg, args) * cvarargs.va_end(args) # <<<<<<<<<<<<<< @@ -46789,7 +46904,7 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, */ va_end(__pyx_v_args); - /* "src/lxml/xmlerror.pxi":650 + /* "src/lxml/xmlerror.pxi":654 * * * cdef void _receiveXSLTError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46800,7 +46915,7 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, /* function exit code */ } -/* "src/lxml/xmlerror.pxi":657 +/* "src/lxml/xmlerror.pxi":661 * cvarargs.va_end(args) * * cdef void _receiveRelaxNGParseError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46811,7 +46926,7 @@ static void __pyx_f_4lxml_5etree__receiveXSLTError(void *__pyx_v_c_log_handler, static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_handler, char *__pyx_v_msg, ...) { va_list __pyx_v_args; - /* "src/lxml/xmlerror.pxi":660 + /* "src/lxml/xmlerror.pxi":664 * # no Python objects here, may be called without thread context ! * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) # <<<<<<<<<<<<<< @@ -46820,7 +46935,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h */ va_start(__pyx_v_args, __pyx_v_msg); - /* "src/lxml/xmlerror.pxi":661 + /* "src/lxml/xmlerror.pxi":665 * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGP, msg, args) # <<<<<<<<<<<<<< @@ -46829,7 +46944,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h */ __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_RELAXNGP, __pyx_v_msg, __pyx_v_args); - /* "src/lxml/xmlerror.pxi":662 + /* "src/lxml/xmlerror.pxi":666 * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGP, msg, args) * cvarargs.va_end(args) # <<<<<<<<<<<<<< @@ -46838,7 +46953,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h */ va_end(__pyx_v_args); - /* "src/lxml/xmlerror.pxi":657 + /* "src/lxml/xmlerror.pxi":661 * cvarargs.va_end(args) * * cdef void _receiveRelaxNGParseError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46849,7 +46964,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h /* function exit code */ } -/* "src/lxml/xmlerror.pxi":664 +/* "src/lxml/xmlerror.pxi":668 * cvarargs.va_end(args) * * cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46860,7 +46975,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGParseError(void *__pyx_v_c_log_h static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_log_handler, char *__pyx_v_msg, ...) { va_list __pyx_v_args; - /* "src/lxml/xmlerror.pxi":667 + /* "src/lxml/xmlerror.pxi":671 * # no Python objects here, may be called without thread context ! * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) # <<<<<<<<<<<<<< @@ -46869,7 +46984,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ */ va_start(__pyx_v_args, __pyx_v_msg); - /* "src/lxml/xmlerror.pxi":668 + /* "src/lxml/xmlerror.pxi":672 * cdef cvarargs.va_list args * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGV, msg, args) # <<<<<<<<<<<<<< @@ -46878,7 +46993,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ */ __pyx_f_4lxml_5etree__receiveGenericError(__pyx_v_c_log_handler, XML_FROM_RELAXNGV, __pyx_v_msg, __pyx_v_args); - /* "src/lxml/xmlerror.pxi":669 + /* "src/lxml/xmlerror.pxi":673 * cvarargs.va_start(args, msg) * _receiveGenericError(c_log_handler, xmlerror.XML_FROM_RELAXNGV, msg, args) * cvarargs.va_end(args) # <<<<<<<<<<<<<< @@ -46887,7 +47002,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ */ va_end(__pyx_v_args); - /* "src/lxml/xmlerror.pxi":664 + /* "src/lxml/xmlerror.pxi":668 * cvarargs.va_end(args) * * cdef void _receiveRelaxNGValidationError(void* c_log_handler, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46898,7 +47013,7 @@ static void __pyx_f_4lxml_5etree__receiveRelaxNGValidationError(void *__pyx_v_c_ /* function exit code */ } -/* "src/lxml/xmlerror.pxi":672 +/* "src/lxml/xmlerror.pxi":676 * * # dummy function: no log output at all * cdef void _nullGenericErrorFunc(void* ctxt, char* msg, ...) nogil: # <<<<<<<<<<<<<< @@ -46911,7 +47026,7 @@ static void __pyx_f_4lxml_5etree__nullGenericErrorFunc(CYTHON_UNUSED void *__pyx /* function exit code */ } -/* "src/lxml/xmlerror.pxi":676 +/* "src/lxml/xmlerror.pxi":680 * * * cdef void _connectGenericErrorLog(log, int c_domain=-1): # <<<<<<<<<<<<<< @@ -46934,7 +47049,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, } } - /* "src/lxml/xmlerror.pxi":677 + /* "src/lxml/xmlerror.pxi":681 * * cdef void _connectGenericErrorLog(log, int c_domain=-1): * cdef xmlerror.xmlGenericErrorFunc error_func = NULL # <<<<<<<<<<<<<< @@ -46943,7 +47058,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_error_func = NULL; - /* "src/lxml/xmlerror.pxi":678 + /* "src/lxml/xmlerror.pxi":682 * cdef void _connectGenericErrorLog(log, int c_domain=-1): * cdef xmlerror.xmlGenericErrorFunc error_func = NULL * c_log = log # <<<<<<<<<<<<<< @@ -46952,7 +47067,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_c_log = ((void *)__pyx_v_log); - /* "src/lxml/xmlerror.pxi":679 + /* "src/lxml/xmlerror.pxi":683 * cdef xmlerror.xmlGenericErrorFunc error_func = NULL * c_log = log * if c_domain == xmlerror.XML_FROM_XSLT: # <<<<<<<<<<<<<< @@ -46962,7 +47077,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, switch (__pyx_v_c_domain) { case XML_FROM_XSLT: - /* "src/lxml/xmlerror.pxi":680 + /* "src/lxml/xmlerror.pxi":684 * c_log = log * if c_domain == xmlerror.XML_FROM_XSLT: * error_func = _receiveXSLTError # <<<<<<<<<<<<<< @@ -46971,7 +47086,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveXSLTError); - /* "src/lxml/xmlerror.pxi":679 + /* "src/lxml/xmlerror.pxi":683 * cdef xmlerror.xmlGenericErrorFunc error_func = NULL * c_log = log * if c_domain == xmlerror.XML_FROM_XSLT: # <<<<<<<<<<<<<< @@ -46981,7 +47096,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, break; case XML_FROM_RELAXNGP: - /* "src/lxml/xmlerror.pxi":682 + /* "src/lxml/xmlerror.pxi":686 * error_func = _receiveXSLTError * elif c_domain == xmlerror.XML_FROM_RELAXNGP: * error_func = _receiveRelaxNGParseError # <<<<<<<<<<<<<< @@ -46990,7 +47105,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveRelaxNGParseError); - /* "src/lxml/xmlerror.pxi":681 + /* "src/lxml/xmlerror.pxi":685 * if c_domain == xmlerror.XML_FROM_XSLT: * error_func = _receiveXSLTError * elif c_domain == xmlerror.XML_FROM_RELAXNGP: # <<<<<<<<<<<<<< @@ -47000,7 +47115,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, break; case XML_FROM_RELAXNGV: - /* "src/lxml/xmlerror.pxi":684 + /* "src/lxml/xmlerror.pxi":688 * error_func = _receiveRelaxNGParseError * elif c_domain == xmlerror.XML_FROM_RELAXNGV: * error_func = _receiveRelaxNGValidationError # <<<<<<<<<<<<<< @@ -47009,7 +47124,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__receiveRelaxNGValidationError); - /* "src/lxml/xmlerror.pxi":683 + /* "src/lxml/xmlerror.pxi":687 * elif c_domain == xmlerror.XML_FROM_RELAXNGP: * error_func = _receiveRelaxNGParseError * elif c_domain == xmlerror.XML_FROM_RELAXNGV: # <<<<<<<<<<<<<< @@ -47020,7 +47135,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, default: break; } - /* "src/lxml/xmlerror.pxi":686 + /* "src/lxml/xmlerror.pxi":690 * error_func = _receiveRelaxNGValidationError * * if log is None or error_func is NULL: # <<<<<<<<<<<<<< @@ -47039,7 +47154,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":687 + /* "src/lxml/xmlerror.pxi":691 * * if log is None or error_func is NULL: * c_log = NULL # <<<<<<<<<<<<<< @@ -47048,7 +47163,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_c_log = NULL; - /* "src/lxml/xmlerror.pxi":688 + /* "src/lxml/xmlerror.pxi":692 * if log is None or error_func is NULL: * c_log = NULL * error_func = _nullGenericErrorFunc # <<<<<<<<<<<<<< @@ -47057,7 +47172,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ __pyx_v_error_func = ((xmlGenericErrorFunc)__pyx_f_4lxml_5etree__nullGenericErrorFunc); - /* "src/lxml/xmlerror.pxi":686 + /* "src/lxml/xmlerror.pxi":690 * error_func = _receiveRelaxNGValidationError * * if log is None or error_func is NULL: # <<<<<<<<<<<<<< @@ -47066,7 +47181,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ } - /* "src/lxml/xmlerror.pxi":689 + /* "src/lxml/xmlerror.pxi":693 * c_log = NULL * error_func = _nullGenericErrorFunc * xmlerror.xmlSetGenericErrorFunc(c_log, error_func) # <<<<<<<<<<<<<< @@ -47075,7 +47190,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, */ xmlSetGenericErrorFunc(__pyx_v_c_log, __pyx_v_error_func); - /* "src/lxml/xmlerror.pxi":676 + /* "src/lxml/xmlerror.pxi":680 * * * cdef void _connectGenericErrorLog(log, int c_domain=-1): # <<<<<<<<<<<<<< @@ -47087,7 +47202,7 @@ static void __pyx_f_4lxml_5etree__connectGenericErrorLog(PyObject *__pyx_v_log, __Pyx_RefNannyFinishContext(); } -/* "src/lxml/xmlerror.pxi":692 +/* "src/lxml/xmlerror.pxi":696 * * * cdef void _receiveGenericError(void* c_log_handler, int c_domain, # <<<<<<<<<<<<<< @@ -47110,7 +47225,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle int __pyx_t_1; int __pyx_t_2; - /* "src/lxml/xmlerror.pxi":703 + /* "src/lxml/xmlerror.pxi":707 * cdef char* c_str * cdef int text_size, element_size, format_count, c_int * if not __DEBUG or msg is NULL: # <<<<<<<<<<<<<< @@ -47120,7 +47235,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_msg == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":704 + /* "src/lxml/xmlerror.pxi":708 * cdef int text_size, element_size, format_count, c_int * if not __DEBUG or msg is NULL: * return # <<<<<<<<<<<<<< @@ -47129,7 +47244,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":703 + /* "src/lxml/xmlerror.pxi":707 * cdef char* c_str * cdef int text_size, element_size, format_count, c_int * if not __DEBUG or msg is NULL: # <<<<<<<<<<<<<< @@ -47138,7 +47253,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":705 + /* "src/lxml/xmlerror.pxi":709 * if not __DEBUG or msg is NULL: * return * if msg[0] in b'\n\0': # <<<<<<<<<<<<<< @@ -47149,7 +47264,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle case '\x00': case '\n': - /* "src/lxml/xmlerror.pxi":706 + /* "src/lxml/xmlerror.pxi":710 * return * if msg[0] in b'\n\0': * return # <<<<<<<<<<<<<< @@ -47158,7 +47273,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ goto __pyx_L0; - /* "src/lxml/xmlerror.pxi":705 + /* "src/lxml/xmlerror.pxi":709 * if not __DEBUG or msg is NULL: * return * if msg[0] in b'\n\0': # <<<<<<<<<<<<<< @@ -47169,7 +47284,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle default: break; } - /* "src/lxml/xmlerror.pxi":708 + /* "src/lxml/xmlerror.pxi":712 * return * * c_text = c_element = c_error.file = c_error.node = NULL # <<<<<<<<<<<<<< @@ -47181,7 +47296,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_v_c_error.file = NULL; __pyx_v_c_error.node = NULL; - /* "src/lxml/xmlerror.pxi":709 + /* "src/lxml/xmlerror.pxi":713 * * c_text = c_element = c_error.file = c_error.node = NULL * c_error.line = 0 # <<<<<<<<<<<<<< @@ -47190,7 +47305,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.line = 0; - /* "src/lxml/xmlerror.pxi":712 + /* "src/lxml/xmlerror.pxi":716 * * # parse "NAME %s" chunks from the format string * c_name_pos = c_pos = msg # <<<<<<<<<<<<<< @@ -47200,7 +47315,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_v_c_name_pos = __pyx_v_msg; __pyx_v_c_pos = __pyx_v_msg; - /* "src/lxml/xmlerror.pxi":713 + /* "src/lxml/xmlerror.pxi":717 * # parse "NAME %s" chunks from the format string * c_name_pos = c_pos = msg * format_count = 0 # <<<<<<<<<<<<<< @@ -47209,7 +47324,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_format_count = 0; - /* "src/lxml/xmlerror.pxi":714 + /* "src/lxml/xmlerror.pxi":718 * c_name_pos = c_pos = msg * format_count = 0 * while c_pos[0]: # <<<<<<<<<<<<<< @@ -47220,7 +47335,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_c_pos[0]) != 0); if (!__pyx_t_1) break; - /* "src/lxml/xmlerror.pxi":715 + /* "src/lxml/xmlerror.pxi":719 * format_count = 0 * while c_pos[0]: * if c_pos[0] == b'%': # <<<<<<<<<<<<<< @@ -47230,7 +47345,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[0]) == '%') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":716 + /* "src/lxml/xmlerror.pxi":720 * while c_pos[0]: * if c_pos[0] == b'%': * c_pos += 1 # <<<<<<<<<<<<<< @@ -47239,7 +47354,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_pos = (__pyx_v_c_pos + 1); - /* "src/lxml/xmlerror.pxi":717 + /* "src/lxml/xmlerror.pxi":721 * if c_pos[0] == b'%': * c_pos += 1 * if c_pos[0] == b's': # "%s" # <<<<<<<<<<<<<< @@ -47249,7 +47364,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[0]) == 's') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":718 + /* "src/lxml/xmlerror.pxi":722 * c_pos += 1 * if c_pos[0] == b's': # "%s" * format_count += 1 # <<<<<<<<<<<<<< @@ -47258,7 +47373,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_format_count = (__pyx_v_format_count + 1); - /* "src/lxml/xmlerror.pxi":719 + /* "src/lxml/xmlerror.pxi":723 * if c_pos[0] == b's': # "%s" * format_count += 1 * c_str = cvarargs.va_charptr(args) # <<<<<<<<<<<<<< @@ -47267,7 +47382,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_str = va_charptr(__pyx_v_args); - /* "src/lxml/xmlerror.pxi":720 + /* "src/lxml/xmlerror.pxi":724 * format_count += 1 * c_str = cvarargs.va_charptr(args) * if c_pos == msg + 1: # <<<<<<<<<<<<<< @@ -47277,7 +47392,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_c_pos == (__pyx_v_msg + 1)) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":721 + /* "src/lxml/xmlerror.pxi":725 * c_str = cvarargs.va_charptr(args) * if c_pos == msg + 1: * c_text = c_str # msg == "%s..." # <<<<<<<<<<<<<< @@ -47286,7 +47401,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_text = __pyx_v_c_str; - /* "src/lxml/xmlerror.pxi":720 + /* "src/lxml/xmlerror.pxi":724 * format_count += 1 * c_str = cvarargs.va_charptr(args) * if c_pos == msg + 1: # <<<<<<<<<<<<<< @@ -47296,7 +47411,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L8; } - /* "src/lxml/xmlerror.pxi":722 + /* "src/lxml/xmlerror.pxi":726 * if c_pos == msg + 1: * c_text = c_str # msg == "%s..." * elif c_name_pos[0] == b'e': # <<<<<<<<<<<<<< @@ -47306,7 +47421,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_name_pos[0]) == 'e') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":723 + /* "src/lxml/xmlerror.pxi":727 * c_text = c_str # msg == "%s..." * elif c_name_pos[0] == b'e': * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: # <<<<<<<<<<<<<< @@ -47316,7 +47431,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"element %s"), 10) == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":724 + /* "src/lxml/xmlerror.pxi":728 * elif c_name_pos[0] == b'e': * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: * c_element = c_str # <<<<<<<<<<<<<< @@ -47325,7 +47440,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_element = __pyx_v_c_str; - /* "src/lxml/xmlerror.pxi":723 + /* "src/lxml/xmlerror.pxi":727 * c_text = c_str # msg == "%s..." * elif c_name_pos[0] == b'e': * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: # <<<<<<<<<<<<<< @@ -47334,7 +47449,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":722 + /* "src/lxml/xmlerror.pxi":726 * if c_pos == msg + 1: * c_text = c_str # msg == "%s..." * elif c_name_pos[0] == b'e': # <<<<<<<<<<<<<< @@ -47344,7 +47459,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L8; } - /* "src/lxml/xmlerror.pxi":725 + /* "src/lxml/xmlerror.pxi":729 * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: * c_element = c_str * elif c_name_pos[0] == b'f': # <<<<<<<<<<<<<< @@ -47354,7 +47469,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_name_pos[0]) == 'f') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":726 + /* "src/lxml/xmlerror.pxi":730 * c_element = c_str * elif c_name_pos[0] == b'f': * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: # <<<<<<<<<<<<<< @@ -47364,7 +47479,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"file %s"), 7) == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":728 + /* "src/lxml/xmlerror.pxi":732 * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: * if cstring_h.strncmp('string://__STRING__XSLT', * c_str, 23) == 0: # <<<<<<<<<<<<<< @@ -47373,7 +47488,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_t_1 = ((strncmp(((char const *)"string://__STRING__XSLT"), __pyx_v_c_str, 23) == 0) != 0); - /* "src/lxml/xmlerror.pxi":727 + /* "src/lxml/xmlerror.pxi":731 * elif c_name_pos[0] == b'f': * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: * if cstring_h.strncmp('string://__STRING__XSLT', # <<<<<<<<<<<<<< @@ -47382,7 +47497,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":729 + /* "src/lxml/xmlerror.pxi":733 * if cstring_h.strncmp('string://__STRING__XSLT', * c_str, 23) == 0: * c_str = '' # <<<<<<<<<<<<<< @@ -47391,7 +47506,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_str = ((char *)""); - /* "src/lxml/xmlerror.pxi":727 + /* "src/lxml/xmlerror.pxi":731 * elif c_name_pos[0] == b'f': * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: * if cstring_h.strncmp('string://__STRING__XSLT', # <<<<<<<<<<<<<< @@ -47400,7 +47515,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":730 + /* "src/lxml/xmlerror.pxi":734 * c_str, 23) == 0: * c_str = '' * c_error.file = c_str # <<<<<<<<<<<<<< @@ -47409,7 +47524,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.file = __pyx_v_c_str; - /* "src/lxml/xmlerror.pxi":726 + /* "src/lxml/xmlerror.pxi":730 * c_element = c_str * elif c_name_pos[0] == b'f': * if cstring_h.strncmp(c_name_pos, 'file %s', 7) == 0: # <<<<<<<<<<<<<< @@ -47418,7 +47533,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":725 + /* "src/lxml/xmlerror.pxi":729 * if cstring_h.strncmp(c_name_pos, 'element %s', 10) == 0: * c_element = c_str * elif c_name_pos[0] == b'f': # <<<<<<<<<<<<<< @@ -47428,7 +47543,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L8:; - /* "src/lxml/xmlerror.pxi":717 + /* "src/lxml/xmlerror.pxi":721 * if c_pos[0] == b'%': * c_pos += 1 * if c_pos[0] == b's': # "%s" # <<<<<<<<<<<<<< @@ -47438,7 +47553,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L7; } - /* "src/lxml/xmlerror.pxi":731 + /* "src/lxml/xmlerror.pxi":735 * c_str = '' * c_error.file = c_str * elif c_pos[0] == b'd': # "%d" # <<<<<<<<<<<<<< @@ -47448,7 +47563,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[0]) == 'd') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":732 + /* "src/lxml/xmlerror.pxi":736 * c_error.file = c_str * elif c_pos[0] == b'd': # "%d" * format_count += 1 # <<<<<<<<<<<<<< @@ -47457,7 +47572,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_format_count = (__pyx_v_format_count + 1); - /* "src/lxml/xmlerror.pxi":733 + /* "src/lxml/xmlerror.pxi":737 * elif c_pos[0] == b'd': # "%d" * format_count += 1 * c_int = cvarargs.va_int(args) # <<<<<<<<<<<<<< @@ -47466,7 +47581,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_int = va_int(__pyx_v_args); - /* "src/lxml/xmlerror.pxi":734 + /* "src/lxml/xmlerror.pxi":738 * format_count += 1 * c_int = cvarargs.va_int(args) * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: # <<<<<<<<<<<<<< @@ -47476,7 +47591,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((strncmp(__pyx_v_c_name_pos, ((char const *)"line %d"), 7) == 0) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":735 + /* "src/lxml/xmlerror.pxi":739 * c_int = cvarargs.va_int(args) * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: * c_error.line = c_int # <<<<<<<<<<<<<< @@ -47485,7 +47600,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.line = __pyx_v_c_int; - /* "src/lxml/xmlerror.pxi":734 + /* "src/lxml/xmlerror.pxi":738 * format_count += 1 * c_int = cvarargs.va_int(args) * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: # <<<<<<<<<<<<<< @@ -47494,7 +47609,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":731 + /* "src/lxml/xmlerror.pxi":735 * c_str = '' * c_error.file = c_str * elif c_pos[0] == b'd': # "%d" # <<<<<<<<<<<<<< @@ -47504,7 +47619,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L7; } - /* "src/lxml/xmlerror.pxi":736 + /* "src/lxml/xmlerror.pxi":740 * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: * c_error.line = c_int * elif c_pos[0] != b'%': # "%%" == "%" # <<<<<<<<<<<<<< @@ -47514,7 +47629,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[0]) != '%') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":737 + /* "src/lxml/xmlerror.pxi":741 * c_error.line = c_int * elif c_pos[0] != b'%': # "%%" == "%" * format_count += 1 # <<<<<<<<<<<<<< @@ -47523,7 +47638,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_format_count = (__pyx_v_format_count + 1); - /* "src/lxml/xmlerror.pxi":738 + /* "src/lxml/xmlerror.pxi":742 * elif c_pos[0] != b'%': # "%%" == "%" * format_count += 1 * break # unexpected format or end of string => abort # <<<<<<<<<<<<<< @@ -47532,7 +47647,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ goto __pyx_L5_break; - /* "src/lxml/xmlerror.pxi":736 + /* "src/lxml/xmlerror.pxi":740 * if cstring_h.strncmp(c_name_pos, 'line %d', 7) == 0: * c_error.line = c_int * elif c_pos[0] != b'%': # "%%" == "%" # <<<<<<<<<<<<<< @@ -47542,7 +47657,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L7:; - /* "src/lxml/xmlerror.pxi":715 + /* "src/lxml/xmlerror.pxi":719 * format_count = 0 * while c_pos[0]: * if c_pos[0] == b'%': # <<<<<<<<<<<<<< @@ -47552,7 +47667,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L6; } - /* "src/lxml/xmlerror.pxi":739 + /* "src/lxml/xmlerror.pxi":743 * format_count += 1 * break # unexpected format or end of string => abort * elif c_pos[0] == b' ': # <<<<<<<<<<<<<< @@ -47562,7 +47677,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[0]) == ' ') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":740 + /* "src/lxml/xmlerror.pxi":744 * break # unexpected format or end of string => abort * elif c_pos[0] == b' ': * if c_pos[1] != b'%': # <<<<<<<<<<<<<< @@ -47572,7 +47687,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = (((__pyx_v_c_pos[1]) != '%') != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":741 + /* "src/lxml/xmlerror.pxi":745 * elif c_pos[0] == b' ': * if c_pos[1] != b'%': * c_name_pos = c_pos + 1 # <<<<<<<<<<<<<< @@ -47581,7 +47696,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_name_pos = (__pyx_v_c_pos + 1); - /* "src/lxml/xmlerror.pxi":740 + /* "src/lxml/xmlerror.pxi":744 * break # unexpected format or end of string => abort * elif c_pos[0] == b' ': * if c_pos[1] != b'%': # <<<<<<<<<<<<<< @@ -47590,7 +47705,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":739 + /* "src/lxml/xmlerror.pxi":743 * format_count += 1 * break # unexpected format or end of string => abort * elif c_pos[0] == b' ': # <<<<<<<<<<<<<< @@ -47600,7 +47715,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L6:; - /* "src/lxml/xmlerror.pxi":742 + /* "src/lxml/xmlerror.pxi":746 * if c_pos[1] != b'%': * c_name_pos = c_pos + 1 * c_pos += 1 # <<<<<<<<<<<<<< @@ -47611,7 +47726,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L5_break:; - /* "src/lxml/xmlerror.pxi":744 + /* "src/lxml/xmlerror.pxi":748 * c_pos += 1 * * c_message = NULL # <<<<<<<<<<<<<< @@ -47620,7 +47735,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_message = NULL; - /* "src/lxml/xmlerror.pxi":745 + /* "src/lxml/xmlerror.pxi":749 * * c_message = NULL * if c_text is NULL: # <<<<<<<<<<<<<< @@ -47630,7 +47745,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_c_text == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":746 + /* "src/lxml/xmlerror.pxi":750 * c_message = NULL * if c_text is NULL: * if c_element is not NULL and format_count == 1: # <<<<<<<<<<<<<< @@ -47648,7 +47763,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":748 + /* "src/lxml/xmlerror.pxi":752 * if c_element is not NULL and format_count == 1: * # special case: a single occurrence of 'element %s' * text_size = cstring_h.strlen(msg) # <<<<<<<<<<<<<< @@ -47657,7 +47772,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_text_size = strlen(__pyx_v_msg); - /* "src/lxml/xmlerror.pxi":749 + /* "src/lxml/xmlerror.pxi":753 * # special case: a single occurrence of 'element %s' * text_size = cstring_h.strlen(msg) * element_size = cstring_h.strlen(c_element) # <<<<<<<<<<<<<< @@ -47666,7 +47781,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_element_size = strlen(__pyx_v_c_element); - /* "src/lxml/xmlerror.pxi":750 + /* "src/lxml/xmlerror.pxi":754 * text_size = cstring_h.strlen(msg) * element_size = cstring_h.strlen(c_element) * c_message = stdlib.malloc( # <<<<<<<<<<<<<< @@ -47675,7 +47790,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_message = ((char *)malloc((((__pyx_v_text_size + __pyx_v_element_size) + 1) * (sizeof(char))))); - /* "src/lxml/xmlerror.pxi":752 + /* "src/lxml/xmlerror.pxi":756 * c_message = stdlib.malloc( * (text_size + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, msg, c_element) # <<<<<<<<<<<<<< @@ -47684,7 +47799,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ (void)(sprintf(__pyx_v_c_message, __pyx_v_msg, __pyx_v_c_element)); - /* "src/lxml/xmlerror.pxi":753 + /* "src/lxml/xmlerror.pxi":757 * (text_size + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, msg, c_element) * c_error.message = c_message # <<<<<<<<<<<<<< @@ -47693,7 +47808,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.message = __pyx_v_c_message; - /* "src/lxml/xmlerror.pxi":746 + /* "src/lxml/xmlerror.pxi":750 * c_message = NULL * if c_text is NULL: * if c_element is not NULL and format_count == 1: # <<<<<<<<<<<<<< @@ -47703,7 +47818,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L15; } - /* "src/lxml/xmlerror.pxi":755 + /* "src/lxml/xmlerror.pxi":759 * c_error.message = c_message * else: * c_error.message = '' # <<<<<<<<<<<<<< @@ -47715,7 +47830,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L15:; - /* "src/lxml/xmlerror.pxi":745 + /* "src/lxml/xmlerror.pxi":749 * * c_message = NULL * if c_text is NULL: # <<<<<<<<<<<<<< @@ -47725,7 +47840,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L14; } - /* "src/lxml/xmlerror.pxi":756 + /* "src/lxml/xmlerror.pxi":760 * else: * c_error.message = '' * elif c_element is NULL: # <<<<<<<<<<<<<< @@ -47735,7 +47850,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_c_element == NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":757 + /* "src/lxml/xmlerror.pxi":761 * c_error.message = '' * elif c_element is NULL: * c_error.message = c_text # <<<<<<<<<<<<<< @@ -47744,7 +47859,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.message = __pyx_v_c_text; - /* "src/lxml/xmlerror.pxi":756 + /* "src/lxml/xmlerror.pxi":760 * else: * c_error.message = '' * elif c_element is NULL: # <<<<<<<<<<<<<< @@ -47754,7 +47869,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle goto __pyx_L14; } - /* "src/lxml/xmlerror.pxi":759 + /* "src/lxml/xmlerror.pxi":763 * c_error.message = c_text * else: * text_size = cstring_h.strlen(c_text) # <<<<<<<<<<<<<< @@ -47764,7 +47879,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle /*else*/ { __pyx_v_text_size = strlen(__pyx_v_c_text); - /* "src/lxml/xmlerror.pxi":760 + /* "src/lxml/xmlerror.pxi":764 * else: * text_size = cstring_h.strlen(c_text) * element_size = cstring_h.strlen(c_element) # <<<<<<<<<<<<<< @@ -47773,7 +47888,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_element_size = strlen(__pyx_v_c_element); - /* "src/lxml/xmlerror.pxi":761 + /* "src/lxml/xmlerror.pxi":765 * text_size = cstring_h.strlen(c_text) * element_size = cstring_h.strlen(c_element) * c_message = stdlib.malloc( # <<<<<<<<<<<<<< @@ -47782,7 +47897,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_message = ((char *)malloc(((((__pyx_v_text_size + 12) + __pyx_v_element_size) + 1) * (sizeof(char))))); - /* "src/lxml/xmlerror.pxi":763 + /* "src/lxml/xmlerror.pxi":767 * c_message = stdlib.malloc( * (text_size + 12 + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, "%s, element '%s'", c_text, c_element) # <<<<<<<<<<<<<< @@ -47791,7 +47906,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ (void)(sprintf(__pyx_v_c_message, ((char const *)"%s, element '%s'"), __pyx_v_c_text, __pyx_v_c_element)); - /* "src/lxml/xmlerror.pxi":764 + /* "src/lxml/xmlerror.pxi":768 * (text_size + 12 + element_size + 1) * sizeof(char)) * stdio.sprintf(c_message, "%s, element '%s'", c_text, c_element) * c_error.message = c_message # <<<<<<<<<<<<<< @@ -47802,7 +47917,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle } __pyx_L14:; - /* "src/lxml/xmlerror.pxi":766 + /* "src/lxml/xmlerror.pxi":770 * c_error.message = c_message * * c_error.domain = c_domain # <<<<<<<<<<<<<< @@ -47811,7 +47926,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.domain = __pyx_v_c_domain; - /* "src/lxml/xmlerror.pxi":767 + /* "src/lxml/xmlerror.pxi":771 * * c_error.domain = c_domain * c_error.code = xmlerror.XML_ERR_OK # what else? # <<<<<<<<<<<<<< @@ -47820,7 +47935,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.code = XML_ERR_OK; - /* "src/lxml/xmlerror.pxi":768 + /* "src/lxml/xmlerror.pxi":772 * c_error.domain = c_domain * c_error.code = xmlerror.XML_ERR_OK # what else? * c_error.level = xmlerror.XML_ERR_ERROR # what else? # <<<<<<<<<<<<<< @@ -47829,7 +47944,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.level = XML_ERR_ERROR; - /* "src/lxml/xmlerror.pxi":769 + /* "src/lxml/xmlerror.pxi":773 * c_error.code = xmlerror.XML_ERR_OK # what else? * c_error.level = xmlerror.XML_ERR_ERROR # what else? * c_error.int2 = 0 # <<<<<<<<<<<<<< @@ -47838,7 +47953,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_v_c_error.int2 = 0; - /* "src/lxml/xmlerror.pxi":771 + /* "src/lxml/xmlerror.pxi":775 * c_error.int2 = 0 * * _forwardError(c_log_handler, &c_error) # <<<<<<<<<<<<<< @@ -47847,7 +47962,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ __pyx_f_4lxml_5etree__forwardError(__pyx_v_c_log_handler, (&__pyx_v_c_error)); - /* "src/lxml/xmlerror.pxi":773 + /* "src/lxml/xmlerror.pxi":777 * _forwardError(c_log_handler, &c_error) * * if c_message is not NULL: # <<<<<<<<<<<<<< @@ -47857,7 +47972,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_t_1 = ((__pyx_v_c_message != NULL) != 0); if (__pyx_t_1) { - /* "src/lxml/xmlerror.pxi":774 + /* "src/lxml/xmlerror.pxi":778 * * if c_message is not NULL: * stdlib.free(c_message) # <<<<<<<<<<<<<< @@ -47866,7 +47981,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ free(__pyx_v_c_message); - /* "src/lxml/xmlerror.pxi":773 + /* "src/lxml/xmlerror.pxi":777 * _forwardError(c_log_handler, &c_error) * * if c_message is not NULL: # <<<<<<<<<<<<<< @@ -47875,7 +47990,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle */ } - /* "src/lxml/xmlerror.pxi":692 + /* "src/lxml/xmlerror.pxi":696 * * * cdef void _receiveGenericError(void* c_log_handler, int c_domain, # <<<<<<<<<<<<<< @@ -47887,7 +48002,7 @@ static void __pyx_f_4lxml_5etree__receiveGenericError(void *__pyx_v_c_log_handle __pyx_L0:; } -/* "src/lxml/xmlerror.pxi":780 +/* "src/lxml/xmlerror.pxi":784 * ################################################################################ * * cdef __initErrorConstants(): # <<<<<<<<<<<<<< @@ -47920,16 +48035,16 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { int __pyx_t_13; __Pyx_RefNannySetupContext("__initErrorConstants", 0); - /* "src/lxml/xmlerror.pxi":783 + /* "src/lxml/xmlerror.pxi":787 * "Called at setup time to parse the constants and build the classes below." * global __ERROR_LEVELS, __ERROR_DOMAINS, __PARSER_ERROR_TYPES, __RELAXNG_ERROR_TYPES * const_defs = ((ErrorLevels, __ERROR_LEVELS), # <<<<<<<<<<<<<< * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorLevels); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 783, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -47938,16 +48053,16 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_4lxml_5etree___ERROR_LEVELS); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":784 + /* "src/lxml/xmlerror.pxi":788 * global __ERROR_LEVELS, __ERROR_DOMAINS, __PARSER_ERROR_TYPES, __RELAXNG_ERROR_TYPES * const_defs = ((ErrorLevels, __ERROR_LEVELS), * (ErrorDomains, __ERROR_DOMAINS), # <<<<<<<<<<<<<< * (ErrorTypes, __PARSER_ERROR_TYPES), * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 784, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorDomains); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 784, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); @@ -47956,16 +48071,16 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_4lxml_5etree___ERROR_DOMAINS); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":785 + /* "src/lxml/xmlerror.pxi":789 * const_defs = ((ErrorLevels, __ERROR_LEVELS), * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), # <<<<<<<<<<<<<< * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 785, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ErrorTypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 785, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -47974,16 +48089,16 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_4lxml_5etree___PARSER_ERROR_TYPES); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":786 + /* "src/lxml/xmlerror.pxi":790 * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) # <<<<<<<<<<<<<< * * for cls, constants in const_defs: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RelaxNGErrorTypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 786, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_RelaxNGErrorTypes); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 786, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 790, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); @@ -47992,14 +48107,14 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_4lxml_5etree___RELAXNG_ERROR_TYPES); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":783 + /* "src/lxml/xmlerror.pxi":787 * "Called at setup time to parse the constants and build the classes below." * global __ERROR_LEVELS, __ERROR_DOMAINS, __PARSER_ERROR_TYPES, __RELAXNG_ERROR_TYPES * const_defs = ((ErrorLevels, __ERROR_LEVELS), # <<<<<<<<<<<<<< * (ErrorDomains, __ERROR_DOMAINS), * (ErrorTypes, __PARSER_ERROR_TYPES), */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 783, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); @@ -48016,7 +48131,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __pyx_v_const_defs = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":788 + /* "src/lxml/xmlerror.pxi":792 * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) * * for cls, constants in const_defs: # <<<<<<<<<<<<<< @@ -48027,9 +48142,9 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { for (;;) { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(1, 792, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if (likely(__pyx_t_5 != Py_None)) { @@ -48038,7 +48153,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 788, __pyx_L1_error) + __PYX_ERR(1, 792, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); @@ -48046,61 +48161,61 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 788, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 788, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 792, __pyx_L1_error) } __Pyx_XDECREF_SET(__pyx_v_cls, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_constants, __pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":789 + /* "src/lxml/xmlerror.pxi":793 * * for cls, constants in const_defs: * reverse_dict = {} # <<<<<<<<<<<<<< * cls._names = reverse_dict * cls._getName = reverse_dict.get */ - __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 789, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_reverse_dict, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":790 + /* "src/lxml/xmlerror.pxi":794 * for cls, constants in const_defs: * reverse_dict = {} * cls._names = reverse_dict # <<<<<<<<<<<<<< * cls._getName = reverse_dict.get * for line in constants.splitlines(): */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_names, __pyx_v_reverse_dict) < 0) __PYX_ERR(1, 790, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_names, __pyx_v_reverse_dict) < 0) __PYX_ERR(1, 794, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":791 + /* "src/lxml/xmlerror.pxi":795 * reverse_dict = {} * cls._names = reverse_dict * cls._getName = reverse_dict.get # <<<<<<<<<<<<<< * for line in constants.splitlines(): * if not line: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 791, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_reverse_dict, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 795, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_getName, __pyx_t_5) < 0) __PYX_ERR(1, 791, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_cls, __pyx_n_s_getName, __pyx_t_5) < 0) __PYX_ERR(1, 795, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":792 + /* "src/lxml/xmlerror.pxi":796 * cls._names = reverse_dict * cls._getName = reverse_dict.get * for line in constants.splitlines(): # <<<<<<<<<<<<<< * if not line: * continue */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_constants, __pyx_n_s_splitlines); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_constants, __pyx_n_s_splitlines); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -48114,16 +48229,16 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 796, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -48131,17 +48246,17 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 796, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(1, 796, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 792, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -48151,7 +48266,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(1, 792, __pyx_L1_error) + else __PYX_ERR(1, 796, __pyx_L1_error) } break; } @@ -48160,18 +48275,18 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":793 + /* "src/lxml/xmlerror.pxi":797 * cls._getName = reverse_dict.get * for line in constants.splitlines(): * if not line: # <<<<<<<<<<<<<< * continue * name, value = line.split('=') */ - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 793, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(1, 797, __pyx_L1_error) __pyx_t_10 = ((!__pyx_t_9) != 0); if (__pyx_t_10) { - /* "src/lxml/xmlerror.pxi":794 + /* "src/lxml/xmlerror.pxi":798 * for line in constants.splitlines(): * if not line: * continue # <<<<<<<<<<<<<< @@ -48180,7 +48295,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { */ goto __pyx_L5_continue; - /* "src/lxml/xmlerror.pxi":793 + /* "src/lxml/xmlerror.pxi":797 * cls._getName = reverse_dict.get * for line in constants.splitlines(): * if not line: # <<<<<<<<<<<<<< @@ -48189,14 +48304,14 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { */ } - /* "src/lxml/xmlerror.pxi":795 + /* "src/lxml/xmlerror.pxi":799 * if not line: * continue * name, value = line.split('=') # <<<<<<<<<<<<<< * value = int(value) * setattr(cls, name, value) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 795, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -48210,7 +48325,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { } __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_s__20) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_s__20); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 795, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -48219,7 +48334,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(1, 795, __pyx_L1_error) + __PYX_ERR(1, 799, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -48232,15 +48347,15 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 795, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 795, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 795, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(1, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -48248,7 +48363,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_2 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(1, 795, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(1, 799, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9_unpacking_done; @@ -48256,7 +48371,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(1, 795, __pyx_L1_error) + __PYX_ERR(1, 799, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_4); @@ -48264,37 +48379,37 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "src/lxml/xmlerror.pxi":796 + /* "src/lxml/xmlerror.pxi":800 * continue * name, value = line.split('=') * value = int(value) # <<<<<<<<<<<<<< * setattr(cls, name, value) * reverse_dict[value] = name */ - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 796, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_v_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_5); __pyx_t_5 = 0; - /* "src/lxml/xmlerror.pxi":797 + /* "src/lxml/xmlerror.pxi":801 * name, value = line.split('=') * value = int(value) * setattr(cls, name, value) # <<<<<<<<<<<<<< * reverse_dict[value] = name * */ - __pyx_t_13 = PyObject_SetAttr(__pyx_v_cls, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 797, __pyx_L1_error) + __pyx_t_13 = PyObject_SetAttr(__pyx_v_cls, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(1, 801, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":798 + /* "src/lxml/xmlerror.pxi":802 * value = int(value) * setattr(cls, name, value) * reverse_dict[value] = name # <<<<<<<<<<<<<< * * # discard the global tuple references after use */ - if (unlikely(PyDict_SetItem(__pyx_v_reverse_dict, __pyx_v_value, __pyx_v_name) < 0)) __PYX_ERR(1, 798, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_reverse_dict, __pyx_v_value, __pyx_v_name) < 0)) __PYX_ERR(1, 802, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":792 + /* "src/lxml/xmlerror.pxi":796 * cls._names = reverse_dict * cls._getName = reverse_dict.get * for line in constants.splitlines(): # <<<<<<<<<<<<<< @@ -48305,7 +48420,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "src/lxml/xmlerror.pxi":788 + /* "src/lxml/xmlerror.pxi":792 * (RelaxNGErrorTypes, __RELAXNG_ERROR_TYPES)) * * for cls, constants in const_defs: # <<<<<<<<<<<<<< @@ -48315,7 +48430,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "src/lxml/xmlerror.pxi":801 + /* "src/lxml/xmlerror.pxi":805 * * # discard the global tuple references after use * __ERROR_LEVELS = __ERROR_DOMAINS = __PARSER_ERROR_TYPES = __RELAXNG_ERROR_TYPES = None # <<<<<<<<<<<<<< @@ -48339,7 +48454,7 @@ static PyObject *__pyx_f_4lxml_5etree___initErrorConstants(void) { __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___RELAXNG_ERROR_TYPES, Py_None); __Pyx_GIVEREF(Py_None); - /* "src/lxml/xmlerror.pxi":780 + /* "src/lxml/xmlerror.pxi":784 * ################################################################################ * * cdef __initErrorConstants(): # <<<<<<<<<<<<<< @@ -50193,7 +50308,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre * if not root_name and (public_id or system_url): * raise ValueError, u"Could not find root node" # <<<<<<<<<<<<<< * - * property root_name: + * @property */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Could_not_find_root_node, 0, 0); __PYX_ERR(0, 516, __pyx_L1_error) @@ -50234,12 +50349,12 @@ static int __pyx_pf_4lxml_5etree_7DocInfo___cinit__(struct __pyx_obj_4lxml_5etre return __pyx_r; } -/* "lxml/etree.pyx":520 - * property root_name: - * u"Returns the name of the root node as defined by the DOCTYPE." - * def __get__(self): # <<<<<<<<<<<<<< - * root_name, public_id, system_url = self._doc.getdoctype() - * return root_name +/* "lxml/etree.pyx":519 + * + * @property + * def root_name(self): # <<<<<<<<<<<<<< + * """Returns the name of the root node as defined by the DOCTYPE.""" + * root_name, public_id, system_url = self._doc.getdoctype() */ /* Python wrapper */ @@ -50270,10 +50385,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":521 - * u"Returns the name of the root node as defined by the DOCTYPE." - * def __get__(self): - * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< - * return root_name + * def root_name(self): + * """Returns the name of the root node as defined by the DOCTYPE.""" + * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< + * return root_name * */ __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) @@ -50339,9 +50454,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __pyx_t_4 = 0; /* "lxml/etree.pyx":522 - * def __get__(self): - * root_name, public_id, system_url = self._doc.getdoctype() - * return root_name # <<<<<<<<<<<<<< + * """Returns the name of the root node as defined by the DOCTYPE.""" + * root_name, public_id, system_url = self._doc.getdoctype() + * return root_name # <<<<<<<<<<<<<< * * @cython.final */ @@ -50350,12 +50465,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ __pyx_r = __pyx_v_root_name; goto __pyx_L0; - /* "lxml/etree.pyx":520 - * property root_name: - * u"Returns the name of the root node as defined by the DOCTYPE." - * def __get__(self): # <<<<<<<<<<<<<< - * root_name, public_id, system_url = self._doc.getdoctype() - * return root_name + /* "lxml/etree.pyx":519 + * + * @property + * def root_name(self): # <<<<<<<<<<<<<< + * """Returns the name of the root node as defined by the DOCTYPE.""" + * root_name, public_id, system_url = self._doc.getdoctype() */ /* function exit code */ @@ -50380,7 +50495,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_9root_name___get__(struct __pyx_ * * @cython.final * cdef tree.xmlDtd* _get_c_dtd(self): # <<<<<<<<<<<<<< - * u"""Return the DTD. Create it if it does not yet exist.""" + * """"Return the DTD. Create it if it does not yet exist.""" * cdef xmlDoc* c_doc = self._doc._c_doc */ @@ -50397,7 +50512,7 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 /* "lxml/etree.pyx":527 * cdef tree.xmlDtd* _get_c_dtd(self): - * u"""Return the DTD. Create it if it does not yet exist.""" + * """"Return the DTD. Create it if it does not yet exist.""" * cdef xmlDoc* c_doc = self._doc._c_doc # <<<<<<<<<<<<<< * cdef xmlNode* c_root_node * cdef const_xmlChar* c_name @@ -50471,7 +50586,7 @@ static xmlDtd *__pyx_f_4lxml_5etree_7DocInfo__get_c_dtd(struct __pyx_obj_4lxml_5 * * @cython.final * cdef tree.xmlDtd* _get_c_dtd(self): # <<<<<<<<<<<<<< - * u"""Return the DTD. Create it if it does not yet exist.""" + * """"Return the DTD. Create it if it does not yet exist.""" * cdef xmlDoc* c_doc = self._doc._c_doc */ @@ -51432,7 +51547,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj * tree.xmlFree(c_dtd.SystemID) * c_dtd.SystemID = c_value # <<<<<<<<<<<<<< * - * property xml_version: + * @property */ __pyx_v_c_dtd->SystemID = __pyx_v_c_value; @@ -51457,12 +51572,12 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_10system_url_2__set__(struct __pyx_obj return __pyx_r; } -/* "lxml/etree.pyx":609 - * property xml_version: - * u"Returns the XML version as declared by the document." - * def __get__(self): # <<<<<<<<<<<<<< - * xml_version, encoding = self._doc.getxmlinfo() - * return xml_version +/* "lxml/etree.pyx":608 + * + * @property + * def xml_version(self): # <<<<<<<<<<<<<< + * """Returns the XML version as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() */ /* Python wrapper */ @@ -51491,10 +51606,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":610 - * u"Returns the XML version as declared by the document." - * def __get__(self): - * xml_version, encoding = self._doc.getxmlinfo() # <<<<<<<<<<<<<< - * return xml_version + * def xml_version(self): + * """Returns the XML version as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() # <<<<<<<<<<<<<< + * return xml_version * */ __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getxmlinfo(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) @@ -51551,23 +51666,23 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p __pyx_t_3 = 0; /* "lxml/etree.pyx":611 - * def __get__(self): - * xml_version, encoding = self._doc.getxmlinfo() - * return xml_version # <<<<<<<<<<<<<< + * """Returns the XML version as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() + * return xml_version # <<<<<<<<<<<<<< * - * property encoding: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_xml_version); __pyx_r = __pyx_v_xml_version; goto __pyx_L0; - /* "lxml/etree.pyx":609 - * property xml_version: - * u"Returns the XML version as declared by the document." - * def __get__(self): # <<<<<<<<<<<<<< - * xml_version, encoding = self._doc.getxmlinfo() - * return xml_version + /* "lxml/etree.pyx":608 + * + * @property + * def xml_version(self): # <<<<<<<<<<<<<< + * """Returns the XML version as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() */ /* function exit code */ @@ -51586,12 +51701,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11xml_version___get__(struct __p return __pyx_r; } -/* "lxml/etree.pyx":615 - * property encoding: - * u"Returns the encoding name as declared by the document." - * def __get__(self): # <<<<<<<<<<<<<< - * xml_version, encoding = self._doc.getxmlinfo() - * return encoding +/* "lxml/etree.pyx":614 + * + * @property + * def encoding(self): # <<<<<<<<<<<<<< + * """Returns the encoding name as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() */ /* Python wrapper */ @@ -51620,10 +51735,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":616 - * u"Returns the encoding name as declared by the document." - * def __get__(self): - * xml_version, encoding = self._doc.getxmlinfo() # <<<<<<<<<<<<<< - * return encoding + * def encoding(self): + * """Returns the encoding name as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() # <<<<<<<<<<<<<< + * return encoding * */ __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getxmlinfo(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) @@ -51680,23 +51795,23 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o __pyx_t_3 = 0; /* "lxml/etree.pyx":617 - * def __get__(self): - * xml_version, encoding = self._doc.getxmlinfo() - * return encoding # <<<<<<<<<<<<<< + * """Returns the encoding name as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() + * return encoding # <<<<<<<<<<<<<< * - * property standalone: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_encoding); __pyx_r = __pyx_v_encoding; goto __pyx_L0; - /* "lxml/etree.pyx":615 - * property encoding: - * u"Returns the encoding name as declared by the document." - * def __get__(self): # <<<<<<<<<<<<<< - * xml_version, encoding = self._doc.getxmlinfo() - * return encoding + /* "lxml/etree.pyx":614 + * + * @property + * def encoding(self): # <<<<<<<<<<<<<< + * """Returns the encoding name as declared by the document.""" + * xml_version, encoding = self._doc.getxmlinfo() */ /* function exit code */ @@ -51715,12 +51830,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_8encoding___get__(struct __pyx_o return __pyx_r; } -/* "lxml/etree.pyx":627 - * ``standalone`` flag was set to ``'yes'`` or not. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._doc.isstandalone() +/* "lxml/etree.pyx":620 * + * @property + * def standalone(self): # <<<<<<<<<<<<<< + * """Returns the standalone flag as declared by the document. The possible + * values are True (``standalone='yes'``), False */ /* Python wrapper */ @@ -51743,9 +51858,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10standalone___get__(struct __py __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":628 + * ``standalone`` flag was set to ``'yes'`` or not. * """ - * def __get__(self): - * return self._doc.isstandalone() # <<<<<<<<<<<<<< + * return self._doc.isstandalone() # <<<<<<<<<<<<<< * * property URL: */ @@ -51756,12 +51871,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_10standalone___get__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":627 - * ``standalone`` flag was set to ``'yes'`` or not. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._doc.isstandalone() + /* "lxml/etree.pyx":620 * + * @property + * def standalone(self): # <<<<<<<<<<<<<< + * """Returns the standalone flag as declared by the document. The possible + * values are True (``standalone='yes'``), False */ /* function exit code */ @@ -51977,7 +52092,7 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5 * if c_oldurl is not NULL: * tree.xmlFree(c_oldurl) # <<<<<<<<<<<<<< * - * property doctype: + * @property */ xmlFree(((void *)__pyx_v_c_oldurl)); @@ -52011,12 +52126,12 @@ static int __pyx_pf_4lxml_5etree_7DocInfo_3URL_2__set__(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":648 - * property doctype: - * u"Returns a DOCTYPE declaration string for the document." - * def __get__(self): # <<<<<<<<<<<<<< - * root_name, public_id, system_url = self._doc.getdoctype() - * if system_url: +/* "lxml/etree.pyx":647 + * + * @property + * def doctype(self): # <<<<<<<<<<<<<< + * """Returns a DOCTYPE declaration string for the document.""" + * root_name, public_id, system_url = self._doc.getdoctype() */ /* Python wrapper */ @@ -52052,11 +52167,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":649 - * u"Returns a DOCTYPE declaration string for the document." - * def __get__(self): - * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< - * if system_url: - * # If '"' in system_url, we must escape it with single + * def doctype(self): + * """Returns a DOCTYPE declaration string for the document.""" + * root_name, public_id, system_url = self._doc.getdoctype() # <<<<<<<<<<<<<< + * if system_url: + * # If '"' in system_url, we must escape it with single */ __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getdoctype(__pyx_v_self->_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -52121,32 +52236,32 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_4 = 0; /* "lxml/etree.pyx":650 - * def __get__(self): - * root_name, public_id, system_url = self._doc.getdoctype() - * if system_url: # <<<<<<<<<<<<<< - * # If '"' in system_url, we must escape it with single - * # quotes, otherwise escape with double quotes. If url + * """Returns a DOCTYPE declaration string for the document.""" + * root_name, public_id, system_url = self._doc.getdoctype() + * if system_url: # <<<<<<<<<<<<<< + * # If '"' in system_url, we must escape it with single + * # quotes, otherwise escape with double quotes. If url */ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 650, __pyx_L1_error) if (__pyx_t_7) { /* "lxml/etree.pyx":655 - * # contains both a single quote and a double quote, XML - * # standard is being violated. - * if '"' in system_url: # <<<<<<<<<<<<<< - * quoted_system_url = f"'{system_url}'" - * else: + * # contains both a single quote and a double quote, XML + * # standard is being violated. + * if '"' in system_url: # <<<<<<<<<<<<<< + * quoted_system_url = f"'{system_url}'" + * else: */ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_kp_s__22, __pyx_v_system_url, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 655, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "lxml/etree.pyx":656 - * # standard is being violated. - * if '"' in system_url: - * quoted_system_url = f"'{system_url}'" # <<<<<<<<<<<<<< - * else: - * quoted_system_url = f'"{system_url}"' + * # standard is being violated. + * if '"' in system_url: + * quoted_system_url = f"'{system_url}'" # <<<<<<<<<<<<<< + * else: + * quoted_system_url = f'"{system_url}"' */ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -52174,21 +52289,21 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_t_4 = 0; /* "lxml/etree.pyx":655 - * # contains both a single quote and a double quote, XML - * # standard is being violated. - * if '"' in system_url: # <<<<<<<<<<<<<< - * quoted_system_url = f"'{system_url}'" - * else: + * # contains both a single quote and a double quote, XML + * # standard is being violated. + * if '"' in system_url: # <<<<<<<<<<<<<< + * quoted_system_url = f"'{system_url}'" + * else: */ goto __pyx_L6; } /* "lxml/etree.pyx":658 - * quoted_system_url = f"'{system_url}'" - * else: - * quoted_system_url = f'"{system_url}"' # <<<<<<<<<<<<<< - * if public_id: - * if system_url: + * quoted_system_url = f"'{system_url}'" + * else: + * quoted_system_url = f'"{system_url}"' # <<<<<<<<<<<<<< + * if public_id: + * if system_url: */ /*else*/ { __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) @@ -52219,40 +52334,40 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob __pyx_L6:; /* "lxml/etree.pyx":650 - * def __get__(self): - * root_name, public_id, system_url = self._doc.getdoctype() - * if system_url: # <<<<<<<<<<<<<< - * # If '"' in system_url, we must escape it with single - * # quotes, otherwise escape with double quotes. If url + * """Returns a DOCTYPE declaration string for the document.""" + * root_name, public_id, system_url = self._doc.getdoctype() + * if system_url: # <<<<<<<<<<<<<< + * # If '"' in system_url, we must escape it with single + * # quotes, otherwise escape with double quotes. If url */ } /* "lxml/etree.pyx":659 - * else: - * quoted_system_url = f'"{system_url}"' - * if public_id: # <<<<<<<<<<<<<< - * if system_url: - * return f'' + * else: + * quoted_system_url = f'"{system_url}"' + * if public_id: # <<<<<<<<<<<<<< + * if system_url: + * return f'' */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_public_id); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 659, __pyx_L1_error) if (__pyx_t_8) { /* "lxml/etree.pyx":660 - * quoted_system_url = f'"{system_url}"' - * if public_id: - * if system_url: # <<<<<<<<<<<<<< - * return f'' - * else: + * quoted_system_url = f'"{system_url}"' + * if public_id: + * if system_url: # <<<<<<<<<<<<<< + * return f'' + * else: */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 660, __pyx_L1_error) if (__pyx_t_8) { /* "lxml/etree.pyx":661 - * if public_id: - * if system_url: - * return f'' # <<<<<<<<<<<<<< - * else: - * return f'' + * if public_id: + * if system_url: + * return f'' # <<<<<<<<<<<<<< + * else: + * return f'' */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error) @@ -52303,20 +52418,20 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L0; /* "lxml/etree.pyx":660 - * quoted_system_url = f'"{system_url}"' - * if public_id: - * if system_url: # <<<<<<<<<<<<<< - * return f'' - * else: + * quoted_system_url = f'"{system_url}"' + * if public_id: + * if system_url: # <<<<<<<<<<<<<< + * return f'' + * else: */ } /* "lxml/etree.pyx":663 - * return f'' - * else: - * return f'' # <<<<<<<<<<<<<< - * elif system_url: - * return f'' + * return f'' + * else: + * return f'' # <<<<<<<<<<<<<< + * elif system_url: + * return f'' */ /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -52359,30 +52474,30 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob } /* "lxml/etree.pyx":659 - * else: - * quoted_system_url = f'"{system_url}"' - * if public_id: # <<<<<<<<<<<<<< - * if system_url: - * return f'' + * else: + * quoted_system_url = f'"{system_url}"' + * if public_id: # <<<<<<<<<<<<<< + * if system_url: + * return f'' */ } /* "lxml/etree.pyx":664 - * else: - * return f'' - * elif system_url: # <<<<<<<<<<<<<< - * return f'' - * elif self._doc.hasdoctype(): + * else: + * return f'' + * elif system_url: # <<<<<<<<<<<<<< + * return f'' + * elif self._doc.hasdoctype(): */ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_system_url); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 664, __pyx_L1_error) if (__pyx_t_8) { /* "lxml/etree.pyx":665 - * return f'' - * elif system_url: - * return f'' # <<<<<<<<<<<<<< - * elif self._doc.hasdoctype(): - * return f'' + * return f'' + * elif system_url: + * return f'' # <<<<<<<<<<<<<< + * elif self._doc.hasdoctype(): + * return f'' */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 665, __pyx_L1_error) @@ -52422,30 +52537,30 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L0; /* "lxml/etree.pyx":664 - * else: - * return f'' - * elif system_url: # <<<<<<<<<<<<<< - * return f'' - * elif self._doc.hasdoctype(): + * else: + * return f'' + * elif system_url: # <<<<<<<<<<<<<< + * return f'' + * elif self._doc.hasdoctype(): */ } /* "lxml/etree.pyx":666 - * elif system_url: - * return f'' - * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< - * return f'' - * else: + * elif system_url: + * return f'' + * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< + * return f'' + * else: */ __pyx_t_8 = (__pyx_f_4lxml_5etree_9_Document_hasdoctype(__pyx_v_self->_doc) != 0); if (__pyx_t_8) { /* "lxml/etree.pyx":667 - * return f'' - * elif self._doc.hasdoctype(): - * return f'' # <<<<<<<<<<<<<< - * else: - * return u'' + * return f'' + * elif self._doc.hasdoctype(): + * return f'' # <<<<<<<<<<<<<< + * else: + * return u'' */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 667, __pyx_L1_error) @@ -52475,20 +52590,20 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L0; /* "lxml/etree.pyx":666 - * elif system_url: - * return f'' - * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< - * return f'' - * else: + * elif system_url: + * return f'' + * elif self._doc.hasdoctype(): # <<<<<<<<<<<<<< + * return f'' + * else: */ } /* "lxml/etree.pyx":669 - * return f'' - * else: - * return u'' # <<<<<<<<<<<<<< + * return f'' + * else: + * return u'' # <<<<<<<<<<<<<< * - * property internalDTD: + * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -52497,12 +52612,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob goto __pyx_L0; } - /* "lxml/etree.pyx":648 - * property doctype: - * u"Returns a DOCTYPE declaration string for the document." - * def __get__(self): # <<<<<<<<<<<<<< - * root_name, public_id, system_url = self._doc.getdoctype() - * if system_url: + /* "lxml/etree.pyx":647 + * + * @property + * def doctype(self): # <<<<<<<<<<<<<< + * """Returns a DOCTYPE declaration string for the document.""" + * root_name, public_id, system_url = self._doc.getdoctype() */ /* function exit code */ @@ -52524,12 +52639,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_7doctype___get__(struct __pyx_ob return __pyx_r; } -/* "lxml/etree.pyx":673 - * property internalDTD: - * u"Returns a DTD validator based on the internal subset of the document." - * def __get__(self): # <<<<<<<<<<<<<< - * return _dtdFactory(self._doc._c_doc.intSubset) +/* "lxml/etree.pyx":672 * + * @property + * def internalDTD(self): # <<<<<<<<<<<<<< + * """Returns a DTD validator based on the internal subset of the document.""" + * return _dtdFactory(self._doc._c_doc.intSubset) */ /* Python wrapper */ @@ -52552,11 +52667,11 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11internalDTD___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":674 - * u"Returns a DTD validator based on the internal subset of the document." - * def __get__(self): - * return _dtdFactory(self._doc._c_doc.intSubset) # <<<<<<<<<<<<<< + * def internalDTD(self): + * """Returns a DTD validator based on the internal subset of the document.""" + * return _dtdFactory(self._doc._c_doc.intSubset) # <<<<<<<<<<<<<< * - * property externalDTD: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__dtdFactory(__pyx_v_self->_doc->_c_doc->intSubset)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error) @@ -52565,12 +52680,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11internalDTD___get__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":673 - * property internalDTD: - * u"Returns a DTD validator based on the internal subset of the document." - * def __get__(self): # <<<<<<<<<<<<<< - * return _dtdFactory(self._doc._c_doc.intSubset) + /* "lxml/etree.pyx":672 * + * @property + * def internalDTD(self): # <<<<<<<<<<<<<< + * """Returns a DTD validator based on the internal subset of the document.""" + * return _dtdFactory(self._doc._c_doc.intSubset) */ /* function exit code */ @@ -52584,12 +52699,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11internalDTD___get__(struct __p return __pyx_r; } -/* "lxml/etree.pyx":678 - * property externalDTD: - * u"Returns a DTD validator based on the external subset of the document." - * def __get__(self): # <<<<<<<<<<<<<< - * return _dtdFactory(self._doc._c_doc.extSubset) +/* "lxml/etree.pyx":677 * + * @property + * def externalDTD(self): # <<<<<<<<<<<<<< + * """Returns a DTD validator based on the external subset of the document.""" + * return _dtdFactory(self._doc._c_doc.extSubset) */ /* Python wrapper */ @@ -52612,9 +52727,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11externalDTD___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":679 - * u"Returns a DTD validator based on the external subset of the document." - * def __get__(self): - * return _dtdFactory(self._doc._c_doc.extSubset) # <<<<<<<<<<<<<< + * def externalDTD(self): + * """Returns a DTD validator based on the external subset of the document.""" + * return _dtdFactory(self._doc._c_doc.extSubset) # <<<<<<<<<<<<<< * * */ @@ -52625,12 +52740,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7DocInfo_11externalDTD___get__(struct __p __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":678 - * property externalDTD: - * u"Returns a DTD validator based on the external subset of the document." - * def __get__(self): # <<<<<<<<<<<<<< - * return _dtdFactory(self._doc._c_doc.extSubset) + /* "lxml/etree.pyx":677 * + * @property + * def externalDTD(self): # <<<<<<<<<<<<<< + * """Returns a DTD validator based on the external subset of the document.""" + * return _dtdFactory(self._doc._c_doc.extSubset) */ /* function exit code */ @@ -55682,7 +55797,7 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p * else: * self._doc._setNodeNs(self._c_node, _xcstr(ns)) # <<<<<<<<<<<<<< * - * property attrib: + * @property */ /*else*/ { __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document__setNodeNs(__pyx_v_self->_doc, __pyx_v_self->_c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_ns)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 997, __pyx_L1_error) @@ -55714,12 +55829,12 @@ static int __pyx_pf_4lxml_5etree_8_Element_3tag_2__set__(struct LxmlElement *__p return __pyx_r; } -/* "lxml/etree.pyx":1003 - * keys(), values() and items() to access element attributes. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return _Attrib.__new__(_Attrib, self) +/* "lxml/etree.pyx":1000 * + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * """Element attribute dictionary. Where possible, use get(), set(), + * keys(), values() and items() to access element attributes. */ /* Python wrapper */ @@ -55743,9 +55858,9 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6attrib___get__(struct LxmlElem __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":1004 + * keys(), values() and items() to access element attributes. * """ - * def __get__(self): - * return _Attrib.__new__(_Attrib, self) # <<<<<<<<<<<<<< + * return _Attrib.__new__(_Attrib, self) # <<<<<<<<<<<<<< * * property text: */ @@ -55762,12 +55877,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6attrib___get__(struct LxmlElem __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1003 - * keys(), values() and items() to access element attributes. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return _Attrib.__new__(_Attrib, self) + /* "lxml/etree.pyx":1000 * + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * """Element attribute dictionary. Where possible, use get(), set(), + * keys(), values() and items() to access element attributes. */ /* function exit code */ @@ -56097,12 +56212,12 @@ static int __pyx_pf_4lxml_5etree_8_Element_4tail_2__set__(struct LxmlElement *__ return __pyx_r; } -/* "lxml/etree.pyx":1045 - * u"""Namespace prefix or None. +/* "lxml/etree.pyx":1043 + * # not in ElementTree, read-only + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * """Namespace prefix or None. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: */ /* Python wrapper */ @@ -56126,30 +56241,30 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":1046 + * """Namespace prefix or None. * """ - * def __get__(self): - * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) + * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) */ __pyx_t_1 = ((__pyx_v_self->_c_node->ns != NULL) != 0); if (__pyx_t_1) { /* "lxml/etree.pyx":1047 - * def __get__(self): - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< - * return funicode(self._c_node.ns.prefix) - * return None + * """ + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< + * return funicode(self._c_node.ns.prefix) + * return None */ __pyx_t_1 = ((__pyx_v_self->_c_node->ns->prefix != NULL) != 0); if (__pyx_t_1) { /* "lxml/etree.pyx":1048 - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) # <<<<<<<<<<<<<< - * return None + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) # <<<<<<<<<<<<<< + * return None * */ __Pyx_XDECREF(__pyx_r); @@ -56160,27 +56275,27 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem goto __pyx_L0; /* "lxml/etree.pyx":1047 - * def __get__(self): - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< - * return funicode(self._c_node.ns.prefix) - * return None + * """ + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< + * return funicode(self._c_node.ns.prefix) + * return None */ } /* "lxml/etree.pyx":1046 + * """Namespace prefix or None. * """ - * def __get__(self): - * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) + * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) */ } /* "lxml/etree.pyx":1049 - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) - * return None # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) + * return None # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ @@ -56188,12 +56303,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_6prefix___get__(struct LxmlElem __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1045 - * u"""Namespace prefix or None. + /* "lxml/etree.pyx":1043 + * # not in ElementTree, read-only + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * """Namespace prefix or None. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: */ /* function exit code */ @@ -56399,12 +56514,12 @@ static int __pyx_pf_4lxml_5etree_8_Element_10sourceline_2__set__(struct LxmlElem return __pyx_r; } -/* "lxml/etree.pyx":1076 - * Note that changing the returned dict has no effect on the Element. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef xmlNode* c_node - * cdef xmlNs* c_ns +/* "lxml/etree.pyx":1070 + * # not in ElementTree, read-only + * @property + * def nsmap(self): # <<<<<<<<<<<<<< + * """Namespace prefix->URI mapping known in the context of this + * Element. This includes all namespace declarations of the */ /* Python wrapper */ @@ -56436,20 +56551,20 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/etree.pyx":1079 - * cdef xmlNode* c_node - * cdef xmlNs* c_ns - * _assertValidNode(self) # <<<<<<<<<<<<<< - * nsmap = {} - * c_node = self._c_node + * cdef xmlNode* c_node + * cdef xmlNs* c_ns + * _assertValidNode(self) # <<<<<<<<<<<<<< + * nsmap = {} + * c_node = self._c_node */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1079, __pyx_L1_error) /* "lxml/etree.pyx":1080 - * cdef xmlNs* c_ns - * _assertValidNode(self) - * nsmap = {} # <<<<<<<<<<<<<< - * c_node = self._c_node - * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: + * cdef xmlNs* c_ns + * _assertValidNode(self) + * nsmap = {} # <<<<<<<<<<<<<< + * c_node = self._c_node + * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: */ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -56457,21 +56572,21 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __pyx_t_2 = 0; /* "lxml/etree.pyx":1081 - * _assertValidNode(self) - * nsmap = {} - * c_node = self._c_node # <<<<<<<<<<<<<< - * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: - * c_ns = c_node.nsDef + * _assertValidNode(self) + * nsmap = {} + * c_node = self._c_node # <<<<<<<<<<<<<< + * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: + * c_ns = c_node.nsDef */ __pyx_t_3 = __pyx_v_self->_c_node; __pyx_v_c_node = __pyx_t_3; /* "lxml/etree.pyx":1082 - * nsmap = {} - * c_node = self._c_node - * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * c_ns = c_node.nsDef - * while c_ns is not NULL: + * nsmap = {} + * c_node = self._c_node + * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * c_ns = c_node.nsDef + * while c_ns is not NULL: */ while (1) { __pyx_t_5 = ((__pyx_v_c_node != NULL) != 0); @@ -56486,32 +56601,32 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme if (!__pyx_t_4) break; /* "lxml/etree.pyx":1083 - * c_node = self._c_node - * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: - * c_ns = c_node.nsDef # <<<<<<<<<<<<<< - * while c_ns is not NULL: - * prefix = funicodeOrNone(c_ns.prefix) + * c_node = self._c_node + * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: + * c_ns = c_node.nsDef # <<<<<<<<<<<<<< + * while c_ns is not NULL: + * prefix = funicodeOrNone(c_ns.prefix) */ __pyx_t_6 = __pyx_v_c_node->nsDef; __pyx_v_c_ns = __pyx_t_6; /* "lxml/etree.pyx":1084 - * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: - * c_ns = c_node.nsDef - * while c_ns is not NULL: # <<<<<<<<<<<<<< - * prefix = funicodeOrNone(c_ns.prefix) - * if prefix not in nsmap: + * while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: + * c_ns = c_node.nsDef + * while c_ns is not NULL: # <<<<<<<<<<<<<< + * prefix = funicodeOrNone(c_ns.prefix) + * if prefix not in nsmap: */ while (1) { __pyx_t_4 = ((__pyx_v_c_ns != NULL) != 0); if (!__pyx_t_4) break; /* "lxml/etree.pyx":1085 - * c_ns = c_node.nsDef - * while c_ns is not NULL: - * prefix = funicodeOrNone(c_ns.prefix) # <<<<<<<<<<<<<< - * if prefix not in nsmap: - * nsmap[prefix] = funicodeOrNone(c_ns.href) + * c_ns = c_node.nsDef + * while c_ns is not NULL: + * prefix = funicodeOrNone(c_ns.prefix) # <<<<<<<<<<<<<< + * if prefix not in nsmap: + * nsmap[prefix] = funicodeOrNone(c_ns.href) */ __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_ns->prefix); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -56519,22 +56634,22 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __pyx_t_2 = 0; /* "lxml/etree.pyx":1086 - * while c_ns is not NULL: - * prefix = funicodeOrNone(c_ns.prefix) - * if prefix not in nsmap: # <<<<<<<<<<<<<< - * nsmap[prefix] = funicodeOrNone(c_ns.href) - * c_ns = c_ns.next + * while c_ns is not NULL: + * prefix = funicodeOrNone(c_ns.prefix) + * if prefix not in nsmap: # <<<<<<<<<<<<<< + * nsmap[prefix] = funicodeOrNone(c_ns.href) + * c_ns = c_ns.next */ __pyx_t_4 = (__Pyx_PyDict_ContainsTF(__pyx_v_prefix, __pyx_v_nsmap, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { /* "lxml/etree.pyx":1087 - * prefix = funicodeOrNone(c_ns.prefix) - * if prefix not in nsmap: - * nsmap[prefix] = funicodeOrNone(c_ns.href) # <<<<<<<<<<<<<< - * c_ns = c_ns.next - * c_node = c_node.parent + * prefix = funicodeOrNone(c_ns.prefix) + * if prefix not in nsmap: + * nsmap[prefix] = funicodeOrNone(c_ns.href) # <<<<<<<<<<<<<< + * c_ns = c_ns.next + * c_node = c_node.parent */ __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_c_ns->href); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -56542,30 +56657,30 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "lxml/etree.pyx":1086 - * while c_ns is not NULL: - * prefix = funicodeOrNone(c_ns.prefix) - * if prefix not in nsmap: # <<<<<<<<<<<<<< - * nsmap[prefix] = funicodeOrNone(c_ns.href) - * c_ns = c_ns.next + * while c_ns is not NULL: + * prefix = funicodeOrNone(c_ns.prefix) + * if prefix not in nsmap: # <<<<<<<<<<<<<< + * nsmap[prefix] = funicodeOrNone(c_ns.href) + * c_ns = c_ns.next */ } /* "lxml/etree.pyx":1088 - * if prefix not in nsmap: - * nsmap[prefix] = funicodeOrNone(c_ns.href) - * c_ns = c_ns.next # <<<<<<<<<<<<<< - * c_node = c_node.parent - * return nsmap + * if prefix not in nsmap: + * nsmap[prefix] = funicodeOrNone(c_ns.href) + * c_ns = c_ns.next # <<<<<<<<<<<<<< + * c_node = c_node.parent + * return nsmap */ __pyx_t_6 = __pyx_v_c_ns->next; __pyx_v_c_ns = __pyx_t_6; } /* "lxml/etree.pyx":1089 - * nsmap[prefix] = funicodeOrNone(c_ns.href) - * c_ns = c_ns.next - * c_node = c_node.parent # <<<<<<<<<<<<<< - * return nsmap + * nsmap[prefix] = funicodeOrNone(c_ns.href) + * c_ns = c_ns.next + * c_node = c_node.parent # <<<<<<<<<<<<<< + * return nsmap * */ __pyx_t_3 = __pyx_v_c_node->parent; @@ -56573,9 +56688,9 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme } /* "lxml/etree.pyx":1090 - * c_ns = c_ns.next - * c_node = c_node.parent - * return nsmap # <<<<<<<<<<<<<< + * c_ns = c_ns.next + * c_node = c_node.parent + * return nsmap # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ @@ -56584,12 +56699,12 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_5nsmap___get__(struct LxmlEleme __pyx_r = __pyx_v_nsmap; goto __pyx_L0; - /* "lxml/etree.pyx":1076 - * Note that changing the returned dict has no effect on the Element. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef xmlNode* c_node - * cdef xmlNs* c_ns + /* "lxml/etree.pyx":1070 + * # not in ElementTree, read-only + * @property + * def nsmap(self): # <<<<<<<<<<<<<< + * """Namespace prefix->URI mapping known in the context of this + * Element. This includes all namespace declarations of the */ /* function exit code */ @@ -59692,6 +59807,105 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme /* "lxml/etree.pyx":1390 * see `iter`. * """ + * if preceding: # <<<<<<<<<<<<<< + * if self._c_node and not self._c_node.prev: + * return ITER_EMPTY + */ + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_preceding); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1391 + * """ + * if preceding: + * if self._c_node and not self._c_node.prev: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * elif self._c_node and not self._c_node.next: + */ + __pyx_t_2 = (__pyx_v_self->_c_node != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_self->_c_node->prev != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L5_bool_binop_done:; + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1392 + * if preceding: + * if self._c_node and not self._c_node.prev: + * return ITER_EMPTY # <<<<<<<<<<<<<< + * elif self._c_node and not self._c_node.next: + * return ITER_EMPTY + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4lxml_5etree_ITER_EMPTY); + __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; + goto __pyx_L0; + + /* "lxml/etree.pyx":1391 + * """ + * if preceding: + * if self._c_node and not self._c_node.prev: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * elif self._c_node and not self._c_node.next: + */ + } + + /* "lxml/etree.pyx":1390 + * see `iter`. + * """ + * if preceding: # <<<<<<<<<<<<<< + * if self._c_node and not self._c_node.prev: + * return ITER_EMPTY + */ + goto __pyx_L3; + } + + /* "lxml/etree.pyx":1393 + * if self._c_node and not self._c_node.prev: + * return ITER_EMPTY + * elif self._c_node and not self._c_node.next: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + __pyx_t_2 = (__pyx_v_self->_c_node != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L7_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_self->_c_node->next != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L7_bool_binop_done:; + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1394 + * return ITER_EMPTY + * elif self._c_node and not self._c_node.next: + * return ITER_EMPTY # <<<<<<<<<<<<<< + * if tag is not None: + * tags += (tag,) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4lxml_5etree_ITER_EMPTY); + __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; + goto __pyx_L0; + + /* "lxml/etree.pyx":1393 + * if self._c_node and not self._c_node.prev: + * return ITER_EMPTY + * elif self._c_node and not self._c_node.next: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + } + __pyx_L3:; + + /* "lxml/etree.pyx":1395 + * elif self._c_node and not self._c_node.next: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return SiblingsIterator(self, tags, preceding=preceding) @@ -59700,34 +59914,34 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1391 - * """ + /* "lxml/etree.pyx":1396 + * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return SiblingsIterator(self, tags, preceding=preceding) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1390 - * see `iter`. - * """ + /* "lxml/etree.pyx":1395 + * elif self._c_node and not self._c_node.next: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return SiblingsIterator(self, tags, preceding=preceding) */ } - /* "lxml/etree.pyx":1392 + /* "lxml/etree.pyx":1397 * if tag is not None: * tags += (tag,) * return SiblingsIterator(self, tags, preceding=preceding) # <<<<<<<<<<<<<< @@ -59735,7 +59949,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme * def iterancestors(self, tag=None, *tags): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1392, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -59743,10 +59957,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1392, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_preceding, __pyx_v_preceding) < 0) __PYX_ERR(0, 1392, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_SiblingsIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_preceding, __pyx_v_preceding) < 0) __PYX_ERR(0, 1397, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_SiblingsIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -59776,7 +59990,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_62itersiblings(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":1394 +/* "lxml/etree.pyx":1399 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -59827,7 +60041,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_65iterancestors(PyObject *__pyx } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterancestors") < 0)) __PYX_ERR(0, 1394, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterancestors") < 0)) __PYX_ERR(0, 1399, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -59864,9 +60078,48 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem __Pyx_RefNannySetupContext("iterancestors", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1402 + /* "lxml/etree.pyx":1407 * see `iter`. * """ + * if self._c_node and not self._c_node.parent: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + __pyx_t_2 = (__pyx_v_self->_c_node != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_self->_c_node->parent != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1408 + * """ + * if self._c_node and not self._c_node.parent: + * return ITER_EMPTY # <<<<<<<<<<<<<< + * if tag is not None: + * tags += (tag,) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4lxml_5etree_ITER_EMPTY); + __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; + goto __pyx_L0; + + /* "lxml/etree.pyx":1407 + * see `iter`. + * """ + * if self._c_node and not self._c_node.parent: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + } + + /* "lxml/etree.pyx":1409 + * if self._c_node and not self._c_node.parent: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return AncestorsIterator(self, tags) @@ -59875,34 +60128,34 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1403 - * """ + /* "lxml/etree.pyx":1410 + * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return AncestorsIterator(self, tags) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1403, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1402 - * see `iter`. - * """ + /* "lxml/etree.pyx":1409 + * if self._c_node and not self._c_node.parent: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return AncestorsIterator(self, tags) */ } - /* "lxml/etree.pyx":1404 + /* "lxml/etree.pyx":1411 * if tag is not None: * tags += (tag,) * return AncestorsIterator(self, tags) # <<<<<<<<<<<<<< @@ -59910,7 +60163,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem * def iterdescendants(self, tag=None, *tags): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -59918,14 +60171,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_AncestorsIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_AncestorsIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1394 + /* "lxml/etree.pyx":1399 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -59946,7 +60199,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_64iterancestors(struct LxmlElem return __pyx_r; } -/* "lxml/etree.pyx":1406 +/* "lxml/etree.pyx":1413 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -59997,7 +60250,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_67iterdescendants(PyObject *__p } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterdescendants") < 0)) __PYX_ERR(0, 1406, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterdescendants") < 0)) __PYX_ERR(0, 1413, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60035,9 +60288,48 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __Pyx_RefNannySetupContext("iterdescendants", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1415 + /* "lxml/etree.pyx":1422 + * with specific tags, see `iter`. + * """ + * if self._c_node and not self._c_node.children: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + __pyx_t_2 = (__pyx_v_self->_c_node != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_self->_c_node->children != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1423 + * """ + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY # <<<<<<<<<<<<<< + * if tag is not None: + * tags += (tag,) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4lxml_5etree_ITER_EMPTY); + __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; + goto __pyx_L0; + + /* "lxml/etree.pyx":1422 * with specific tags, see `iter`. * """ + * if self._c_node and not self._c_node.children: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + } + + /* "lxml/etree.pyx":1424 + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementDepthFirstIterator(self, tags, inclusive=False) @@ -60046,34 +60338,34 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1416 - * """ + /* "lxml/etree.pyx":1425 + * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags, inclusive=False) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1416, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1415 - * with specific tags, see `iter`. - * """ + /* "lxml/etree.pyx":1424 + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementDepthFirstIterator(self, tags, inclusive=False) */ } - /* "lxml/etree.pyx":1417 + /* "lxml/etree.pyx":1426 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags, inclusive=False) # <<<<<<<<<<<<<< @@ -60081,7 +60373,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl * def iterchildren(self, tag=None, *tags, reversed=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -60089,10 +60381,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inclusive, Py_False) < 0) __PYX_ERR(0, 1417, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1417, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inclusive, Py_False) < 0) __PYX_ERR(0, 1426, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -60100,7 +60392,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1406 + /* "lxml/etree.pyx":1413 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -60122,7 +60414,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_66iterdescendants(struct LxmlEl return __pyx_r; } -/* "lxml/etree.pyx":1419 +/* "lxml/etree.pyx":1428 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< @@ -60180,7 +60472,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_69iterchildren(PyObject *__pyx_ } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterchildren") < 0)) __PYX_ERR(0, 1419, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iterchildren") < 0)) __PYX_ERR(0, 1428, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60219,9 +60511,48 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __Pyx_RefNannySetupContext("iterchildren", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1428 + /* "lxml/etree.pyx":1437 * to find only elements with specific tags, see `iter`. * """ + * if self._c_node and not self._c_node.children: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + __pyx_t_2 = (__pyx_v_self->_c_node != 0); + if (__pyx_t_2) { + } else { + __pyx_t_1 = __pyx_t_2; + goto __pyx_L4_bool_binop_done; + } + __pyx_t_2 = ((!(__pyx_v_self->_c_node->children != 0)) != 0); + __pyx_t_1 = __pyx_t_2; + __pyx_L4_bool_binop_done:; + if (__pyx_t_1) { + + /* "lxml/etree.pyx":1438 + * """ + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY # <<<<<<<<<<<<<< + * if tag is not None: + * tags += (tag,) + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_4lxml_5etree_ITER_EMPTY); + __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; + goto __pyx_L0; + + /* "lxml/etree.pyx":1437 + * to find only elements with specific tags, see `iter`. + * """ + * if self._c_node and not self._c_node.children: # <<<<<<<<<<<<<< + * return ITER_EMPTY + * if tag is not None: + */ + } + + /* "lxml/etree.pyx":1439 + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementChildIterator(self, tags, reversed=reversed) @@ -60230,34 +60561,34 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1429 - * """ + /* "lxml/etree.pyx":1440 + * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementChildIterator(self, tags, reversed=reversed) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1428 - * to find only elements with specific tags, see `iter`. - * """ + /* "lxml/etree.pyx":1439 + * if self._c_node and not self._c_node.children: + * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< * tags += (tag,) * return ElementChildIterator(self, tags, reversed=reversed) */ } - /* "lxml/etree.pyx":1430 + /* "lxml/etree.pyx":1441 * if tag is not None: * tags += (tag,) * return ElementChildIterator(self, tags, reversed=reversed) # <<<<<<<<<<<<<< @@ -60265,7 +60596,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme * def getroottree(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -60273,10 +60604,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reversed, __pyx_v_reversed) < 0) __PYX_ERR(0, 1430, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1430, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_reversed, __pyx_v_reversed) < 0) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementChildIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -60284,7 +60615,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1419 + /* "lxml/etree.pyx":1428 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< @@ -60306,7 +60637,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_68iterchildren(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":1432 +/* "lxml/etree.pyx":1443 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< @@ -60337,7 +60668,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("getroottree", 0); - /* "lxml/etree.pyx":1441 + /* "lxml/etree.pyx":1452 * returns None (for the root element) and then build an ElementTree for * the last parent that was returned.""" * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< @@ -60346,10 +60677,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1442 + /* "lxml/etree.pyx":1453 * the last parent that was returned.""" * _assertValidDoc(self._doc) * return _elementTreeFactory(self._doc, None) # <<<<<<<<<<<<<< @@ -60359,14 +60690,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1432 + /* "lxml/etree.pyx":1443 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< @@ -60386,7 +60717,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_70getroottree(struct LxmlElemen return __pyx_r; } -/* "lxml/etree.pyx":1444 +/* "lxml/etree.pyx":1455 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -60437,7 +60768,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_73getiterator(PyObject *__pyx_v } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 1444, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 1455, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60474,7 +60805,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen __Pyx_RefNannySetupContext("getiterator", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1462 + /* "lxml/etree.pyx":1473 * with older versions of lxml or ElementTree. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60485,25 +60816,25 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1463 + /* "lxml/etree.pyx":1474 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1463, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1462 + /* "lxml/etree.pyx":1473 * with older versions of lxml or ElementTree. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60512,7 +60843,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen */ } - /* "lxml/etree.pyx":1464 + /* "lxml/etree.pyx":1475 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags) # <<<<<<<<<<<<<< @@ -60520,7 +60851,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen * def iter(self, tag=None, *tags): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -60528,14 +60859,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1464, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1444 + /* "lxml/etree.pyx":1455 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -60556,7 +60887,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_72getiterator(struct LxmlElemen return __pyx_r; } -/* "lxml/etree.pyx":1466 +/* "lxml/etree.pyx":1477 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -60607,7 +60938,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_75iter(PyObject *__pyx_v_self, } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 1466, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 1477, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60644,7 +60975,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py __Pyx_RefNannySetupContext("iter", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1486 + /* "lxml/etree.pyx":1497 * in document order. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60655,25 +60986,25 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1487 + /* "lxml/etree.pyx":1498 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementDepthFirstIterator(self, tags) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1487, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1486 + /* "lxml/etree.pyx":1497 * in document order. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60682,7 +61013,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":1488 + /* "lxml/etree.pyx":1499 * if tag is not None: * tags += (tag,) * return ElementDepthFirstIterator(self, tags) # <<<<<<<<<<<<<< @@ -60690,7 +61021,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py * def itertext(self, tag=None, *tags, with_tail=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -60698,14 +61029,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementDepthFirstIterator), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1466 + /* "lxml/etree.pyx":1477 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -60726,7 +61057,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_74iter(struct LxmlElement *__py return __pyx_r; } -/* "lxml/etree.pyx":1490 +/* "lxml/etree.pyx":1501 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< @@ -60784,7 +61115,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_77itertext(PyObject *__pyx_v_se } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "itertext") < 0)) __PYX_ERR(0, 1490, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "itertext") < 0)) __PYX_ERR(0, 1501, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60823,7 +61154,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __Pyx_RefNannySetupContext("itertext", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":1501 + /* "lxml/etree.pyx":1512 * over tail text. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60834,25 +61165,25 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1502 + /* "lxml/etree.pyx":1513 * """ * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return ElementTextIterator(self, tags, with_tail=with_tail) * */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_tag); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1501 + /* "lxml/etree.pyx":1512 * over tail text. * """ * if tag is not None: # <<<<<<<<<<<<<< @@ -60861,7 +61192,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * */ } - /* "lxml/etree.pyx":1503 + /* "lxml/etree.pyx":1514 * if tag is not None: * tags += (tag,) * return ElementTextIterator(self, tags, with_tail=with_tail) # <<<<<<<<<<<<<< @@ -60869,7 +61200,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); @@ -60877,10 +61208,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_tags); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) __PYX_ERR(0, 1503, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementTextIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1503, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_ElementTextIterator), __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -60888,7 +61219,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1490 + /* "lxml/etree.pyx":1501 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< @@ -60910,7 +61241,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_76itertext(struct LxmlElement * return __pyx_r; } -/* "lxml/etree.pyx":1505 +/* "lxml/etree.pyx":1516 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -60969,7 +61300,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_79makeelement(PyObject *__pyx_v } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) __PYX_ERR(0, 1505, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "makeelement") < 0)) __PYX_ERR(0, 1516, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -60988,7 +61319,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_79makeelement(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1505, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("makeelement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1516, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__extra); __pyx_v__extra = 0; __Pyx_AddTraceback("lxml.etree._Element.makeelement", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -61011,7 +61342,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("makeelement", 0); - /* "lxml/etree.pyx":1510 + /* "lxml/etree.pyx":1521 * Creates a new element associated with the same document. * """ * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< @@ -61020,10 +61351,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1510, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1511 + /* "lxml/etree.pyx":1522 * """ * _assertValidDoc(self._doc) * return _makeElement(_tag, NULL, self._doc, None, None, None, # <<<<<<<<<<<<<< @@ -61034,21 +61365,21 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen __pyx_t_1 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_1); - /* "lxml/etree.pyx":1512 + /* "lxml/etree.pyx":1523 * _assertValidDoc(self._doc) * return _makeElement(_tag, NULL, self._doc, None, None, None, * attrib, nsmap, _extra) # <<<<<<<<<<<<<< * * def find(self, path, namespaces=None): */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)__pyx_t_1), ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1511, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)__pyx_t_1), ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1505 + /* "lxml/etree.pyx":1516 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -61068,7 +61399,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_78makeelement(struct LxmlElemen return __pyx_r; } -/* "lxml/etree.pyx":1514 +/* "lxml/etree.pyx":1525 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61114,7 +61445,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_81find(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 1514, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 1525, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61130,7 +61461,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_81find(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1514, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1525, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.find", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61156,7 +61487,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __Pyx_RefNannySetupContext("find", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1523 + /* "lxml/etree.pyx":1534 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61167,7 +61498,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1524 + /* "lxml/etree.pyx":1535 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< @@ -61179,7 +61510,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1523 + /* "lxml/etree.pyx":1534 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61188,7 +61519,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py */ } - /* "lxml/etree.pyx":1525 + /* "lxml/etree.pyx":1536 * if isinstance(path, QName): * path = (path).text * return _elementpath.find(self, path, namespaces) # <<<<<<<<<<<<<< @@ -61196,7 +61527,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py * def findtext(self, path, default=None, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_find); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -61213,7 +61544,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61221,13 +61552,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -61241,7 +61572,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_namespaces); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -61250,7 +61581,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1514 + /* "lxml/etree.pyx":1525 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61273,7 +61604,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_80find(struct LxmlElement *__py return __pyx_r; } -/* "lxml/etree.pyx":1527 +/* "lxml/etree.pyx":1538 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -61329,7 +61660,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_83findtext(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 1527, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 1538, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61348,7 +61679,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_83findtext(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1527, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1538, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.findtext", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61374,7 +61705,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __Pyx_RefNannySetupContext("findtext", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1536 + /* "lxml/etree.pyx":1547 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61385,7 +61716,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1537 + /* "lxml/etree.pyx":1548 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< @@ -61397,7 +61728,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1536 + /* "lxml/etree.pyx":1547 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61406,7 +61737,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * */ } - /* "lxml/etree.pyx":1538 + /* "lxml/etree.pyx":1549 * if isinstance(path, QName): * path = (path).text * return _elementpath.findtext(self, path, default, namespaces) # <<<<<<<<<<<<<< @@ -61414,7 +61745,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * * def findall(self, path, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_findtext); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_findtext); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -61431,7 +61762,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_default, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61439,13 +61770,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[5] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_default, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 4+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(4+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -61462,7 +61793,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_namespaces); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -61471,7 +61802,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1527 + /* "lxml/etree.pyx":1538 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -61494,7 +61825,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_82findtext(struct LxmlElement * return __pyx_r; } -/* "lxml/etree.pyx":1540 +/* "lxml/etree.pyx":1551 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61540,7 +61871,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_85findall(PyObject *__pyx_v_sel } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 1540, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 1551, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61556,7 +61887,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_85findall(PyObject *__pyx_v_sel } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1540, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1551, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.findall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61582,7 +61913,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __Pyx_RefNannySetupContext("findall", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1549 + /* "lxml/etree.pyx":1560 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61593,7 +61924,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1550 + /* "lxml/etree.pyx":1561 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< @@ -61605,7 +61936,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1549 + /* "lxml/etree.pyx":1560 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61614,7 +61945,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ */ } - /* "lxml/etree.pyx":1551 + /* "lxml/etree.pyx":1562 * if isinstance(path, QName): * path = (path).text * return _elementpath.findall(self, path, namespaces) # <<<<<<<<<<<<<< @@ -61622,7 +61953,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ * def iterfind(self, path, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_findall); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -61639,7 +61970,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61647,13 +61978,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -61667,7 +61998,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_namespaces); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -61676,7 +62007,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1540 + /* "lxml/etree.pyx":1551 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61699,7 +62030,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_84findall(struct LxmlElement *_ return __pyx_r; } -/* "lxml/etree.pyx":1553 +/* "lxml/etree.pyx":1564 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61745,7 +62076,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_87iterfind(PyObject *__pyx_v_se } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 1553, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 1564, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -61761,7 +62092,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_87iterfind(PyObject *__pyx_v_se } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1553, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1564, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -61787,7 +62118,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __Pyx_RefNannySetupContext("iterfind", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":1562 + /* "lxml/etree.pyx":1573 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61798,7 +62129,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1563 + /* "lxml/etree.pyx":1574 * """ * if isinstance(path, QName): * path = (path).text # <<<<<<<<<<<<<< @@ -61810,7 +62141,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1562 + /* "lxml/etree.pyx":1573 * prefixes in the path expression. * """ * if isinstance(path, QName): # <<<<<<<<<<<<<< @@ -61819,7 +62150,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * */ } - /* "lxml/etree.pyx":1564 + /* "lxml/etree.pyx":1575 * if isinstance(path, QName): * path = (path).text * return _elementpath.iterfind(self, path, namespaces) # <<<<<<<<<<<<<< @@ -61827,7 +62158,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * * def xpath(self, _path, *, namespaces=None, extensions=None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree__elementpath, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -61844,7 +62175,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -61852,13 +62183,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -61872,7 +62203,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_namespaces); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -61881,7 +62212,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1553 + /* "lxml/etree.pyx":1564 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -61904,7 +62235,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_86iterfind(struct LxmlElement * return __pyx_r; } -/* "lxml/etree.pyx":1566 +/* "lxml/etree.pyx":1577 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -61933,7 +62264,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); - /* "lxml/etree.pyx":1567 + /* "lxml/etree.pyx":1578 * * def xpath(self, _path, *, namespaces=None, extensions=None, * smart_strings=True, **_variables): # <<<<<<<<<<<<<< @@ -61964,7 +62295,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 1566, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 1577, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -61978,7 +62309,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1566, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__variables); __pyx_v__variables = 0; __Pyx_AddTraceback("lxml.etree._Element.xpath", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -61987,7 +62318,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_89xpath(PyObject *__pyx_v_self, __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_8_Element_88xpath(((struct LxmlElement *)__pyx_v_self), __pyx_v__path, __pyx_v_namespaces, __pyx_v_extensions, __pyx_v_smart_strings, __pyx_v__variables); - /* "lxml/etree.pyx":1566 + /* "lxml/etree.pyx":1577 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -62010,55 +62341,55 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__p PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("xpath", 0); - /* "lxml/etree.pyx":1572 + /* "lxml/etree.pyx":1583 * Evaluate an xpath expression using the element as context node. * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 1583, __pyx_L1_error) - /* "lxml/etree.pyx":1573 + /* "lxml/etree.pyx":1584 * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, * extensions=extensions, # <<<<<<<<<<<<<< * smart_strings=smart_strings) * return evaluator(_path, **_variables) */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 1583, __pyx_L1_error) - /* "lxml/etree.pyx":1574 + /* "lxml/etree.pyx":1585 * evaluator = XPathElementEvaluator(self, namespaces=namespaces, * extensions=extensions, * smart_strings=smart_strings) # <<<<<<<<<<<<<< * return evaluator(_path, **_variables) * */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 1572, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 1583, __pyx_L1_error) - /* "lxml/etree.pyx":1572 + /* "lxml/etree.pyx":1583 * Evaluate an xpath expression using the element as context node. * """ * evaluator = XPathElementEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathElementEvaluator), __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_evaluator = ((struct __pyx_obj_4lxml_5etree_XPathElementEvaluator *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1575 + /* "lxml/etree.pyx":1586 * extensions=extensions, * smart_strings=smart_strings) * return evaluator(_path, **_variables) # <<<<<<<<<<<<<< @@ -62066,19 +62397,19 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__p * def cssselect(self, expr, *, translator='xml'): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v__path); __Pyx_GIVEREF(__pyx_v__path); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v__path); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_3, __pyx_v__variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_3, __pyx_v__variables); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1566 + /* "lxml/etree.pyx":1577 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -62100,7 +62431,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_88xpath(struct LxmlElement *__p return __pyx_r; } -/* "lxml/etree.pyx":1577 +/* "lxml/etree.pyx":1588 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< @@ -62143,7 +62474,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_91cssselect(PyObject *__pyx_v_s if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cssselect") < 0)) __PYX_ERR(0, 1577, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "cssselect") < 0)) __PYX_ERR(0, 1588, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -62155,7 +62486,7 @@ static PyObject *__pyx_pw_4lxml_5etree_8_Element_91cssselect(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("cssselect", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1577, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("cssselect", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1588, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Element.cssselect", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62178,29 +62509,29 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("cssselect", 0); - /* "lxml/etree.pyx":1587 + /* "lxml/etree.pyx":1598 * """ * # Do the import here to make the dependency optional. * from lxml.cssselect import CSSSelector # <<<<<<<<<<<<<< * return CSSSelector(expr, translator=translator)(self) * */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_CSSSelector); __Pyx_GIVEREF(__pyx_n_s_CSSSelector); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_CSSSelector); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_lxml_cssselect, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_lxml_cssselect, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CSSSelector); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_CSSSelector); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_1); __pyx_v_CSSSelector = __pyx_t_1; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1588 + /* "lxml/etree.pyx":1599 * # Do the import here to make the dependency optional. * from lxml.cssselect import CSSSelector * return CSSSelector(expr, translator=translator)(self) # <<<<<<<<<<<<<< @@ -62208,15 +62539,15 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1588, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_expr); __Pyx_GIVEREF(__pyx_v_expr); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_expr); - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1588, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_translator, __pyx_v_translator) < 0) __PYX_ERR(0, 1588, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_CSSSelector, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1588, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_translator, __pyx_v_translator) < 0) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_CSSSelector, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -62232,14 +62563,14 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_4, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1588, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1577 + /* "lxml/etree.pyx":1588 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< @@ -62262,7 +62593,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Element_90cssselect(struct LxmlElement return __pyx_r; } -/* "lxml/etree.pyx":1597 +/* "lxml/etree.pyx":1608 * * @cython.linetrace(False) * cdef _Element _elementFactory(_Document doc, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -62283,19 +62614,19 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_elementFactory", 0); - /* "lxml/etree.pyx":1599 + /* "lxml/etree.pyx":1610 * cdef _Element _elementFactory(_Document doc, xmlNode* c_node): * cdef _Element result * result = getProxy(c_node) # <<<<<<<<<<<<<< * if result is not None: * return result */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_result = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1600 + /* "lxml/etree.pyx":1611 * cdef _Element result * result = getProxy(c_node) * if result is not None: # <<<<<<<<<<<<<< @@ -62306,7 +62637,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1601 + /* "lxml/etree.pyx":1612 * result = getProxy(c_node) * if result is not None: * return result # <<<<<<<<<<<<<< @@ -62318,7 +62649,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":1600 + /* "lxml/etree.pyx":1611 * cdef _Element result * result = getProxy(c_node) * if result is not None: # <<<<<<<<<<<<<< @@ -62327,7 +62658,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1602 + /* "lxml/etree.pyx":1613 * if result is not None: * return result * if c_node is NULL: # <<<<<<<<<<<<<< @@ -62337,7 +62668,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1603 + /* "lxml/etree.pyx":1614 * return result * if c_node is NULL: * return None # <<<<<<<<<<<<<< @@ -62348,7 +62679,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_r = ((struct LxmlElement *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1602 + /* "lxml/etree.pyx":1613 * if result is not None: * return result * if c_node is NULL: # <<<<<<<<<<<<<< @@ -62357,7 +62688,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1606 + /* "lxml/etree.pyx":1617 * * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) # <<<<<<<<<<<<<< @@ -62367,20 +62698,20 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_1 = __pyx_v_4lxml_5etree_ELEMENT_CLASS_LOOKUP_STATE; __Pyx_INCREF(__pyx_t_1); - /* "lxml/etree.pyx":1605 + /* "lxml/etree.pyx":1616 * return None * * element_class = LOOKUP_ELEMENT_CLASS( # <<<<<<<<<<<<<< * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) * if hasProxy(c_node): */ - __pyx_t_4 = __pyx_v_4lxml_5etree_LOOKUP_ELEMENT_CLASS(__pyx_t_1, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1605, __pyx_L1_error) + __pyx_t_4 = __pyx_v_4lxml_5etree_LOOKUP_ELEMENT_CLASS(__pyx_t_1, __pyx_v_doc, __pyx_v_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1616, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_element_class = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":1607 + /* "lxml/etree.pyx":1618 * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -62390,7 +62721,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_3 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1609 + /* "lxml/etree.pyx":1620 * if hasProxy(c_node): * # prevent re-entry race condition - we just called into Python * return getProxy(c_node) # <<<<<<<<<<<<<< @@ -62398,13 +62729,13 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum * if hasProxy(c_node): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1607 + /* "lxml/etree.pyx":1618 * element_class = LOOKUP_ELEMENT_CLASS( * ELEMENT_CLASS_LOOKUP_STATE, doc, c_node) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -62413,20 +62744,20 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1610 + /* "lxml/etree.pyx":1621 * # prevent re-entry race condition - we just called into Python * return getProxy(c_node) * result = NEW_ELEMENT(element_class) # <<<<<<<<<<<<<< * if hasProxy(c_node): * # prevent re-entry race condition - we just called into Python */ - __pyx_t_4 = PY_NEW(__pyx_v_element_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1610, __pyx_L1_error) + __pyx_t_4 = PY_NEW(__pyx_v_element_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1610, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_result, ((struct LxmlElement *)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1611 + /* "lxml/etree.pyx":1622 * return getProxy(c_node) * result = NEW_ELEMENT(element_class) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -62436,7 +62767,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_3 = (__pyx_f_4lxml_5etree_hasProxy(__pyx_v_c_node) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1613 + /* "lxml/etree.pyx":1624 * if hasProxy(c_node): * # prevent re-entry race condition - we just called into Python * result._c_node = NULL # <<<<<<<<<<<<<< @@ -62445,7 +62776,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ __pyx_v_result->_c_node = NULL; - /* "lxml/etree.pyx":1614 + /* "lxml/etree.pyx":1625 * # prevent re-entry race condition - we just called into Python * result._c_node = NULL * return getProxy(c_node) # <<<<<<<<<<<<<< @@ -62453,13 +62784,13 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum * _registerProxy(result, doc, c_node) */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1614, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_getProxy(__pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1611 + /* "lxml/etree.pyx":1622 * return getProxy(c_node) * result = NEW_ELEMENT(element_class) * if hasProxy(c_node): # <<<<<<<<<<<<<< @@ -62468,16 +62799,16 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1616 + /* "lxml/etree.pyx":1627 * return getProxy(c_node) * * _registerProxy(result, doc, c_node) # <<<<<<<<<<<<<< * if element_class is not _Element: * result._init() */ - __pyx_t_5 = __pyx_f_4lxml_5etree__registerProxy(__pyx_v_result, __pyx_v_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__registerProxy(__pyx_v_result, __pyx_v_doc, __pyx_v_c_node); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1627, __pyx_L1_error) - /* "lxml/etree.pyx":1617 + /* "lxml/etree.pyx":1628 * * _registerProxy(result, doc, c_node) * if element_class is not _Element: # <<<<<<<<<<<<<< @@ -62488,14 +62819,14 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1618 + /* "lxml/etree.pyx":1629 * _registerProxy(result, doc, c_node) * if element_class is not _Element: * result._init() # <<<<<<<<<<<<<< * return result * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1618, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_result), __pyx_n_s_init_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -62509,12 +62840,12 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1618, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1617 + /* "lxml/etree.pyx":1628 * * _registerProxy(result, doc, c_node) * if element_class is not _Element: # <<<<<<<<<<<<<< @@ -62523,7 +62854,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum */ } - /* "lxml/etree.pyx":1619 + /* "lxml/etree.pyx":1630 * if element_class is not _Element: * result._init() * return result # <<<<<<<<<<<<<< @@ -62535,7 +62866,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":1597 + /* "lxml/etree.pyx":1608 * * @cython.linetrace(False) * cdef _Element _elementFactory(_Document doc, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -62558,7 +62889,7 @@ static struct LxmlElement *__pyx_f_4lxml_5etree__elementFactory(struct LxmlDocum return __pyx_r; } -/* "lxml/etree.pyx":1624 +/* "lxml/etree.pyx":1635 * @cython.internal * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: # <<<<<<<<<<<<<< @@ -62571,7 +62902,7 @@ static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UN __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_raiseImmutable", 0); - /* "lxml/etree.pyx":1625 + /* "lxml/etree.pyx":1636 * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: * raise TypeError, u"this element does not have children or attributes" # <<<<<<<<<<<<<< @@ -62579,9 +62910,9 @@ static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UN * def set(self, key, value): */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_this_element_does_not_have_child, 0, 0); - __PYX_ERR(0, 1625, __pyx_L1_error) + __PYX_ERR(0, 1636, __pyx_L1_error) - /* "lxml/etree.pyx":1624 + /* "lxml/etree.pyx":1635 * @cython.internal * cdef class __ContentOnlyElement(_Element): * cdef int _raiseImmutable(self) except -1: # <<<<<<<<<<<<<< @@ -62597,7 +62928,7 @@ static int __pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable(CYTHON_UN return __pyx_r; } -/* "lxml/etree.pyx":1627 +/* "lxml/etree.pyx":1638 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -62638,11 +62969,11 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set(PyObject *__p case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1627, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, 1); __PYX_ERR(0, 1638, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1627, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set") < 0)) __PYX_ERR(0, 1638, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -62655,7 +62986,7 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_1set(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1627, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1638, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.set", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62674,16 +63005,16 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_set(struct __pyx_o int __pyx_t_1; __Pyx_RefNannySetupContext("set", 0); - /* "lxml/etree.pyx":1629 + /* "lxml/etree.pyx":1640 * def set(self, key, value): * u"set(self, key, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def append(self, value): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1629, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1640, __pyx_L1_error) - /* "lxml/etree.pyx":1627 + /* "lxml/etree.pyx":1638 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< @@ -62703,7 +63034,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_set(struct __pyx_o return __pyx_r; } -/* "lxml/etree.pyx":1631 +/* "lxml/etree.pyx":1642 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< @@ -62732,16 +63063,16 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_2append(struct __p int __pyx_t_1; __Pyx_RefNannySetupContext("append", 0); - /* "lxml/etree.pyx":1633 + /* "lxml/etree.pyx":1644 * def append(self, value): * u"append(self, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def insert(self, index, value): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1633, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1644, __pyx_L1_error) - /* "lxml/etree.pyx":1631 + /* "lxml/etree.pyx":1642 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< @@ -62761,7 +63092,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_2append(struct __p return __pyx_r; } -/* "lxml/etree.pyx":1635 +/* "lxml/etree.pyx":1646 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< @@ -62802,11 +63133,11 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert(PyObject * case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 1635, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); __PYX_ERR(0, 1646, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) __PYX_ERR(0, 1635, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) __PYX_ERR(0, 1646, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -62819,7 +63150,7 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_5insert(PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1635, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1646, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.insert", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -62838,16 +63169,16 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4insert(struct __p int __pyx_t_1; __Pyx_RefNannySetupContext("insert", 0); - /* "lxml/etree.pyx":1637 + /* "lxml/etree.pyx":1648 * def insert(self, index, value): * u"insert(self, index, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * * def __setitem__(self, index, value): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1637, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1648, __pyx_L1_error) - /* "lxml/etree.pyx":1635 + /* "lxml/etree.pyx":1646 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< @@ -62867,7 +63198,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4insert(struct __p return __pyx_r; } -/* "lxml/etree.pyx":1639 +/* "lxml/etree.pyx":1650 * self._raiseImmutable() * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -62898,16 +63229,16 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_6__setitem__(struct __py int __pyx_t_1; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "lxml/etree.pyx":1641 + /* "lxml/etree.pyx":1652 * def __setitem__(self, index, value): * u"__setitem__(self, index, value)" * self._raiseImmutable() # <<<<<<<<<<<<<< * - * property attrib: + * @property */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1641, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree___ContentOnlyElement *)__pyx_v_self->__pyx_vtab)->_raiseImmutable(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1652, __pyx_L1_error) - /* "lxml/etree.pyx":1639 + /* "lxml/etree.pyx":1650 * self._raiseImmutable() * * def __setitem__(self, index, value): # <<<<<<<<<<<<<< @@ -62926,11 +63257,11 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_6__setitem__(struct __py return __pyx_r; } -/* "lxml/etree.pyx":1644 +/* "lxml/etree.pyx":1655 * - * property attrib: - * def __get__(self): # <<<<<<<<<<<<<< - * return IMMUTABLE_EMPTY_MAPPING + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * return IMMUTABLE_EMPTY_MAPPING * */ @@ -62952,10 +63283,10 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_6attrib___get__(CY __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1645 - * property attrib: - * def __get__(self): - * return IMMUTABLE_EMPTY_MAPPING # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1656 + * @property + * def attrib(self): + * return IMMUTABLE_EMPTY_MAPPING # <<<<<<<<<<<<<< * * property text: */ @@ -62964,11 +63295,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_6attrib___get__(CY __pyx_r = __pyx_v_4lxml_5etree_IMMUTABLE_EMPTY_MAPPING; goto __pyx_L0; - /* "lxml/etree.pyx":1644 + /* "lxml/etree.pyx":1655 * - * property attrib: - * def __get__(self): # <<<<<<<<<<<<<< - * return IMMUTABLE_EMPTY_MAPPING + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * return IMMUTABLE_EMPTY_MAPPING * */ @@ -62979,7 +63310,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_6attrib___get__(CY return __pyx_r; } -/* "lxml/etree.pyx":1648 +/* "lxml/etree.pyx":1659 * * property text: * def __get__(self): # <<<<<<<<<<<<<< @@ -63007,16 +63338,16 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text___get__(stru PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1649 + /* "lxml/etree.pyx":1660 * property text: * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicodeOrEmpty(self._c_node.content) * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1649, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1660, __pyx_L1_error) - /* "lxml/etree.pyx":1650 + /* "lxml/etree.pyx":1661 * def __get__(self): * _assertValidNode(self) * return funicodeOrEmpty(self._c_node.content) # <<<<<<<<<<<<<< @@ -63024,13 +63355,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text___get__(stru * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_self->__pyx_base._c_node->content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrEmpty(__pyx_v_self->__pyx_base._c_node->content); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1648 + /* "lxml/etree.pyx":1659 * * property text: * def __get__(self): # <<<<<<<<<<<<<< @@ -63049,7 +63380,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text___get__(stru return __pyx_r; } -/* "lxml/etree.pyx":1652 +/* "lxml/etree.pyx":1663 * return funicodeOrEmpty(self._c_node.content) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -63081,16 +63412,16 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":1654 + /* "lxml/etree.pyx":1665 * def __set__(self, value): * cdef tree.xmlDict* c_dict * _assertValidNode(self) # <<<<<<<<<<<<<< * if value is None: * c_text = NULL */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1654, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1665, __pyx_L1_error) - /* "lxml/etree.pyx":1655 + /* "lxml/etree.pyx":1666 * cdef tree.xmlDict* c_dict * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< @@ -63101,7 +63432,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":1656 + /* "lxml/etree.pyx":1667 * _assertValidNode(self) * if value is None: * c_text = NULL # <<<<<<<<<<<<<< @@ -63110,7 +63441,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ */ __pyx_v_c_text = ((const xmlChar *)NULL); - /* "lxml/etree.pyx":1655 + /* "lxml/etree.pyx":1666 * cdef tree.xmlDict* c_dict * _assertValidNode(self) * if value is None: # <<<<<<<<<<<<<< @@ -63120,7 +63451,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ goto __pyx_L3; } - /* "lxml/etree.pyx":1658 + /* "lxml/etree.pyx":1669 * c_text = NULL * else: * value = _utf8(value) # <<<<<<<<<<<<<< @@ -63128,12 +63459,12 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ * tree.xmlNodeSetContent(self._c_node, c_text) */ /*else*/ { - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1659 + /* "lxml/etree.pyx":1670 * else: * value = _utf8(value) * c_text = _xcstr(value) # <<<<<<<<<<<<<< @@ -63144,7 +63475,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ } __pyx_L3:; - /* "lxml/etree.pyx":1660 + /* "lxml/etree.pyx":1671 * value = _utf8(value) * c_text = _xcstr(value) * tree.xmlNodeSetContent(self._c_node, c_text) # <<<<<<<<<<<<<< @@ -63153,7 +63484,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ */ xmlNodeSetContent(__pyx_v_self->__pyx_base._c_node, __pyx_v_c_text); - /* "lxml/etree.pyx":1652 + /* "lxml/etree.pyx":1663 * return funicodeOrEmpty(self._c_node.content) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -63174,7 +63505,7 @@ static int __pyx_pf_4lxml_5etree_20__ContentOnlyElement_4text_2__set__(struct __ return __pyx_r; } -/* "lxml/etree.pyx":1663 +/* "lxml/etree.pyx":1674 * * # ACCESSORS * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -63207,7 +63538,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "lxml/etree.pyx":1665 + /* "lxml/etree.pyx":1676 * def __getitem__(self, x): * u"__getitem__(self, x)" * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -63218,7 +63549,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO __pyx_t_2 = (__pyx_t_1 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":1666 + /* "lxml/etree.pyx":1677 * u"__getitem__(self, x)" * if isinstance(x, slice): * return [] # <<<<<<<<<<<<<< @@ -63226,13 +63557,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO * raise IndexError, u"list index out of range" */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1665 + /* "lxml/etree.pyx":1676 * def __getitem__(self, x): * u"__getitem__(self, x)" * if isinstance(x, slice): # <<<<<<<<<<<<<< @@ -63241,7 +63572,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO */ } - /* "lxml/etree.pyx":1668 + /* "lxml/etree.pyx":1679 * return [] * else: * raise IndexError, u"list index out of range" # <<<<<<<<<<<<<< @@ -63250,10 +63581,10 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO */ /*else*/ { __Pyx_Raise(__pyx_builtin_IndexError, __pyx_kp_u_list_index_out_of_range, 0, 0); - __PYX_ERR(0, 1668, __pyx_L1_error) + __PYX_ERR(0, 1679, __pyx_L1_error) } - /* "lxml/etree.pyx":1663 + /* "lxml/etree.pyx":1674 * * # ACCESSORS * def __getitem__(self, x): # <<<<<<<<<<<<<< @@ -63272,7 +63603,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_8__getitem__(CYTHO return __pyx_r; } -/* "lxml/etree.pyx":1670 +/* "lxml/etree.pyx":1681 * raise IndexError, u"list index out of range" * * def __len__(self): # <<<<<<<<<<<<<< @@ -63302,7 +63633,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "lxml/etree.pyx":1672 + /* "lxml/etree.pyx":1683 * def __len__(self): * u"__len__(self)" * return 0 # <<<<<<<<<<<<<< @@ -63312,7 +63643,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_ __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1670 + /* "lxml/etree.pyx":1681 * raise IndexError, u"list index out of range" * * def __len__(self): # <<<<<<<<<<<<<< @@ -63326,7 +63657,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_20__ContentOnlyElement_10__len__(CYTHON_ return __pyx_r; } -/* "lxml/etree.pyx":1674 +/* "lxml/etree.pyx":1685 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -63372,7 +63703,7 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get(PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1674, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1685, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -63388,7 +63719,7 @@ static PyObject *__pyx_pw_4lxml_5etree_20__ContentOnlyElement_13get(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1674, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1685, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.__ContentOnlyElement.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -63406,7 +63737,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_12get(CYTHON_UNUSE __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get", 0); - /* "lxml/etree.pyx":1676 + /* "lxml/etree.pyx":1687 * def get(self, key, default=None): * u"get(self, key, default=None)" * return None # <<<<<<<<<<<<<< @@ -63417,7 +63748,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_12get(CYTHON_UNUSE __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1674 + /* "lxml/etree.pyx":1685 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -63432,7 +63763,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_12get(CYTHON_UNUSE return __pyx_r; } -/* "lxml/etree.pyx":1678 +/* "lxml/etree.pyx":1689 * return None * * def keys(self): # <<<<<<<<<<<<<< @@ -63461,7 +63792,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_14keys(CYTHON_UNUS PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("keys", 0); - /* "lxml/etree.pyx":1680 + /* "lxml/etree.pyx":1691 * def keys(self): * u"keys(self)" * return [] # <<<<<<<<<<<<<< @@ -63469,13 +63800,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_14keys(CYTHON_UNUS * def items(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1680, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1678 + /* "lxml/etree.pyx":1689 * return None * * def keys(self): # <<<<<<<<<<<<<< @@ -63494,7 +63825,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_14keys(CYTHON_UNUS return __pyx_r; } -/* "lxml/etree.pyx":1682 +/* "lxml/etree.pyx":1693 * return [] * * def items(self): # <<<<<<<<<<<<<< @@ -63523,7 +63854,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_16items(CYTHON_UNU PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("items", 0); - /* "lxml/etree.pyx":1684 + /* "lxml/etree.pyx":1695 * def items(self): * u"items(self)" * return [] # <<<<<<<<<<<<<< @@ -63531,13 +63862,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_16items(CYTHON_UNU * def values(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1684, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1682 + /* "lxml/etree.pyx":1693 * return [] * * def items(self): # <<<<<<<<<<<<<< @@ -63556,7 +63887,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_16items(CYTHON_UNU return __pyx_r; } -/* "lxml/etree.pyx":1686 +/* "lxml/etree.pyx":1697 * return [] * * def values(self): # <<<<<<<<<<<<<< @@ -63585,7 +63916,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_18values(CYTHON_UN PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("values", 0); - /* "lxml/etree.pyx":1688 + /* "lxml/etree.pyx":1699 * def values(self): * u"values(self)" * return [] # <<<<<<<<<<<<<< @@ -63593,13 +63924,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_18values(CYTHON_UN * cdef class _Comment(__ContentOnlyElement): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1686 + /* "lxml/etree.pyx":1697 * return [] * * def values(self): # <<<<<<<<<<<<<< @@ -63618,11 +63949,11 @@ static PyObject *__pyx_pf_4lxml_5etree_20__ContentOnlyElement_18values(CYTHON_UN return __pyx_r; } -/* "lxml/etree.pyx":1692 +/* "lxml/etree.pyx":1703 * cdef class _Comment(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return Comment + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return Comment * */ @@ -63645,25 +63976,25 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment_3tag___get__(CYTHON_UNUSED stru PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1693 - * property tag: - * def __get__(self): - * return Comment # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1704 + * @property + * def tag(self): + * return Comment # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1693, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1692 + /* "lxml/etree.pyx":1703 * cdef class _Comment(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return Comment + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return Comment * */ @@ -63678,8 +64009,8 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment_3tag___get__(CYTHON_UNUSED stru return __pyx_r; } -/* "lxml/etree.pyx":1695 - * return Comment +/* "lxml/etree.pyx":1706 + * return Comment * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % strrepr(self.text) @@ -63706,7 +64037,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment___repr__(struct __pyx_obj_4lxml PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/etree.pyx":1696 + /* "lxml/etree.pyx":1707 * * def __repr__(self): * return "" % strrepr(self.text) # <<<<<<<<<<<<<< @@ -63714,20 +64045,20 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment___repr__(struct __pyx_obj_4lxml * cdef class _ProcessingInstruction(__ContentOnlyElement): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1696, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1695 - * return Comment + /* "lxml/etree.pyx":1706 + * return Comment * * def __repr__(self): # <<<<<<<<<<<<<< * return "" % strrepr(self.text) @@ -63746,11 +64077,11 @@ static PyObject *__pyx_pf_4lxml_5etree_8_Comment___repr__(struct __pyx_obj_4lxml return __pyx_r; } -/* "lxml/etree.pyx":1700 +/* "lxml/etree.pyx":1711 * cdef class _ProcessingInstruction(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return ProcessingInstruction + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return ProcessingInstruction * */ @@ -63773,25 +64104,25 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_3tag___get__(CYT PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1701 - * property tag: - * def __get__(self): - * return ProcessingInstruction # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1712 + * @property + * def tag(self): + * return ProcessingInstruction # <<<<<<<<<<<<<< * * property target: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1701, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1700 + /* "lxml/etree.pyx":1711 * cdef class _ProcessingInstruction(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return ProcessingInstruction + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return ProcessingInstruction * */ @@ -63806,7 +64137,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_3tag___get__(CYT return __pyx_r; } -/* "lxml/etree.pyx":1705 +/* "lxml/etree.pyx":1716 * property target: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -63834,16 +64165,16 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target___get__( PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1706 + /* "lxml/etree.pyx":1717 * # not in ElementTree * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicode(self._c_node.name) * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1717, __pyx_L1_error) - /* "lxml/etree.pyx":1707 + /* "lxml/etree.pyx":1718 * def __get__(self): * _assertValidNode(self) * return funicode(self._c_node.name) # <<<<<<<<<<<<<< @@ -63851,13 +64182,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target___get__( * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1707, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1705 + /* "lxml/etree.pyx":1716 * property target: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -63876,7 +64207,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target___get__( return __pyx_r; } -/* "lxml/etree.pyx":1709 +/* "lxml/etree.pyx":1720 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -63906,28 +64237,28 @@ static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struc __Pyx_RefNannySetupContext("__set__", 0); __Pyx_INCREF(__pyx_v_value); - /* "lxml/etree.pyx":1710 + /* "lxml/etree.pyx":1721 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * value = _utf8(value) * c_text = _xcstr(value) */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1710, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1721, __pyx_L1_error) - /* "lxml/etree.pyx":1711 + /* "lxml/etree.pyx":1722 * def __set__(self, value): * _assertValidNode(self) * value = _utf8(value) # <<<<<<<<<<<<<< * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) */ - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1712 + /* "lxml/etree.pyx":1723 * _assertValidNode(self) * value = _utf8(value) * c_text = _xcstr(value) # <<<<<<<<<<<<<< @@ -63936,7 +64267,7 @@ static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struc */ __pyx_v_c_text = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value); - /* "lxml/etree.pyx":1713 + /* "lxml/etree.pyx":1724 * value = _utf8(value) * c_text = _xcstr(value) * tree.xmlNodeSetName(self._c_node, c_text) # <<<<<<<<<<<<<< @@ -63945,7 +64276,7 @@ static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struc */ xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, __pyx_v_c_text); - /* "lxml/etree.pyx":1709 + /* "lxml/etree.pyx":1720 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -63966,7 +64297,7 @@ static int __pyx_pf_4lxml_5etree_22_ProcessingInstruction_6target_2__set__(struc return __pyx_r; } -/* "lxml/etree.pyx":1715 +/* "lxml/etree.pyx":1726 * tree.xmlNodeSetName(self._c_node, c_text) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -63997,29 +64328,29 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/etree.pyx":1716 + /* "lxml/etree.pyx":1727 * * def __repr__(self): * text = self.text # <<<<<<<<<<<<<< * if text: * return "" % (strrepr(self.target), */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1716, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_text = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":1717 + /* "lxml/etree.pyx":1728 * def __repr__(self): * text = self.text * if text: # <<<<<<<<<<<<<< * return "" % (strrepr(self.target), * strrepr(text)) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1717, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_text); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1728, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":1718 + /* "lxml/etree.pyx":1729 * text = self.text * if text: * return "" % (strrepr(self.target), # <<<<<<<<<<<<<< @@ -64027,30 +64358,30 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct * else: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1719 + /* "lxml/etree.pyx":1730 * if text: * return "" % (strrepr(self.target), * strrepr(text)) # <<<<<<<<<<<<<< * else: * return "" % strrepr(self.target) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_strrepr(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1719, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_strrepr(__pyx_v_text); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":1718 + /* "lxml/etree.pyx":1729 * text = self.text * if text: * return "" % (strrepr(self.target), # <<<<<<<<<<<<<< * strrepr(text)) * else: */ - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1718, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -64058,14 +64389,14 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); __pyx_t_3 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1717 + /* "lxml/etree.pyx":1728 * def __repr__(self): * text = self.text * if text: # <<<<<<<<<<<<<< @@ -64074,7 +64405,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct */ } - /* "lxml/etree.pyx":1721 + /* "lxml/etree.pyx":1732 * strrepr(text)) * else: * return "" % strrepr(self.target) # <<<<<<<<<<<<<< @@ -64083,12 +64414,12 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; @@ -64096,7 +64427,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct goto __pyx_L0; } - /* "lxml/etree.pyx":1715 + /* "lxml/etree.pyx":1726 * tree.xmlNodeSetName(self._c_node, c_text) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -64118,7 +64449,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction___repr__(struct return __pyx_r; } -/* "lxml/etree.pyx":1723 +/* "lxml/etree.pyx":1734 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -64164,7 +64495,7 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1723, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 1734, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -64180,7 +64511,7 @@ static PyObject *__pyx_pw_4lxml_5etree_22_ProcessingInstruction_3get(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1723, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1734, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ProcessingInstruction.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -64203,17 +64534,17 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("get", 0); - /* "lxml/etree.pyx":1735 + /* "lxml/etree.pyx":1746 * It is not guaranteed to work for all possible text content. * """ * return self.attrib.get(key, default) # <<<<<<<<<<<<<< * - * property attrib: + * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attrib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_attrib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -64231,7 +64562,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_default}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -64239,13 +64570,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_key, __pyx_v_default}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -64256,7 +64587,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py __Pyx_INCREF(__pyx_v_default); __Pyx_GIVEREF(__pyx_v_default); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_default); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1735, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -64265,7 +64596,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1723 + /* "lxml/etree.pyx":1734 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -64287,12 +64618,12 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_2get(struct __py return __pyx_r; } -/* "lxml/etree.pyx":1743 - * XML node, although this is not guaranteed to stay this way. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return { attr : (value1 or value2) - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } +/* "lxml/etree.pyx":1749 + * + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * """Returns a dict containing all pseudo-attributes that can be + * parsed from the text content of this processing instruction. */ /* Python wrapper */ @@ -64327,28 +64658,28 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( int __pyx_t_11; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1744 + /* "lxml/etree.pyx":1755 + * XML node, although this is not guaranteed to stay this way. * """ - * def __get__(self): - * return { attr : (value1 or value2) # <<<<<<<<<<<<<< - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } + * return { attr : (value1 or value2) # <<<<<<<<<<<<<< + * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } * */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L5_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":1745 - * def __get__(self): - * return { attr : (value1 or value2) - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1756 + * """ + * return { attr : (value1 or value2) + * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } # <<<<<<<<<<<<<< * * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyNumber_Add(__pyx_kp_u__10, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_4 = PyNumber_Add(__pyx_kp_u__10, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES); @@ -64365,16 +64696,16 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0; __pyx_t_7 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1756, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -64382,17 +64713,17 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1756, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1756, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -64402,7 +64733,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1745, __pyx_L5_error) + else __PYX_ERR(0, 1756, __pyx_L5_error) } break; } @@ -64414,7 +64745,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1745, __pyx_L5_error) + __PYX_ERR(0, 1756, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -64430,17 +64761,17 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1745, __pyx_L5_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1756, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -64450,7 +64781,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_GOTREF(__pyx_t_5); index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 1745, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 1756, __pyx_L5_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L9_unpacking_done; @@ -64458,7 +64789,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1745, __pyx_L5_error) + __PYX_ERR(0, 1756, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_attr, __pyx_t_4); @@ -64468,14 +64799,14 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_value2, __pyx_t_8); __pyx_t_8 = 0; - /* "lxml/etree.pyx":1744 + /* "lxml/etree.pyx":1755 + * XML node, although this is not guaranteed to stay this way. * """ - * def __get__(self): - * return { attr : (value1 or value2) # <<<<<<<<<<<<<< - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } + * return { attr : (value1 or value2) # <<<<<<<<<<<<<< + * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } * */ - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_value1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1744, __pyx_L5_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_7genexpr__pyx_v_value1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1755, __pyx_L5_error) if (!__pyx_t_11) { } else { __Pyx_INCREF(__pyx_7genexpr__pyx_v_value1); @@ -64485,13 +64816,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __Pyx_INCREF(__pyx_7genexpr__pyx_v_value2); __pyx_t_2 = __pyx_7genexpr__pyx_v_value2; __pyx_L10_bool_binop_done:; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_attr, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1744, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_7genexpr__pyx_v_attr, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1755, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1745 - * def __get__(self): - * return { attr : (value1 or value2) - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1756 + * """ + * return { attr : (value1 or value2) + * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } # <<<<<<<<<<<<<< * * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall */ @@ -64512,12 +64843,12 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1743 - * XML node, although this is not guaranteed to stay this way. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return { attr : (value1 or value2) - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } + /* "lxml/etree.pyx":1749 + * + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * """Returns a dict containing all pseudo-attributes that can be + * parsed from the text content of this processing instruction. */ /* function exit code */ @@ -64540,11 +64871,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_ProcessingInstruction_6attrib___get__( return __pyx_r; } -/* "lxml/etree.pyx":1751 +/* "lxml/etree.pyx":1762 * cdef class _Entity(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return Entity + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return Entity * */ @@ -64567,25 +64898,25 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_3tag___get__(CYTHON_UNUSED struc PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1752 - * property tag: - * def __get__(self): - * return Entity # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1763 + * @property + * def tag(self): + * return Entity # <<<<<<<<<<<<<< * * property name: */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1752, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1751 + /* "lxml/etree.pyx":1762 * cdef class _Entity(__ContentOnlyElement): - * property tag: - * def __get__(self): # <<<<<<<<<<<<<< - * return Entity + * @property + * def tag(self): # <<<<<<<<<<<<<< + * return Entity * */ @@ -64600,7 +64931,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_3tag___get__(CYTHON_UNUSED struc return __pyx_r; } -/* "lxml/etree.pyx":1756 +/* "lxml/etree.pyx":1767 * property name: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -64628,16 +64959,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4name___get__(struct __pyx_obj_4 PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1757 + /* "lxml/etree.pyx":1768 * # not in ElementTree * def __get__(self): * _assertValidNode(self) # <<<<<<<<<<<<<< * return funicode(self._c_node.name) * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1757, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1768, __pyx_L1_error) - /* "lxml/etree.pyx":1758 + /* "lxml/etree.pyx":1769 * def __get__(self): * _assertValidNode(self) * return funicode(self._c_node.name) # <<<<<<<<<<<<<< @@ -64645,13 +64976,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4name___get__(struct __pyx_obj_4 * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1769, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1756 + /* "lxml/etree.pyx":1767 * property name: * # not in ElementTree * def __get__(self): # <<<<<<<<<<<<<< @@ -64670,7 +65001,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4name___get__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":1760 +/* "lxml/etree.pyx":1771 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -64705,55 +65036,55 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "lxml/etree.pyx":1761 + /* "lxml/etree.pyx":1772 * * def __set__(self, value): * _assertValidNode(self) # <<<<<<<<<<<<<< * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1761, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1772, __pyx_L1_error) - /* "lxml/etree.pyx":1762 + /* "lxml/etree.pyx":1773 * def __set__(self, value): * _assertValidNode(self) * value_utf = _utf8(value) # <<<<<<<<<<<<<< * if b'&' in value_utf or b';' in value_utf: * raise ValueError, f"Invalid entity name '{value}'" */ - __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1762, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__utf8(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value_utf = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1763 + /* "lxml/etree.pyx":1774 * _assertValidNode(self) * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: # <<<<<<<<<<<<<< * raise ValueError, f"Invalid entity name '{value}'" * tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) */ - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__28, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__28, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1774, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__29, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1763, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__29, __pyx_v_value_utf, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1774, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":1764 + /* "lxml/etree.pyx":1775 * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: * raise ValueError, f"Invalid entity name '{value}'" # <<<<<<<<<<<<<< * tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) * */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -64761,7 +65092,7 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ __pyx_t_6 += 21; __Pyx_GIVEREF(__pyx_kp_u_Invalid_entity_name); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Invalid_entity_name); - __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); @@ -64772,14 +65103,14 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ __pyx_t_6 += 1; __Pyx_GIVEREF(__pyx_kp_u__21); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__21); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1764, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_8, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(0, 1764, __pyx_L1_error) + __PYX_ERR(0, 1775, __pyx_L1_error) - /* "lxml/etree.pyx":1763 + /* "lxml/etree.pyx":1774 * _assertValidNode(self) * value_utf = _utf8(value) * if b'&' in value_utf or b';' in value_utf: # <<<<<<<<<<<<<< @@ -64788,16 +65119,16 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ */ } - /* "lxml/etree.pyx":1765 + /* "lxml/etree.pyx":1776 * if b'&' in value_utf or b';' in value_utf: * raise ValueError, f"Invalid entity name '{value}'" * tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) # <<<<<<<<<<<<<< * - * property text: + * @property */ xmlNodeSetName(__pyx_v_self->__pyx_base.__pyx_base._c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf)); - /* "lxml/etree.pyx":1760 + /* "lxml/etree.pyx":1771 * return funicode(self._c_node.name) * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -64819,12 +65150,12 @@ static int __pyx_pf_4lxml_5etree_7_Entity_4name_2__set__(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "lxml/etree.pyx":1770 +/* "lxml/etree.pyx":1779 + * + * @property + * def text(self): # <<<<<<<<<<<<<< * # FIXME: should this be None or '&[VALUE];' or the resolved * # entity value ? - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidNode(self) - * return f'&{funicode(self._c_node.name)};' */ /* Python wrapper */ @@ -64851,24 +65182,24 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1771 + /* "lxml/etree.pyx":1782 + * # FIXME: should this be None or '&[VALUE];' or the resolved * # entity value ? - * def __get__(self): - * _assertValidNode(self) # <<<<<<<<<<<<<< - * return f'&{funicode(self._c_node.name)};' + * _assertValidNode(self) # <<<<<<<<<<<<<< + * return f'&{funicode(self._c_node.name)};' * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1771, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1782, __pyx_L1_error) - /* "lxml/etree.pyx":1772 - * def __get__(self): - * _assertValidNode(self) - * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1783 + * # entity value ? + * _assertValidNode(self) + * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -64876,9 +65207,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 __pyx_t_3 += 1; __Pyx_GIVEREF(__pyx_kp_u__28); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__28); - __pyx_t_5 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_funicode(__pyx_v_self->__pyx_base.__pyx_base._c_node->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_4; @@ -64890,19 +65221,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 __pyx_t_3 += 1; __Pyx_GIVEREF(__pyx_kp_u__29); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__29); - __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1772, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1770 + /* "lxml/etree.pyx":1779 + * + * @property + * def text(self): # <<<<<<<<<<<<<< * # FIXME: should this be None or '&[VALUE];' or the resolved * # entity value ? - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidNode(self) - * return f'&{funicode(self._c_node.name)};' */ /* function exit code */ @@ -64918,8 +65249,8 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity_4text___get__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":1774 - * return f'&{funicode(self._c_node.name)};' +/* "lxml/etree.pyx":1785 + * return f'&{funicode(self._c_node.name)};' * * def __repr__(self): # <<<<<<<<<<<<<< * return "&%s;" % strrepr(self.name) @@ -64946,7 +65277,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity___repr__(struct __pyx_obj_4lxml_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/etree.pyx":1775 + /* "lxml/etree.pyx":1786 * * def __repr__(self): * return "&%s;" % strrepr(self.name) # <<<<<<<<<<<<<< @@ -64954,20 +65285,20 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity___repr__(struct __pyx_obj_4lxml_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_strrepr(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_FormatSafe(__pyx_kp_s_s_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1774 - * return f'&{funicode(self._c_node.name)};' + /* "lxml/etree.pyx":1785 + * return f'&{funicode(self._c_node.name)};' * * def __repr__(self): # <<<<<<<<<<<<<< * return "&%s;" % strrepr(self.name) @@ -64986,7 +65317,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Entity___repr__(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "lxml/etree.pyx":1802 +/* "lxml/etree.pyx":1813 * cdef readonly unicode localname * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): # <<<<<<<<<<<<<< @@ -65030,7 +65361,7 @@ static int __pyx_pw_4lxml_5etree_5QName_1__init__(PyObject *__pyx_v_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1802, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1813, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -65046,7 +65377,7 @@ static int __pyx_pw_4lxml_5etree_5QName_1__init__(PyObject *__pyx_v_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1802, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1813, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.QName.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -65076,7 +65407,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_INCREF(__pyx_v_text_or_uri_or_element); __Pyx_INCREF(__pyx_v_tag); - /* "lxml/etree.pyx":1803 + /* "lxml/etree.pyx":1814 * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): * if text_or_uri_or_element is None: # <<<<<<<<<<<<<< @@ -65087,7 +65418,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1805 + /* "lxml/etree.pyx":1816 * if text_or_uri_or_element is None: * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None # <<<<<<<<<<<<<< @@ -65103,7 +65434,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1803 + /* "lxml/etree.pyx":1814 * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): * if text_or_uri_or_element is None: # <<<<<<<<<<<<<< @@ -65112,7 +65443,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1806 + /* "lxml/etree.pyx":1817 * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): # <<<<<<<<<<<<<< @@ -65122,7 +65453,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_2 = ((!(_isString(__pyx_v_text_or_uri_or_element) != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1807 + /* "lxml/etree.pyx":1818 * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): * if isinstance(text_or_uri_or_element, _Element): # <<<<<<<<<<<<<< @@ -65133,19 +65464,19 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1808 + /* "lxml/etree.pyx":1819 * if not _isString(text_or_uri_or_element): * if isinstance(text_or_uri_or_element, _Element): * text_or_uri_or_element = (<_Element>text_or_uri_or_element).tag # <<<<<<<<<<<<<< * if not _isString(text_or_uri_or_element): * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_text_or_uri_or_element, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1808, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_text_or_uri_or_element, __pyx_n_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_text_or_uri_or_element, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1809 + /* "lxml/etree.pyx":1820 * if isinstance(text_or_uri_or_element, _Element): * text_or_uri_or_element = (<_Element>text_or_uri_or_element).tag * if not _isString(text_or_uri_or_element): # <<<<<<<<<<<<<< @@ -65155,23 +65486,23 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_1 = ((!(_isString(__pyx_v_text_or_uri_or_element) != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":1810 + /* "lxml/etree.pyx":1821 * text_or_uri_or_element = (<_Element>text_or_uri_or_element).tag * if not _isString(text_or_uri_or_element): * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" # <<<<<<<<<<<<<< * elif isinstance(text_or_uri_or_element, QName): * text_or_uri_or_element = (text_or_uri_or_element).text */ - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_text_or_uri_or_element))), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1810, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_text_or_uri_or_element))), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_input_tag_of_type, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1810, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_input_tag_of_type, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1810, __pyx_L1_error) + __PYX_ERR(0, 1821, __pyx_L1_error) - /* "lxml/etree.pyx":1809 + /* "lxml/etree.pyx":1820 * if isinstance(text_or_uri_or_element, _Element): * text_or_uri_or_element = (<_Element>text_or_uri_or_element).tag * if not _isString(text_or_uri_or_element): # <<<<<<<<<<<<<< @@ -65180,7 +65511,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1807 + /* "lxml/etree.pyx":1818 * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): * if isinstance(text_or_uri_or_element, _Element): # <<<<<<<<<<<<<< @@ -65190,7 +65521,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1811 + /* "lxml/etree.pyx":1822 * if not _isString(text_or_uri_or_element): * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" * elif isinstance(text_or_uri_or_element, QName): # <<<<<<<<<<<<<< @@ -65201,7 +65532,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1812 + /* "lxml/etree.pyx":1823 * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" * elif isinstance(text_or_uri_or_element, QName): * text_or_uri_or_element = (text_or_uri_or_element).text # <<<<<<<<<<<<<< @@ -65213,7 +65544,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_DECREF_SET(__pyx_v_text_or_uri_or_element, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1811 + /* "lxml/etree.pyx":1822 * if not _isString(text_or_uri_or_element): * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" * elif isinstance(text_or_uri_or_element, QName): # <<<<<<<<<<<<<< @@ -65223,7 +65554,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1813 + /* "lxml/etree.pyx":1824 * elif isinstance(text_or_uri_or_element, QName): * text_or_uri_or_element = (text_or_uri_or_element).text * elif text_or_uri_or_element is not None: # <<<<<<<<<<<<<< @@ -65234,19 +65565,19 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":1814 + /* "lxml/etree.pyx":1825 * text_or_uri_or_element = (text_or_uri_or_element).text * elif text_or_uri_or_element is not None: * text_or_uri_or_element = unicode(text_or_uri_or_element) # <<<<<<<<<<<<<< * else: * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" */ - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_text_or_uri_or_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1814, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_text_or_uri_or_element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text_or_uri_or_element, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1813 + /* "lxml/etree.pyx":1824 * elif isinstance(text_or_uri_or_element, QName): * text_or_uri_or_element = (text_or_uri_or_element).text * elif text_or_uri_or_element is not None: # <<<<<<<<<<<<<< @@ -65256,7 +65587,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L5; } - /* "lxml/etree.pyx":1816 + /* "lxml/etree.pyx":1827 * text_or_uri_or_element = unicode(text_or_uri_or_element) * else: * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" # <<<<<<<<<<<<<< @@ -65264,18 +65595,18 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_text_or_uri_or_element))), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1816, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(((PyObject *)Py_TYPE(__pyx_v_text_or_uri_or_element))), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_input_tag_of_type, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1816, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Invalid_input_tag_of_type, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 1816, __pyx_L1_error) + __PYX_ERR(0, 1827, __pyx_L1_error) } __pyx_L5:; - /* "lxml/etree.pyx":1806 + /* "lxml/etree.pyx":1817 * # Allow None as no namespace. * text_or_uri_or_element, tag = tag, None * if not _isString(text_or_uri_or_element): # <<<<<<<<<<<<<< @@ -65284,14 +65615,14 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1818 + /* "lxml/etree.pyx":1829 * raise ValueError, f"Invalid input tag of type {type(text_or_uri_or_element)!r}" * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) # <<<<<<<<<<<<<< * if tag is not None: * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') */ - __pyx_t_4 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_text_or_uri_or_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_text_or_uri_or_element); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (likely(__pyx_t_4 != Py_None)) { PyObject* sequence = __pyx_t_4; @@ -65299,7 +65630,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1818, __pyx_L1_error) + __PYX_ERR(0, 1829, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -65307,21 +65638,21 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1818, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 1829, __pyx_L1_error) } __pyx_v_ns_utf = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_tag_utf = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/etree.pyx":1819 + /* "lxml/etree.pyx":1830 * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) * if tag is not None: # <<<<<<<<<<<<<< @@ -65332,7 +65663,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1821 + /* "lxml/etree.pyx":1832 * if tag is not None: * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -65343,7 +65674,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1822 + /* "lxml/etree.pyx":1833 * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: * ns_utf = tag_utf # case 1: namespace ended up as tag name # <<<<<<<<<<<<<< @@ -65353,7 +65684,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_INCREF(__pyx_v_tag_utf); __Pyx_DECREF_SET(__pyx_v_ns_utf, __pyx_v_tag_utf); - /* "lxml/etree.pyx":1821 + /* "lxml/etree.pyx":1832 * if tag is not None: * # either ('ns', 'tag') or ('{ns}oldtag', 'newtag') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -65362,19 +65693,19 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1823 + /* "lxml/etree.pyx":1834 * if ns_utf is None: * ns_utf = tag_utf # case 1: namespace ended up as tag name * tag_utf = _utf8(tag) # <<<<<<<<<<<<<< * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') */ - __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__utf8(__pyx_v_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_tag_utf, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1819 + /* "lxml/etree.pyx":1830 * * ns_utf, tag_utf = _getNsTag(text_or_uri_or_element) * if tag is not None: # <<<<<<<<<<<<<< @@ -65383,16 +65714,16 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ } - /* "lxml/etree.pyx":1824 + /* "lxml/etree.pyx":1835 * ns_utf = tag_utf # case 1: namespace ended up as tag name * tag_utf = _utf8(tag) * _tagValidOrRaise(tag_utf) # <<<<<<<<<<<<<< * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: */ - __pyx_t_6 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_tag_utf); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1824, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_tag_utf); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1835, __pyx_L1_error) - /* "lxml/etree.pyx":1825 + /* "lxml/etree.pyx":1836 * tag_utf = _utf8(tag) * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') # <<<<<<<<<<<<<< @@ -65401,9 +65732,9 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q */ if (unlikely(__pyx_v_tag_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1825, __pyx_L1_error) + __PYX_ERR(0, 1836, __pyx_L1_error) } - __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1825, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_tag_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->localname); @@ -65411,7 +65742,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_v_self->localname = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1826 + /* "lxml/etree.pyx":1837 * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -65422,7 +65753,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1827 + /* "lxml/etree.pyx":1838 * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: * self.namespace = None # <<<<<<<<<<<<<< @@ -65435,7 +65766,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __Pyx_DECREF(__pyx_v_self->namespace); __pyx_v_self->namespace = ((PyObject*)Py_None); - /* "lxml/etree.pyx":1828 + /* "lxml/etree.pyx":1839 * if ns_utf is None: * self.namespace = None * self.text = self.localname # <<<<<<<<<<<<<< @@ -65450,7 +65781,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_v_self->text = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1826 + /* "lxml/etree.pyx":1837 * _tagValidOrRaise(tag_utf) * self.localname = (tag_utf).decode('utf8') * if ns_utf is None: # <<<<<<<<<<<<<< @@ -65460,7 +65791,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q goto __pyx_L9; } - /* "lxml/etree.pyx":1830 + /* "lxml/etree.pyx":1841 * self.text = self.localname * else: * self.namespace = (ns_utf).decode('utf8') # <<<<<<<<<<<<<< @@ -65470,9 +65801,9 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q /*else*/ { if (unlikely(__pyx_v_ns_utf == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1830, __pyx_L1_error) + __PYX_ERR(0, 1841, __pyx_L1_error) } - __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_ns_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1830, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_ns_utf), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->namespace); @@ -65480,14 +65811,14 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_v_self->namespace = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1831 + /* "lxml/etree.pyx":1842 * else: * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) # <<<<<<<<<<<<<< * def __str__(self): * return self.text */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = 127; @@ -65495,7 +65826,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__30); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u__30); - __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->namespace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_8; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -65506,14 +65837,14 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__31); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__31); - __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->localname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->localname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_8; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_5); @@ -65524,7 +65855,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q } __pyx_L9:; - /* "lxml/etree.pyx":1802 + /* "lxml/etree.pyx":1813 * cdef readonly unicode localname * cdef readonly unicode namespace * def __init__(self, text_or_uri_or_element, tag=None): # <<<<<<<<<<<<<< @@ -65550,7 +65881,7 @@ static int __pyx_pf_4lxml_5etree_5QName___init__(struct __pyx_obj_4lxml_5etree_Q return __pyx_r; } -/* "lxml/etree.pyx":1832 +/* "lxml/etree.pyx":1843 * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): # <<<<<<<<<<<<<< @@ -65576,7 +65907,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_2__str__(struct __pyx_obj_4lxml_5e __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); - /* "lxml/etree.pyx":1833 + /* "lxml/etree.pyx":1844 * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): * return self.text # <<<<<<<<<<<<<< @@ -65588,7 +65919,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_2__str__(struct __pyx_obj_4lxml_5e __pyx_r = __pyx_v_self->text; goto __pyx_L0; - /* "lxml/etree.pyx":1832 + /* "lxml/etree.pyx":1843 * self.namespace = (ns_utf).decode('utf8') * self.text = u"{%s}%s" % (self.namespace, self.localname) * def __str__(self): # <<<<<<<<<<<<<< @@ -65603,7 +65934,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_2__str__(struct __pyx_obj_4lxml_5e return __pyx_r; } -/* "lxml/etree.pyx":1834 +/* "lxml/etree.pyx":1845 * def __str__(self): * return self.text * def __hash__(self): # <<<<<<<<<<<<<< @@ -65631,7 +65962,7 @@ static Py_hash_t __pyx_pf_4lxml_5etree_5QName_4__hash__(struct __pyx_obj_4lxml_5 Py_hash_t __pyx_t_2; __Pyx_RefNannySetupContext("__hash__", 0); - /* "lxml/etree.pyx":1835 + /* "lxml/etree.pyx":1846 * return self.text * def __hash__(self): * return hash(self.text) # <<<<<<<<<<<<<< @@ -65640,12 +65971,12 @@ static Py_hash_t __pyx_pf_4lxml_5etree_5QName_4__hash__(struct __pyx_obj_4lxml_5 */ __pyx_t_1 = __pyx_v_self->text; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 1835, __pyx_L1_error) + __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_hash_t)-1))) __PYX_ERR(0, 1846, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "lxml/etree.pyx":1834 + /* "lxml/etree.pyx":1845 * def __str__(self): * return self.text * def __hash__(self): # <<<<<<<<<<<<<< @@ -65664,7 +65995,7 @@ static Py_hash_t __pyx_pf_4lxml_5etree_5QName_4__hash__(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":1836 +/* "lxml/etree.pyx":1847 * def __hash__(self): * return hash(self.text) * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -65700,7 +66031,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); - /* "lxml/etree.pyx":1837 + /* "lxml/etree.pyx":1848 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -65716,7 +66047,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":1838 + /* "lxml/etree.pyx":1849 * def __richcmp__(self, other, int op): * try: * if type(other) is QName: # <<<<<<<<<<<<<< @@ -65727,7 +66058,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":1839 + /* "lxml/etree.pyx":1850 * try: * if type(other) is QName: * other = (other).text # <<<<<<<<<<<<<< @@ -65739,7 +66070,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1838 + /* "lxml/etree.pyx":1849 * def __richcmp__(self, other, int op): * try: * if type(other) is QName: # <<<<<<<<<<<<<< @@ -65749,7 +66080,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm goto __pyx_L9; } - /* "lxml/etree.pyx":1840 + /* "lxml/etree.pyx":1851 * if type(other) is QName: * other = (other).text * elif not isinstance(other, unicode): # <<<<<<<<<<<<<< @@ -65760,19 +66091,19 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_t_4 = ((!(__pyx_t_5 != 0)) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":1841 + /* "lxml/etree.pyx":1852 * other = (other).text * elif not isinstance(other, unicode): * other = unicode(other) # <<<<<<<<<<<<<< * except (ValueError, UnicodeDecodeError): * return NotImplemented */ - __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1841, __pyx_L3_error) + __pyx_t_6 = __Pyx_PyObject_Unicode(__pyx_v_other); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1840 + /* "lxml/etree.pyx":1851 * if type(other) is QName: * other = (other).text * elif not isinstance(other, unicode): # <<<<<<<<<<<<<< @@ -65782,7 +66113,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm } __pyx_L9:; - /* "lxml/etree.pyx":1837 + /* "lxml/etree.pyx":1848 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -65797,7 +66128,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1842 + /* "lxml/etree.pyx":1853 * elif not isinstance(other, unicode): * other = unicode(other) * except (ValueError, UnicodeDecodeError): # <<<<<<<<<<<<<< @@ -65807,12 +66138,12 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_t_7 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_UnicodeDecodeError); if (__pyx_t_7) { __Pyx_AddTraceback("lxml.etree.QName.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1842, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_8, &__pyx_t_9) < 0) __PYX_ERR(0, 1853, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_9); - /* "lxml/etree.pyx":1843 + /* "lxml/etree.pyx":1854 * other = unicode(other) * except (ValueError, UnicodeDecodeError): * return NotImplemented # <<<<<<<<<<<<<< @@ -65830,7 +66161,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":1837 + /* "lxml/etree.pyx":1848 * return hash(self.text) * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -65851,7 +66182,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __pyx_L8_try_end:; } - /* "lxml/etree.pyx":1844 + /* "lxml/etree.pyx":1855 * except (ValueError, UnicodeDecodeError): * return NotImplemented * return python.PyObject_RichCompare(self.text, other, op) # <<<<<<<<<<<<<< @@ -65861,14 +66192,14 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __pyx_v_self->text; __Pyx_INCREF(__pyx_t_9); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1844, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_9, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_r = __pyx_t_8; __pyx_t_8 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1836 + /* "lxml/etree.pyx":1847 * def __hash__(self): * return hash(self.text) * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -65890,7 +66221,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_6__richcmp__(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":1799 +/* "lxml/etree.pyx":1810 * their text content. * """ * cdef readonly unicode text # <<<<<<<<<<<<<< @@ -65927,7 +66258,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_4text___get__(struct __pyx_obj_4lx return __pyx_r; } -/* "lxml/etree.pyx":1800 +/* "lxml/etree.pyx":1811 * """ * cdef readonly unicode text * cdef readonly unicode localname # <<<<<<<<<<<<<< @@ -65964,7 +66295,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_9localname___get__(struct __pyx_ob return __pyx_r; } -/* "lxml/etree.pyx":1801 +/* "lxml/etree.pyx":1812 * cdef readonly unicode text * cdef readonly unicode localname * cdef readonly unicode namespace # <<<<<<<<<<<<<< @@ -66001,7 +66332,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5QName_9namespace___get__(struct __pyx_ob return __pyx_r; } -/* "lxml/etree.pyx":1857 +/* "lxml/etree.pyx":1868 * * @cython.final * cdef int _assertHasRoot(self) except -1: # <<<<<<<<<<<<<< @@ -66015,7 +66346,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement int __pyx_t_1; __Pyx_RefNannySetupContext("_assertHasRoot", 0); - /* "lxml/etree.pyx":1863 + /* "lxml/etree.pyx":1874 * the caller program. * """ * assert self._context_node is not None, \ # <<<<<<<<<<<<<< @@ -66027,12 +66358,12 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement __pyx_t_1 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_u_ElementTree_not_initialized_miss); - __PYX_ERR(0, 1863, __pyx_L1_error) + __PYX_ERR(0, 1874, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":1865 + /* "lxml/etree.pyx":1876 * assert self._context_node is not None, \ * u"ElementTree not initialized, missing root" * return 0 # <<<<<<<<<<<<<< @@ -66042,7 +66373,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1857 + /* "lxml/etree.pyx":1868 * * @cython.final * cdef int _assertHasRoot(self) except -1: # <<<<<<<<<<<<<< @@ -66059,7 +66390,7 @@ static int __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(struct LxmlElement return __pyx_r; } -/* "lxml/etree.pyx":1867 +/* "lxml/etree.pyx":1878 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -66112,7 +66443,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_1parse(PyObject *__pyx_v_s if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1867, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1878, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -66129,13 +66460,13 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_1parse(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1867, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1878, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 1867, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 1878, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_parse(((struct LxmlElementTree *)__pyx_v_self), __pyx_v_source, __pyx_v_parser, __pyx_v_base_url); /* function exit code */ @@ -66164,7 +66495,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr int __pyx_t_10; __Pyx_RefNannySetupContext("parse", 0); - /* "lxml/etree.pyx":1872 + /* "lxml/etree.pyx":1883 * Updates self with the content of source and returns its root * """ * cdef _Document doc = None # <<<<<<<<<<<<<< @@ -66174,7 +66505,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __Pyx_INCREF(Py_None); __pyx_v_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":1873 + /* "lxml/etree.pyx":1884 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< @@ -66190,35 +66521,35 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":1874 + /* "lxml/etree.pyx":1885 * cdef _Document doc = None * try: * doc = _parseDocument(source, parser, base_url) # <<<<<<<<<<<<<< * self._context_node = doc.getroot() * if self._context_node is None: */ - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, __pyx_v_parser, __pyx_v_base_url)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1874, __pyx_L3_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, __pyx_v_parser, __pyx_v_base_url)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_doc, ((struct LxmlDocument *)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1875 + /* "lxml/etree.pyx":1886 * try: * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() # <<<<<<<<<<<<<< * if self._context_node is None: * self._doc = doc */ - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L3_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1875, __pyx_L3_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1886, __pyx_L3_error) __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_self->_context_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_v_self->_context_node = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1876 + /* "lxml/etree.pyx":1887 * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() * if self._context_node is None: # <<<<<<<<<<<<<< @@ -66229,7 +66560,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":1877 + /* "lxml/etree.pyx":1888 * self._context_node = doc.getroot() * if self._context_node is None: * self._doc = doc # <<<<<<<<<<<<<< @@ -66242,7 +66573,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __Pyx_DECREF(((PyObject *)__pyx_v_self->_doc)); __pyx_v_self->_doc = __pyx_v_doc; - /* "lxml/etree.pyx":1876 + /* "lxml/etree.pyx":1887 * doc = _parseDocument(source, parser, base_url) * self._context_node = doc.getroot() * if self._context_node is None: # <<<<<<<<<<<<<< @@ -66251,7 +66582,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr */ } - /* "lxml/etree.pyx":1873 + /* "lxml/etree.pyx":1884 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< @@ -66266,7 +66597,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1878 + /* "lxml/etree.pyx":1889 * if self._context_node is None: * self._doc = doc * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -66274,7 +66605,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr * self._context_node = result_container.result */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1878, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1889, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -66282,23 +66613,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("lxml.etree._ElementTree.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 1878, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_4) < 0) __PYX_ERR(0, 1889, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __pyx_v_result_container = __pyx_t_7; - /* "lxml/etree.pyx":1880 + /* "lxml/etree.pyx":1891 * except _TargetParserResult as result_container: * # raises a TypeError if we don't get an _Element * self._context_node = result_container.result # <<<<<<<<<<<<<< * return self._context_node * */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1880, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1891, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1880, __pyx_L5_except_error) + if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1891, __pyx_L5_except_error) __Pyx_GIVEREF(__pyx_t_9); __Pyx_GOTREF(__pyx_v_self->_context_node); __Pyx_DECREF(((PyObject *)__pyx_v_self->_context_node)); @@ -66312,7 +66643,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":1873 + /* "lxml/etree.pyx":1884 * """ * cdef _Document doc = None * try: # <<<<<<<<<<<<<< @@ -66332,7 +66663,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_L8_try_end:; } - /* "lxml/etree.pyx":1881 + /* "lxml/etree.pyx":1892 * # raises a TypeError if we don't get an _Element * self._context_node = result_container.result * return self._context_node # <<<<<<<<<<<<<< @@ -66344,7 +66675,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr __pyx_r = ((PyObject *)__pyx_v_self->_context_node); goto __pyx_L0; - /* "lxml/etree.pyx":1867 + /* "lxml/etree.pyx":1878 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -66368,7 +66699,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_parse(struct LxmlElementTr return __pyx_r; } -/* "lxml/etree.pyx":1883 +/* "lxml/etree.pyx":1894 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< @@ -66384,7 +66715,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_3_setroot(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_setroot (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_5etree__Element, 0, "root", 0))) __PYX_ERR(0, 1883, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_root), __pyx_ptype_4lxml_5etree__Element, 0, "root", 0))) __PYX_ERR(0, 1894, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(((struct LxmlElementTree *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_root)); /* function exit code */ @@ -66403,16 +66734,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme int __pyx_t_2; __Pyx_RefNannySetupContext("_setroot", 0); - /* "lxml/etree.pyx":1888 + /* "lxml/etree.pyx":1899 * Relocate the ElementTree to a new root node. * """ * _assertValidNode(root) # <<<<<<<<<<<<<< * if root._c_node.type != tree.XML_ELEMENT_NODE: * raise TypeError, u"Only elements can be the root of an ElementTree" */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1899, __pyx_L1_error) - /* "lxml/etree.pyx":1889 + /* "lxml/etree.pyx":1900 * """ * _assertValidNode(root) * if root._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -66422,7 +66753,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme __pyx_t_2 = ((__pyx_v_root->_c_node->type != XML_ELEMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":1890 + /* "lxml/etree.pyx":1901 * _assertValidNode(root) * if root._c_node.type != tree.XML_ELEMENT_NODE: * raise TypeError, u"Only elements can be the root of an ElementTree" # <<<<<<<<<<<<<< @@ -66430,9 +66761,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme * self._doc = None */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Only_elements_can_be_the_root_of, 0, 0); - __PYX_ERR(0, 1890, __pyx_L1_error) + __PYX_ERR(0, 1901, __pyx_L1_error) - /* "lxml/etree.pyx":1889 + /* "lxml/etree.pyx":1900 * """ * _assertValidNode(root) * if root._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -66441,7 +66772,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme */ } - /* "lxml/etree.pyx":1891 + /* "lxml/etree.pyx":1902 * if root._c_node.type != tree.XML_ELEMENT_NODE: * raise TypeError, u"Only elements can be the root of an ElementTree" * self._context_node = root # <<<<<<<<<<<<<< @@ -66454,7 +66785,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme __Pyx_DECREF(((PyObject *)__pyx_v_self->_context_node)); __pyx_v_self->_context_node = __pyx_v_root; - /* "lxml/etree.pyx":1892 + /* "lxml/etree.pyx":1903 * raise TypeError, u"Only elements can be the root of an ElementTree" * self._context_node = root * self._doc = None # <<<<<<<<<<<<<< @@ -66467,7 +66798,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme __Pyx_DECREF(((PyObject *)__pyx_v_self->_doc)); __pyx_v_self->_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":1883 + /* "lxml/etree.pyx":1894 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< @@ -66487,7 +66818,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_2_setroot(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":1894 +/* "lxml/etree.pyx":1905 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< @@ -66515,7 +66846,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_4getroot(struct LxmlElemen __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getroot", 0); - /* "lxml/etree.pyx":1899 + /* "lxml/etree.pyx":1910 * Gets the root element for this tree. * """ * return self._context_node # <<<<<<<<<<<<<< @@ -66527,7 +66858,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_4getroot(struct LxmlElemen __pyx_r = ((PyObject *)__pyx_v_self->_context_node); goto __pyx_L0; - /* "lxml/etree.pyx":1894 + /* "lxml/etree.pyx":1905 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< @@ -66542,7 +66873,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_4getroot(struct LxmlElemen return __pyx_r; } -/* "lxml/etree.pyx":1901 +/* "lxml/etree.pyx":1912 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< @@ -66572,7 +66903,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__copy__", 0); - /* "lxml/etree.pyx":1902 + /* "lxml/etree.pyx":1913 * * def __copy__(self): * return _elementTreeFactory(self._doc, self._context_node) # <<<<<<<<<<<<<< @@ -66584,7 +66915,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1902, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)__pyx_t_1), ((struct LxmlElement *)__pyx_t_2))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -66592,7 +66923,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1901 + /* "lxml/etree.pyx":1912 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< @@ -66613,7 +66944,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6__copy__(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":1904 +/* "lxml/etree.pyx":1915 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -66649,7 +66980,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE int __pyx_t_6; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "lxml/etree.pyx":1908 + /* "lxml/etree.pyx":1919 * cdef _Document doc * cdef xmlDoc* c_doc * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -66660,14 +66991,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1909 + /* "lxml/etree.pyx":1920 * cdef xmlDoc* c_doc * if self._context_node is not None: * root = self._context_node.__copy__() # <<<<<<<<<<<<<< * assert root is not None * _assertValidNode(root) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_context_node), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_context_node), __pyx_n_s_copy_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -66681,14 +67012,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1909, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1920, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1909, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 1920, __pyx_L1_error) __pyx_v_root = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1910 + /* "lxml/etree.pyx":1921 * if self._context_node is not None: * root = self._context_node.__copy__() * assert root is not None # <<<<<<<<<<<<<< @@ -66700,30 +67031,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __pyx_t_2 = (((PyObject *)__pyx_v_root) != Py_None); if (unlikely(!(__pyx_t_2 != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 1910, __pyx_L1_error) + __PYX_ERR(0, 1921, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":1911 + /* "lxml/etree.pyx":1922 * root = self._context_node.__copy__() * assert root is not None * _assertValidNode(root) # <<<<<<<<<<<<<< * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) */ - __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1911, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1922, __pyx_L1_error) - /* "lxml/etree.pyx":1912 + /* "lxml/etree.pyx":1923 * assert root is not None * _assertValidNode(root) * _copyNonElementSiblings(self._context_node._c_node, root._c_node) # <<<<<<<<<<<<<< * return _elementTreeFactory(None, root) * elif self._doc is not None: */ - __pyx_t_6 = __pyx_f_4lxml_5etree__copyNonElementSiblings(__pyx_v_self->_context_node->_c_node, __pyx_v_root->_c_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1912, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__copyNonElementSiblings(__pyx_v_self->_context_node->_c_node, __pyx_v_root->_c_node); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1923, __pyx_L1_error) - /* "lxml/etree.pyx":1913 + /* "lxml/etree.pyx":1924 * _assertValidNode(root) * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) # <<<<<<<<<<<<<< @@ -66731,13 +67062,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE * _assertValidDoc(self._doc) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)Py_None), __pyx_v_root)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(((struct LxmlDocument *)Py_None), __pyx_v_root)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1908 + /* "lxml/etree.pyx":1919 * cdef _Document doc * cdef xmlDoc* c_doc * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -66746,7 +67077,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1914 + /* "lxml/etree.pyx":1925 * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -66757,7 +67088,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":1915 + /* "lxml/etree.pyx":1926 * return _elementTreeFactory(None, root) * elif self._doc is not None: * _assertValidDoc(self._doc) # <<<<<<<<<<<<<< @@ -66766,10 +67097,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ __pyx_t_3 = ((PyObject *)__pyx_v_self->_doc); __Pyx_INCREF(__pyx_t_3); - __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_3)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__assertValidDoc(((struct LxmlDocument *)__pyx_t_3)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":1916 + /* "lxml/etree.pyx":1927 * elif self._doc is not None: * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) # <<<<<<<<<<<<<< @@ -66778,7 +67109,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ __pyx_v_c_doc = xmlCopyDoc(__pyx_v_self->_doc->_c_doc, 1); - /* "lxml/etree.pyx":1917 + /* "lxml/etree.pyx":1928 * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -66788,16 +67119,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE __pyx_t_1 = ((__pyx_v_c_doc == NULL) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/etree.pyx":1918 + /* "lxml/etree.pyx":1929 * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * doc = _documentFactory(c_doc, self._doc._parser) * return _elementTreeFactory(doc, None) */ - PyErr_NoMemory(); __PYX_ERR(0, 1918, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 1929, __pyx_L1_error) - /* "lxml/etree.pyx":1917 + /* "lxml/etree.pyx":1928 * _assertValidDoc(self._doc) * c_doc = tree.xmlCopyDoc(self._doc._c_doc, 1) * if c_doc is NULL: # <<<<<<<<<<<<<< @@ -66806,7 +67137,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1919 + /* "lxml/etree.pyx":1930 * if c_doc is NULL: * raise MemoryError() * doc = _documentFactory(c_doc, self._doc._parser) # <<<<<<<<<<<<<< @@ -66815,13 +67146,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ __pyx_t_3 = ((PyObject *)__pyx_v_self->_doc->_parser); __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1919, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1930, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":1920 + /* "lxml/etree.pyx":1931 * raise MemoryError() * doc = _documentFactory(c_doc, self._doc._parser) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< @@ -66829,13 +67160,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE * # so what ... */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1920, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1931, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1914 + /* "lxml/etree.pyx":1925 * _copyNonElementSiblings(self._context_node._c_node, root._c_node) * return _elementTreeFactory(None, root) * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -66844,7 +67175,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE */ } - /* "lxml/etree.pyx":1923 + /* "lxml/etree.pyx":1934 * else: * # so what ... * return self # <<<<<<<<<<<<<< @@ -66858,7 +67189,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE goto __pyx_L0; } - /* "lxml/etree.pyx":1904 + /* "lxml/etree.pyx":1915 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -66881,12 +67212,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_8__deepcopy__(struct LxmlE return __pyx_r; } -/* "lxml/etree.pyx":1928 - * property docinfo: - * u"""Information about the document provided by parser and DTD.""" - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertHasRoot() - * return DocInfo(self._context_node._doc) +/* "lxml/etree.pyx":1938 + * # not in ElementTree + * @property + * def docinfo(self): # <<<<<<<<<<<<<< + * """Information about the document provided by parser and DTD.""" + * self._assertHasRoot() */ /* Python wrapper */ @@ -66909,35 +67240,35 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_7docinfo___get__(struct Lx PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1929 - * u"""Information about the document provided by parser and DTD.""" - * def __get__(self): - * self._assertHasRoot() # <<<<<<<<<<<<<< - * return DocInfo(self._context_node._doc) + /* "lxml/etree.pyx":1940 + * def docinfo(self): + * """Information about the document provided by parser and DTD.""" + * self._assertHasRoot() # <<<<<<<<<<<<<< + * return DocInfo(self._context_node._doc) * */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1929, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1940, __pyx_L1_error) - /* "lxml/etree.pyx":1930 - * def __get__(self): - * self._assertHasRoot() - * return DocInfo(self._context_node._doc) # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1941 + * """Information about the document provided by parser and DTD.""" + * self._assertHasRoot() + * return DocInfo(self._context_node._doc) # <<<<<<<<<<<<<< * * # not in ElementTree, read-only */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_DocInfo), ((PyObject *)__pyx_v_self->_context_node->_doc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_DocInfo), ((PyObject *)__pyx_v_self->_context_node->_doc)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":1928 - * property docinfo: - * u"""Information about the document provided by parser and DTD.""" - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertHasRoot() - * return DocInfo(self._context_node._doc) + /* "lxml/etree.pyx":1938 + * # not in ElementTree + * @property + * def docinfo(self): # <<<<<<<<<<<<<< + * """Information about the document provided by parser and DTD.""" + * self._assertHasRoot() */ /* function exit code */ @@ -66951,12 +67282,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_7docinfo___get__(struct Lx return __pyx_r; } -/* "lxml/etree.pyx":1936 - * u"""The parser that was used to parse the document in this ElementTree. +/* "lxml/etree.pyx":1945 + * # not in ElementTree, read-only + * @property + * def parser(self): # <<<<<<<<<<<<<< + * """The parser that was used to parse the document in this ElementTree. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self._context_node is not None and \ - * self._context_node._doc is not None: */ /* Python wrapper */ @@ -66980,12 +67311,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm int __pyx_t_3; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":1937 + /* "lxml/etree.pyx":1948 + * """The parser that was used to parse the document in this ElementTree. * """ - * def __get__(self): - * if self._context_node is not None and \ # <<<<<<<<<<<<<< - * self._context_node._doc is not None: - * return self._context_node._doc._parser + * if self._context_node is not None and \ # <<<<<<<<<<<<<< + * self._context_node._doc is not None: + * return self._context_node._doc._parser */ __pyx_t_2 = (((PyObject *)__pyx_v_self->_context_node) != Py_None); __pyx_t_3 = (__pyx_t_2 != 0); @@ -66995,64 +67326,64 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm goto __pyx_L4_bool_binop_done; } - /* "lxml/etree.pyx":1938 - * def __get__(self): - * if self._context_node is not None and \ - * self._context_node._doc is not None: # <<<<<<<<<<<<<< - * return self._context_node._doc._parser - * if self._doc is not None: + /* "lxml/etree.pyx":1949 + * """ + * if self._context_node is not None and \ + * self._context_node._doc is not None: # <<<<<<<<<<<<<< + * return self._context_node._doc._parser + * if self._doc is not None: */ __pyx_t_3 = (((PyObject *)__pyx_v_self->_context_node->_doc) != Py_None); __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; - /* "lxml/etree.pyx":1937 + /* "lxml/etree.pyx":1948 + * """The parser that was used to parse the document in this ElementTree. * """ - * def __get__(self): - * if self._context_node is not None and \ # <<<<<<<<<<<<<< - * self._context_node._doc is not None: - * return self._context_node._doc._parser + * if self._context_node is not None and \ # <<<<<<<<<<<<<< + * self._context_node._doc is not None: + * return self._context_node._doc._parser */ if (__pyx_t_1) { - /* "lxml/etree.pyx":1939 - * if self._context_node is not None and \ - * self._context_node._doc is not None: - * return self._context_node._doc._parser # <<<<<<<<<<<<<< - * if self._doc is not None: - * return self._doc._parser + /* "lxml/etree.pyx":1950 + * if self._context_node is not None and \ + * self._context_node._doc is not None: + * return self._context_node._doc._parser # <<<<<<<<<<<<<< + * if self._doc is not None: + * return self._doc._parser */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_context_node->_doc->_parser)); __pyx_r = ((PyObject *)__pyx_v_self->_context_node->_doc->_parser); goto __pyx_L0; - /* "lxml/etree.pyx":1937 + /* "lxml/etree.pyx":1948 + * """The parser that was used to parse the document in this ElementTree. * """ - * def __get__(self): - * if self._context_node is not None and \ # <<<<<<<<<<<<<< - * self._context_node._doc is not None: - * return self._context_node._doc._parser + * if self._context_node is not None and \ # <<<<<<<<<<<<<< + * self._context_node._doc is not None: + * return self._context_node._doc._parser */ } - /* "lxml/etree.pyx":1940 - * self._context_node._doc is not None: - * return self._context_node._doc._parser - * if self._doc is not None: # <<<<<<<<<<<<<< - * return self._doc._parser - * return None + /* "lxml/etree.pyx":1951 + * self._context_node._doc is not None: + * return self._context_node._doc._parser + * if self._doc is not None: # <<<<<<<<<<<<<< + * return self._doc._parser + * return None */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) != Py_None); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":1941 - * return self._context_node._doc._parser - * if self._doc is not None: - * return self._doc._parser # <<<<<<<<<<<<<< - * return None + /* "lxml/etree.pyx":1952 + * return self._context_node._doc._parser + * if self._doc is not None: + * return self._doc._parser # <<<<<<<<<<<<<< + * return None * */ __Pyx_XDECREF(__pyx_r); @@ -67060,19 +67391,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm __pyx_r = ((PyObject *)__pyx_v_self->_doc->_parser); goto __pyx_L0; - /* "lxml/etree.pyx":1940 - * self._context_node._doc is not None: - * return self._context_node._doc._parser - * if self._doc is not None: # <<<<<<<<<<<<<< - * return self._doc._parser - * return None + /* "lxml/etree.pyx":1951 + * self._context_node._doc is not None: + * return self._context_node._doc._parser + * if self._doc is not None: # <<<<<<<<<<<<<< + * return self._doc._parser + * return None */ } - /* "lxml/etree.pyx":1942 - * if self._doc is not None: - * return self._doc._parser - * return None # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":1953 + * if self._doc is not None: + * return self._doc._parser + * return None # <<<<<<<<<<<<<< * * def write(self, file, *, encoding=None, method=u"xml", */ @@ -67080,12 +67411,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1936 - * u"""The parser that was used to parse the document in this ElementTree. + /* "lxml/etree.pyx":1945 + * # not in ElementTree, read-only + * @property + * def parser(self): # <<<<<<<<<<<<<< + * """The parser that was used to parse the document in this ElementTree. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * if self._context_node is not None and \ - * self._context_node._doc is not None: */ /* function exit code */ @@ -67095,8 +67426,8 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_6parser___get__(struct Lxm return __pyx_r; } -/* "lxml/etree.pyx":1944 - * return None +/* "lxml/etree.pyx":1955 + * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< * pretty_print=False, xml_declaration=None, with_tail=True, @@ -67130,7 +67461,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)__pyx_n_u_xml); - /* "lxml/etree.pyx":1945 + /* "lxml/etree.pyx":1956 * * def write(self, file, *, encoding=None, method=u"xml", * pretty_print=False, xml_declaration=None, with_tail=True, # <<<<<<<<<<<<<< @@ -67141,7 +67472,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ values[4] = ((PyObject *)Py_None); values[5] = ((PyObject *)Py_True); - /* "lxml/etree.pyx":1946 + /* "lxml/etree.pyx":1957 * def write(self, file, *, encoding=None, method=u"xml", * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, # <<<<<<<<<<<<<< @@ -67152,7 +67483,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ values[7] = ((PyObject *)Py_None); values[8] = ((PyObject *)__pyx_int_0); - /* "lxml/etree.pyx":1947 + /* "lxml/etree.pyx":1958 * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, * exclusive=False, with_comments=True, inclusive_ns_prefixes=None, # <<<<<<<<<<<<<< @@ -67163,7 +67494,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ values[10] = ((PyObject *)Py_True); values[11] = ((PyObject *)Py_None); - /* "lxml/etree.pyx":1948 + /* "lxml/etree.pyx":1959 * standalone=None, doctype=None, compression=0, * exclusive=False, with_comments=True, inclusive_ns_prefixes=None, * docstring=None): # <<<<<<<<<<<<<< @@ -67194,7 +67525,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) __PYX_ERR(0, 1944, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write") < 0)) __PYX_ERR(0, 1955, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -67217,7 +67548,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1944, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1955, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.write", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -67225,8 +67556,8 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_11write(PyObject *__pyx_v_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_10write(((struct LxmlElementTree *)__pyx_v_self), __pyx_v_file, __pyx_v_encoding, __pyx_v_method, __pyx_v_pretty_print, __pyx_v_xml_declaration, __pyx_v_with_tail, __pyx_v_standalone, __pyx_v_doctype, __pyx_v_compression, __pyx_v_exclusive, __pyx_v_with_comments, __pyx_v_inclusive_ns_prefixes, __pyx_v_docstring); - /* "lxml/etree.pyx":1944 - * return None + /* "lxml/etree.pyx":1955 + * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< * pretty_print=False, xml_declaration=None, with_tail=True, @@ -67256,16 +67587,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_INCREF(__pyx_v_doctype); __Pyx_INCREF(__pyx_v_compression); - /* "lxml/etree.pyx":1990 + /* "lxml/etree.pyx":2001 * cdef int is_standalone * * self._assertHasRoot() # <<<<<<<<<<<<<< * _assertValidNode(self._context_node) * if compression is None or compression < 0: */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1990, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2001, __pyx_L1_error) - /* "lxml/etree.pyx":1991 + /* "lxml/etree.pyx":2002 * * self._assertHasRoot() * _assertValidNode(self._context_node) # <<<<<<<<<<<<<< @@ -67274,10 +67605,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_2)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1991, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_2)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2002, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":1992 + /* "lxml/etree.pyx":2003 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -67291,14 +67622,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1992, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2003, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2003, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/etree.pyx":1993 + /* "lxml/etree.pyx":2004 * _assertValidNode(self._context_node) * if compression is None or compression < 0: * compression = 0 # <<<<<<<<<<<<<< @@ -67308,7 +67639,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_compression, __pyx_int_0); - /* "lxml/etree.pyx":1992 + /* "lxml/etree.pyx":2003 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -67317,17 +67648,17 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":1996 + /* "lxml/etree.pyx":2007 * * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_c14n, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1996, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_c14n, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2007, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/etree.pyx":1997 + /* "lxml/etree.pyx":2008 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -67338,20 +67669,20 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_5 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":1998 + /* "lxml/etree.pyx":2009 * if method == 'c14n': * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") # <<<<<<<<<<<<<< * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1998, __pyx_L1_error) + __PYX_ERR(0, 2009, __pyx_L1_error) - /* "lxml/etree.pyx":1997 + /* "lxml/etree.pyx":2008 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -67360,30 +67691,30 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":1999 + /* "lxml/etree.pyx":2010 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< * raise ValueError("Cannot enable XML declaration in C14N") * */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1999, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2010, __pyx_L1_error) if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2000 + /* "lxml/etree.pyx":2011 * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") # <<<<<<<<<<<<<< * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_t_2, 0, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 2000, __pyx_L1_error) + __PYX_ERR(0, 2011, __pyx_L1_error) - /* "lxml/etree.pyx":1999 + /* "lxml/etree.pyx":2010 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< @@ -67392,7 +67723,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2002 + /* "lxml/etree.pyx":2013 * raise ValueError("Cannot enable XML declaration in C14N") * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< @@ -67401,31 +67732,31 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_exclusive); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2002, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2002, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_exclusive); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2013, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2013, __pyx_L1_error) - /* "lxml/etree.pyx":2003 + /* "lxml/etree.pyx":2014 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) # <<<<<<<<<<<<<< * return * if not with_comments: */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2003, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2014, __pyx_L1_error) - /* "lxml/etree.pyx":2002 + /* "lxml/etree.pyx":2013 * raise ValueError("Cannot enable XML declaration in C14N") * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * return */ - __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelikeC14N(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_t_5, __pyx_t_3, __pyx_t_1, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2002, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelikeC14N(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_t_5, __pyx_t_3, __pyx_t_1, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2004 + /* "lxml/etree.pyx":2015 * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) * return # <<<<<<<<<<<<<< @@ -67436,7 +67767,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":1996 + /* "lxml/etree.pyx":2007 * * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< @@ -67445,31 +67776,31 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2005 + /* "lxml/etree.pyx":2016 * compression, inclusive_ns_prefixes) * return * if not with_comments: # <<<<<<<<<<<<<< * raise ValueError("Can only discard comments in C14N serialisation") * # suppress decl. in default case (purely for ElementTree compatibility) */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2005, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2016, __pyx_L1_error) __pyx_t_5 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2006 + /* "lxml/etree.pyx":2017 * return * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") # <<<<<<<<<<<<<< * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: */ - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2006, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_Raise(__pyx_t_6, 0, 0, 0); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __PYX_ERR(0, 2006, __pyx_L1_error) + __PYX_ERR(0, 2017, __pyx_L1_error) - /* "lxml/etree.pyx":2005 + /* "lxml/etree.pyx":2016 * compression, inclusive_ns_prefixes) * return * if not with_comments: # <<<<<<<<<<<<<< @@ -67478,7 +67809,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2008 + /* "lxml/etree.pyx":2019 * raise ValueError("Can only discard comments in C14N serialisation") * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: # <<<<<<<<<<<<<< @@ -67489,17 +67820,17 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2009 + /* "lxml/etree.pyx":2020 * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: * write_declaration = xml_declaration # <<<<<<<<<<<<<< * if encoding is None: * encoding = u'ASCII' */ - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2009, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2020, __pyx_L1_error) __pyx_v_write_declaration = __pyx_t_3; - /* "lxml/etree.pyx":2010 + /* "lxml/etree.pyx":2021 * if xml_declaration is not None: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -67510,7 +67841,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2011 + /* "lxml/etree.pyx":2022 * write_declaration = xml_declaration * if encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< @@ -67520,7 +67851,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":2010 + /* "lxml/etree.pyx":2021 * if xml_declaration is not None: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -67530,7 +67861,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L11; } - /* "lxml/etree.pyx":2013 + /* "lxml/etree.pyx":2024 * encoding = u'ASCII' * else: * encoding = encoding.upper() # <<<<<<<<<<<<<< @@ -67538,7 +67869,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement * encoding = u'ASCII' */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2013, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -67552,7 +67883,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2013, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6); @@ -67560,7 +67891,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_L11:; - /* "lxml/etree.pyx":2008 + /* "lxml/etree.pyx":2019 * raise ValueError("Can only discard comments in C14N serialisation") * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: # <<<<<<<<<<<<<< @@ -67570,7 +67901,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L10; } - /* "lxml/etree.pyx":2014 + /* "lxml/etree.pyx":2025 * else: * encoding = encoding.upper() * elif encoding is None: # <<<<<<<<<<<<<< @@ -67581,7 +67912,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_3 = (__pyx_t_5 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2015 + /* "lxml/etree.pyx":2026 * encoding = encoding.upper() * elif encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< @@ -67591,7 +67922,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":2016 + /* "lxml/etree.pyx":2027 * elif encoding is None: * encoding = u'ASCII' * write_declaration = 0 # <<<<<<<<<<<<<< @@ -67600,7 +67931,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_v_write_declaration = 0; - /* "lxml/etree.pyx":2014 + /* "lxml/etree.pyx":2025 * else: * encoding = encoding.upper() * elif encoding is None: # <<<<<<<<<<<<<< @@ -67610,7 +67941,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L10; } - /* "lxml/etree.pyx":2018 + /* "lxml/etree.pyx":2029 * write_declaration = 0 * else: * encoding = encoding.upper() # <<<<<<<<<<<<<< @@ -67618,7 +67949,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') */ /*else*/ { - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2018, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -67632,13 +67963,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2018, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2019 + /* "lxml/etree.pyx":2030 * else: * encoding = encoding.upper() * write_declaration = encoding not in \ # <<<<<<<<<<<<<< @@ -67647,25 +67978,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __Pyx_INCREF(__pyx_v_encoding); __pyx_t_6 = __pyx_v_encoding; - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2019, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L12_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2019, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L12_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2019, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error) if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L12_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2019, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2030, __pyx_L1_error) __pyx_t_3 = __pyx_t_5; __pyx_L12_bool_binop_done:; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -67673,7 +68004,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_L10:; - /* "lxml/etree.pyx":2021 + /* "lxml/etree.pyx":2032 * write_declaration = encoding not in \ * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: # <<<<<<<<<<<<<< @@ -67684,7 +68015,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_5 = (__pyx_t_3 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2022 + /* "lxml/etree.pyx":2033 * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: * is_standalone = -1 # <<<<<<<<<<<<<< @@ -67693,7 +68024,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_v_is_standalone = -1; - /* "lxml/etree.pyx":2021 + /* "lxml/etree.pyx":2032 * write_declaration = encoding not in \ * (u'US-ASCII', u'ASCII', u'UTF8', u'UTF-8') * if standalone is None: # <<<<<<<<<<<<<< @@ -67703,17 +68034,17 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L16; } - /* "lxml/etree.pyx":2023 + /* "lxml/etree.pyx":2034 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< * write_declaration = 1 * is_standalone = 1 */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2023, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2034, __pyx_L1_error) if (__pyx_t_5) { - /* "lxml/etree.pyx":2024 + /* "lxml/etree.pyx":2035 * is_standalone = -1 * elif standalone: * write_declaration = 1 # <<<<<<<<<<<<<< @@ -67722,7 +68053,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":2025 + /* "lxml/etree.pyx":2036 * elif standalone: * write_declaration = 1 * is_standalone = 1 # <<<<<<<<<<<<<< @@ -67731,7 +68062,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ __pyx_v_is_standalone = 1; - /* "lxml/etree.pyx":2023 + /* "lxml/etree.pyx":2034 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< @@ -67741,7 +68072,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement goto __pyx_L16; } - /* "lxml/etree.pyx":2027 + /* "lxml/etree.pyx":2038 * is_standalone = 1 * else: * write_declaration = 1 # <<<<<<<<<<<<<< @@ -67751,7 +68082,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement /*else*/ { __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":2028 + /* "lxml/etree.pyx":2039 * else: * write_declaration = 1 * is_standalone = 0 # <<<<<<<<<<<<<< @@ -67762,7 +68093,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement } __pyx_L16:; - /* "lxml/etree.pyx":2030 + /* "lxml/etree.pyx":2041 * is_standalone = 0 * * if docstring is not None and doctype is None: # <<<<<<<<<<<<<< @@ -67782,41 +68113,41 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_L18_bool_binop_done:; if (__pyx_t_5) { - /* "lxml/etree.pyx":2031 + /* "lxml/etree.pyx":2042 * * if docstring is not None and doctype is None: * import warnings # <<<<<<<<<<<<<< * warnings.warn( * "The 'docstring' option is deprecated. Use 'doctype' instead.", */ - __pyx_t_6 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2031, __pyx_L1_error) + __pyx_t_6 = __Pyx_Import(__pyx_n_s_warnings, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_warnings = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/etree.pyx":2032 + /* "lxml/etree.pyx":2043 * if docstring is not None and doctype is None: * import warnings * warnings.warn( # <<<<<<<<<<<<<< * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2032, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_warnings, __pyx_n_s_warn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "lxml/etree.pyx":2034 + /* "lxml/etree.pyx":2045 * warnings.warn( * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) # <<<<<<<<<<<<<< * doctype = docstring * */ - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2035 + /* "lxml/etree.pyx":2046 * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) * doctype = docstring # <<<<<<<<<<<<<< @@ -67826,7 +68157,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __Pyx_INCREF(__pyx_v_docstring); __Pyx_DECREF_SET(__pyx_v_doctype, __pyx_v_docstring); - /* "lxml/etree.pyx":2030 + /* "lxml/etree.pyx":2041 * is_standalone = 0 * * if docstring is not None and doctype is None: # <<<<<<<<<<<<<< @@ -67835,7 +68166,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement */ } - /* "lxml/etree.pyx":2037 + /* "lxml/etree.pyx":2048 * doctype = docstring * * _tofilelike(file, self._context_node, encoding, doctype, method, # <<<<<<<<<<<<<< @@ -67845,39 +68176,39 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - /* "lxml/etree.pyx":2038 + /* "lxml/etree.pyx":2049 * * _tofilelike(file, self._context_node, encoding, doctype, method, * write_declaration, 1, pretty_print, with_tail, # <<<<<<<<<<<<<< * is_standalone, compression) * */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_pretty_print); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2038, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_tail); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2038, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_pretty_print); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_with_tail); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) - /* "lxml/etree.pyx":2039 + /* "lxml/etree.pyx":2050 * _tofilelike(file, self._context_node, encoding, doctype, method, * write_declaration, 1, pretty_print, with_tail, * is_standalone, compression) # <<<<<<<<<<<<<< * * def getpath(self, _Element element not None): */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2039, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2050, __pyx_L1_error) - /* "lxml/etree.pyx":2037 + /* "lxml/etree.pyx":2048 * doctype = docstring * * _tofilelike(file, self._context_node, encoding, doctype, method, # <<<<<<<<<<<<<< * write_declaration, 1, pretty_print, with_tail, * is_standalone, compression) */ - __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelike(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 1, __pyx_t_5, __pyx_t_3, __pyx_v_is_standalone, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2037, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelike(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 1, __pyx_t_5, __pyx_t_3, __pyx_v_is_standalone, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":1944 - * return None + /* "lxml/etree.pyx":1955 + * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< * pretty_print=False, xml_declaration=None, with_tail=True, @@ -67903,7 +68234,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_10write(struct LxmlElement return __pyx_r; } -/* "lxml/etree.pyx":2041 +/* "lxml/etree.pyx":2052 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -67919,7 +68250,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_13getpath(PyObject *__pyx_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getpath (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2041, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2052, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_12getpath(((struct LxmlElementTree *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -67946,16 +68277,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme xmlDoc *__pyx_t_5; __Pyx_RefNannySetupContext("getpath", 0); - /* "lxml/etree.pyx":2056 + /* "lxml/etree.pyx":2067 * cdef _Element root * cdef xmlDoc* c_doc * _assertValidNode(element) # <<<<<<<<<<<<<< * if self._context_node is not None: * root = self._context_node */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2067, __pyx_L1_error) - /* "lxml/etree.pyx":2057 + /* "lxml/etree.pyx":2068 * cdef xmlDoc* c_doc * _assertValidNode(element) * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -67966,7 +68297,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2058 + /* "lxml/etree.pyx":2069 * _assertValidNode(element) * if self._context_node is not None: * root = self._context_node # <<<<<<<<<<<<<< @@ -67978,7 +68309,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2059 + /* "lxml/etree.pyx":2070 * if self._context_node is not None: * root = self._context_node * doc = root._doc # <<<<<<<<<<<<<< @@ -67990,7 +68321,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2057 + /* "lxml/etree.pyx":2068 * cdef xmlDoc* c_doc * _assertValidNode(element) * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -68000,7 +68331,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme goto __pyx_L3; } - /* "lxml/etree.pyx":2060 + /* "lxml/etree.pyx":2071 * root = self._context_node * doc = root._doc * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -68011,7 +68342,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_t_2 = (__pyx_t_3 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":2061 + /* "lxml/etree.pyx":2072 * doc = root._doc * elif self._doc is not None: * doc = self._doc # <<<<<<<<<<<<<< @@ -68023,20 +68354,20 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2062 + /* "lxml/etree.pyx":2073 * elif self._doc is not None: * doc = self._doc * root = doc.getroot() # <<<<<<<<<<<<<< * else: * raise ValueError, u"Element is not in this tree." */ - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2062, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2073, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2062, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2073, __pyx_L1_error) __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2060 + /* "lxml/etree.pyx":2071 * root = self._context_node * doc = root._doc * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -68046,7 +68377,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme goto __pyx_L3; } - /* "lxml/etree.pyx":2064 + /* "lxml/etree.pyx":2075 * root = doc.getroot() * else: * raise ValueError, u"Element is not in this tree." # <<<<<<<<<<<<<< @@ -68055,29 +68386,29 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ /*else*/ { __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2064, __pyx_L1_error) + __PYX_ERR(0, 2075, __pyx_L1_error) } __pyx_L3:; - /* "lxml/etree.pyx":2065 + /* "lxml/etree.pyx":2076 * else: * raise ValueError, u"Element is not in this tree." * _assertValidDoc(doc) # <<<<<<<<<<<<<< * _assertValidNode(root) * if element._doc is not doc: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2076, __pyx_L1_error) - /* "lxml/etree.pyx":2066 + /* "lxml/etree.pyx":2077 * raise ValueError, u"Element is not in this tree." * _assertValidDoc(doc) * _assertValidNode(root) # <<<<<<<<<<<<<< * if element._doc is not doc: * raise ValueError, u"Element is not in this tree." */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2066, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2077, __pyx_L1_error) - /* "lxml/etree.pyx":2067 + /* "lxml/etree.pyx":2078 * _assertValidDoc(doc) * _assertValidNode(root) * if element._doc is not doc: # <<<<<<<<<<<<<< @@ -68088,7 +68419,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2068 + /* "lxml/etree.pyx":2079 * _assertValidNode(root) * if element._doc is not doc: * raise ValueError, u"Element is not in this tree." # <<<<<<<<<<<<<< @@ -68096,9 +68427,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2068, __pyx_L1_error) + __PYX_ERR(0, 2079, __pyx_L1_error) - /* "lxml/etree.pyx":2067 + /* "lxml/etree.pyx":2078 * _assertValidDoc(doc) * _assertValidNode(root) * if element._doc is not doc: # <<<<<<<<<<<<<< @@ -68107,17 +68438,17 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ } - /* "lxml/etree.pyx":2070 + /* "lxml/etree.pyx":2081 * raise ValueError, u"Element is not in this tree." * * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) # <<<<<<<<<<<<<< * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) */ - __pyx_t_5 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root->_c_node); if (unlikely(__pyx_t_5 == ((xmlDoc *)NULL))) __PYX_ERR(0, 2070, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__fakeRootDoc(__pyx_v_doc->_c_doc, __pyx_v_root->_c_node); if (unlikely(__pyx_t_5 == ((xmlDoc *)NULL))) __PYX_ERR(0, 2081, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_5; - /* "lxml/etree.pyx":2071 + /* "lxml/etree.pyx":2082 * * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) * c_path = tree.xmlGetNodePath(element._c_node) # <<<<<<<<<<<<<< @@ -68126,7 +68457,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ __pyx_v_c_path = xmlGetNodePath(__pyx_v_element->_c_node); - /* "lxml/etree.pyx":2072 + /* "lxml/etree.pyx":2083 * c_doc = _fakeRootDoc(doc._c_doc, root._c_node) * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) # <<<<<<<<<<<<<< @@ -68135,7 +68466,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ __pyx_f_4lxml_5etree__destroyFakeDoc(__pyx_v_doc->_c_doc, __pyx_v_c_doc); - /* "lxml/etree.pyx":2073 + /* "lxml/etree.pyx":2084 * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: # <<<<<<<<<<<<<< @@ -68145,16 +68476,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_t_3 = ((__pyx_v_c_path == NULL) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2074 + /* "lxml/etree.pyx":2085 * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: * raise MemoryError() # <<<<<<<<<<<<<< * path = funicode(c_path) * tree.xmlFree(c_path) */ - PyErr_NoMemory(); __PYX_ERR(0, 2074, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 2085, __pyx_L1_error) - /* "lxml/etree.pyx":2073 + /* "lxml/etree.pyx":2084 * c_path = tree.xmlGetNodePath(element._c_node) * _destroyFakeDoc(doc._c_doc, c_doc) * if c_path is NULL: # <<<<<<<<<<<<<< @@ -68163,19 +68494,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ } - /* "lxml/etree.pyx":2075 + /* "lxml/etree.pyx":2086 * if c_path is NULL: * raise MemoryError() * path = funicode(c_path) # <<<<<<<<<<<<<< * tree.xmlFree(c_path) * return path */ - __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2075, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_funicode(__pyx_v_c_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_path = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":2076 + /* "lxml/etree.pyx":2087 * raise MemoryError() * path = funicode(c_path) * tree.xmlFree(c_path) # <<<<<<<<<<<<<< @@ -68184,7 +68515,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme */ xmlFree(__pyx_v_c_path); - /* "lxml/etree.pyx":2077 + /* "lxml/etree.pyx":2088 * path = funicode(c_path) * tree.xmlFree(c_path) * return path # <<<<<<<<<<<<<< @@ -68196,7 +68527,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme __pyx_r = __pyx_v_path; goto __pyx_L0; - /* "lxml/etree.pyx":2041 + /* "lxml/etree.pyx":2052 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -68218,7 +68549,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_12getpath(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":2079 +/* "lxml/etree.pyx":2090 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -68234,7 +68565,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_15getelementpath(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("getelementpath (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2079, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2090, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(((struct LxmlElementTree *)__pyx_v_self), ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -68269,16 +68600,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx int __pyx_t_10; __Pyx_RefNannySetupContext("getelementpath", 0); - /* "lxml/etree.pyx":2093 + /* "lxml/etree.pyx":2104 * cdef _Element root * cdef Py_ssize_t count * _assertValidNode(element) # <<<<<<<<<<<<<< * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2104, __pyx_L1_error) - /* "lxml/etree.pyx":2094 + /* "lxml/etree.pyx":2105 * cdef Py_ssize_t count * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68288,7 +68619,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_2 = ((__pyx_v_element->_c_node->type != XML_ELEMENT_NODE) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2095 + /* "lxml/etree.pyx":2106 * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" # <<<<<<<<<<<<<< @@ -68296,9 +68627,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx * root = self._context_node */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_input_is_not_an_Element, 0, 0); - __PYX_ERR(0, 2095, __pyx_L1_error) + __PYX_ERR(0, 2106, __pyx_L1_error) - /* "lxml/etree.pyx":2094 + /* "lxml/etree.pyx":2105 * cdef Py_ssize_t count * _assertValidNode(element) * if element._c_node.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68307,7 +68638,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2096 + /* "lxml/etree.pyx":2107 * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -68318,7 +68649,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2097 + /* "lxml/etree.pyx":2108 * raise ValueError, u"input is not an Element" * if self._context_node is not None: * root = self._context_node # <<<<<<<<<<<<<< @@ -68330,7 +68661,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2096 + /* "lxml/etree.pyx":2107 * if element._c_node.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"input is not an Element" * if self._context_node is not None: # <<<<<<<<<<<<<< @@ -68340,7 +68671,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L4; } - /* "lxml/etree.pyx":2098 + /* "lxml/etree.pyx":2109 * if self._context_node is not None: * root = self._context_node * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -68351,20 +68682,20 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_2 = (__pyx_t_3 != 0); if (likely(__pyx_t_2)) { - /* "lxml/etree.pyx":2099 + /* "lxml/etree.pyx":2110 * root = self._context_node * elif self._doc is not None: * root = self._doc.getroot() # <<<<<<<<<<<<<< * else: * raise ValueError, u"Element is not in this tree" */ - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_self->_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2099, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_self->_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2110, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2099, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2110, __pyx_L1_error) __pyx_v_root = ((struct LxmlElement *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2098 + /* "lxml/etree.pyx":2109 * if self._context_node is not None: * root = self._context_node * elif self._doc is not None: # <<<<<<<<<<<<<< @@ -68374,7 +68705,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L4; } - /* "lxml/etree.pyx":2101 + /* "lxml/etree.pyx":2112 * root = self._doc.getroot() * else: * raise ValueError, u"Element is not in this tree" # <<<<<<<<<<<<<< @@ -68383,20 +68714,20 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ /*else*/ { __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree_2, 0, 0); - __PYX_ERR(0, 2101, __pyx_L1_error) + __PYX_ERR(0, 2112, __pyx_L1_error) } __pyx_L4:; - /* "lxml/etree.pyx":2102 + /* "lxml/etree.pyx":2113 * else: * raise ValueError, u"Element is not in this tree" * _assertValidNode(root) # <<<<<<<<<<<<<< * if element._doc is not root._doc: * raise ValueError, u"Element is not in this tree" */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2102, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_root); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2113, __pyx_L1_error) - /* "lxml/etree.pyx":2103 + /* "lxml/etree.pyx":2114 * raise ValueError, u"Element is not in this tree" * _assertValidNode(root) * if element._doc is not root._doc: # <<<<<<<<<<<<<< @@ -68407,7 +68738,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2104 + /* "lxml/etree.pyx":2115 * _assertValidNode(root) * if element._doc is not root._doc: * raise ValueError, u"Element is not in this tree" # <<<<<<<<<<<<<< @@ -68415,9 +68746,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx * path = [] */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree_2, 0, 0); - __PYX_ERR(0, 2104, __pyx_L1_error) + __PYX_ERR(0, 2115, __pyx_L1_error) - /* "lxml/etree.pyx":2103 + /* "lxml/etree.pyx":2114 * raise ValueError, u"Element is not in this tree" * _assertValidNode(root) * if element._doc is not root._doc: # <<<<<<<<<<<<<< @@ -68426,19 +68757,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2106 + /* "lxml/etree.pyx":2117 * raise ValueError, u"Element is not in this tree" * * path = [] # <<<<<<<<<<<<<< * c_element = element._c_node * while c_element is not root._c_node: */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2106, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2117, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_path = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2107 + /* "lxml/etree.pyx":2118 * * path = [] * c_element = element._c_node # <<<<<<<<<<<<<< @@ -68448,7 +68779,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_5 = __pyx_v_element->_c_node; __pyx_v_c_element = __pyx_t_5; - /* "lxml/etree.pyx":2108 + /* "lxml/etree.pyx":2119 * path = [] * c_element = element._c_node * while c_element is not root._c_node: # <<<<<<<<<<<<<< @@ -68459,7 +68790,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_element != __pyx_v_root->_c_node) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2109 + /* "lxml/etree.pyx":2120 * c_element = element._c_node * while c_element is not root._c_node: * c_name = c_element.name # <<<<<<<<<<<<<< @@ -68469,7 +68800,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_6 = __pyx_v_c_element->name; __pyx_v_c_name = __pyx_t_6; - /* "lxml/etree.pyx":2110 + /* "lxml/etree.pyx":2121 * while c_element is not root._c_node: * c_name = c_element.name * c_href = _getNs(c_element) # <<<<<<<<<<<<<< @@ -68478,19 +68809,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ __pyx_v_c_href = _getNs(__pyx_v_c_element); - /* "lxml/etree.pyx":2111 + /* "lxml/etree.pyx":2122 * c_name = c_element.name * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) # <<<<<<<<<<<<<< * if c_href is NULL: * c_href = b'' # no namespace (NULL is wildcard) */ - __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2111, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedNameFromNsName(__pyx_v_c_href, __pyx_v_c_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_tag, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2112 + /* "lxml/etree.pyx":2123 * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: # <<<<<<<<<<<<<< @@ -68500,7 +68831,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_href == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2113 + /* "lxml/etree.pyx":2124 * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: * c_href = b'' # no namespace (NULL is wildcard) # <<<<<<<<<<<<<< @@ -68509,7 +68840,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ __pyx_v_c_href = ((const xmlChar *)((const xmlChar *)((char const *)""))); - /* "lxml/etree.pyx":2112 + /* "lxml/etree.pyx":2123 * c_href = _getNs(c_element) * tag = _namespacedNameFromNsName(c_href, c_name) * if c_href is NULL: # <<<<<<<<<<<<<< @@ -68518,7 +68849,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2115 + /* "lxml/etree.pyx":2126 * c_href = b'' # no namespace (NULL is wildcard) * # use tag[N] if there are preceding siblings with the same tag * count = 0 # <<<<<<<<<<<<<< @@ -68527,7 +68858,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ __pyx_v_count = 0; - /* "lxml/etree.pyx":2116 + /* "lxml/etree.pyx":2127 * # use tag[N] if there are preceding siblings with the same tag * count = 0 * c_node = c_element.prev # <<<<<<<<<<<<<< @@ -68537,7 +68868,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_5 = __pyx_v_c_element->prev; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2117 + /* "lxml/etree.pyx":2128 * count = 0 * c_node = c_element.prev * while c_node is not NULL: # <<<<<<<<<<<<<< @@ -68548,7 +68879,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2118 + /* "lxml/etree.pyx":2129 * c_node = c_element.prev * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68558,7 +68889,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2119 + /* "lxml/etree.pyx":2130 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -68568,7 +68899,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = (__pyx_f_4lxml_5etree__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2120 + /* "lxml/etree.pyx":2131 * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): * count += 1 # <<<<<<<<<<<<<< @@ -68577,7 +68908,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ __pyx_v_count = (__pyx_v_count + 1); - /* "lxml/etree.pyx":2119 + /* "lxml/etree.pyx":2130 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -68586,7 +68917,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2118 + /* "lxml/etree.pyx":2129 * c_node = c_element.prev * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68595,7 +68926,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2121 + /* "lxml/etree.pyx":2132 * if _tagMatches(c_node, c_href, c_name): * count += 1 * c_node = c_node.prev # <<<<<<<<<<<<<< @@ -68606,7 +68937,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_v_c_node = __pyx_t_5; } - /* "lxml/etree.pyx":2122 + /* "lxml/etree.pyx":2133 * count += 1 * c_node = c_node.prev * if count: # <<<<<<<<<<<<<< @@ -68616,18 +68947,18 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = (__pyx_v_count != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2123 + /* "lxml/etree.pyx":2134 * c_node = c_node.prev * if count: * tag = f'{tag}[{count+1}]' # <<<<<<<<<<<<<< * else: * # use tag[1] if there are following siblings with the same tag */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = 0; __pyx_t_8 = 127; - __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_tag, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); @@ -68638,7 +68969,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__36); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_kp_u__36); - __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_count + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_v_count + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); @@ -68648,13 +68979,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_7 += 1; __Pyx_GIVEREF(__pyx_kp_u__37); PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_kp_u__37); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_4, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":2122 + /* "lxml/etree.pyx":2133 * count += 1 * c_node = c_node.prev * if count: # <<<<<<<<<<<<<< @@ -68664,7 +68995,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx goto __pyx_L13; } - /* "lxml/etree.pyx":2126 + /* "lxml/etree.pyx":2137 * else: * # use tag[1] if there are following siblings with the same tag * c_node = c_element.next # <<<<<<<<<<<<<< @@ -68675,7 +69006,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_5 = __pyx_v_c_element->next; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2127 + /* "lxml/etree.pyx":2138 * # use tag[1] if there are following siblings with the same tag * c_node = c_element.next * while c_node is not NULL: # <<<<<<<<<<<<<< @@ -68686,7 +69017,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_node != NULL) != 0); if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2128 + /* "lxml/etree.pyx":2139 * c_node = c_element.next * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68696,7 +69027,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2129 + /* "lxml/etree.pyx":2140 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -68706,19 +69037,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_3 = (__pyx_f_4lxml_5etree__tagMatches(__pyx_v_c_node, __pyx_v_c_href, __pyx_v_c_name) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2130 + /* "lxml/etree.pyx":2141 * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): * tag += '[1]' # <<<<<<<<<<<<<< * break * c_node = c_node.next */ - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_kp_s_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2130, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_tag, __pyx_kp_s_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF_SET(__pyx_v_tag, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/etree.pyx":2131 + /* "lxml/etree.pyx":2142 * if _tagMatches(c_node, c_href, c_name): * tag += '[1]' * break # <<<<<<<<<<<<<< @@ -68727,7 +69058,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ goto __pyx_L15_break; - /* "lxml/etree.pyx":2129 + /* "lxml/etree.pyx":2140 * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: * if _tagMatches(c_node, c_href, c_name): # <<<<<<<<<<<<<< @@ -68736,7 +69067,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2128 + /* "lxml/etree.pyx":2139 * c_node = c_element.next * while c_node is not NULL: * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68745,7 +69076,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2132 + /* "lxml/etree.pyx":2143 * tag += '[1]' * break * c_node = c_node.next # <<<<<<<<<<<<<< @@ -68759,16 +69090,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx } __pyx_L13:; - /* "lxml/etree.pyx":2134 + /* "lxml/etree.pyx":2145 * c_node = c_node.next * * path.append(tag) # <<<<<<<<<<<<<< * c_element = c_element.parent * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: */ - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_path, __pyx_v_tag); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2134, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_path, __pyx_v_tag); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2145, __pyx_L1_error) - /* "lxml/etree.pyx":2135 + /* "lxml/etree.pyx":2146 * * path.append(tag) * c_element = c_element.parent # <<<<<<<<<<<<<< @@ -68778,7 +69109,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_5 = __pyx_v_c_element->parent; __pyx_v_c_element = __pyx_t_5; - /* "lxml/etree.pyx":2136 + /* "lxml/etree.pyx":2147 * path.append(tag) * c_element = c_element.parent * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68796,7 +69127,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_L19_bool_binop_done:; if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2137 + /* "lxml/etree.pyx":2148 * c_element = c_element.parent * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"Element is not in this tree." # <<<<<<<<<<<<<< @@ -68804,9 +69135,9 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx * return '.' */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Element_is_not_in_this_tree, 0, 0); - __PYX_ERR(0, 2137, __pyx_L1_error) + __PYX_ERR(0, 2148, __pyx_L1_error) - /* "lxml/etree.pyx":2136 + /* "lxml/etree.pyx":2147 * path.append(tag) * c_element = c_element.parent * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -68816,7 +69147,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx } } - /* "lxml/etree.pyx":2138 + /* "lxml/etree.pyx":2149 * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"Element is not in this tree." * if not path: # <<<<<<<<<<<<<< @@ -68827,7 +69158,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_t_2 = ((!__pyx_t_3) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2139 + /* "lxml/etree.pyx":2150 * raise ValueError, u"Element is not in this tree." * if not path: * return '.' # <<<<<<<<<<<<<< @@ -68839,7 +69170,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx __pyx_r = __pyx_kp_s__3; goto __pyx_L0; - /* "lxml/etree.pyx":2138 + /* "lxml/etree.pyx":2149 * if c_element is NULL or c_element.type != tree.XML_ELEMENT_NODE: * raise ValueError, u"Element is not in this tree." * if not path: # <<<<<<<<<<<<<< @@ -68848,16 +69179,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx */ } - /* "lxml/etree.pyx":2140 + /* "lxml/etree.pyx":2151 * if not path: * return '.' * path.reverse() # <<<<<<<<<<<<<< * return '/'.join(path) * */ - __pyx_t_10 = PyList_Reverse(__pyx_v_path); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2140, __pyx_L1_error) + __pyx_t_10 = PyList_Reverse(__pyx_v_path); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 2151, __pyx_L1_error) - /* "lxml/etree.pyx":2141 + /* "lxml/etree.pyx":2152 * return '.' * path.reverse() * return '/'.join(path) # <<<<<<<<<<<<<< @@ -68865,13 +69196,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx * def getiterator(self, tag=None, *tags): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2141, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyString_Join(__pyx_kp_s__38, __pyx_v_path); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2079 + /* "lxml/etree.pyx":2090 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< @@ -68894,7 +69225,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_14getelementpath(struct Lx return __pyx_r; } -/* "lxml/etree.pyx":2143 +/* "lxml/etree.pyx":2154 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -68945,7 +69276,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_17getiterator(PyObject *__ } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 2143, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "getiterator") < 0)) __PYX_ERR(0, 2154, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -68984,14 +69315,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __Pyx_RefNannySetupContext("getiterator", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":2160 + /* "lxml/etree.pyx":2171 * with older versions of lxml or ElementTree. * """ * root = self.getroot() # <<<<<<<<<<<<<< * if root is None: * return ITER_EMPTY */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -69005,13 +69336,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_root = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":2161 + /* "lxml/etree.pyx":2172 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -69022,7 +69353,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2162 + /* "lxml/etree.pyx":2173 * root = self.getroot() * if root is None: * return ITER_EMPTY # <<<<<<<<<<<<<< @@ -69034,7 +69365,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; goto __pyx_L0; - /* "lxml/etree.pyx":2161 + /* "lxml/etree.pyx":2172 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -69043,7 +69374,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE */ } - /* "lxml/etree.pyx":2163 + /* "lxml/etree.pyx":2174 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -69054,25 +69385,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2164 + /* "lxml/etree.pyx":2175 * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return root.getiterator(*tags) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2164, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2164, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2163 + /* "lxml/etree.pyx":2174 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -69081,7 +69412,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE */ } - /* "lxml/etree.pyx":2165 + /* "lxml/etree.pyx":2176 * if tag is not None: * tags += (tag,) * return root.getiterator(*tags) # <<<<<<<<<<<<<< @@ -69089,16 +69420,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE * def iter(self, tag=None, *tags): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_getiterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_getiterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_tags, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_tags, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2143 + /* "lxml/etree.pyx":2154 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -69121,7 +69452,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_16getiterator(struct LxmlE return __pyx_r; } -/* "lxml/etree.pyx":2167 +/* "lxml/etree.pyx":2178 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -69172,7 +69503,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_19iter(PyObject *__pyx_v_s } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 2167, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "iter") < 0)) __PYX_ERR(0, 2178, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -69211,14 +69542,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __Pyx_RefNannySetupContext("iter", 0); __Pyx_INCREF(__pyx_v_tags); - /* "lxml/etree.pyx":2178 + /* "lxml/etree.pyx":2189 * see `_Element.iter`. * """ * root = self.getroot() # <<<<<<<<<<<<<< * if root is None: * return ITER_EMPTY */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2178, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -69232,13 +69563,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2178, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_root = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/etree.pyx":2179 + /* "lxml/etree.pyx":2190 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -69249,7 +69580,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2180 + /* "lxml/etree.pyx":2191 * root = self.getroot() * if root is None: * return ITER_EMPTY # <<<<<<<<<<<<<< @@ -69261,7 +69592,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; goto __pyx_L0; - /* "lxml/etree.pyx":2179 + /* "lxml/etree.pyx":2190 * """ * root = self.getroot() * if root is None: # <<<<<<<<<<<<<< @@ -69270,7 +69601,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT */ } - /* "lxml/etree.pyx":2181 + /* "lxml/etree.pyx":2192 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -69281,25 +69612,25 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2182 + /* "lxml/etree.pyx":2193 * return ITER_EMPTY * if tag is not None: * tags += (tag,) # <<<<<<<<<<<<<< * return root.iter(*tags) * */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tag); - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2182, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_tags, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_tags, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2181 + /* "lxml/etree.pyx":2192 * if root is None: * return ITER_EMPTY * if tag is not None: # <<<<<<<<<<<<<< @@ -69308,7 +69639,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT */ } - /* "lxml/etree.pyx":2183 + /* "lxml/etree.pyx":2194 * if tag is not None: * tags += (tag,) * return root.iter(*tags) # <<<<<<<<<<<<<< @@ -69316,16 +69647,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT * def find(self, path, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2183, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_iter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_tags, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2183, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_tags, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2167 + /* "lxml/etree.pyx":2178 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< @@ -69348,7 +69679,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_18iter(struct LxmlElementT return __pyx_r; } -/* "lxml/etree.pyx":2185 +/* "lxml/etree.pyx":2196 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -69394,7 +69725,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_21find(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 2185, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "find") < 0)) __PYX_ERR(0, 2196, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -69410,7 +69741,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_21find(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2185, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("find", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2196, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.find", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -69436,23 +69767,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __Pyx_RefNannySetupContext("find", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2195 + /* "lxml/etree.pyx":2206 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2195, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2206, __pyx_L1_error) - /* "lxml/etree.pyx":2196 + /* "lxml/etree.pyx":2207 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2196, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -69466,13 +69797,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2196, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_root = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/etree.pyx":2197 + /* "lxml/etree.pyx":2208 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -69482,32 +69813,32 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2198 + /* "lxml/etree.pyx":2209 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.find(path, namespaces) */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2199 + /* "lxml/etree.pyx":2210 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.find(path, namespaces) * */ - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2199, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2198 + /* "lxml/etree.pyx":2209 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -69516,7 +69847,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT */ } - /* "lxml/etree.pyx":2197 + /* "lxml/etree.pyx":2208 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -69525,7 +69856,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT */ } - /* "lxml/etree.pyx":2200 + /* "lxml/etree.pyx":2211 * if path[:1] == "/": * path = "." + path * return root.find(path, namespaces) # <<<<<<<<<<<<<< @@ -69533,7 +69864,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT * def findtext(self, path, default=None, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2200, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_find); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -69550,7 +69881,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2200, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -69558,13 +69889,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2200, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2200, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -69575,7 +69906,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_namespaces); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2200, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -69584,7 +69915,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2185 + /* "lxml/etree.pyx":2196 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -69608,7 +69939,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_20find(struct LxmlElementT return __pyx_r; } -/* "lxml/etree.pyx":2202 +/* "lxml/etree.pyx":2213 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -69664,7 +69995,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_23findtext(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 2202, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findtext") < 0)) __PYX_ERR(0, 2213, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -69683,7 +70014,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_23findtext(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2202, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findtext", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2213, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.findtext", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -69709,23 +70040,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __Pyx_RefNannySetupContext("findtext", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2212 + /* "lxml/etree.pyx":2223 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2212, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2223, __pyx_L1_error) - /* "lxml/etree.pyx":2213 + /* "lxml/etree.pyx":2224 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -69739,13 +70070,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2213, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_root = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/etree.pyx":2214 + /* "lxml/etree.pyx":2225 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -69755,32 +70086,32 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2215 + /* "lxml/etree.pyx":2226 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.findtext(path, default, namespaces) */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2215, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2215, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2216 + /* "lxml/etree.pyx":2227 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.findtext(path, default, namespaces) * */ - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2216, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2215 + /* "lxml/etree.pyx":2226 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -69789,7 +70120,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem */ } - /* "lxml/etree.pyx":2214 + /* "lxml/etree.pyx":2225 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -69798,7 +70129,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem */ } - /* "lxml/etree.pyx":2217 + /* "lxml/etree.pyx":2228 * if path[:1] == "/": * path = "." + path * return root.findtext(path, default, namespaces) # <<<<<<<<<<<<<< @@ -69806,7 +70137,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem * def findall(self, path, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_findtext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2217, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_findtext); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -69823,7 +70154,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_path, __pyx_v_default, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -69831,13 +70162,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_path, __pyx_v_default, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 3+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2228, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2217, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -69851,7 +70182,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_1, __pyx_v_namespaces); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2217, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -69860,7 +70191,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2202 + /* "lxml/etree.pyx":2213 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< @@ -69884,7 +70215,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_22findtext(struct LxmlElem return __pyx_r; } -/* "lxml/etree.pyx":2219 +/* "lxml/etree.pyx":2230 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -69930,7 +70261,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_25findall(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 2219, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "findall") < 0)) __PYX_ERR(0, 2230, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -69946,7 +70277,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_25findall(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2219, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("findall", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2230, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.findall", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -69972,23 +70303,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __Pyx_RefNannySetupContext("findall", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2229 + /* "lxml/etree.pyx":2240 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2229, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2240, __pyx_L1_error) - /* "lxml/etree.pyx":2230 + /* "lxml/etree.pyx":2241 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2230, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -70002,13 +70333,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2230, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_root = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/etree.pyx":2231 + /* "lxml/etree.pyx":2242 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -70018,32 +70349,32 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2232 + /* "lxml/etree.pyx":2243 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.findall(path, namespaces) */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2232, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2232, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2243, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2233 + /* "lxml/etree.pyx":2244 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.findall(path, namespaces) * */ - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2233, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2232 + /* "lxml/etree.pyx":2243 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -70052,7 +70383,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme */ } - /* "lxml/etree.pyx":2231 + /* "lxml/etree.pyx":2242 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -70061,7 +70392,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme */ } - /* "lxml/etree.pyx":2234 + /* "lxml/etree.pyx":2245 * if path[:1] == "/": * path = "." + path * return root.findall(path, namespaces) # <<<<<<<<<<<<<< @@ -70069,7 +70400,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme * def iterfind(self, path, namespaces=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2234, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_findall); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -70086,7 +70417,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -70094,13 +70425,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2234, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -70111,7 +70442,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_namespaces); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2234, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -70120,7 +70451,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2219 + /* "lxml/etree.pyx":2230 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -70144,7 +70475,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_24findall(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":2236 +/* "lxml/etree.pyx":2247 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -70190,7 +70521,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 2236, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "iterfind") < 0)) __PYX_ERR(0, 2247, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -70206,7 +70537,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_27iterfind(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2236, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("iterfind", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2247, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.iterfind", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -70232,23 +70563,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __Pyx_RefNannySetupContext("iterfind", 0); __Pyx_INCREF(__pyx_v_path); - /* "lxml/etree.pyx":2246 + /* "lxml/etree.pyx":2257 * prefixes in the path expression. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * root = self.getroot() * if _isString(path): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2246, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2257, __pyx_L1_error) - /* "lxml/etree.pyx":2247 + /* "lxml/etree.pyx":2258 * """ * self._assertHasRoot() * root = self.getroot() # <<<<<<<<<<<<<< * if _isString(path): * if path[:1] == "/": */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2247, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getroot); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -70262,13 +70593,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2258, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_root = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/etree.pyx":2248 + /* "lxml/etree.pyx":2259 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -70278,32 +70609,32 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __pyx_t_5 = (_isString(__pyx_v_path) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2249 + /* "lxml/etree.pyx":2260 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.iterfind(path, namespaces) */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2249, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_path, 0, 1, NULL, NULL, &__pyx_slice__39, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2249, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2260, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "lxml/etree.pyx":2250 + /* "lxml/etree.pyx":2261 * if _isString(path): * if path[:1] == "/": * path = "." + path # <<<<<<<<<<<<<< * return root.iterfind(path, namespaces) * */ - __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2250, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_kp_s__3, __pyx_v_path); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_path, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2249 + /* "lxml/etree.pyx":2260 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< @@ -70312,7 +70643,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem */ } - /* "lxml/etree.pyx":2248 + /* "lxml/etree.pyx":2259 * self._assertHasRoot() * root = self.getroot() * if _isString(path): # <<<<<<<<<<<<<< @@ -70321,7 +70652,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem */ } - /* "lxml/etree.pyx":2251 + /* "lxml/etree.pyx":2262 * if path[:1] == "/": * path = "." + path * return root.iterfind(path, namespaces) # <<<<<<<<<<<<<< @@ -70329,7 +70660,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem * def xpath(self, _path, *, namespaces=None, extensions=None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_root, __pyx_n_s_iterfind); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; __pyx_t_1 = 0; @@ -70346,7 +70677,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -70354,13 +70685,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_path, __pyx_v_namespaces}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_1, 2+__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -70371,7 +70702,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __Pyx_INCREF(__pyx_v_namespaces); __Pyx_GIVEREF(__pyx_v_namespaces); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_1, __pyx_v_namespaces); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2251, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -70380,7 +70711,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2236 + /* "lxml/etree.pyx":2247 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< @@ -70404,7 +70735,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_26iterfind(struct LxmlElem return __pyx_r; } -/* "lxml/etree.pyx":2253 +/* "lxml/etree.pyx":2264 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -70433,7 +70764,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); - /* "lxml/etree.pyx":2254 + /* "lxml/etree.pyx":2265 * * def xpath(self, _path, *, namespaces=None, extensions=None, * smart_strings=True, **_variables): # <<<<<<<<<<<<<< @@ -70464,7 +70795,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 2253, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__variables, values, pos_args, "xpath") < 0)) __PYX_ERR(0, 2264, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -70478,7 +70809,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2253, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xpath", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2264, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__variables); __pyx_v__variables = 0; __Pyx_AddTraceback("lxml.etree._ElementTree.xpath", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -70487,7 +70818,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_29xpath(PyObject *__pyx_v_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_28xpath(((struct LxmlElementTree *)__pyx_v_self), __pyx_v__path, __pyx_v_namespaces, __pyx_v_extensions, __pyx_v_smart_strings, __pyx_v__variables); - /* "lxml/etree.pyx":2253 + /* "lxml/etree.pyx":2264 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -70511,64 +70842,64 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElement PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("xpath", 0); - /* "lxml/etree.pyx":2272 + /* "lxml/etree.pyx":2283 * XPathEvaluator directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2272, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2283, __pyx_L1_error) - /* "lxml/etree.pyx":2273 + /* "lxml/etree.pyx":2284 * """ * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_namespaces, __pyx_v_namespaces) < 0) __PYX_ERR(0, 2284, __pyx_L1_error) - /* "lxml/etree.pyx":2274 + /* "lxml/etree.pyx":2285 * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, # <<<<<<<<<<<<<< * smart_strings=smart_strings) * return evaluator(_path, **_variables) */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2284, __pyx_L1_error) - /* "lxml/etree.pyx":2275 + /* "lxml/etree.pyx":2286 * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, * extensions=extensions, * smart_strings=smart_strings) # <<<<<<<<<<<<<< * return evaluator(_path, **_variables) * */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 2273, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smart_strings, __pyx_v_smart_strings) < 0) __PYX_ERR(0, 2284, __pyx_L1_error) - /* "lxml/etree.pyx":2273 + /* "lxml/etree.pyx":2284 * """ * self._assertHasRoot() * evaluator = XPathDocumentEvaluator(self, namespaces=namespaces, # <<<<<<<<<<<<<< * extensions=extensions, * smart_strings=smart_strings) */ - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2273, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XPathDocumentEvaluator), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_evaluator = ((struct __pyx_obj_4lxml_5etree_XPathDocumentEvaluator *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2276 + /* "lxml/etree.pyx":2287 * extensions=extensions, * smart_strings=smart_strings) * return evaluator(_path, **_variables) # <<<<<<<<<<<<<< @@ -70576,19 +70907,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElement * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2276, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v__path); __Pyx_GIVEREF(__pyx_v__path); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__path); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_4, __pyx_v__variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2276, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_evaluator), __pyx_t_4, __pyx_v__variables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2253 + /* "lxml/etree.pyx":2264 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< @@ -70610,7 +70941,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_28xpath(struct LxmlElement return __pyx_r; } -/* "lxml/etree.pyx":2278 +/* "lxml/etree.pyx":2289 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< @@ -70669,7 +71000,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_31xslt(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__kw, values, pos_args, "xslt") < 0)) __PYX_ERR(0, 2278, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__kw, values, pos_args, "xslt") < 0)) __PYX_ERR(0, 2289, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -70688,7 +71019,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_31xslt(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("xslt", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2278, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xslt", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2289, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__kw); __pyx_v__kw = 0; __Pyx_AddTraceback("lxml.etree._ElementTree.xslt", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -70713,55 +71044,55 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_30xslt(struct LxmlElementT PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("xslt", 0); - /* "lxml/etree.pyx":2292 + /* "lxml/etree.pyx":2303 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2292, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2303, __pyx_L1_error) - /* "lxml/etree.pyx":2293 + /* "lxml/etree.pyx":2304 * """ * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, # <<<<<<<<<<<<<< * access_control=access_control) * return style(self, **_kw) */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2293, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v__xslt); __Pyx_GIVEREF(__pyx_v__xslt); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__xslt); - __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2293, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_extensions, __pyx_v_extensions) < 0) __PYX_ERR(0, 2304, __pyx_L1_error) - /* "lxml/etree.pyx":2294 + /* "lxml/etree.pyx":2305 * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) # <<<<<<<<<<<<<< * return style(self, **_kw) * */ - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_access_control, __pyx_v_access_control) < 0) __PYX_ERR(0, 2293, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_access_control, __pyx_v_access_control) < 0) __PYX_ERR(0, 2304, __pyx_L1_error) - /* "lxml/etree.pyx":2293 + /* "lxml/etree.pyx":2304 * """ * self._assertHasRoot() * style = XSLT(_xslt, extensions=extensions, # <<<<<<<<<<<<<< * access_control=access_control) * return style(self, **_kw) */ - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLT), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2293, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_XSLT), __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_style = ((struct __pyx_obj_4lxml_5etree_XSLT *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2295 + /* "lxml/etree.pyx":2306 * style = XSLT(_xslt, extensions=extensions, * access_control=access_control) * return style(self, **_kw) # <<<<<<<<<<<<<< @@ -70769,19 +71100,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_30xslt(struct LxmlElementT * def relaxng(self, relaxng): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2295, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_style), __pyx_t_4, __pyx_v__kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2295, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_style), __pyx_t_4, __pyx_v__kw); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2278 + /* "lxml/etree.pyx":2289 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< @@ -70803,7 +71134,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_30xslt(struct LxmlElementT return __pyx_r; } -/* "lxml/etree.pyx":2297 +/* "lxml/etree.pyx":2308 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< @@ -70836,28 +71167,28 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("relaxng", 0); - /* "lxml/etree.pyx":2311 + /* "lxml/etree.pyx":2322 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * schema = RelaxNG(relaxng) * return schema.validate(self) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2311, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2322, __pyx_L1_error) - /* "lxml/etree.pyx":2312 + /* "lxml/etree.pyx":2323 * """ * self._assertHasRoot() * schema = RelaxNG(relaxng) # <<<<<<<<<<<<<< * return schema.validate(self) * */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG), __pyx_v_relaxng); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_RelaxNG), __pyx_v_relaxng); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_schema = ((struct __pyx_obj_4lxml_5etree_RelaxNG *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2313 + /* "lxml/etree.pyx":2324 * self._assertHasRoot() * schema = RelaxNG(relaxng) * return schema.validate(self) # <<<<<<<<<<<<<< @@ -70865,7 +71196,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme * def xmlschema(self, xmlschema): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_schema), __pyx_n_s_validate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2313, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_schema), __pyx_n_s_validate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -70879,14 +71210,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2297 + /* "lxml/etree.pyx":2308 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< @@ -70908,7 +71239,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_32relaxng(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":2315 +/* "lxml/etree.pyx":2326 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< @@ -70941,28 +71272,28 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("xmlschema", 0); - /* "lxml/etree.pyx":2329 + /* "lxml/etree.pyx":2340 * class directly. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * schema = XMLSchema(xmlschema) * return schema.validate(self) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2329, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2340, __pyx_L1_error) - /* "lxml/etree.pyx":2330 + /* "lxml/etree.pyx":2341 * """ * self._assertHasRoot() * schema = XMLSchema(xmlschema) # <<<<<<<<<<<<<< * return schema.validate(self) * */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XMLSchema), __pyx_v_xmlschema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2330, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_4lxml_5etree_XMLSchema), __pyx_v_xmlschema); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_schema = ((struct __pyx_obj_4lxml_5etree_XMLSchema *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2331 + /* "lxml/etree.pyx":2342 * self._assertHasRoot() * schema = XMLSchema(xmlschema) * return schema.validate(self) # <<<<<<<<<<<<<< @@ -70970,7 +71301,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle * def xinclude(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_schema), __pyx_n_s_validate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2331, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_schema), __pyx_n_s_validate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -70984,14 +71315,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2331, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2315 + /* "lxml/etree.pyx":2326 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< @@ -71013,7 +71344,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_34xmlschema(struct LxmlEle return __pyx_r; } -/* "lxml/etree.pyx":2333 +/* "lxml/etree.pyx":2344 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< @@ -71045,23 +71376,23 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("xinclude", 0); - /* "lxml/etree.pyx":2345 + /* "lxml/etree.pyx":2356 * due to restrictions of libxml2 <= 2.6.29. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * XInclude()(self._context_node) * */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2345, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2356, __pyx_L1_error) - /* "lxml/etree.pyx":2346 + /* "lxml/etree.pyx":2357 * """ * self._assertHasRoot() * XInclude()(self._context_node) # <<<<<<<<<<<<<< * * def write_c14n(self, file, *, exclusive=False, with_comments=True, */ - __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_XInclude)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2346, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree_XInclude)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -71075,12 +71406,12 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_self->_context_node)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self->_context_node)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2346, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2333 + /* "lxml/etree.pyx":2344 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< @@ -71103,7 +71434,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_36xinclude(struct LxmlElem return __pyx_r; } -/* "lxml/etree.pyx":2348 +/* "lxml/etree.pyx":2359 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -71131,7 +71462,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__p values[2] = ((PyObject *)Py_True); values[3] = ((PyObject *)__pyx_int_0); - /* "lxml/etree.pyx":2349 + /* "lxml/etree.pyx":2360 * * def write_c14n(self, file, *, exclusive=False, with_comments=True, * compression=0, inclusive_ns_prefixes=None): # <<<<<<<<<<<<<< @@ -71162,7 +71493,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__p } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_c14n") < 0)) __PYX_ERR(0, 2348, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_c14n") < 0)) __PYX_ERR(0, 2359, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -71177,7 +71508,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_c14n", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2348, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_c14n", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2359, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._ElementTree.write_c14n", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -71185,7 +71516,7 @@ static PyObject *__pyx_pw_4lxml_5etree_12_ElementTree_39write_c14n(PyObject *__p __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(((struct LxmlElementTree *)__pyx_v_self), __pyx_v_file, __pyx_v_exclusive, __pyx_v_with_comments, __pyx_v_compression, __pyx_v_inclusive_ns_prefixes); - /* "lxml/etree.pyx":2348 + /* "lxml/etree.pyx":2359 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -71210,16 +71541,16 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl __Pyx_RefNannySetupContext("write_c14n", 0); __Pyx_INCREF(__pyx_v_compression); - /* "lxml/etree.pyx":2367 + /* "lxml/etree.pyx":2378 * of the namespace node's parent element. * """ * self._assertHasRoot() # <<<<<<<<<<<<<< * _assertValidNode(self._context_node) * if compression is None or compression < 0: */ - __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2367, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2378, __pyx_L1_error) - /* "lxml/etree.pyx":2368 + /* "lxml/etree.pyx":2379 * """ * self._assertHasRoot() * _assertValidNode(self._context_node) # <<<<<<<<<<<<<< @@ -71228,10 +71559,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl */ __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_2)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2368, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_2)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2369 + /* "lxml/etree.pyx":2380 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -71245,14 +71576,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2369, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2369, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_compression, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2380, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/etree.pyx":2370 + /* "lxml/etree.pyx":2381 * _assertValidNode(self._context_node) * if compression is None or compression < 0: * compression = 0 # <<<<<<<<<<<<<< @@ -71262,7 +71593,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_compression, __pyx_int_0); - /* "lxml/etree.pyx":2369 + /* "lxml/etree.pyx":2380 * self._assertHasRoot() * _assertValidNode(self._context_node) * if compression is None or compression < 0: # <<<<<<<<<<<<<< @@ -71271,7 +71602,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl */ } - /* "lxml/etree.pyx":2372 + /* "lxml/etree.pyx":2383 * compression = 0 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< @@ -71280,31 +71611,31 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl */ __pyx_t_2 = ((PyObject *)__pyx_v_self->_context_node); __Pyx_INCREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_exclusive); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2372, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_exclusive); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_with_comments); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2383, __pyx_L1_error) - /* "lxml/etree.pyx":2373 + /* "lxml/etree.pyx":2384 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, * compression, inclusive_ns_prefixes) # <<<<<<<<<<<<<< * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_compression); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2384, __pyx_L1_error) - /* "lxml/etree.pyx":2372 + /* "lxml/etree.pyx":2383 * compression = 0 * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, # <<<<<<<<<<<<<< * compression, inclusive_ns_prefixes) * */ - __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelikeC14N(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_t_3, __pyx_t_5, __pyx_t_1, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__tofilelikeC14N(__pyx_v_file, ((struct LxmlElement *)__pyx_t_2), __pyx_t_3, __pyx_t_5, __pyx_t_1, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2348 + /* "lxml/etree.pyx":2359 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< @@ -71327,7 +71658,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12_ElementTree_38write_c14n(struct LxmlEl return __pyx_r; } -/* "lxml/etree.pyx":2375 +/* "lxml/etree.pyx":2386 * compression, inclusive_ns_prefixes) * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): # <<<<<<<<<<<<<< @@ -71341,7 +71672,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct L PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_elementTreeFactory", 0); - /* "lxml/etree.pyx":2376 + /* "lxml/etree.pyx":2387 * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): * return _newElementTree(doc, context_node, _ElementTree) # <<<<<<<<<<<<<< @@ -71349,13 +71680,13 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct L * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__newElementTree(__pyx_v_doc, __pyx_v_context_node, ((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2376, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__newElementTree(__pyx_v_doc, __pyx_v_context_node, ((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((struct LxmlElementTree *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2375 + /* "lxml/etree.pyx":2386 * compression, inclusive_ns_prefixes) * * cdef _ElementTree _elementTreeFactory(_Document doc, _Element context_node): # <<<<<<<<<<<<<< @@ -71374,7 +71705,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__elementTreeFactory(struct L return __pyx_r; } -/* "lxml/etree.pyx":2378 +/* "lxml/etree.pyx":2389 * return _newElementTree(doc, context_node, _ElementTree) * * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, # <<<<<<<<<<<<<< @@ -71396,7 +71727,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __Pyx_RefNannySetupContext("_newElementTree", 0); __Pyx_INCREF((PyObject *)__pyx_v_context_node); - /* "lxml/etree.pyx":2381 + /* "lxml/etree.pyx":2392 * object baseclass): * cdef _ElementTree result * result = baseclass() # <<<<<<<<<<<<<< @@ -71416,14 +71747,14 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2381, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ElementTree))))) __PYX_ERR(0, 2381, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__ElementTree))))) __PYX_ERR(0, 2392, __pyx_L1_error) __pyx_v_result = ((struct LxmlElementTree *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2382 + /* "lxml/etree.pyx":2393 * cdef _ElementTree result * result = baseclass() * if context_node is None and doc is not None: # <<<<<<<<<<<<<< @@ -71443,20 +71774,20 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __pyx_L4_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/etree.pyx":2383 + /* "lxml/etree.pyx":2394 * result = baseclass() * if context_node is None and doc is not None: * context_node = doc.getroot() # <<<<<<<<<<<<<< * if context_node is None: * _assertValidDoc(doc) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2383, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2383, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2394, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_context_node, ((struct LxmlElement *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2382 + /* "lxml/etree.pyx":2393 * cdef _ElementTree result * result = baseclass() * if context_node is None and doc is not None: # <<<<<<<<<<<<<< @@ -71465,7 +71796,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD */ } - /* "lxml/etree.pyx":2384 + /* "lxml/etree.pyx":2395 * if context_node is None and doc is not None: * context_node = doc.getroot() * if context_node is None: # <<<<<<<<<<<<<< @@ -71476,16 +71807,16 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":2385 + /* "lxml/etree.pyx":2396 * context_node = doc.getroot() * if context_node is None: * _assertValidDoc(doc) # <<<<<<<<<<<<<< * result._doc = doc * else: */ - __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2385, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidDoc(__pyx_v_doc); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2396, __pyx_L1_error) - /* "lxml/etree.pyx":2386 + /* "lxml/etree.pyx":2397 * if context_node is None: * _assertValidDoc(doc) * result._doc = doc # <<<<<<<<<<<<<< @@ -71498,7 +71829,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __Pyx_DECREF(((PyObject *)__pyx_v_result->_doc)); __pyx_v_result->_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2384 + /* "lxml/etree.pyx":2395 * if context_node is None and doc is not None: * context_node = doc.getroot() * if context_node is None: # <<<<<<<<<<<<<< @@ -71508,7 +71839,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD goto __pyx_L6; } - /* "lxml/etree.pyx":2388 + /* "lxml/etree.pyx":2399 * result._doc = doc * else: * _assertValidNode(context_node) # <<<<<<<<<<<<<< @@ -71516,11 +71847,11 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD * return result */ /*else*/ { - __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_context_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2388, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_context_node); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 2399, __pyx_L1_error) } __pyx_L6:; - /* "lxml/etree.pyx":2389 + /* "lxml/etree.pyx":2400 * else: * _assertValidNode(context_node) * result._context_node = context_node # <<<<<<<<<<<<<< @@ -71533,7 +71864,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __Pyx_DECREF(((PyObject *)__pyx_v_result->_context_node)); __pyx_v_result->_context_node = __pyx_v_context_node; - /* "lxml/etree.pyx":2390 + /* "lxml/etree.pyx":2401 * _assertValidNode(context_node) * result._context_node = context_node * return result # <<<<<<<<<<<<<< @@ -71545,7 +71876,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2378 + /* "lxml/etree.pyx":2389 * return _newElementTree(doc, context_node, _ElementTree) * * cdef _ElementTree _newElementTree(_Document doc, _Element context_node, # <<<<<<<<<<<<<< @@ -71568,7 +71899,7 @@ static struct LxmlElementTree *__pyx_f_4lxml_5etree__newElementTree(struct LxmlD return __pyx_r; } -/* "lxml/etree.pyx":2399 +/* "lxml/etree.pyx":2410 * """ * cdef _Element _element * def __cinit__(self, _Element element not None): # <<<<<<<<<<<<<< @@ -71602,7 +71933,7 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_1__cinit__(PyObject *__pyx_v_self, PyO else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2399, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2410, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -71613,13 +71944,13 @@ static int __pyx_pw_4lxml_5etree_7_Attrib_1__cinit__(PyObject *__pyx_v_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2399, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2410, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Attrib.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2399, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2410, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_7_Attrib___cinit__(((struct __pyx_obj_4lxml_5etree__Attrib *)__pyx_v_self), __pyx_v_element); /* function exit code */ @@ -71637,16 +71968,16 @@ static int __pyx_pf_4lxml_5etree_7_Attrib___cinit__(struct __pyx_obj_4lxml_5etre int __pyx_t_1; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2400 + /* "lxml/etree.pyx":2411 * cdef _Element _element * def __cinit__(self, _Element element not None): * _assertValidNode(element) # <<<<<<<<<<<<<< * self._element = element * */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2400, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2411, __pyx_L1_error) - /* "lxml/etree.pyx":2401 + /* "lxml/etree.pyx":2412 * def __cinit__(self, _Element element not None): * _assertValidNode(element) * self._element = element # <<<<<<<<<<<<<< @@ -71659,7 +71990,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib___cinit__(struct __pyx_obj_4lxml_5etre __Pyx_DECREF(((PyObject *)__pyx_v_self->_element)); __pyx_v_self->_element = __pyx_v_element; - /* "lxml/etree.pyx":2399 + /* "lxml/etree.pyx":2410 * """ * cdef _Element _element * def __cinit__(self, _Element element not None): # <<<<<<<<<<<<<< @@ -71678,7 +72009,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib___cinit__(struct __pyx_obj_4lxml_5etre return __pyx_r; } -/* "lxml/etree.pyx":2404 +/* "lxml/etree.pyx":2415 * * # MANIPULATORS * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -71706,7 +72037,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5e int __pyx_t_2; __Pyx_RefNannySetupContext("__setitem__", 0); - /* "lxml/etree.pyx":2405 + /* "lxml/etree.pyx":2416 * # MANIPULATORS * def __setitem__(self, key, value): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -71715,10 +72046,10 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5e */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2405, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2416, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2406 + /* "lxml/etree.pyx":2417 * def __setitem__(self, key, value): * _assertValidNode(self._element) * _setAttributeValue(self._element, key, value) # <<<<<<<<<<<<<< @@ -71727,10 +72058,10 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5e */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__setAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2406, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__setAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2417, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2404 + /* "lxml/etree.pyx":2415 * * # MANIPULATORS * def __setitem__(self, key, value): # <<<<<<<<<<<<<< @@ -71750,7 +72081,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_2__setitem__(struct __pyx_obj_4lxml_5e return __pyx_r; } -/* "lxml/etree.pyx":2408 +/* "lxml/etree.pyx":2419 * _setAttributeValue(self._element, key, value) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -71778,7 +72109,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5e int __pyx_t_2; __Pyx_RefNannySetupContext("__delitem__", 0); - /* "lxml/etree.pyx":2409 + /* "lxml/etree.pyx":2420 * * def __delitem__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -71787,10 +72118,10 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5e */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2409, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2420, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2410 + /* "lxml/etree.pyx":2421 * def __delitem__(self, key): * _assertValidNode(self._element) * _delAttribute(self._element, key) # <<<<<<<<<<<<<< @@ -71799,10 +72130,10 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5e */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__delAttribute(((struct LxmlElement *)__pyx_t_1), __pyx_v_key); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2410, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__delAttribute(((struct LxmlElement *)__pyx_t_1), __pyx_v_key); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2421, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2408 + /* "lxml/etree.pyx":2419 * _setAttributeValue(self._element, key, value) * * def __delitem__(self, key): # <<<<<<<<<<<<<< @@ -71822,7 +72153,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_4__delitem__(struct __pyx_obj_4lxml_5e return __pyx_r; } -/* "lxml/etree.pyx":2412 +/* "lxml/etree.pyx":2423 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< @@ -71864,7 +72195,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_RefNannySetupContext("update", 0); __Pyx_INCREF(__pyx_v_sequence_or_dict); - /* "lxml/etree.pyx":2413 + /* "lxml/etree.pyx":2424 * * def update(self, sequence_or_dict): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -71873,10 +72204,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2413, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2414 + /* "lxml/etree.pyx":2425 * def update(self, sequence_or_dict): * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): # <<<<<<<<<<<<<< @@ -71897,14 +72228,14 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2415 + /* "lxml/etree.pyx":2426 * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): * sequence_or_dict = sequence_or_dict.items() # <<<<<<<<<<<<<< * for key, value in sequence_or_dict: * _setAttributeValue(self._element, key, value) */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sequence_or_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2415, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_sequence_or_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -71918,13 +72249,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 } __pyx_t_1 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2415, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF_SET(__pyx_v_sequence_or_dict, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2414 + /* "lxml/etree.pyx":2425 * def update(self, sequence_or_dict): * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): # <<<<<<<<<<<<<< @@ -71933,7 +72264,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 */ } - /* "lxml/etree.pyx":2416 + /* "lxml/etree.pyx":2427 * if isinstance(sequence_or_dict, (dict, _Attrib)): * sequence_or_dict = sequence_or_dict.items() * for key, value in sequence_or_dict: # <<<<<<<<<<<<<< @@ -71944,26 +72275,26 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __pyx_t_1 = __pyx_v_sequence_or_dict; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sequence_or_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_sequence_or_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2427, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2427, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2427, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -71973,7 +72304,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2416, __pyx_L1_error) + else __PYX_ERR(0, 2427, __pyx_L1_error) } break; } @@ -71985,7 +72316,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2416, __pyx_L1_error) + __PYX_ERR(0, 2427, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -71998,15 +72329,15 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2416, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -72014,7 +72345,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 2416, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 2427, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9_unpacking_done; @@ -72022,7 +72353,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2416, __pyx_L1_error) + __PYX_ERR(0, 2427, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_7); @@ -72030,7 +72361,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_10); __pyx_t_10 = 0; - /* "lxml/etree.pyx":2417 + /* "lxml/etree.pyx":2428 * sequence_or_dict = sequence_or_dict.items() * for key, value in sequence_or_dict: * _setAttributeValue(self._element, key, value) # <<<<<<<<<<<<<< @@ -72039,10 +72370,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 */ __pyx_t_6 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_6); - __pyx_t_2 = __pyx_f_4lxml_5etree__setAttributeValue(((struct LxmlElement *)__pyx_t_6), __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2417, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__setAttributeValue(((struct LxmlElement *)__pyx_t_6), __pyx_v_key, __pyx_v_value); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2416 + /* "lxml/etree.pyx":2427 * if isinstance(sequence_or_dict, (dict, _Attrib)): * sequence_or_dict = sequence_or_dict.items() * for key, value in sequence_or_dict: # <<<<<<<<<<<<<< @@ -72052,7 +72383,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2412 + /* "lxml/etree.pyx":2423 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< @@ -72080,7 +72411,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_6update(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":2419 +/* "lxml/etree.pyx":2430 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< @@ -72127,7 +72458,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_9pop(PyObject *__pyx_v_self, PyO } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "pop") < 0)) __PYX_ERR(0, 2419, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "pop") < 0)) __PYX_ERR(0, 2430, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -72138,7 +72469,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_9pop(PyObject *__pyx_v_self, PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2419, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pop", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2430, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_default); __pyx_v_default = 0; __Pyx_AddTraceback("lxml.etree._Attrib.pop", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -72165,35 +72496,35 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr int __pyx_t_6; __Pyx_RefNannySetupContext("pop", 0); - /* "lxml/etree.pyx":2420 + /* "lxml/etree.pyx":2431 * * def pop(self, key, *default): * if len(default) > 1: # <<<<<<<<<<<<<< * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" * _assertValidNode(self._element) */ - __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2420, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2431, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_1 > 1) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2421 + /* "lxml/etree.pyx":2432 * def pop(self, key, *default): * if len(default) > 1: * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" # <<<<<<<<<<<<<< * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) */ - __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2421, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_t_1 + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2421, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_default); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2432, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_From_Py_ssize_t((__pyx_t_1 + 1), 0, ' ', 'd'); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pop_expected_at_most_2_arguments, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2421, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pop_expected_at_most_2_arguments, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 2421, __pyx_L1_error) + __PYX_ERR(0, 2432, __pyx_L1_error) - /* "lxml/etree.pyx":2420 + /* "lxml/etree.pyx":2431 * * def pop(self, key, *default): * if len(default) > 1: # <<<<<<<<<<<<<< @@ -72202,7 +72533,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2422 + /* "lxml/etree.pyx":2433 * if len(default) > 1: * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72211,10 +72542,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ __pyx_t_4 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_4)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2422, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_4)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2433, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":2423 + /* "lxml/etree.pyx":2434 * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) # <<<<<<<<<<<<<< @@ -72223,13 +72554,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ __pyx_t_4 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_4); - __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_4), __pyx_v_key, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_4), __pyx_v_key, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":2424 + /* "lxml/etree.pyx":2435 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -72240,7 +72571,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr __pyx_t_6 = (__pyx_t_2 != 0); if (__pyx_t_6) { - /* "lxml/etree.pyx":2425 + /* "lxml/etree.pyx":2436 * result = _getAttributeValue(self._element, key, None) * if result is None: * if not default: # <<<<<<<<<<<<<< @@ -72251,7 +72582,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr __pyx_t_2 = ((!__pyx_t_6) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2426 + /* "lxml/etree.pyx":2437 * if result is None: * if not default: * raise KeyError, key # <<<<<<<<<<<<<< @@ -72259,9 +72590,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr * else: */ __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 2426, __pyx_L1_error) + __PYX_ERR(0, 2437, __pyx_L1_error) - /* "lxml/etree.pyx":2425 + /* "lxml/etree.pyx":2436 * result = _getAttributeValue(self._element, key, None) * if result is None: * if not default: # <<<<<<<<<<<<<< @@ -72270,19 +72601,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2427 + /* "lxml/etree.pyx":2438 * if not default: * raise KeyError, key * result = default[0] # <<<<<<<<<<<<<< * else: * _delAttribute(self._element, key) */ - __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_default, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2427, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_default, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2424 + /* "lxml/etree.pyx":2435 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -72292,7 +72623,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr goto __pyx_L4; } - /* "lxml/etree.pyx":2429 + /* "lxml/etree.pyx":2440 * result = default[0] * else: * _delAttribute(self._element, key) # <<<<<<<<<<<<<< @@ -72302,12 +72633,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_3); - __pyx_t_5 = __pyx_f_4lxml_5etree__delAttribute(((struct LxmlElement *)__pyx_t_3), __pyx_v_key); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2429, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__delAttribute(((struct LxmlElement *)__pyx_t_3), __pyx_v_key); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L4:; - /* "lxml/etree.pyx":2430 + /* "lxml/etree.pyx":2441 * else: * _delAttribute(self._element, key) * return result # <<<<<<<<<<<<<< @@ -72319,7 +72650,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2419 + /* "lxml/etree.pyx":2430 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< @@ -72340,7 +72671,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_8pop(struct __pyx_obj_4lxml_5etr return __pyx_r; } -/* "lxml/etree.pyx":2432 +/* "lxml/etree.pyx":2443 * return result * * def clear(self): # <<<<<<<<<<<<<< @@ -72372,7 +72703,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 int __pyx_t_4; __Pyx_RefNannySetupContext("clear", 0); - /* "lxml/etree.pyx":2433 + /* "lxml/etree.pyx":2444 * * def clear(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72381,10 +72712,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2433, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2444, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2434 + /* "lxml/etree.pyx":2445 * def clear(self): * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node # <<<<<<<<<<<<<< @@ -72394,7 +72725,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 __pyx_t_3 = __pyx_v_self->_element->_c_node; __pyx_v_c_node = __pyx_t_3; - /* "lxml/etree.pyx":2435 + /* "lxml/etree.pyx":2446 * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node * while c_node.properties is not NULL: # <<<<<<<<<<<<<< @@ -72405,7 +72736,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 __pyx_t_4 = ((__pyx_v_c_node->properties != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2436 + /* "lxml/etree.pyx":2447 * cdef xmlNode* c_node = self._element._c_node * while c_node.properties is not NULL: * tree.xmlRemoveProp(c_node.properties) # <<<<<<<<<<<<<< @@ -72415,7 +72746,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 (void)(xmlRemoveProp(__pyx_v_c_node->properties)); } - /* "lxml/etree.pyx":2432 + /* "lxml/etree.pyx":2443 * return result * * def clear(self): # <<<<<<<<<<<<<< @@ -72436,7 +72767,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_10clear(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":2439 +/* "lxml/etree.pyx":2450 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -72465,7 +72796,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxm PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/etree.pyx":2440 + /* "lxml/etree.pyx":2451 * # ACCESSORS * def __repr__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72474,10 +72805,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxm */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2440, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2451, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2441 + /* "lxml/etree.pyx":2452 * def __repr__(self): * _assertValidNode(self._element) * return repr(dict( _collectAttributes(self._element._c_node, 3) )) # <<<<<<<<<<<<<< @@ -72485,19 +72816,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxm * def __copy__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2441, __pyx_L1_error) + __pyx_t_1 = PyObject_Repr(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2439 + /* "lxml/etree.pyx":2450 * * # ACCESSORS * def __repr__(self): # <<<<<<<<<<<<<< @@ -72517,7 +72848,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_12__repr__(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":2443 +/* "lxml/etree.pyx":2454 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< @@ -72547,7 +72878,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxm PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__copy__", 0); - /* "lxml/etree.pyx":2444 + /* "lxml/etree.pyx":2455 * * def __copy__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72556,10 +72887,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxm */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2444, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2445 + /* "lxml/etree.pyx":2456 * def __copy__(self): * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< @@ -72567,16 +72898,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxm * def __deepcopy__(self, memo): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2445, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2445, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2443 + /* "lxml/etree.pyx":2454 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< @@ -72596,7 +72927,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_14__copy__(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":2447 +/* "lxml/etree.pyx":2458 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -72626,7 +72957,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__deepcopy__", 0); - /* "lxml/etree.pyx":2448 + /* "lxml/etree.pyx":2459 * * def __deepcopy__(self, memo): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72635,10 +72966,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_ */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2448, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2459, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2449 + /* "lxml/etree.pyx":2460 * def __deepcopy__(self, memo): * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< @@ -72646,16 +72977,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_ * def __getitem__(self, key): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2447 + /* "lxml/etree.pyx":2458 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< @@ -72675,7 +73006,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_16__deepcopy__(struct __pyx_obj_ return __pyx_r; } -/* "lxml/etree.pyx":2451 +/* "lxml/etree.pyx":2462 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -72707,7 +73038,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 int __pyx_t_5; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "lxml/etree.pyx":2452 + /* "lxml/etree.pyx":2463 * * def __getitem__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72716,10 +73047,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2452, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2453 + /* "lxml/etree.pyx":2464 * def __getitem__(self, key): * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) # <<<<<<<<<<<<<< @@ -72728,13 +73059,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2453, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_result = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":2454 + /* "lxml/etree.pyx":2465 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -72745,7 +73076,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 __pyx_t_5 = (__pyx_t_4 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":2455 + /* "lxml/etree.pyx":2466 * result = _getAttributeValue(self._element, key, None) * if result is None: * raise KeyError, key # <<<<<<<<<<<<<< @@ -72753,9 +73084,9 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 * */ __Pyx_Raise(__pyx_builtin_KeyError, __pyx_v_key, 0, 0); - __PYX_ERR(0, 2455, __pyx_L1_error) + __PYX_ERR(0, 2466, __pyx_L1_error) - /* "lxml/etree.pyx":2454 + /* "lxml/etree.pyx":2465 * _assertValidNode(self._element) * result = _getAttributeValue(self._element, key, None) * if result is None: # <<<<<<<<<<<<<< @@ -72764,7 +73095,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":2456 + /* "lxml/etree.pyx":2467 * if result is None: * raise KeyError, key * return result # <<<<<<<<<<<<<< @@ -72776,7 +73107,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2451 + /* "lxml/etree.pyx":2462 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __getitem__(self, key): # <<<<<<<<<<<<<< @@ -72797,7 +73128,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_18__getitem__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":2458 +/* "lxml/etree.pyx":2469 * return result * * def __bool__(self): # <<<<<<<<<<<<<< @@ -72828,7 +73159,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr int __pyx_t_4; __Pyx_RefNannySetupContext("__bool__", 0); - /* "lxml/etree.pyx":2459 + /* "lxml/etree.pyx":2470 * * def __bool__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72837,10 +73168,10 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2459, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2470, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2460 + /* "lxml/etree.pyx":2471 * def __bool__(self): * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties # <<<<<<<<<<<<<< @@ -72850,7 +73181,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_t_3 = __pyx_v_self->_element->_c_node->properties; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2461 + /* "lxml/etree.pyx":2472 * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: # <<<<<<<<<<<<<< @@ -72861,7 +73192,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_t_4 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2462 + /* "lxml/etree.pyx":2473 * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -72871,7 +73202,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_t_4 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2463 + /* "lxml/etree.pyx":2474 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * return 1 # <<<<<<<<<<<<<< @@ -72881,7 +73212,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2462 + /* "lxml/etree.pyx":2473 * cdef xmlAttr* c_attr = self._element._c_node.properties * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -72890,7 +73221,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr */ } - /* "lxml/etree.pyx":2464 + /* "lxml/etree.pyx":2475 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * return 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< @@ -72901,7 +73232,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2465 + /* "lxml/etree.pyx":2476 * return 1 * c_attr = c_attr.next * return 0 # <<<<<<<<<<<<<< @@ -72911,7 +73242,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2458 + /* "lxml/etree.pyx":2469 * return result * * def __bool__(self): # <<<<<<<<<<<<<< @@ -72929,7 +73260,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_20__bool__(struct __pyx_obj_4lxml_5etr return __pyx_r; } -/* "lxml/etree.pyx":2467 +/* "lxml/etree.pyx":2478 * return 0 * * def __len__(self): # <<<<<<<<<<<<<< @@ -72961,7 +73292,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm int __pyx_t_4; __Pyx_RefNannySetupContext("__len__", 0); - /* "lxml/etree.pyx":2468 + /* "lxml/etree.pyx":2479 * * def __len__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -72970,10 +73301,10 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2468, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2469 + /* "lxml/etree.pyx":2480 * def __len__(self): * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties # <<<<<<<<<<<<<< @@ -72983,7 +73314,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __pyx_t_3 = __pyx_v_self->_element->_c_node->properties; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2470 + /* "lxml/etree.pyx":2481 * _assertValidNode(self._element) * cdef xmlAttr* c_attr = self._element._c_node.properties * cdef Py_ssize_t c = 0 # <<<<<<<<<<<<<< @@ -72992,7 +73323,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm */ __pyx_v_c = 0; - /* "lxml/etree.pyx":2471 + /* "lxml/etree.pyx":2482 * cdef xmlAttr* c_attr = self._element._c_node.properties * cdef Py_ssize_t c = 0 * while c_attr is not NULL: # <<<<<<<<<<<<<< @@ -73003,7 +73334,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __pyx_t_4 = ((__pyx_v_c_attr != NULL) != 0); if (!__pyx_t_4) break; - /* "lxml/etree.pyx":2472 + /* "lxml/etree.pyx":2483 * cdef Py_ssize_t c = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -73013,7 +73344,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __pyx_t_4 = ((__pyx_v_c_attr->type == XML_ATTRIBUTE_NODE) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2473 + /* "lxml/etree.pyx":2484 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * c += 1 # <<<<<<<<<<<<<< @@ -73022,7 +73353,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm */ __pyx_v_c = (__pyx_v_c + 1); - /* "lxml/etree.pyx":2472 + /* "lxml/etree.pyx":2483 * cdef Py_ssize_t c = 0 * while c_attr is not NULL: * if c_attr.type == tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -73031,7 +73362,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm */ } - /* "lxml/etree.pyx":2474 + /* "lxml/etree.pyx":2485 * if c_attr.type == tree.XML_ATTRIBUTE_NODE: * c += 1 * c_attr = c_attr.next # <<<<<<<<<<<<<< @@ -73042,7 +73373,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2475 + /* "lxml/etree.pyx":2486 * c += 1 * c_attr = c_attr.next * return c # <<<<<<<<<<<<<< @@ -73052,7 +73383,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm __pyx_r = __pyx_v_c; goto __pyx_L0; - /* "lxml/etree.pyx":2467 + /* "lxml/etree.pyx":2478 * return 0 * * def __len__(self): # <<<<<<<<<<<<<< @@ -73070,7 +73401,7 @@ static Py_ssize_t __pyx_pf_4lxml_5etree_7_Attrib_22__len__(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":2477 +/* "lxml/etree.pyx":2488 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -73115,7 +73446,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_25get(PyObject *__pyx_v_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 2477, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get") < 0)) __PYX_ERR(0, 2488, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -73131,7 +73462,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7_Attrib_25get(PyObject *__pyx_v_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2477, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2488, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Attrib.get", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -73152,7 +73483,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5et PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("get", 0); - /* "lxml/etree.pyx":2478 + /* "lxml/etree.pyx":2489 * * def get(self, key, default=None): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73161,10 +73492,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5et */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2478, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2489, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2479 + /* "lxml/etree.pyx":2490 * def get(self, key, default=None): * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) # <<<<<<<<<<<<<< @@ -73174,14 +73505,14 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5et __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2479, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__getAttributeValue(((struct LxmlElement *)__pyx_t_1), __pyx_v_key, __pyx_v_default); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2477 + /* "lxml/etree.pyx":2488 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< @@ -73201,7 +73532,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_24get(struct __pyx_obj_4lxml_5et return __pyx_r; } -/* "lxml/etree.pyx":2481 +/* "lxml/etree.pyx":2492 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -73230,7 +73561,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5e int __pyx_t_2; __Pyx_RefNannySetupContext("keys", 0); - /* "lxml/etree.pyx":2482 + /* "lxml/etree.pyx":2493 * * def keys(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73239,10 +73570,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5e */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2482, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2493, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2483 + /* "lxml/etree.pyx":2494 * def keys(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) # <<<<<<<<<<<<<< @@ -73250,13 +73581,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5e * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2481 + /* "lxml/etree.pyx":2492 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< @@ -73275,7 +73606,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_26keys(struct __pyx_obj_4lxml_5e return __pyx_r; } -/* "lxml/etree.pyx":2485 +/* "lxml/etree.pyx":2496 * return _collectAttributes(self._element._c_node, 1) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -73304,7 +73635,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxm PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2486 + /* "lxml/etree.pyx":2497 * * def __iter__(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73313,10 +73644,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxm */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2486, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2487 + /* "lxml/etree.pyx":2498 * def __iter__(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) # <<<<<<<<<<<<<< @@ -73324,16 +73655,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxm * def iterkeys(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2487, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2487, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2485 + /* "lxml/etree.pyx":2496 * return _collectAttributes(self._element._c_node, 1) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -73353,7 +73684,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_28__iter__(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":2489 +/* "lxml/etree.pyx":2500 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< @@ -73383,7 +73714,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxm PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("iterkeys", 0); - /* "lxml/etree.pyx":2490 + /* "lxml/etree.pyx":2501 * * def iterkeys(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73392,10 +73723,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxm */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2490, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2491 + /* "lxml/etree.pyx":2502 * def iterkeys(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) # <<<<<<<<<<<<<< @@ -73403,16 +73734,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxm * def values(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2491, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2491, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2489 + /* "lxml/etree.pyx":2500 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< @@ -73432,7 +73763,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_30iterkeys(struct __pyx_obj_4lxm return __pyx_r; } -/* "lxml/etree.pyx":2493 +/* "lxml/etree.pyx":2504 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< @@ -73461,7 +73792,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_ int __pyx_t_2; __Pyx_RefNannySetupContext("values", 0); - /* "lxml/etree.pyx":2494 + /* "lxml/etree.pyx":2505 * * def values(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73470,10 +73801,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_ */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2494, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2495 + /* "lxml/etree.pyx":2506 * def values(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) # <<<<<<<<<<<<<< @@ -73481,13 +73812,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_ * def itervalues(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2495, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2493 + /* "lxml/etree.pyx":2504 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< @@ -73506,7 +73837,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_32values(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "lxml/etree.pyx":2497 +/* "lxml/etree.pyx":2508 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< @@ -73536,7 +73867,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4l PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("itervalues", 0); - /* "lxml/etree.pyx":2498 + /* "lxml/etree.pyx":2509 * * def itervalues(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73545,10 +73876,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4l */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2498, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2499 + /* "lxml/etree.pyx":2510 * def itervalues(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) # <<<<<<<<<<<<<< @@ -73556,16 +73887,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4l * def items(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2499, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2497 + /* "lxml/etree.pyx":2508 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< @@ -73585,7 +73916,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_34itervalues(struct __pyx_obj_4l return __pyx_r; } -/* "lxml/etree.pyx":2501 +/* "lxml/etree.pyx":2512 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< @@ -73614,7 +73945,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5 int __pyx_t_2; __Pyx_RefNannySetupContext("items", 0); - /* "lxml/etree.pyx":2502 + /* "lxml/etree.pyx":2513 * * def items(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73623,10 +73954,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5 */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2502, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2503 + /* "lxml/etree.pyx":2514 * def items(self): * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) # <<<<<<<<<<<<<< @@ -73634,13 +73965,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5 * def iteritems(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2503, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2501 + /* "lxml/etree.pyx":2512 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< @@ -73659,7 +73990,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_36items(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":2505 +/* "lxml/etree.pyx":2516 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< @@ -73689,7 +74020,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("iteritems", 0); - /* "lxml/etree.pyx":2506 + /* "lxml/etree.pyx":2517 * * def iteritems(self): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73698,10 +74029,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lx */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2506, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2507 + /* "lxml/etree.pyx":2518 * def iteritems(self): * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) # <<<<<<<<<<<<<< @@ -73709,16 +74040,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lx * def has_key(self, key): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->_element->_c_node, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2505 + /* "lxml/etree.pyx":2516 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< @@ -73738,7 +74069,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_38iteritems(struct __pyx_obj_4lx return __pyx_r; } -/* "lxml/etree.pyx":2509 +/* "lxml/etree.pyx":2520 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< @@ -73768,7 +74099,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml int __pyx_t_3; __Pyx_RefNannySetupContext("has_key", 0); - /* "lxml/etree.pyx":2510 + /* "lxml/etree.pyx":2521 * * def has_key(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73777,10 +74108,10 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2510, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2521, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2511 + /* "lxml/etree.pyx":2522 * def has_key(self, key): * _assertValidNode(self._element) * return key in self # <<<<<<<<<<<<<< @@ -73788,14 +74119,14 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml * def __contains__(self, key): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2511, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, ((PyObject *)__pyx_v_self), Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2509 + /* "lxml/etree.pyx":2520 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< @@ -73814,7 +74145,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_40has_key(struct __pyx_obj_4lxml return __pyx_r; } -/* "lxml/etree.pyx":2513 +/* "lxml/etree.pyx":2524 * return key in self * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -73851,7 +74182,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ int __pyx_t_7; __Pyx_RefNannySetupContext("__contains__", 0); - /* "lxml/etree.pyx":2514 + /* "lxml/etree.pyx":2525 * * def __contains__(self, key): * _assertValidNode(self._element) # <<<<<<<<<<<<<< @@ -73860,17 +74191,17 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ */ __pyx_t_1 = ((PyObject *)__pyx_v_self->_element); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2514, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__assertValidNode(((struct LxmlElement *)__pyx_t_1)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2516 + /* "lxml/etree.pyx":2527 * _assertValidNode(self._element) * cdef xmlNode* c_node * ns, tag = _getNsTag(key) # <<<<<<<<<<<<<< * c_node = self._element._c_node * c_href = NULL if ns is None else _xcstr(ns) */ - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -73878,7 +74209,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2516, __pyx_L1_error) + __PYX_ERR(0, 2527, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -73886,21 +74217,21 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2516, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2527, __pyx_L1_error) } __pyx_v_ns = __pyx_t_3; __pyx_t_3 = 0; __pyx_v_tag = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":2517 + /* "lxml/etree.pyx":2528 * cdef xmlNode* c_node * ns, tag = _getNsTag(key) * c_node = self._element._c_node # <<<<<<<<<<<<<< @@ -73910,7 +74241,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ __pyx_t_5 = __pyx_v_self->_element->_c_node; __pyx_v_c_node = __pyx_t_5; - /* "lxml/etree.pyx":2518 + /* "lxml/etree.pyx":2529 * ns, tag = _getNsTag(key) * c_node = self._element._c_node * c_href = NULL if ns is None else _xcstr(ns) # <<<<<<<<<<<<<< @@ -73925,7 +74256,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ } __pyx_v_c_href = __pyx_t_6; - /* "lxml/etree.pyx":2519 + /* "lxml/etree.pyx":2530 * c_node = self._element._c_node * c_href = NULL if ns is None else _xcstr(ns) * return 1 if tree.xmlHasNsProp(c_node, _xcstr(tag), c_href) else 0 # <<<<<<<<<<<<<< @@ -73940,7 +74271,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "lxml/etree.pyx":2513 + /* "lxml/etree.pyx":2524 * return key in self * * def __contains__(self, key): # <<<<<<<<<<<<<< @@ -73962,7 +74293,7 @@ static int __pyx_pf_4lxml_5etree_7_Attrib_42__contains__(struct __pyx_obj_4lxml_ return __pyx_r; } -/* "lxml/etree.pyx":2521 +/* "lxml/etree.pyx":2532 * return 1 if tree.xmlHasNsProp(c_node, _xcstr(tag), c_href) else 0 * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -73999,7 +74330,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_RefNannySetupContext("__richcmp__", 0); __Pyx_INCREF(__pyx_v_other); - /* "lxml/etree.pyx":2522 + /* "lxml/etree.pyx":2533 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -74015,14 +74346,14 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":2523 + /* "lxml/etree.pyx":2534 * def __richcmp__(self, other, int op): * try: * one = dict(self.items()) # <<<<<<<<<<<<<< * if not isinstance(other, dict): * other = dict(other) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_items); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2534, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -74036,16 +74367,16 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2523, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2534, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2523, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2534, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_one = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":2524 + /* "lxml/etree.pyx":2535 * try: * one = dict(self.items()) * if not isinstance(other, dict): # <<<<<<<<<<<<<< @@ -74056,19 +74387,19 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0); if (__pyx_t_8) { - /* "lxml/etree.pyx":2525 + /* "lxml/etree.pyx":2536 * one = dict(self.items()) * if not isinstance(other, dict): * other = dict(other) # <<<<<<<<<<<<<< * except (TypeError, ValueError): * return NotImplemented */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2525, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2536, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v_other, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/etree.pyx":2524 + /* "lxml/etree.pyx":2535 * try: * one = dict(self.items()) * if not isinstance(other, dict): # <<<<<<<<<<<<<< @@ -74077,7 +74408,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 */ } - /* "lxml/etree.pyx":2522 + /* "lxml/etree.pyx":2533 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -74094,7 +74425,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2526 + /* "lxml/etree.pyx":2537 * if not isinstance(other, dict): * other = dict(other) * except (TypeError, ValueError): # <<<<<<<<<<<<<< @@ -74104,12 +74435,12 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_TypeError) || __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); if (__pyx_t_9) { __Pyx_AddTraceback("lxml.etree._Attrib.__richcmp__", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 2526, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 2537, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); - /* "lxml/etree.pyx":2527 + /* "lxml/etree.pyx":2538 * other = dict(other) * except (TypeError, ValueError): * return NotImplemented # <<<<<<<<<<<<<< @@ -74127,7 +74458,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":2522 + /* "lxml/etree.pyx":2533 * * def __richcmp__(self, other, int op): * try: # <<<<<<<<<<<<<< @@ -74148,7 +74479,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 __pyx_L8_try_end:; } - /* "lxml/etree.pyx":2528 + /* "lxml/etree.pyx":2539 * except (TypeError, ValueError): * return NotImplemented * return python.PyObject_RichCompare(one, other, op) # <<<<<<<<<<<<<< @@ -74156,13 +74487,13 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = PyObject_RichCompare(__pyx_v_one, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2528, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_v_one, __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2521 + /* "lxml/etree.pyx":2532 * return 1 if tree.xmlHasNsProp(c_node, _xcstr(tag), c_href) else 0 * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -74185,7 +74516,7 @@ static PyObject *__pyx_pf_4lxml_5etree_7_Attrib_44__richcmp__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":2540 +/* "lxml/etree.pyx":2551 * cdef xmlAttr* _c_attr * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): # <<<<<<<<<<<<<< @@ -74211,7 +74542,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator___iter__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2541 + /* "lxml/etree.pyx":2552 * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -74223,7 +74554,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator___iter__(struct __pyx_o __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2540 + /* "lxml/etree.pyx":2551 * cdef xmlAttr* _c_attr * cdef int _keysvalues # 1 - keys, 2 - values, 3 - items (key, value) * def __iter__(self): # <<<<<<<<<<<<<< @@ -74238,7 +74569,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator___iter__(struct __pyx_o return __pyx_r; } -/* "lxml/etree.pyx":2543 +/* "lxml/etree.pyx":2554 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -74271,7 +74602,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "lxml/etree.pyx":2545 + /* "lxml/etree.pyx":2556 * def __next__(self): * cdef xmlAttr* c_attr * if self._node is None: # <<<<<<<<<<<<<< @@ -74282,7 +74613,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2546 + /* "lxml/etree.pyx":2557 * cdef xmlAttr* c_attr * if self._node is None: * raise StopIteration # <<<<<<<<<<<<<< @@ -74290,9 +74621,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2546, __pyx_L1_error) + __PYX_ERR(0, 2557, __pyx_L1_error) - /* "lxml/etree.pyx":2545 + /* "lxml/etree.pyx":2556 * def __next__(self): * cdef xmlAttr* c_attr * if self._node is None: # <<<<<<<<<<<<<< @@ -74301,7 +74632,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ */ } - /* "lxml/etree.pyx":2547 + /* "lxml/etree.pyx":2558 * if self._node is None: * raise StopIteration * c_attr = self._c_attr # <<<<<<<<<<<<<< @@ -74311,7 +74642,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_t_3 = __pyx_v_self->_c_attr; __pyx_v_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2548 + /* "lxml/etree.pyx":2559 * raise StopIteration * c_attr = self._c_attr * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: # <<<<<<<<<<<<<< @@ -74330,7 +74661,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_L6_bool_binop_done:; if (!__pyx_t_2) break; - /* "lxml/etree.pyx":2549 + /* "lxml/etree.pyx":2560 * c_attr = self._c_attr * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next # <<<<<<<<<<<<<< @@ -74341,7 +74672,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_v_c_attr = __pyx_t_3; } - /* "lxml/etree.pyx":2550 + /* "lxml/etree.pyx":2561 * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next * if c_attr is NULL: # <<<<<<<<<<<<<< @@ -74351,7 +74682,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_t_2 = ((__pyx_v_c_attr == NULL) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2551 + /* "lxml/etree.pyx":2562 * c_attr = c_attr.next * if c_attr is NULL: * self._node = None # <<<<<<<<<<<<<< @@ -74364,7 +74695,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __Pyx_DECREF(((PyObject *)__pyx_v_self->_node)); __pyx_v_self->_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2552 + /* "lxml/etree.pyx":2563 * if c_attr is NULL: * self._node = None * raise StopIteration # <<<<<<<<<<<<<< @@ -74372,9 +74703,9 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * self._c_attr = c_attr.next */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2552, __pyx_L1_error) + __PYX_ERR(0, 2563, __pyx_L1_error) - /* "lxml/etree.pyx":2550 + /* "lxml/etree.pyx":2561 * while c_attr is not NULL and c_attr.type != tree.XML_ATTRIBUTE_NODE: * c_attr = c_attr.next * if c_attr is NULL: # <<<<<<<<<<<<<< @@ -74383,7 +74714,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ */ } - /* "lxml/etree.pyx":2554 + /* "lxml/etree.pyx":2565 * raise StopIteration * * self._c_attr = c_attr.next # <<<<<<<<<<<<<< @@ -74393,7 +74724,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ __pyx_t_3 = __pyx_v_c_attr->next; __pyx_v_self->_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2555 + /* "lxml/etree.pyx":2566 * * self._c_attr = c_attr.next * if self._keysvalues == 1: # <<<<<<<<<<<<<< @@ -74403,7 +74734,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ switch (__pyx_v_self->_keysvalues) { case 1: - /* "lxml/etree.pyx":2556 + /* "lxml/etree.pyx":2567 * self._c_attr = c_attr.next * if self._keysvalues == 1: * return _namespacedName(c_attr) # <<<<<<<<<<<<<< @@ -74411,13 +74742,13 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * return _attributeValue(self._node._c_node, c_attr) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2556, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2555 + /* "lxml/etree.pyx":2566 * * self._c_attr = c_attr.next * if self._keysvalues == 1: # <<<<<<<<<<<<<< @@ -74427,7 +74758,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ break; case 2: - /* "lxml/etree.pyx":2558 + /* "lxml/etree.pyx":2569 * return _namespacedName(c_attr) * elif self._keysvalues == 2: * return _attributeValue(self._node._c_node, c_attr) # <<<<<<<<<<<<<< @@ -74435,13 +74766,13 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * return (_namespacedName(c_attr), */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_self->_node->_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2558, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_self->_node->_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2557 + /* "lxml/etree.pyx":2568 * if self._keysvalues == 1: * return _namespacedName(c_attr) * elif self._keysvalues == 2: # <<<<<<<<<<<<<< @@ -74451,7 +74782,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ break; default: - /* "lxml/etree.pyx":2560 + /* "lxml/etree.pyx":2571 * return _attributeValue(self._node._c_node, c_attr) * else: * return (_namespacedName(c_attr), # <<<<<<<<<<<<<< @@ -74459,27 +74790,27 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2560, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__namespacedName(((xmlNode *)__pyx_v_c_attr)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "lxml/etree.pyx":2561 + /* "lxml/etree.pyx":2572 * else: * return (_namespacedName(c_attr), * _attributeValue(self._node._c_node, c_attr)) # <<<<<<<<<<<<<< * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): */ - __pyx_t_5 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_self->_node->_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2561, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__attributeValue(__pyx_v_self->_node->_c_node, __pyx_v_c_attr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "lxml/etree.pyx":2560 + /* "lxml/etree.pyx":2571 * return _attributeValue(self._node._c_node, c_attr) * else: * return (_namespacedName(c_attr), # <<<<<<<<<<<<<< * _attributeValue(self._node._c_node, c_attr)) * */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2560, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -74493,7 +74824,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ break; } - /* "lxml/etree.pyx":2543 + /* "lxml/etree.pyx":2554 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -74514,7 +74845,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_AttribIterator_2__next__(struct __pyx_ return __pyx_r; } -/* "lxml/etree.pyx":2563 +/* "lxml/etree.pyx":2574 * _attributeValue(self._node._c_node, c_attr)) * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): # <<<<<<<<<<<<<< @@ -74531,7 +74862,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme xmlAttr *__pyx_t_3; __Pyx_RefNannySetupContext("_attributeIteratorFactory", 0); - /* "lxml/etree.pyx":2565 + /* "lxml/etree.pyx":2576 * cdef object _attributeIteratorFactory(_Element element, int keysvalues): * cdef _AttribIterator attribs * if element._c_node.properties is NULL: # <<<<<<<<<<<<<< @@ -74541,7 +74872,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __pyx_t_1 = ((__pyx_v_element->_c_node->properties == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2566 + /* "lxml/etree.pyx":2577 * cdef _AttribIterator attribs * if element._c_node.properties is NULL: * return ITER_EMPTY # <<<<<<<<<<<<<< @@ -74553,7 +74884,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __pyx_r = __pyx_v_4lxml_5etree_ITER_EMPTY; goto __pyx_L0; - /* "lxml/etree.pyx":2565 + /* "lxml/etree.pyx":2576 * cdef object _attributeIteratorFactory(_Element element, int keysvalues): * cdef _AttribIterator attribs * if element._c_node.properties is NULL: # <<<<<<<<<<<<<< @@ -74562,19 +74893,19 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme */ } - /* "lxml/etree.pyx":2567 + /* "lxml/etree.pyx":2578 * if element._c_node.properties is NULL: * return ITER_EMPTY * attribs = _AttribIterator() # <<<<<<<<<<<<<< * attribs._node = element * attribs._c_attr = element._c_node.properties */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__AttribIterator)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2567, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__AttribIterator)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_attribs = ((struct __pyx_obj_4lxml_5etree__AttribIterator *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2568 + /* "lxml/etree.pyx":2579 * return ITER_EMPTY * attribs = _AttribIterator() * attribs._node = element # <<<<<<<<<<<<<< @@ -74587,7 +74918,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __Pyx_DECREF(((PyObject *)__pyx_v_attribs->_node)); __pyx_v_attribs->_node = __pyx_v_element; - /* "lxml/etree.pyx":2569 + /* "lxml/etree.pyx":2580 * attribs = _AttribIterator() * attribs._node = element * attribs._c_attr = element._c_node.properties # <<<<<<<<<<<<<< @@ -74597,7 +74928,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __pyx_t_3 = __pyx_v_element->_c_node->properties; __pyx_v_attribs->_c_attr = __pyx_t_3; - /* "lxml/etree.pyx":2570 + /* "lxml/etree.pyx":2581 * attribs._node = element * attribs._c_attr = element._c_node.properties * attribs._keysvalues = keysvalues # <<<<<<<<<<<<<< @@ -74606,7 +74937,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme */ __pyx_v_attribs->_keysvalues = __pyx_v_keysvalues; - /* "lxml/etree.pyx":2571 + /* "lxml/etree.pyx":2582 * attribs._c_attr = element._c_node.properties * attribs._keysvalues = keysvalues * return attribs # <<<<<<<<<<<<<< @@ -74618,7 +74949,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme __pyx_r = ((PyObject *)__pyx_v_attribs); goto __pyx_L0; - /* "lxml/etree.pyx":2563 + /* "lxml/etree.pyx":2574 * _attributeValue(self._node._c_node, c_attr)) * * cdef object _attributeIteratorFactory(_Element element, int keysvalues): # <<<<<<<<<<<<<< @@ -74638,7 +74969,7 @@ static PyObject *__pyx_f_4lxml_5etree__attributeIteratorFactory(struct LxmlEleme return __pyx_r; } -/* "lxml/etree.pyx":2583 +/* "lxml/etree.pyx":2594 * cdef char* _href * cdef char* _name * cdef _initTagMatch(self, tag): # <<<<<<<<<<<<<< @@ -74654,7 +74985,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_initTagMatch", 0); - /* "lxml/etree.pyx":2584 + /* "lxml/etree.pyx":2595 * cdef char* _name * cdef _initTagMatch(self, tag): * self._href = NULL # <<<<<<<<<<<<<< @@ -74663,7 +74994,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_href = NULL; - /* "lxml/etree.pyx":2585 + /* "lxml/etree.pyx":2596 * cdef _initTagMatch(self, tag): * self._href = NULL * self._name = NULL # <<<<<<<<<<<<<< @@ -74672,7 +75003,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_name = NULL; - /* "lxml/etree.pyx":2586 + /* "lxml/etree.pyx":2597 * self._href = NULL * self._name = NULL * if tag is None: # <<<<<<<<<<<<<< @@ -74683,7 +75014,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2587 + /* "lxml/etree.pyx":2598 * self._name = NULL * if tag is None: * self._node_type = 0 # <<<<<<<<<<<<<< @@ -74692,7 +75023,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_node_type = 0; - /* "lxml/etree.pyx":2586 + /* "lxml/etree.pyx":2597 * self._href = NULL * self._name = NULL * if tag is None: # <<<<<<<<<<<<<< @@ -74702,21 +75033,21 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2588 + /* "lxml/etree.pyx":2599 * if tag is None: * self._node_type = 0 * elif tag is Comment: # <<<<<<<<<<<<<< * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2588, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Comment); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_v_tag == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2589 + /* "lxml/etree.pyx":2600 * self._node_type = 0 * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE # <<<<<<<<<<<<<< @@ -74725,7 +75056,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_node_type = XML_COMMENT_NODE; - /* "lxml/etree.pyx":2588 + /* "lxml/etree.pyx":2599 * if tag is None: * self._node_type = 0 * elif tag is Comment: # <<<<<<<<<<<<<< @@ -74735,21 +75066,21 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2590 + /* "lxml/etree.pyx":2601 * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< * self._node_type = tree.XML_PI_NODE * elif tag is Entity: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2590, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_tag == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2591 + /* "lxml/etree.pyx":2602 * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE # <<<<<<<<<<<<<< @@ -74758,7 +75089,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_node_type = XML_PI_NODE; - /* "lxml/etree.pyx":2590 + /* "lxml/etree.pyx":2601 * elif tag is Comment: * self._node_type = tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< @@ -74768,21 +75099,21 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2592 + /* "lxml/etree.pyx":2603 * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2592, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Entity); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_v_tag == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2593 + /* "lxml/etree.pyx":2604 * self._node_type = tree.XML_PI_NODE * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE # <<<<<<<<<<<<<< @@ -74791,7 +75122,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_node_type = XML_ENTITY_REF_NODE; - /* "lxml/etree.pyx":2592 + /* "lxml/etree.pyx":2603 * elif tag is ProcessingInstruction: * self._node_type = tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< @@ -74801,21 +75132,21 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2594 + /* "lxml/etree.pyx":2605 * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< * self._node_type = tree.XML_ELEMENT_NODE * else: */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2594, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Element); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = (__pyx_v_tag == __pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2595 + /* "lxml/etree.pyx":2606 * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: * self._node_type = tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< @@ -74824,7 +75155,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_node_type = XML_ELEMENT_NODE; - /* "lxml/etree.pyx":2594 + /* "lxml/etree.pyx":2605 * elif tag is Entity: * self._node_type = tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< @@ -74834,7 +75165,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct goto __pyx_L3; } - /* "lxml/etree.pyx":2597 + /* "lxml/etree.pyx":2608 * self._node_type = tree.XML_ELEMENT_NODE * else: * self._node_type = tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< @@ -74844,14 +75175,14 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct /*else*/ { __pyx_v_self->_node_type = XML_ELEMENT_NODE; - /* "lxml/etree.pyx":2598 + /* "lxml/etree.pyx":2609 * else: * self._node_type = tree.XML_ELEMENT_NODE * self._pystrings = _getNsTag(tag) # <<<<<<<<<<<<<< * if self._pystrings[0] is not None: * self._href = _cstr(self._pystrings[0]) */ - __pyx_t_3 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2598, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_pystrings); @@ -74859,33 +75190,33 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct __pyx_v_self->_pystrings = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/etree.pyx":2599 + /* "lxml/etree.pyx":2610 * self._node_type = tree.XML_ELEMENT_NODE * self._pystrings = _getNsTag(tag) * if self._pystrings[0] is not None: # <<<<<<<<<<<<<< * self._href = _cstr(self._pystrings[0]) * self._name = _cstr(self._pystrings[1]) */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2599, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2610, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = (__pyx_t_3 != Py_None); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2600 + /* "lxml/etree.pyx":2611 * self._pystrings = _getNsTag(tag) * if self._pystrings[0] is not None: * self._href = _cstr(self._pystrings[0]) # <<<<<<<<<<<<<< * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2611, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_self->_href = PyBytes_AS_STRING(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2599 + /* "lxml/etree.pyx":2610 * self._node_type = tree.XML_ELEMENT_NODE * self._pystrings = _getNsTag(tag) * if self._pystrings[0] is not None: # <<<<<<<<<<<<<< @@ -74894,19 +75225,19 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ } - /* "lxml/etree.pyx":2601 + /* "lxml/etree.pyx":2612 * if self._pystrings[0] is not None: * self._href = _cstr(self._pystrings[0]) * self._name = _cstr(self._pystrings[1]) # <<<<<<<<<<<<<< * if self._name[0] == c'*' and self._name[1] == c'\0': * self._name = NULL */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2601, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_self->_pystrings, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_self->_name = PyBytes_AS_STRING(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2602 + /* "lxml/etree.pyx":2613 * self._href = _cstr(self._pystrings[0]) * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': # <<<<<<<<<<<<<< @@ -74924,7 +75255,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2603 + /* "lxml/etree.pyx":2614 * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': * self._name = NULL # <<<<<<<<<<<<<< @@ -74933,7 +75264,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct */ __pyx_v_self->_name = NULL; - /* "lxml/etree.pyx":2602 + /* "lxml/etree.pyx":2613 * self._href = _cstr(self._pystrings[0]) * self._name = _cstr(self._pystrings[1]) * if self._name[0] == c'*' and self._name[1] == c'\0': # <<<<<<<<<<<<<< @@ -74944,7 +75275,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct } __pyx_L3:; - /* "lxml/etree.pyx":2583 + /* "lxml/etree.pyx":2594 * cdef char* _href * cdef char* _name * cdef _initTagMatch(self, tag): # <<<<<<<<<<<<<< @@ -74965,7 +75296,7 @@ static PyObject *__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch(struct return __pyx_r; } -/* "lxml/etree.pyx":2613 +/* "lxml/etree.pyx":2624 * cdef _Element _node * cdef _node_to_node_function _next_element * def __iter__(self): # <<<<<<<<<<<<<< @@ -74991,7 +75322,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlEl __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2614 + /* "lxml/etree.pyx":2625 * cdef _node_to_node_function _next_element * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -75003,7 +75334,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlEl __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2613 + /* "lxml/etree.pyx":2624 * cdef _Element _node * cdef _node_to_node_function _next_element * def __iter__(self): # <<<<<<<<<<<<<< @@ -75018,7 +75349,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator___iter__(struct LxmlEl return __pyx_r; } -/* "lxml/etree.pyx":2616 +/* "lxml/etree.pyx":2627 * return self * * cdef void _storeNext(self, _Element node): # <<<<<<<<<<<<<< @@ -75035,7 +75366,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_storeNext", 0); - /* "lxml/etree.pyx":2618 + /* "lxml/etree.pyx":2629 * cdef void _storeNext(self, _Element node): * cdef xmlNode* c_node * c_node = self._next_element(node._c_node) # <<<<<<<<<<<<<< @@ -75044,7 +75375,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen */ __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_node->_c_node); - /* "lxml/etree.pyx":2619 + /* "lxml/etree.pyx":2630 * cdef xmlNode* c_node * c_node = self._next_element(node._c_node) * while c_node is not NULL and \ # <<<<<<<<<<<<<< @@ -75059,7 +75390,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2620 + /* "lxml/etree.pyx":2631 * c_node = self._next_element(node._c_node) * while c_node is not NULL and \ * self._node_type != 0 and \ # <<<<<<<<<<<<<< @@ -75073,7 +75404,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2621 + /* "lxml/etree.pyx":2632 * while c_node is not NULL and \ * self._node_type != 0 and \ * (self._node_type != c_node.type or # <<<<<<<<<<<<<< @@ -75087,7 +75418,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L5_bool_binop_done; } - /* "lxml/etree.pyx":2622 + /* "lxml/etree.pyx":2633 * self._node_type != 0 and \ * (self._node_type != c_node.type or * not _tagMatches(c_node, self._href, self._name)): # <<<<<<<<<<<<<< @@ -75099,7 +75430,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __pyx_L5_bool_binop_done:; if (!__pyx_t_1) break; - /* "lxml/etree.pyx":2623 + /* "lxml/etree.pyx":2634 * (self._node_type != c_node.type or * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) # <<<<<<<<<<<<<< @@ -75109,7 +75440,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2624 + /* "lxml/etree.pyx":2635 * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -75119,7 +75450,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2625 + /* "lxml/etree.pyx":2636 * c_node = self._next_element(c_node) * if c_node is NULL: * self._node = None # <<<<<<<<<<<<<< @@ -75132,7 +75463,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __Pyx_DECREF(((PyObject *)__pyx_v_self->_node)); __pyx_v_self->_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2624 + /* "lxml/etree.pyx":2635 * not _tagMatches(c_node, self._href, self._name)): * c_node = self._next_element(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -75142,7 +75473,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen goto __pyx_L9; } - /* "lxml/etree.pyx":2628 + /* "lxml/etree.pyx":2639 * else: * # Python ref: * self._node = _elementFactory(node._doc, c_node) # <<<<<<<<<<<<<< @@ -75152,7 +75483,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen /*else*/ { __pyx_t_3 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_3); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_3), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2628, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_3), __pyx_v_c_node)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -75163,7 +75494,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen } __pyx_L9:; - /* "lxml/etree.pyx":2616 + /* "lxml/etree.pyx":2627 * return self * * cdef void _storeNext(self, _Element node): # <<<<<<<<<<<<<< @@ -75181,7 +75512,7 @@ static void __pyx_f_4lxml_5etree_16_ElementIterator__storeNext(struct LxmlElemen __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2630 +/* "lxml/etree.pyx":2641 * self._node = _elementFactory(node._doc, c_node) * * def __next__(self): # <<<<<<<<<<<<<< @@ -75211,7 +75542,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "lxml/etree.pyx":2633 + /* "lxml/etree.pyx":2644 * cdef xmlNode* c_node * cdef _Element current_node * if self._node is None: # <<<<<<<<<<<<<< @@ -75222,7 +75553,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":2634 + /* "lxml/etree.pyx":2645 * cdef _Element current_node * if self._node is None: * raise StopIteration # <<<<<<<<<<<<<< @@ -75230,9 +75561,9 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE * current_node = self._node */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2634, __pyx_L1_error) + __PYX_ERR(0, 2645, __pyx_L1_error) - /* "lxml/etree.pyx":2633 + /* "lxml/etree.pyx":2644 * cdef xmlNode* c_node * cdef _Element current_node * if self._node is None: # <<<<<<<<<<<<<< @@ -75241,7 +75572,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE */ } - /* "lxml/etree.pyx":2636 + /* "lxml/etree.pyx":2647 * raise StopIteration * # Python ref: * current_node = self._node # <<<<<<<<<<<<<< @@ -75253,7 +75584,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2637 + /* "lxml/etree.pyx":2648 * # Python ref: * current_node = self._node * self._storeNext(current_node) # <<<<<<<<<<<<<< @@ -75262,7 +75593,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE */ ((struct __pyx_vtabstruct_4lxml_5etree__ElementIterator *)__pyx_v_self->__pyx_base.__pyx_vtab)->_storeNext(__pyx_v_self, __pyx_v_current_node); - /* "lxml/etree.pyx":2638 + /* "lxml/etree.pyx":2649 * current_node = self._node * self._storeNext(current_node) * return current_node # <<<<<<<<<<<<<< @@ -75274,7 +75605,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2630 + /* "lxml/etree.pyx":2641 * self._node = _elementFactory(node._doc, c_node) * * def __next__(self): # <<<<<<<<<<<<<< @@ -75294,7 +75625,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ElementIterator_2__next__(struct LxmlE return __pyx_r; } -/* "lxml/etree.pyx":2653 +/* "lxml/etree.pyx":2664 * cdef int _node_types * * def __cinit__(self, tags): # <<<<<<<<<<<<<< @@ -75328,7 +75659,7 @@ static int __pyx_pw_4lxml_5etree_16_MultiTagMatcher_1__cinit__(PyObject *__pyx_v else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2653, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2664, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -75339,7 +75670,7 @@ static int __pyx_pw_4lxml_5etree_16_MultiTagMatcher_1__cinit__(PyObject *__pyx_v } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2653, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2664, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._MultiTagMatcher.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -75358,14 +75689,14 @@ static int __pyx_pf_4lxml_5etree_16_MultiTagMatcher___cinit__(struct __pyx_obj_4 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2654 + /* "lxml/etree.pyx":2665 * * def __cinit__(self, tags): * self._py_tags = [] # <<<<<<<<<<<<<< * self.initTagMatch(tags) * */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_py_tags); @@ -75373,18 +75704,18 @@ static int __pyx_pf_4lxml_5etree_16_MultiTagMatcher___cinit__(struct __pyx_obj_4 __pyx_v_self->_py_tags = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2655 + /* "lxml/etree.pyx":2666 * def __cinit__(self, tags): * self._py_tags = [] * self.initTagMatch(tags) # <<<<<<<<<<<<<< * * def __dealloc__(self): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(__pyx_v_self, __pyx_v_tags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2655, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(__pyx_v_self, __pyx_v_tags); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2653 + /* "lxml/etree.pyx":2664 * cdef int _node_types * * def __cinit__(self, tags): # <<<<<<<<<<<<<< @@ -75404,7 +75735,7 @@ static int __pyx_pf_4lxml_5etree_16_MultiTagMatcher___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":2657 +/* "lxml/etree.pyx":2668 * self.initTagMatch(tags) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -75427,7 +75758,7 @@ static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_o __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); - /* "lxml/etree.pyx":2658 + /* "lxml/etree.pyx":2669 * * def __dealloc__(self): * self._clear() # <<<<<<<<<<<<<< @@ -75436,7 +75767,7 @@ static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_o */ __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(__pyx_v_self); - /* "lxml/etree.pyx":2657 + /* "lxml/etree.pyx":2668 * self.initTagMatch(tags) * * def __dealloc__(self): # <<<<<<<<<<<<<< @@ -75448,7 +75779,7 @@ static void __pyx_pf_4lxml_5etree_16_MultiTagMatcher_2__dealloc__(struct __pyx_o __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2660 +/* "lxml/etree.pyx":2671 * self._clear() * * cdef bint rejectsAll(self): # <<<<<<<<<<<<<< @@ -75463,7 +75794,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4 int __pyx_t_2; __Pyx_RefNannySetupContext("rejectsAll", 0); - /* "lxml/etree.pyx":2661 + /* "lxml/etree.pyx":2672 * * cdef bint rejectsAll(self): * return not self._tag_count and not self._node_types # <<<<<<<<<<<<<< @@ -75482,7 +75813,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4 __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "lxml/etree.pyx":2660 + /* "lxml/etree.pyx":2671 * self._clear() * * cdef bint rejectsAll(self): # <<<<<<<<<<<<<< @@ -75496,7 +75827,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":2663 +/* "lxml/etree.pyx":2674 * return not self._tag_count and not self._node_types * * cdef bint rejectsAllAttributes(self): # <<<<<<<<<<<<<< @@ -75509,7 +75840,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("rejectsAllAttributes", 0); - /* "lxml/etree.pyx":2664 + /* "lxml/etree.pyx":2675 * * cdef bint rejectsAllAttributes(self): * return not self._tag_count # <<<<<<<<<<<<<< @@ -75519,7 +75850,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct _ __pyx_r = (!(__pyx_v_self->_tag_count != 0)); goto __pyx_L0; - /* "lxml/etree.pyx":2663 + /* "lxml/etree.pyx":2674 * return not self._tag_count and not self._node_types * * cdef bint rejectsAllAttributes(self): # <<<<<<<<<<<<<< @@ -75533,7 +75864,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAllAttributes(struct _ return __pyx_r; } -/* "lxml/etree.pyx":2666 +/* "lxml/etree.pyx":2677 * return not self._tag_count * * cdef bint matchesType(self, int node_type): # <<<<<<<<<<<<<< @@ -75548,7 +75879,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ int __pyx_t_2; __Pyx_RefNannySetupContext("matchesType", 0); - /* "lxml/etree.pyx":2667 + /* "lxml/etree.pyx":2678 * * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: # <<<<<<<<<<<<<< @@ -75566,7 +75897,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2668 + /* "lxml/etree.pyx":2679 * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: * return True # <<<<<<<<<<<<<< @@ -75576,7 +75907,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2667 + /* "lxml/etree.pyx":2678 * * cdef bint matchesType(self, int node_type): * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: # <<<<<<<<<<<<<< @@ -75585,7 +75916,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ */ } - /* "lxml/etree.pyx":2669 + /* "lxml/etree.pyx":2680 * if node_type == tree.XML_ELEMENT_NODE and self._tag_count: * return True * return self._node_types & (1 << node_type) # <<<<<<<<<<<<<< @@ -75595,7 +75926,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ __pyx_r = (__pyx_v_self->_node_types & (1 << __pyx_v_node_type)); goto __pyx_L0; - /* "lxml/etree.pyx":2666 + /* "lxml/etree.pyx":2677 * return not self._tag_count * * cdef bint matchesType(self, int node_type): # <<<<<<<<<<<<<< @@ -75609,7 +75940,7 @@ static int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesType(struct __pyx_obj_ return __pyx_r; } -/* "lxml/etree.pyx":2671 +/* "lxml/etree.pyx":2682 * return self._node_types & (1 << node_type) * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -75627,7 +75958,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm size_t __pyx_t_4; __Pyx_RefNannySetupContext("_clear", 0); - /* "lxml/etree.pyx":2673 + /* "lxml/etree.pyx":2684 * cdef void _clear(self): * cdef size_t i, count * count = self._tag_count # <<<<<<<<<<<<<< @@ -75637,7 +75968,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm __pyx_t_1 = __pyx_v_self->_tag_count; __pyx_v_count = __pyx_t_1; - /* "lxml/etree.pyx":2674 + /* "lxml/etree.pyx":2685 * cdef size_t i, count * count = self._tag_count * self._tag_count = 0 # <<<<<<<<<<<<<< @@ -75646,7 +75977,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ __pyx_v_self->_tag_count = 0; - /* "lxml/etree.pyx":2675 + /* "lxml/etree.pyx":2686 * count = self._tag_count * self._tag_count = 0 * if self._cached_tags: # <<<<<<<<<<<<<< @@ -75656,7 +75987,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm __pyx_t_2 = (__pyx_v_self->_cached_tags != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2676 + /* "lxml/etree.pyx":2687 * self._tag_count = 0 * if self._cached_tags: * for i in xrange(count): # <<<<<<<<<<<<<< @@ -75668,7 +75999,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { __pyx_v_i = __pyx_t_4; - /* "lxml/etree.pyx":2677 + /* "lxml/etree.pyx":2688 * if self._cached_tags: * for i in xrange(count): * cpython.ref.Py_XDECREF(self._cached_tags[i].href) # <<<<<<<<<<<<<< @@ -75678,7 +76009,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm Py_XDECREF((__pyx_v_self->_cached_tags[__pyx_v_i]).href); } - /* "lxml/etree.pyx":2678 + /* "lxml/etree.pyx":2689 * for i in xrange(count): * cpython.ref.Py_XDECREF(self._cached_tags[i].href) * python.lxml_free(self._cached_tags) # <<<<<<<<<<<<<< @@ -75687,7 +76018,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ lxml_free(__pyx_v_self->_cached_tags); - /* "lxml/etree.pyx":2679 + /* "lxml/etree.pyx":2690 * cpython.ref.Py_XDECREF(self._cached_tags[i].href) * python.lxml_free(self._cached_tags) * self._cached_tags = NULL # <<<<<<<<<<<<<< @@ -75696,7 +76027,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ __pyx_v_self->_cached_tags = NULL; - /* "lxml/etree.pyx":2675 + /* "lxml/etree.pyx":2686 * count = self._tag_count * self._tag_count = 0 * if self._cached_tags: # <<<<<<<<<<<<<< @@ -75705,7 +76036,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm */ } - /* "lxml/etree.pyx":2671 + /* "lxml/etree.pyx":2682 * return self._node_types & (1 << node_type) * * cdef void _clear(self): # <<<<<<<<<<<<<< @@ -75717,7 +76048,7 @@ static void __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(struct __pyx_obj_4lxm __Pyx_RefNannyFinishContext(); } -/* "lxml/etree.pyx":2681 +/* "lxml/etree.pyx":2692 * self._cached_tags = NULL * * cdef initTagMatch(self, tags): # <<<<<<<<<<<<<< @@ -75735,7 +76066,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("initTagMatch", 0); - /* "lxml/etree.pyx":2682 + /* "lxml/etree.pyx":2693 * * cdef initTagMatch(self, tags): * self._cached_doc = None # <<<<<<<<<<<<<< @@ -75748,7 +76079,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":2683 + /* "lxml/etree.pyx":2694 * cdef initTagMatch(self, tags): * self._cached_doc = None * del self._py_tags[:] # <<<<<<<<<<<<<< @@ -75757,11 +76088,11 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p */ if (unlikely(__pyx_v_self->_py_tags == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2683, __pyx_L1_error) + __PYX_ERR(0, 2694, __pyx_L1_error) } - if (__Pyx_PyObject_DelSlice(__pyx_v_self->_py_tags, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 2683, __pyx_L1_error) + if (__Pyx_PyObject_DelSlice(__pyx_v_self->_py_tags, 0, 0, NULL, NULL, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 2694, __pyx_L1_error) - /* "lxml/etree.pyx":2684 + /* "lxml/etree.pyx":2695 * self._cached_doc = None * del self._py_tags[:] * self._clear() # <<<<<<<<<<<<<< @@ -75770,7 +76101,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p */ __pyx_f_4lxml_5etree_16_MultiTagMatcher__clear(__pyx_v_self); - /* "lxml/etree.pyx":2685 + /* "lxml/etree.pyx":2696 * del self._py_tags[:] * self._clear() * if tags is None or tags == (): # <<<<<<<<<<<<<< @@ -75784,14 +76115,14 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = PyObject_RichCompare(__pyx_v_tags, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2685, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2685, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_tags, __pyx_empty_tuple, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2696, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2687 + /* "lxml/etree.pyx":2698 * if tags is None or tags == (): * # no selection in tags argument => match anything * self._node_types = ( # <<<<<<<<<<<<<< @@ -75800,7 +76131,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p */ __pyx_v_self->_node_types = ((((1 << XML_COMMENT_NODE) | (1 << XML_PI_NODE)) | (1 << XML_ENTITY_REF_NODE)) | (1 << XML_ELEMENT_NODE)); - /* "lxml/etree.pyx":2685 + /* "lxml/etree.pyx":2696 * del self._py_tags[:] * self._clear() * if tags is None or tags == (): # <<<<<<<<<<<<<< @@ -75810,7 +76141,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p goto __pyx_L3; } - /* "lxml/etree.pyx":2693 + /* "lxml/etree.pyx":2704 * 1 << tree.XML_ELEMENT_NODE) * else: * self._node_types = 0 # <<<<<<<<<<<<<< @@ -75820,23 +76151,23 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p /*else*/ { __pyx_v_self->_node_types = 0; - /* "lxml/etree.pyx":2694 + /* "lxml/etree.pyx":2705 * else: * self._node_types = 0 * self._storeTags(tags, set()) # <<<<<<<<<<<<<< * * cdef _storeTags(self, tag, set seen): */ - __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2694, __pyx_L1_error) + __pyx_t_4 = PySet_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(__pyx_v_self, __pyx_v_tags, ((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2694, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(__pyx_v_self, __pyx_v_tags, ((PyObject*)__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":2681 + /* "lxml/etree.pyx":2692 * self._cached_tags = NULL * * cdef initTagMatch(self, tags): # <<<<<<<<<<<<<< @@ -75858,7 +76189,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher_initTagMatch(struct __p return __pyx_r; } -/* "lxml/etree.pyx":2696 +/* "lxml/etree.pyx":2707 * self._storeTags(tags, set()) * * cdef _storeTags(self, tag, set seen): # <<<<<<<<<<<<<< @@ -75882,21 +76213,21 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_storeTags", 0); - /* "lxml/etree.pyx":2697 + /* "lxml/etree.pyx":2708 * * cdef _storeTags(self, tag, set seen): * if tag is Comment: # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2697, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tag == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2698 + /* "lxml/etree.pyx":2709 * cdef _storeTags(self, tag, set seen): * if tag is Comment: * self._node_types |= 1 << tree.XML_COMMENT_NODE # <<<<<<<<<<<<<< @@ -75905,7 +76236,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_COMMENT_NODE)); - /* "lxml/etree.pyx":2697 + /* "lxml/etree.pyx":2708 * * cdef _storeTags(self, tag, set seen): * if tag is Comment: # <<<<<<<<<<<<<< @@ -75915,21 +76246,21 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2699 + /* "lxml/etree.pyx":2710 * if tag is Comment: * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_PI_NODE * elif tag is Entity: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2699, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_tag == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2700 + /* "lxml/etree.pyx":2711 * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: * self._node_types |= 1 << tree.XML_PI_NODE # <<<<<<<<<<<<<< @@ -75938,7 +76269,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_PI_NODE)); - /* "lxml/etree.pyx":2699 + /* "lxml/etree.pyx":2710 * if tag is Comment: * self._node_types |= 1 << tree.XML_COMMENT_NODE * elif tag is ProcessingInstruction: # <<<<<<<<<<<<<< @@ -75948,21 +76279,21 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2701 + /* "lxml/etree.pyx":2712 * elif tag is ProcessingInstruction: * self._node_types |= 1 << tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE * elif tag is Element: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2701, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Entity); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_v_tag == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2702 + /* "lxml/etree.pyx":2713 * self._node_types |= 1 << tree.XML_PI_NODE * elif tag is Entity: * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE # <<<<<<<<<<<<<< @@ -75971,7 +76302,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ENTITY_REF_NODE)); - /* "lxml/etree.pyx":2701 + /* "lxml/etree.pyx":2712 * elif tag is ProcessingInstruction: * self._node_types |= 1 << tree.XML_PI_NODE * elif tag is Entity: # <<<<<<<<<<<<<< @@ -75981,21 +76312,21 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2703 + /* "lxml/etree.pyx":2714 * elif tag is Entity: * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2703, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_Element); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = (__pyx_v_tag == __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2704 + /* "lxml/etree.pyx":2715 * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE * elif tag is Element: * self._node_types |= 1 << tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< @@ -76004,7 +76335,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ELEMENT_NODE)); - /* "lxml/etree.pyx":2703 + /* "lxml/etree.pyx":2714 * elif tag is Entity: * self._node_types |= 1 << tree.XML_ENTITY_REF_NODE * elif tag is Element: # <<<<<<<<<<<<<< @@ -76014,7 +76345,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2705 + /* "lxml/etree.pyx":2716 * elif tag is Element: * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): # <<<<<<<<<<<<<< @@ -76024,7 +76355,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __pyx_t_2 = (_isString(__pyx_v_tag) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2706 + /* "lxml/etree.pyx":2717 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): * if tag in seen: # <<<<<<<<<<<<<< @@ -76033,13 +76364,13 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ if (unlikely(__pyx_v_seen == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 2706, __pyx_L1_error) + __PYX_ERR(0, 2717, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_v_tag, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2706, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_v_tag, __pyx_v_seen, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2717, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2707 + /* "lxml/etree.pyx":2718 * elif python._isString(tag): * if tag in seen: * return # <<<<<<<<<<<<<< @@ -76050,7 +76381,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/etree.pyx":2706 + /* "lxml/etree.pyx":2717 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): * if tag in seen: # <<<<<<<<<<<<<< @@ -76059,7 +76390,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ } - /* "lxml/etree.pyx":2708 + /* "lxml/etree.pyx":2719 * if tag in seen: * return * seen.add(tag) # <<<<<<<<<<<<<< @@ -76068,11 +76399,11 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ if (unlikely(__pyx_v_seen == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "add"); - __PYX_ERR(0, 2708, __pyx_L1_error) + __PYX_ERR(0, 2719, __pyx_L1_error) } - __pyx_t_4 = PySet_Add(__pyx_v_seen, __pyx_v_tag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2708, __pyx_L1_error) + __pyx_t_4 = PySet_Add(__pyx_v_seen, __pyx_v_tag); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2719, __pyx_L1_error) - /* "lxml/etree.pyx":2709 + /* "lxml/etree.pyx":2720 * return * seen.add(tag) * if tag in ('*', '{*}*'): # <<<<<<<<<<<<<< @@ -76081,20 +76412,20 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __Pyx_INCREF(__pyx_v_tag); __pyx_t_1 = __pyx_v_tag; - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2709, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__40, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2720, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_3 = __pyx_t_2; goto __pyx_L6_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__41, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2709, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__41, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2720, __pyx_L1_error) __pyx_t_3 = __pyx_t_2; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2710 + /* "lxml/etree.pyx":2721 * seen.add(tag) * if tag in ('*', '{*}*'): * self._node_types |= 1 << tree.XML_ELEMENT_NODE # <<<<<<<<<<<<<< @@ -76103,7 +76434,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ __pyx_v_self->_node_types = (__pyx_v_self->_node_types | (1 << XML_ELEMENT_NODE)); - /* "lxml/etree.pyx":2709 + /* "lxml/etree.pyx":2720 * return * seen.add(tag) * if tag in ('*', '{*}*'): # <<<<<<<<<<<<<< @@ -76113,7 +76444,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L5; } - /* "lxml/etree.pyx":2712 + /* "lxml/etree.pyx":2723 * self._node_types |= 1 << tree.XML_ELEMENT_NODE * else: * href, name = _getNsTag(tag) # <<<<<<<<<<<<<< @@ -76121,7 +76452,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx * name = None */ /*else*/ { - __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2712, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__getNsTag(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(__pyx_t_1 != Py_None)) { PyObject* sequence = __pyx_t_1; @@ -76129,7 +76460,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2712, __pyx_L1_error) + __PYX_ERR(0, 2723, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); @@ -76137,31 +76468,31 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2712, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2712, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2723, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2712, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2723, __pyx_L1_error) } __pyx_v_href = __pyx_t_5; __pyx_t_5 = 0; __pyx_v_name = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/etree.pyx":2713 + /* "lxml/etree.pyx":2724 * else: * href, name = _getNsTag(tag) * if name == b'*': # <<<<<<<<<<<<<< * name = None * if href is None: */ - __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_name, __pyx_kp_b__40, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2713, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyBytes_Equals(__pyx_v_name, __pyx_kp_b__40, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2724, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":2714 + /* "lxml/etree.pyx":2725 * href, name = _getNsTag(tag) * if name == b'*': * name = None # <<<<<<<<<<<<<< @@ -76171,7 +76502,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_name, Py_None); - /* "lxml/etree.pyx":2713 + /* "lxml/etree.pyx":2724 * else: * href, name = _getNsTag(tag) * if name == b'*': # <<<<<<<<<<<<<< @@ -76180,7 +76511,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ } - /* "lxml/etree.pyx":2715 + /* "lxml/etree.pyx":2726 * if name == b'*': * name = None * if href is None: # <<<<<<<<<<<<<< @@ -76191,7 +76522,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2716 + /* "lxml/etree.pyx":2727 * name = None * if href is None: * href = b'' # no namespace # <<<<<<<<<<<<<< @@ -76201,7 +76532,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_INCREF(__pyx_kp_b__11); __Pyx_DECREF_SET(__pyx_v_href, __pyx_kp_b__11); - /* "lxml/etree.pyx":2715 + /* "lxml/etree.pyx":2726 * if name == b'*': * name = None * if href is None: # <<<<<<<<<<<<<< @@ -76211,17 +76542,17 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L9; } - /* "lxml/etree.pyx":2717 + /* "lxml/etree.pyx":2728 * if href is None: * href = b'' # no namespace * elif href == b'*': # <<<<<<<<<<<<<< * href = None # wildcard: any namespace, including none * self._py_tags.append((href, name)) */ - __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_href, __pyx_kp_b__40, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2717, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyBytes_Equals(__pyx_v_href, __pyx_kp_b__40, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2728, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/etree.pyx":2718 + /* "lxml/etree.pyx":2729 * href = b'' # no namespace * elif href == b'*': * href = None # wildcard: any namespace, including none # <<<<<<<<<<<<<< @@ -76231,7 +76562,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_href, Py_None); - /* "lxml/etree.pyx":2717 + /* "lxml/etree.pyx":2728 * if href is None: * href = b'' # no namespace * elif href == b'*': # <<<<<<<<<<<<<< @@ -76241,7 +76572,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx } __pyx_L9:; - /* "lxml/etree.pyx":2719 + /* "lxml/etree.pyx":2730 * elif href == b'*': * href = None # wildcard: any namespace, including none * self._py_tags.append((href, name)) # <<<<<<<<<<<<<< @@ -76250,9 +76581,9 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx */ if (unlikely(__pyx_v_self->_py_tags == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 2719, __pyx_L1_error) + __PYX_ERR(0, 2730, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2719, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_href); __Pyx_GIVEREF(__pyx_v_href); @@ -76260,12 +76591,12 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_name); - __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_py_tags, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2719, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyList_Append(__pyx_v_self->_py_tags, __pyx_t_1); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2730, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L5:; - /* "lxml/etree.pyx":2705 + /* "lxml/etree.pyx":2716 * elif tag is Element: * self._node_types |= 1 << tree.XML_ELEMENT_NODE * elif python._isString(tag): # <<<<<<<<<<<<<< @@ -76275,7 +76606,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx goto __pyx_L3; } - /* "lxml/etree.pyx":2722 + /* "lxml/etree.pyx":2733 * else: * # support a sequence of tags * for item in tag: # <<<<<<<<<<<<<< @@ -76287,26 +76618,26 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __pyx_t_1 = __pyx_v_tag; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2733, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2722, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2733, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -76316,7 +76647,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2722, __pyx_L1_error) + else __PYX_ERR(0, 2733, __pyx_L1_error) } break; } @@ -76325,18 +76656,18 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2723 + /* "lxml/etree.pyx":2734 * # support a sequence of tags * for item in tag: * self._storeTags(item, seen) # <<<<<<<<<<<<<< * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: */ - __pyx_t_6 = __pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(__pyx_v_self, __pyx_v_item, __pyx_v_seen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2723, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(__pyx_v_self, __pyx_v_item, __pyx_v_seen); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/etree.pyx":2722 + /* "lxml/etree.pyx":2733 * else: * # support a sequence of tags * for item in tag: # <<<<<<<<<<<<<< @@ -76348,7 +76679,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx } __pyx_L3:; - /* "lxml/etree.pyx":2696 + /* "lxml/etree.pyx":2707 * self._storeTags(tags, set()) * * cdef _storeTags(self, tag, set seen): # <<<<<<<<<<<<<< @@ -76374,7 +76705,7 @@ static PyObject *__pyx_f_4lxml_5etree_16_MultiTagMatcher__storeTags(struct __pyx return __pyx_r; } -/* "lxml/etree.pyx":2725 +/* "lxml/etree.pyx":2736 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -76399,7 +76730,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc } } - /* "lxml/etree.pyx":2729 + /* "lxml/etree.pyx":2740 * Look up the tag names in the doc dict to enable string pointer comparisons. * """ * cdef size_t dict_size = tree.xmlDictSize(doc._c_doc.dict) # <<<<<<<<<<<<<< @@ -76408,7 +76739,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ __pyx_v_dict_size = xmlDictSize(__pyx_v_doc->_c_doc->dict); - /* "lxml/etree.pyx":2730 + /* "lxml/etree.pyx":2741 * """ * cdef size_t dict_size = tree.xmlDictSize(doc._c_doc.dict) * if doc is self._cached_doc and dict_size == self._cached_size: # <<<<<<<<<<<<<< @@ -76427,7 +76758,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/etree.pyx":2732 + /* "lxml/etree.pyx":2743 * if doc is self._cached_doc and dict_size == self._cached_size: * # doc and dict didn't change => names already cached * return 0 # <<<<<<<<<<<<<< @@ -76437,7 +76768,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2730 + /* "lxml/etree.pyx":2741 * """ * cdef size_t dict_size = tree.xmlDictSize(doc._c_doc.dict) * if doc is self._cached_doc and dict_size == self._cached_size: # <<<<<<<<<<<<<< @@ -76446,7 +76777,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2733 + /* "lxml/etree.pyx":2744 * # doc and dict didn't change => names already cached * return 0 * self._tag_count = 0 # <<<<<<<<<<<<<< @@ -76455,7 +76786,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ __pyx_v_self->_tag_count = 0; - /* "lxml/etree.pyx":2734 + /* "lxml/etree.pyx":2745 * return 0 * self._tag_count = 0 * if not self._py_tags: # <<<<<<<<<<<<<< @@ -76466,7 +76797,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2735 + /* "lxml/etree.pyx":2746 * self._tag_count = 0 * if not self._py_tags: * self._cached_doc = doc # <<<<<<<<<<<<<< @@ -76479,7 +76810,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2736 + /* "lxml/etree.pyx":2747 * if not self._py_tags: * self._cached_doc = doc * self._cached_size = dict_size # <<<<<<<<<<<<<< @@ -76488,7 +76819,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ __pyx_v_self->_cached_size = __pyx_v_dict_size; - /* "lxml/etree.pyx":2737 + /* "lxml/etree.pyx":2748 * self._cached_doc = doc * self._cached_size = dict_size * return 0 # <<<<<<<<<<<<<< @@ -76498,7 +76829,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2734 + /* "lxml/etree.pyx":2745 * return 0 * self._tag_count = 0 * if not self._py_tags: # <<<<<<<<<<<<<< @@ -76507,7 +76838,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2738 + /* "lxml/etree.pyx":2749 * self._cached_size = dict_size * return 0 * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -76517,7 +76848,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_t_3 = ((!(__pyx_v_self->_cached_tags != 0)) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2739 + /* "lxml/etree.pyx":2750 * return 0 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) # <<<<<<<<<<<<<< @@ -76528,13 +76859,13 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2739, __pyx_L1_error) + __PYX_ERR(0, 2750, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2739, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2750, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->_cached_tags = ((struct __pyx_t_4lxml_5etree_qname *)lxml_malloc(__pyx_t_5, (sizeof(struct __pyx_t_4lxml_5etree_qname)))); - /* "lxml/etree.pyx":2740 + /* "lxml/etree.pyx":2751 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -76544,7 +76875,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_t_3 = ((!(__pyx_v_self->_cached_tags != 0)) != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2741 + /* "lxml/etree.pyx":2752 * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: * self._cached_doc = None # <<<<<<<<<<<<<< @@ -76557,16 +76888,16 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = ((struct LxmlDocument *)Py_None); - /* "lxml/etree.pyx":2742 + /* "lxml/etree.pyx":2753 * if not self._cached_tags: * self._cached_doc = None * raise MemoryError() # <<<<<<<<<<<<<< * self._tag_count = _mapTagsToQnameMatchArray( * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) */ - PyErr_NoMemory(); __PYX_ERR(0, 2742, __pyx_L1_error) + PyErr_NoMemory(); __PYX_ERR(0, 2753, __pyx_L1_error) - /* "lxml/etree.pyx":2740 + /* "lxml/etree.pyx":2751 * if not self._cached_tags: * self._cached_tags = python.lxml_malloc(len(self._py_tags), sizeof(qname)) * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -76575,7 +76906,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2738 + /* "lxml/etree.pyx":2749 * self._cached_size = dict_size * return 0 * if not self._cached_tags: # <<<<<<<<<<<<<< @@ -76584,7 +76915,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ } - /* "lxml/etree.pyx":2744 + /* "lxml/etree.pyx":2755 * raise MemoryError() * self._tag_count = _mapTagsToQnameMatchArray( * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) # <<<<<<<<<<<<<< @@ -76594,18 +76925,18 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_t_4 = __pyx_v_self->_py_tags; __Pyx_INCREF(__pyx_t_4); - /* "lxml/etree.pyx":2743 + /* "lxml/etree.pyx":2754 * self._cached_doc = None * raise MemoryError() * self._tag_count = _mapTagsToQnameMatchArray( # <<<<<<<<<<<<<< * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) * self._cached_doc = doc */ - __pyx_t_5 = __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(__pyx_v_doc->_c_doc, ((PyObject*)__pyx_t_4), __pyx_v_self->_cached_tags, __pyx_v_force_into_dict); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 2743, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__mapTagsToQnameMatchArray(__pyx_v_doc->_c_doc, ((PyObject*)__pyx_t_4), __pyx_v_self->_cached_tags, __pyx_v_force_into_dict); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1L))) __PYX_ERR(0, 2754, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_self->_tag_count = ((size_t)__pyx_t_5); - /* "lxml/etree.pyx":2745 + /* "lxml/etree.pyx":2756 * self._tag_count = _mapTagsToQnameMatchArray( * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) * self._cached_doc = doc # <<<<<<<<<<<<<< @@ -76618,7 +76949,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __Pyx_DECREF(((PyObject *)__pyx_v_self->_cached_doc)); __pyx_v_self->_cached_doc = __pyx_v_doc; - /* "lxml/etree.pyx":2746 + /* "lxml/etree.pyx":2757 * doc._c_doc, self._py_tags, self._cached_tags, force_into_dict) * self._cached_doc = doc * self._cached_size = dict_size # <<<<<<<<<<<<<< @@ -76627,7 +76958,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc */ __pyx_v_self->_cached_size = __pyx_v_dict_size; - /* "lxml/etree.pyx":2747 + /* "lxml/etree.pyx":2758 * self._cached_doc = doc * self._cached_size = dict_size * return 0 # <<<<<<<<<<<<<< @@ -76637,7 +76968,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2725 + /* "lxml/etree.pyx":2736 * self._storeTags(item, seen) * * cdef inline int cacheTags(self, _Document doc, bint force_into_dict=False) except -1: # <<<<<<<<<<<<<< @@ -76655,7 +76986,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(struc return __pyx_r; } -/* "lxml/etree.pyx":2749 +/* "lxml/etree.pyx":2760 * return 0 * * cdef inline bint matches(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -76673,7 +77004,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct struct __pyx_t_4lxml_5etree_qname *__pyx_t_4; __Pyx_RefNannySetupContext("matches", 0); - /* "lxml/etree.pyx":2751 + /* "lxml/etree.pyx":2762 * cdef inline bint matches(self, xmlNode* c_node): * cdef qname* c_qname * if self._node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -76683,7 +77014,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_t_1 = ((__pyx_v_self->_node_types & (1 << __pyx_v_c_node->type)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2752 + /* "lxml/etree.pyx":2763 * cdef qname* c_qname * if self._node_types & (1 << c_node.type): * return True # <<<<<<<<<<<<<< @@ -76693,7 +77024,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2751 + /* "lxml/etree.pyx":2762 * cdef inline bint matches(self, xmlNode* c_node): * cdef qname* c_qname * if self._node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -76702,7 +77033,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct */ } - /* "lxml/etree.pyx":2753 + /* "lxml/etree.pyx":2764 * if self._node_types & (1 << c_node.type): * return True * elif c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -76712,7 +77043,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2754 + /* "lxml/etree.pyx":2765 * return True * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< @@ -76724,7 +77055,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_t_2 = __pyx_t_4; __pyx_v_c_qname = __pyx_t_2; - /* "lxml/etree.pyx":2755 + /* "lxml/etree.pyx":2766 * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): # <<<<<<<<<<<<<< @@ -76734,7 +77065,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_t_1 = (__pyx_f_4lxml_5etree__tagMatchesExactly(__pyx_v_c_node, __pyx_v_c_qname) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2756 + /* "lxml/etree.pyx":2767 * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): * return True # <<<<<<<<<<<<<< @@ -76744,7 +77075,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2755 + /* "lxml/etree.pyx":2766 * elif c_node.type == tree.XML_ELEMENT_NODE: * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_node, c_qname): # <<<<<<<<<<<<<< @@ -76754,7 +77085,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct } } - /* "lxml/etree.pyx":2753 + /* "lxml/etree.pyx":2764 * if self._node_types & (1 << c_node.type): * return True * elif c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -76763,7 +77094,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct */ } - /* "lxml/etree.pyx":2757 + /* "lxml/etree.pyx":2768 * if _tagMatchesExactly(c_node, c_qname): * return True * return False # <<<<<<<<<<<<<< @@ -76773,7 +77104,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2749 + /* "lxml/etree.pyx":2760 * return 0 * * cdef inline bint matches(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -76787,7 +77118,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(struct return __pyx_r; } -/* "lxml/etree.pyx":2759 +/* "lxml/etree.pyx":2770 * return False * * cdef inline bint matchesNsTag(self, const_xmlChar* c_href, # <<<<<<<<<<<<<< @@ -76805,7 +77136,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st struct __pyx_t_4lxml_5etree_qname *__pyx_t_4; __Pyx_RefNannySetupContext("matchesNsTag", 0); - /* "lxml/etree.pyx":2762 + /* "lxml/etree.pyx":2773 * const_xmlChar* c_name): * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): # <<<<<<<<<<<<<< @@ -76815,7 +77146,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_t_1 = ((__pyx_v_self->_node_types & (1 << XML_ELEMENT_NODE)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2763 + /* "lxml/etree.pyx":2774 * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): * return True # <<<<<<<<<<<<<< @@ -76825,7 +77156,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2762 + /* "lxml/etree.pyx":2773 * const_xmlChar* c_name): * cdef qname* c_qname * if self._node_types & (1 << tree.XML_ELEMENT_NODE): # <<<<<<<<<<<<<< @@ -76834,7 +77165,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st */ } - /* "lxml/etree.pyx":2764 + /* "lxml/etree.pyx":2775 * if self._node_types & (1 << tree.XML_ELEMENT_NODE): * return True * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< @@ -76846,7 +77177,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_t_2 = __pyx_t_4; __pyx_v_c_qname = __pyx_t_2; - /* "lxml/etree.pyx":2765 + /* "lxml/etree.pyx":2776 * return True * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): # <<<<<<<<<<<<<< @@ -76856,7 +77187,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_t_1 = (__pyx_f_4lxml_5etree__nsTagMatchesExactly(__pyx_v_c_href, __pyx_v_c_name, __pyx_v_c_qname) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2766 + /* "lxml/etree.pyx":2777 * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): * return True # <<<<<<<<<<<<<< @@ -76866,7 +77197,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2765 + /* "lxml/etree.pyx":2776 * return True * for c_qname in self._cached_tags[:self._tag_count]: * if _nsTagMatchesExactly(c_href, c_name, c_qname): # <<<<<<<<<<<<<< @@ -76876,7 +77207,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st } } - /* "lxml/etree.pyx":2767 + /* "lxml/etree.pyx":2778 * if _nsTagMatchesExactly(c_href, c_name, c_qname): * return True * return False # <<<<<<<<<<<<<< @@ -76886,7 +77217,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2759 + /* "lxml/etree.pyx":2770 * return False * * cdef inline bint matchesNsTag(self, const_xmlChar* c_href, # <<<<<<<<<<<<<< @@ -76900,7 +77231,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag(st return __pyx_r; } -/* "lxml/etree.pyx":2769 +/* "lxml/etree.pyx":2780 * return False * * cdef inline bint matchesAttribute(self, xmlAttr* c_attr): # <<<<<<<<<<<<<< @@ -76918,7 +77249,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut int __pyx_t_4; __Pyx_RefNannySetupContext("matchesAttribute", 0); - /* "lxml/etree.pyx":2774 + /* "lxml/etree.pyx":2785 * """ * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: # <<<<<<<<<<<<<< @@ -76930,7 +77261,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut __pyx_t_1 = __pyx_t_3; __pyx_v_c_qname = __pyx_t_1; - /* "lxml/etree.pyx":2775 + /* "lxml/etree.pyx":2786 * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): # <<<<<<<<<<<<<< @@ -76940,7 +77271,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut __pyx_t_4 = (__pyx_f_4lxml_5etree__tagMatchesExactly(((xmlNode *)__pyx_v_c_attr), __pyx_v_c_qname) != 0); if (__pyx_t_4) { - /* "lxml/etree.pyx":2776 + /* "lxml/etree.pyx":2787 * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): * return True # <<<<<<<<<<<<<< @@ -76950,7 +77281,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut __pyx_r = 1; goto __pyx_L0; - /* "lxml/etree.pyx":2775 + /* "lxml/etree.pyx":2786 * cdef qname* c_qname * for c_qname in self._cached_tags[:self._tag_count]: * if _tagMatchesExactly(c_attr, c_qname): # <<<<<<<<<<<<<< @@ -76960,7 +77291,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut } } - /* "lxml/etree.pyx":2777 + /* "lxml/etree.pyx":2788 * if _tagMatchesExactly(c_attr, c_qname): * return True * return False # <<<<<<<<<<<<<< @@ -76970,7 +77301,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2769 + /* "lxml/etree.pyx":2780 * return False * * cdef inline bint matchesAttribute(self, xmlAttr* c_attr): # <<<<<<<<<<<<<< @@ -76984,7 +77315,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribut return __pyx_r; } -/* "lxml/etree.pyx":2785 +/* "lxml/etree.pyx":2796 * * @cython.final * cdef _initTagMatcher(self, tags): # <<<<<<<<<<<<<< @@ -76999,19 +77330,19 @@ static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(st PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_initTagMatcher", 0); - /* "lxml/etree.pyx":2786 + /* "lxml/etree.pyx":2797 * @cython.final * cdef _initTagMatcher(self, tags): * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2797, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_tags); __Pyx_GIVEREF(__pyx_v_tags); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_tags); - __pyx_t_2 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2786, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_1, NULL)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2797, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_2)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); @@ -77020,7 +77351,7 @@ static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(st __pyx_v_self->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2785 + /* "lxml/etree.pyx":2796 * * @cython.final * cdef _initTagMatcher(self, tags): # <<<<<<<<<<<<<< @@ -77042,7 +77373,7 @@ static PyObject *__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(st return __pyx_r; } -/* "lxml/etree.pyx":2788 +/* "lxml/etree.pyx":2799 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -77068,7 +77399,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct _ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2789 + /* "lxml/etree.pyx":2800 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -77080,7 +77411,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct _ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2788 + /* "lxml/etree.pyx":2799 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tags) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -77095,7 +77426,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator___iter__(struct _ return __pyx_r; } -/* "lxml/etree.pyx":2792 +/* "lxml/etree.pyx":2803 * * @cython.final * cdef int _storeNext(self, _Element node) except -1: # <<<<<<<<<<<<<< @@ -77115,7 +77446,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("_storeNext", 0); - /* "lxml/etree.pyx":2793 + /* "lxml/etree.pyx":2804 * @cython.final * cdef int _storeNext(self, _Element node) except -1: * self._matcher.cacheTags(node._doc) # <<<<<<<<<<<<<< @@ -77124,10 +77455,10 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ */ __pyx_t_1 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_1), NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2793, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_1), NULL); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 2804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2794 + /* "lxml/etree.pyx":2805 * cdef int _storeNext(self, _Element node) except -1: * self._matcher.cacheTags(node._doc) * c_node = self._next_element(node._c_node) # <<<<<<<<<<<<<< @@ -77136,7 +77467,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ */ __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_node->_c_node); - /* "lxml/etree.pyx":2795 + /* "lxml/etree.pyx":2806 * self._matcher.cacheTags(node._doc) * c_node = self._next_element(node._c_node) * while c_node is not NULL and not self._matcher.matches(c_node): # <<<<<<<<<<<<<< @@ -77155,7 +77486,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __pyx_L5_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2796 + /* "lxml/etree.pyx":2807 * c_node = self._next_element(node._c_node) * while c_node is not NULL and not self._matcher.matches(c_node): * c_node = self._next_element(c_node) # <<<<<<<<<<<<<< @@ -77165,7 +77496,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __pyx_v_c_node = __pyx_v_self->_next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2798 + /* "lxml/etree.pyx":2809 * c_node = self._next_element(c_node) * # store Python ref to next node to make sure it's kept alive * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None # <<<<<<<<<<<<<< @@ -77175,7 +77506,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ if (((__pyx_v_c_node != NULL) != 0)) { __pyx_t_5 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2798, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2809, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_6; @@ -77190,7 +77521,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __pyx_v_self->_node = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2799 + /* "lxml/etree.pyx":2810 * # store Python ref to next node to make sure it's kept alive * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None * return 0 # <<<<<<<<<<<<<< @@ -77200,7 +77531,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ __pyx_r = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2792 + /* "lxml/etree.pyx":2803 * * @cython.final * cdef int _storeNext(self, _Element node) except -1: # <<<<<<<<<<<<<< @@ -77220,7 +77551,7 @@ static int __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(struct __pyx_ return __pyx_r; } -/* "lxml/etree.pyx":2801 +/* "lxml/etree.pyx":2812 * return 0 * * def __next__(self): # <<<<<<<<<<<<<< @@ -77251,7 +77582,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct int __pyx_t_4; __Pyx_RefNannySetupContext("__next__", 0); - /* "lxml/etree.pyx":2802 + /* "lxml/etree.pyx":2813 * * def __next__(self): * cdef _Element current_node = self._node # <<<<<<<<<<<<<< @@ -77263,7 +77594,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2803 + /* "lxml/etree.pyx":2814 * def __next__(self): * cdef _Element current_node = self._node * if current_node is None: # <<<<<<<<<<<<<< @@ -77274,7 +77605,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2804 + /* "lxml/etree.pyx":2815 * cdef _Element current_node = self._node * if current_node is None: * raise StopIteration # <<<<<<<<<<<<<< @@ -77282,9 +77613,9 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct * return current_node */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2804, __pyx_L1_error) + __PYX_ERR(0, 2815, __pyx_L1_error) - /* "lxml/etree.pyx":2803 + /* "lxml/etree.pyx":2814 * def __next__(self): * cdef _Element current_node = self._node * if current_node is None: # <<<<<<<<<<<<<< @@ -77293,16 +77624,16 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct */ } - /* "lxml/etree.pyx":2805 + /* "lxml/etree.pyx":2816 * if current_node is None: * raise StopIteration * self._storeNext(current_node) # <<<<<<<<<<<<<< * return current_node * */ - __pyx_t_4 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(__pyx_v_self, __pyx_v_current_node); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2805, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(__pyx_v_self, __pyx_v_current_node); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 2816, __pyx_L1_error) - /* "lxml/etree.pyx":2806 + /* "lxml/etree.pyx":2817 * raise StopIteration * self._storeNext(current_node) * return current_node # <<<<<<<<<<<<<< @@ -77314,7 +77645,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2801 + /* "lxml/etree.pyx":2812 * return 0 * * def __next__(self): # <<<<<<<<<<<<<< @@ -77334,7 +77665,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ElementMatchIterator_2__next__(struct return __pyx_r; } -/* "lxml/etree.pyx":2812 +/* "lxml/etree.pyx":2823 * Iterates over the children of an element. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): # <<<<<<<<<<<<<< @@ -77384,7 +77715,7 @@ static int __pyx_pw_4lxml_5etree_20ElementChildIterator_1__cinit__(PyObject *__p if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2812, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2823, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -77398,20 +77729,20 @@ static int __pyx_pw_4lxml_5etree_20ElementChildIterator_1__cinit__(PyObject *__p __pyx_v_node = ((struct LxmlElement *)values[0]); __pyx_v_tag = values[1]; if (values[2]) { - __pyx_v_reversed = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reversed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2812, __pyx_L3_error) + __pyx_v_reversed = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_reversed == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2823, __pyx_L3_error) } else { __pyx_v_reversed = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2812, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2823, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ElementChildIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2812, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2823, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(((struct __pyx_obj_4lxml_5etree_ElementChildIterator *)__pyx_v_self), __pyx_v_node, __pyx_v_tag, __pyx_v_reversed); /* function exit code */ @@ -77435,27 +77766,27 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2814 + /* "lxml/etree.pyx":2825 * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): * cdef xmlNode* c_node * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * if reversed: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2814, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2825, __pyx_L1_error) - /* "lxml/etree.pyx":2815 + /* "lxml/etree.pyx":2826 * cdef xmlNode* c_node * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * if reversed: * c_node = _findChildBackwards(node._c_node, 0) */ - __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2816 + /* "lxml/etree.pyx":2827 * _assertValidNode(node) * self._initTagMatcher(tag) * if reversed: # <<<<<<<<<<<<<< @@ -77465,7 +77796,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __pyx_t_3 = (__pyx_v_reversed != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2817 + /* "lxml/etree.pyx":2828 * self._initTagMatcher(tag) * if reversed: * c_node = _findChildBackwards(node._c_node, 0) # <<<<<<<<<<<<<< @@ -77474,7 +77805,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o */ __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildBackwards(__pyx_v_node->_c_node, 0); - /* "lxml/etree.pyx":2818 + /* "lxml/etree.pyx":2829 * if reversed: * c_node = _findChildBackwards(node._c_node, 0) * self._next_element = _previousElement # <<<<<<<<<<<<<< @@ -77483,7 +77814,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o */ __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__previousElement; - /* "lxml/etree.pyx":2816 + /* "lxml/etree.pyx":2827 * _assertValidNode(node) * self._initTagMatcher(tag) * if reversed: # <<<<<<<<<<<<<< @@ -77493,7 +77824,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o goto __pyx_L3; } - /* "lxml/etree.pyx":2820 + /* "lxml/etree.pyx":2831 * self._next_element = _previousElement * else: * c_node = _findChildForwards(node._c_node, 0) # <<<<<<<<<<<<<< @@ -77503,7 +77834,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o /*else*/ { __pyx_v_c_node = __pyx_f_4lxml_5etree__findChildForwards(__pyx_v_node->_c_node, 0); - /* "lxml/etree.pyx":2821 + /* "lxml/etree.pyx":2832 * else: * c_node = _findChildForwards(node._c_node, 0) * self._next_element = _nextElement # <<<<<<<<<<<<<< @@ -77514,7 +77845,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o } __pyx_L3:; - /* "lxml/etree.pyx":2822 + /* "lxml/etree.pyx":2833 * c_node = _findChildForwards(node._c_node, 0) * self._next_element = _nextElement * self._matcher.cacheTags(node._doc) # <<<<<<<<<<<<<< @@ -77523,10 +77854,10 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o */ __pyx_t_2 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->__pyx_base._matcher, ((struct LxmlDocument *)__pyx_t_2), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2822, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->__pyx_base._matcher, ((struct LxmlDocument *)__pyx_t_2), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2833, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2823 + /* "lxml/etree.pyx":2834 * self._next_element = _nextElement * self._matcher.cacheTags(node._doc) * while c_node is not NULL and not self._matcher.matches(c_node): # <<<<<<<<<<<<<< @@ -77545,7 +77876,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __pyx_L6_bool_binop_done:; if (!__pyx_t_3) break; - /* "lxml/etree.pyx":2824 + /* "lxml/etree.pyx":2835 * self._matcher.cacheTags(node._doc) * while c_node is not NULL and not self._matcher.matches(c_node): * c_node = self._next_element(c_node) # <<<<<<<<<<<<<< @@ -77555,7 +77886,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __pyx_v_c_node = __pyx_v_self->__pyx_base._next_element(__pyx_v_c_node); } - /* "lxml/etree.pyx":2826 + /* "lxml/etree.pyx":2837 * c_node = self._next_element(c_node) * # store Python ref to next node to make sure it's kept alive * self._node = _elementFactory(node._doc, c_node) if c_node is not NULL else None # <<<<<<<<<<<<<< @@ -77565,7 +77896,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o if (((__pyx_v_c_node != NULL) != 0)) { __pyx_t_5 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_5); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2826, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_5), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_6; @@ -77580,7 +77911,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o __pyx_v_self->__pyx_base._node = ((struct LxmlElement *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2812 + /* "lxml/etree.pyx":2823 * Iterates over the children of an element. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint reversed=False): # <<<<<<<<<<<<<< @@ -77602,7 +77933,7 @@ static int __pyx_pf_4lxml_5etree_20ElementChildIterator___cinit__(struct __pyx_o return __pyx_r; } -/* "lxml/etree.pyx":2834 +/* "lxml/etree.pyx":2845 * You can pass the boolean keyword ``preceding`` to specify the direction. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): # <<<<<<<<<<<<<< @@ -77652,7 +77983,7 @@ static int __pyx_pw_4lxml_5etree_16SiblingsIterator_1__cinit__(PyObject *__pyx_v if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2834, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2845, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -77666,20 +77997,20 @@ static int __pyx_pw_4lxml_5etree_16SiblingsIterator_1__cinit__(PyObject *__pyx_v __pyx_v_node = ((struct LxmlElement *)values[0]); __pyx_v_tag = values[1]; if (values[2]) { - __pyx_v_preceding = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_preceding == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2834, __pyx_L3_error) + __pyx_v_preceding = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_preceding == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2845, __pyx_L3_error) } else { __pyx_v_preceding = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2834, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2845, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.SiblingsIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2834, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2845, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(((struct __pyx_obj_4lxml_5etree_SiblingsIterator *)__pyx_v_self), __pyx_v_node, __pyx_v_tag, __pyx_v_preceding); /* function exit code */ @@ -77699,27 +78030,27 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 int __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2835 + /* "lxml/etree.pyx":2846 * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * if preceding: */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2835, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2846, __pyx_L1_error) - /* "lxml/etree.pyx":2836 + /* "lxml/etree.pyx":2847 * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * if preceding: * self._next_element = _previousElement */ - __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2836, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2837 + /* "lxml/etree.pyx":2848 * _assertValidNode(node) * self._initTagMatcher(tag) * if preceding: # <<<<<<<<<<<<<< @@ -77729,7 +78060,7 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 __pyx_t_3 = (__pyx_v_preceding != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2838 + /* "lxml/etree.pyx":2849 * self._initTagMatcher(tag) * if preceding: * self._next_element = _previousElement # <<<<<<<<<<<<<< @@ -77738,7 +78069,7 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 */ __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__previousElement; - /* "lxml/etree.pyx":2837 + /* "lxml/etree.pyx":2848 * _assertValidNode(node) * self._initTagMatcher(tag) * if preceding: # <<<<<<<<<<<<<< @@ -77748,7 +78079,7 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 goto __pyx_L3; } - /* "lxml/etree.pyx":2840 + /* "lxml/etree.pyx":2851 * self._next_element = _previousElement * else: * self._next_element = _nextElement # <<<<<<<<<<<<<< @@ -77760,16 +78091,16 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 } __pyx_L3:; - /* "lxml/etree.pyx":2841 + /* "lxml/etree.pyx":2852 * else: * self._next_element = _nextElement * self._storeNext(node) # <<<<<<<<<<<<<< * * cdef class AncestorsIterator(_ElementMatchIterator): */ - __pyx_t_1 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2841, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2852, __pyx_L1_error) - /* "lxml/etree.pyx":2834 + /* "lxml/etree.pyx":2845 * You can pass the boolean keyword ``preceding`` to specify the direction. * """ * def __cinit__(self, _Element node not None, tag=None, *, bint preceding=False): # <<<<<<<<<<<<<< @@ -77789,7 +78120,7 @@ static int __pyx_pf_4lxml_5etree_16SiblingsIterator___cinit__(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":2847 +/* "lxml/etree.pyx":2858 * Iterates over the ancestors of an element (from parent to parent). * """ * def __cinit__(self, _Element node not None, tag=None): # <<<<<<<<<<<<<< @@ -77833,7 +78164,7 @@ static int __pyx_pw_4lxml_5etree_17AncestorsIterator_1__cinit__(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2847, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2858, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -77849,13 +78180,13 @@ static int __pyx_pw_4lxml_5etree_17AncestorsIterator_1__cinit__(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2847, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2858, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.AncestorsIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2847, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2858, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(((struct __pyx_obj_4lxml_5etree_AncestorsIterator *)__pyx_v_self), __pyx_v_node, __pyx_v_tag); /* function exit code */ @@ -77874,27 +78205,27 @@ static int __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(struct __pyx_obj_ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2848 + /* "lxml/etree.pyx":2859 * """ * def __cinit__(self, _Element node not None, tag=None): * _assertValidNode(node) # <<<<<<<<<<<<<< * self._initTagMatcher(tag) * self._next_element = _parentElement */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2848, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2859, __pyx_L1_error) - /* "lxml/etree.pyx":2849 + /* "lxml/etree.pyx":2860 * def __cinit__(self, _Element node not None, tag=None): * _assertValidNode(node) * self._initTagMatcher(tag) # <<<<<<<<<<<<<< * self._next_element = _parentElement * self._storeNext(node) */ - __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2849, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":2850 + /* "lxml/etree.pyx":2861 * _assertValidNode(node) * self._initTagMatcher(tag) * self._next_element = _parentElement # <<<<<<<<<<<<<< @@ -77903,16 +78234,16 @@ static int __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(struct __pyx_obj_ */ __pyx_v_self->__pyx_base._next_element = __pyx_f_4lxml_5etree__parentElement; - /* "lxml/etree.pyx":2851 + /* "lxml/etree.pyx":2862 * self._initTagMatcher(tag) * self._next_element = _parentElement * self._storeNext(node) # <<<<<<<<<<<<<< * * cdef class ElementDepthFirstIterator: */ - __pyx_t_1 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2851, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext(((struct __pyx_obj_4lxml_5etree__ElementMatchIterator *)__pyx_v_self), __pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2862, __pyx_L1_error) - /* "lxml/etree.pyx":2847 + /* "lxml/etree.pyx":2858 * Iterates over the ancestors of an element (from parent to parent). * """ * def __cinit__(self, _Element node not None, tag=None): # <<<<<<<<<<<<<< @@ -77932,7 +78263,7 @@ static int __pyx_pf_4lxml_5etree_17AncestorsIterator___cinit__(struct __pyx_obj_ return __pyx_r; } -/* "lxml/etree.pyx":2878 +/* "lxml/etree.pyx":2889 * cdef _Element _top_node * cdef _MultiTagMatcher _matcher * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): # <<<<<<<<<<<<<< @@ -77982,7 +78313,7 @@ static int __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_1__cinit__(PyObject if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2878, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2889, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -77996,20 +78327,20 @@ static int __pyx_pw_4lxml_5etree_25ElementDepthFirstIterator_1__cinit__(PyObject __pyx_v_node = ((struct LxmlElement *)values[0]); __pyx_v_tag = values[1]; if (values[2]) { - __pyx_v_inclusive = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_inclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2878, __pyx_L3_error) + __pyx_v_inclusive = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_inclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2889, __pyx_L3_error) } else { __pyx_v_inclusive = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2878, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2889, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ElementDepthFirstIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2878, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_node), __pyx_ptype_4lxml_5etree__Element, 0, "node", 0))) __PYX_ERR(0, 2889, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(((struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *)__pyx_v_self), __pyx_v_node, __pyx_v_tag, __pyx_v_inclusive); /* function exit code */ @@ -78031,16 +78362,16 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ int __pyx_t_5; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2879 + /* "lxml/etree.pyx":2890 * cdef _MultiTagMatcher _matcher * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): * _assertValidNode(node) # <<<<<<<<<<<<<< * self._top_node = node * self._next_node = node */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2879, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2890, __pyx_L1_error) - /* "lxml/etree.pyx":2880 + /* "lxml/etree.pyx":2891 * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): * _assertValidNode(node) * self._top_node = node # <<<<<<<<<<<<<< @@ -78053,7 +78384,7 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __Pyx_DECREF(((PyObject *)__pyx_v_self->_top_node)); __pyx_v_self->_top_node = __pyx_v_node; - /* "lxml/etree.pyx":2881 + /* "lxml/etree.pyx":2892 * _assertValidNode(node) * self._top_node = node * self._next_node = node # <<<<<<<<<<<<<< @@ -78066,19 +78397,19 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __Pyx_DECREF(((PyObject *)__pyx_v_self->_next_node)); __pyx_v_self->_next_node = __pyx_v_node; - /* "lxml/etree.pyx":2882 + /* "lxml/etree.pyx":2893 * self._top_node = node * self._next_node = node * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) # <<<<<<<<<<<<<< * self._matcher.cacheTags(node._doc) * if not inclusive or not self._matcher.matches(node._c_node): */ - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_tag); - __pyx_t_3 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_2, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2882, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_tp_new_4lxml_5etree__MultiTagMatcher(((PyTypeObject *)__pyx_ptype_4lxml_5etree__MultiTagMatcher), __pyx_t_2, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2893, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_3)); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); @@ -78087,7 +78418,7 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __pyx_v_self->_matcher = ((struct __pyx_obj_4lxml_5etree__MultiTagMatcher *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2883 + /* "lxml/etree.pyx":2894 * self._next_node = node * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) # <<<<<<<<<<<<<< @@ -78096,10 +78427,10 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ */ __pyx_t_3 = ((PyObject *)__pyx_v_node->_doc); __Pyx_INCREF(__pyx_t_3); - __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_3), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2883, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_3), NULL); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2884 + /* "lxml/etree.pyx":2895 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) * if not inclusive or not self._matcher.matches(node._c_node): # <<<<<<<<<<<<<< @@ -78117,18 +78448,18 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ __pyx_L4_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/etree.pyx":2886 + /* "lxml/etree.pyx":2897 * if not inclusive or not self._matcher.matches(node._c_node): * # find start node (this cannot raise StopIteration, self._next_node != None) * next(self) # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_3 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2886, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyIter_Next(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2884 + /* "lxml/etree.pyx":2895 * self._matcher = _MultiTagMatcher.__new__(_MultiTagMatcher, tag) * self._matcher.cacheTags(node._doc) * if not inclusive or not self._matcher.matches(node._c_node): # <<<<<<<<<<<<<< @@ -78137,7 +78468,7 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ */ } - /* "lxml/etree.pyx":2878 + /* "lxml/etree.pyx":2889 * cdef _Element _top_node * cdef _MultiTagMatcher _matcher * def __cinit__(self, _Element node not None, tag=None, *, bint inclusive=True): # <<<<<<<<<<<<<< @@ -78158,7 +78489,7 @@ static int __pyx_pf_4lxml_5etree_25ElementDepthFirstIterator___cinit__(struct __ return __pyx_r; } -/* "lxml/etree.pyx":2888 +/* "lxml/etree.pyx":2899 * next(self) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -78184,7 +78515,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_2__iter__(str __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2889 + /* "lxml/etree.pyx":2900 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -78196,7 +78527,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_2__iter__(str __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2888 + /* "lxml/etree.pyx":2899 * next(self) * * def __iter__(self): # <<<<<<<<<<<<<< @@ -78211,7 +78542,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_2__iter__(str return __pyx_r; } -/* "lxml/etree.pyx":2891 +/* "lxml/etree.pyx":2902 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -78245,7 +78576,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__next__", 0); - /* "lxml/etree.pyx":2893 + /* "lxml/etree.pyx":2904 * def __next__(self): * cdef xmlNode* c_node * cdef _Element current_node = self._next_node # <<<<<<<<<<<<<< @@ -78257,7 +78588,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_v_current_node = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2894 + /* "lxml/etree.pyx":2905 * cdef xmlNode* c_node * cdef _Element current_node = self._next_node * if current_node is None: # <<<<<<<<<<<<<< @@ -78268,7 +78599,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":2895 + /* "lxml/etree.pyx":2906 * cdef _Element current_node = self._next_node * if current_node is None: * raise StopIteration # <<<<<<<<<<<<<< @@ -78276,9 +78607,9 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str * self._matcher.cacheTags(current_node._doc) */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 2895, __pyx_L1_error) + __PYX_ERR(0, 2906, __pyx_L1_error) - /* "lxml/etree.pyx":2894 + /* "lxml/etree.pyx":2905 * cdef xmlNode* c_node * cdef _Element current_node = self._next_node * if current_node is None: # <<<<<<<<<<<<<< @@ -78287,7 +78618,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str */ } - /* "lxml/etree.pyx":2896 + /* "lxml/etree.pyx":2907 * if current_node is None: * raise StopIteration * c_node = current_node._c_node # <<<<<<<<<<<<<< @@ -78297,7 +78628,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_t_4 = __pyx_v_current_node->_c_node; __pyx_v_c_node = __pyx_t_4; - /* "lxml/etree.pyx":2897 + /* "lxml/etree.pyx":2908 * raise StopIteration * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) # <<<<<<<<<<<<<< @@ -78306,10 +78637,10 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str */ __pyx_t_1 = ((PyObject *)__pyx_v_current_node->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_1), NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2897, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree_16_MultiTagMatcher_cacheTags(__pyx_v_self->_matcher, ((struct LxmlDocument *)__pyx_t_1), NULL); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 2908, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":2898 + /* "lxml/etree.pyx":2909 * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) * if not self._matcher._tag_count: # <<<<<<<<<<<<<< @@ -78319,7 +78650,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_t_3 = ((!(__pyx_v_self->_matcher->_tag_count != 0)) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2901 + /* "lxml/etree.pyx":2912 * # no tag name was found in the dict => not in document either * # try to match by node type * c_node = self._nextNodeAnyTag(c_node) # <<<<<<<<<<<<<< @@ -78328,7 +78659,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str */ __pyx_v_c_node = __pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag(__pyx_v_self, __pyx_v_c_node); - /* "lxml/etree.pyx":2898 + /* "lxml/etree.pyx":2909 * c_node = current_node._c_node * self._matcher.cacheTags(current_node._doc) * if not self._matcher._tag_count: # <<<<<<<<<<<<<< @@ -78338,7 +78669,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str goto __pyx_L4; } - /* "lxml/etree.pyx":2903 + /* "lxml/etree.pyx":2914 * c_node = self._nextNodeAnyTag(c_node) * else: * c_node = self._nextNodeMatchTag(c_node) # <<<<<<<<<<<<<< @@ -78350,7 +78681,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str } __pyx_L4:; - /* "lxml/etree.pyx":2904 + /* "lxml/etree.pyx":2915 * else: * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -78360,7 +78691,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_t_3 = ((__pyx_v_c_node == NULL) != 0); if (__pyx_t_3) { - /* "lxml/etree.pyx":2905 + /* "lxml/etree.pyx":2916 * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: * self._next_node = None # <<<<<<<<<<<<<< @@ -78373,7 +78704,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __Pyx_DECREF(((PyObject *)__pyx_v_self->_next_node)); __pyx_v_self->_next_node = ((struct LxmlElement *)Py_None); - /* "lxml/etree.pyx":2904 + /* "lxml/etree.pyx":2915 * else: * c_node = self._nextNodeMatchTag(c_node) * if c_node is NULL: # <<<<<<<<<<<<<< @@ -78383,7 +78714,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str goto __pyx_L5; } - /* "lxml/etree.pyx":2907 + /* "lxml/etree.pyx":2918 * self._next_node = None * else: * self._next_node = _elementFactory(current_node._doc, c_node) # <<<<<<<<<<<<<< @@ -78393,7 +78724,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str /*else*/ { __pyx_t_1 = ((PyObject *)__pyx_v_current_node->_doc); __Pyx_INCREF(__pyx_t_1); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2907, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(((struct LxmlDocument *)__pyx_t_1), __pyx_v_c_node)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_6); @@ -78404,7 +78735,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str } __pyx_L5:; - /* "lxml/etree.pyx":2908 + /* "lxml/etree.pyx":2919 * else: * self._next_node = _elementFactory(current_node._doc, c_node) * return current_node # <<<<<<<<<<<<<< @@ -78416,7 +78747,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str __pyx_r = ((PyObject *)__pyx_v_current_node); goto __pyx_L0; - /* "lxml/etree.pyx":2891 + /* "lxml/etree.pyx":2902 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -78437,7 +78768,7 @@ static PyObject *__pyx_pf_4lxml_5etree_25ElementDepthFirstIterator_4__next__(str return __pyx_r; } -/* "lxml/etree.pyx":2911 +/* "lxml/etree.pyx":2922 * * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -78453,7 +78784,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag int __pyx_t_2; __Pyx_RefNannySetupContext("_nextNodeAnyTag", 0); - /* "lxml/etree.pyx":2912 + /* "lxml/etree.pyx":2923 * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types # <<<<<<<<<<<<<< @@ -78463,7 +78794,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_t_1 = __pyx_v_self->_matcher->_node_types; __pyx_v_node_types = __pyx_t_1; - /* "lxml/etree.pyx":2913 + /* "lxml/etree.pyx":2924 * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types * if not node_types: # <<<<<<<<<<<<<< @@ -78473,7 +78804,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_t_2 = ((!(__pyx_v_node_types != 0)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2914 + /* "lxml/etree.pyx":2925 * cdef int node_types = self._matcher._node_types * if not node_types: * return NULL # <<<<<<<<<<<<<< @@ -78483,7 +78814,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2913 + /* "lxml/etree.pyx":2924 * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): * cdef int node_types = self._matcher._node_types * if not node_types: # <<<<<<<<<<<<<< @@ -78492,7 +78823,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ } - /* "lxml/etree.pyx":2915 + /* "lxml/etree.pyx":2926 * if not node_types: * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) # <<<<<<<<<<<<<< @@ -78501,7 +78832,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_self->_top_node->_c_node, __pyx_v_c_node, 0); - /* "lxml/etree.pyx":2916 + /* "lxml/etree.pyx":2927 * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -78511,7 +78842,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_t_2 = ((__pyx_v_node_types & (1 << __pyx_v_c_node->type)) != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2917 + /* "lxml/etree.pyx":2928 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): * return c_node # <<<<<<<<<<<<<< @@ -78521,7 +78852,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2916 + /* "lxml/etree.pyx":2927 * return NULL * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if node_types & (1 << c_node.type): # <<<<<<<<<<<<<< @@ -78530,7 +78861,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ } - /* "lxml/etree.pyx":2918 + /* "lxml/etree.pyx":2929 * if node_types & (1 << c_node.type): * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< @@ -78539,7 +78870,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag */ END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); - /* "lxml/etree.pyx":2919 + /* "lxml/etree.pyx":2930 * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL # <<<<<<<<<<<<<< @@ -78549,7 +78880,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2911 + /* "lxml/etree.pyx":2922 * * @cython.final * cdef xmlNode* _nextNodeAnyTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -78563,7 +78894,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag return __pyx_r; } -/* "lxml/etree.pyx":2922 +/* "lxml/etree.pyx":2933 * * @cython.final * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -78577,7 +78908,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT int __pyx_t_1; __Pyx_RefNannySetupContext("_nextNodeMatchTag", 0); - /* "lxml/etree.pyx":2923 + /* "lxml/etree.pyx":2934 * @cython.final * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) # <<<<<<<<<<<<<< @@ -78586,7 +78917,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT */ BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_self->_top_node->_c_node, __pyx_v_c_node, 0); - /* "lxml/etree.pyx":2924 + /* "lxml/etree.pyx":2935 * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if self._matcher.matches(c_node): # <<<<<<<<<<<<<< @@ -78596,7 +78927,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT __pyx_t_1 = (__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches(__pyx_v_self->_matcher, __pyx_v_c_node) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2925 + /* "lxml/etree.pyx":2936 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if self._matcher.matches(c_node): * return c_node # <<<<<<<<<<<<<< @@ -78606,7 +78937,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2924 + /* "lxml/etree.pyx":2935 * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): * tree.BEGIN_FOR_EACH_ELEMENT_FROM(self._top_node._c_node, c_node, 0) * if self._matcher.matches(c_node): # <<<<<<<<<<<<<< @@ -78615,7 +78946,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT */ } - /* "lxml/etree.pyx":2926 + /* "lxml/etree.pyx":2937 * if self._matcher.matches(c_node): * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< @@ -78624,7 +78955,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT */ END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); - /* "lxml/etree.pyx":2927 + /* "lxml/etree.pyx":2938 * return c_node * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * return NULL # <<<<<<<<<<<<<< @@ -78634,7 +78965,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT __pyx_r = NULL; goto __pyx_L0; - /* "lxml/etree.pyx":2922 + /* "lxml/etree.pyx":2933 * * @cython.final * cdef xmlNode* _nextNodeMatchTag(self, xmlNode* c_node): # <<<<<<<<<<<<<< @@ -78648,7 +78979,7 @@ static xmlNode *__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchT return __pyx_r; } -/* "lxml/etree.pyx":2941 +/* "lxml/etree.pyx":2952 * cdef object _nextEvent * cdef _Element _start_element * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): # <<<<<<<<<<<<<< @@ -78698,7 +79029,7 @@ static int __pyx_pw_4lxml_5etree_19ElementTextIterator_1__cinit__(PyObject *__py if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2941, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 2952, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -78712,20 +79043,20 @@ static int __pyx_pw_4lxml_5etree_19ElementTextIterator_1__cinit__(PyObject *__py __pyx_v_element = ((struct LxmlElement *)values[0]); __pyx_v_tag = values[1]; if (values[2]) { - __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2941, __pyx_L3_error) + __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2952, __pyx_L3_error) } else { __pyx_v_with_tail = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2941, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2952, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ElementTextIterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2941, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 0, "element", 0))) __PYX_ERR(0, 2952, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(((struct __pyx_obj_4lxml_5etree_ElementTextIterator *)__pyx_v_self), __pyx_v_element, __pyx_v_tag, __pyx_v_with_tail); /* function exit code */ @@ -78748,16 +79079,16 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":2942 + /* "lxml/etree.pyx":2953 * cdef _Element _start_element * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): * _assertValidNode(element) # <<<<<<<<<<<<<< * if with_tail: * events = (u"start", u"end") */ - __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2942, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidNode(__pyx_v_element); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 2953, __pyx_L1_error) - /* "lxml/etree.pyx":2943 + /* "lxml/etree.pyx":2954 * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): * _assertValidNode(element) * if with_tail: # <<<<<<<<<<<<<< @@ -78767,7 +79098,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob __pyx_t_2 = (__pyx_v_with_tail != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":2944 + /* "lxml/etree.pyx":2955 * _assertValidNode(element) * if with_tail: * events = (u"start", u"end") # <<<<<<<<<<<<<< @@ -78777,7 +79108,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob __Pyx_INCREF(__pyx_tuple__42); __pyx_v_events = __pyx_tuple__42; - /* "lxml/etree.pyx":2943 + /* "lxml/etree.pyx":2954 * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): * _assertValidNode(element) * if with_tail: # <<<<<<<<<<<<<< @@ -78787,7 +79118,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob goto __pyx_L3; } - /* "lxml/etree.pyx":2946 + /* "lxml/etree.pyx":2957 * events = (u"start", u"end") * else: * events = (u"start",) # <<<<<<<<<<<<<< @@ -78800,7 +79131,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob } __pyx_L3:; - /* "lxml/etree.pyx":2947 + /* "lxml/etree.pyx":2958 * else: * events = (u"start",) * self._start_element = element # <<<<<<<<<<<<<< @@ -78813,27 +79144,27 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob __Pyx_DECREF(((PyObject *)__pyx_v_self->_start_element)); __pyx_v_self->_start_element = __pyx_v_element; - /* "lxml/etree.pyx":2948 + /* "lxml/etree.pyx":2959 * events = (u"start",) * self._start_element = element * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ # <<<<<<<<<<<<<< * * def __iter__(self): */ - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2948, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_element)); __Pyx_GIVEREF(((PyObject *)__pyx_v_element)); PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_element)); - __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2948, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_events, __pyx_v_events) < 0) __PYX_ERR(0, 2948, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 2948, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_iterwalk), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2948, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_events, __pyx_v_events) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_tag, __pyx_v_tag) < 0) __PYX_ERR(0, 2959, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_iterwalk), __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_next); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2948, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_next); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2959, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -78842,7 +79173,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob __pyx_v_self->_nextEvent = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":2941 + /* "lxml/etree.pyx":2952 * cdef object _nextEvent * cdef _Element _start_element * def __cinit__(self, _Element element not None, tag=None, *, bint with_tail=True): # <<<<<<<<<<<<<< @@ -78865,7 +79196,7 @@ static int __pyx_pf_4lxml_5etree_19ElementTextIterator___cinit__(struct __pyx_ob return __pyx_r; } -/* "lxml/etree.pyx":2950 +/* "lxml/etree.pyx":2961 * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ * * def __iter__(self): # <<<<<<<<<<<<<< @@ -78891,7 +79222,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_2__iter__(struct __ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__", 0); - /* "lxml/etree.pyx":2951 + /* "lxml/etree.pyx":2962 * * def __iter__(self): * return self # <<<<<<<<<<<<<< @@ -78903,7 +79234,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_2__iter__(struct __ __pyx_r = ((PyObject *)__pyx_v_self); goto __pyx_L0; - /* "lxml/etree.pyx":2950 + /* "lxml/etree.pyx":2961 * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ * * def __iter__(self): # <<<<<<<<<<<<<< @@ -78918,7 +79249,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_2__iter__(struct __ return __pyx_r; } -/* "lxml/etree.pyx":2953 +/* "lxml/etree.pyx":2964 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -78954,7 +79285,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ PyObject *(*__pyx_t_7)(PyObject *); __Pyx_RefNannySetupContext("__next__", 0); - /* "lxml/etree.pyx":2955 + /* "lxml/etree.pyx":2966 * def __next__(self): * cdef _Element element * result = None # <<<<<<<<<<<<<< @@ -78964,7 +79295,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_INCREF(Py_None); __pyx_v_result = Py_None; - /* "lxml/etree.pyx":2956 + /* "lxml/etree.pyx":2967 * cdef _Element element * result = None * while result is None: # <<<<<<<<<<<<<< @@ -78976,7 +79307,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __pyx_t_2 = (__pyx_t_1 != 0); if (!__pyx_t_2) break; - /* "lxml/etree.pyx":2957 + /* "lxml/etree.pyx":2968 * result = None * while result is None: * event, element = self._nextEvent() # raises StopIteration # <<<<<<<<<<<<<< @@ -78996,7 +79327,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2957, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -79005,7 +79336,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2957, __pyx_L1_error) + __PYX_ERR(0, 2968, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -79018,15 +79349,15 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2957, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2957, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2957, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -79034,7 +79365,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2957, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2968, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -79042,38 +79373,38 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2957, __pyx_L1_error) + __PYX_ERR(0, 2968, __pyx_L1_error) __pyx_L6_unpacking_done:; } - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2957, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_5etree__Element))))) __PYX_ERR(0, 2968, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_event, __pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_element, ((struct LxmlElement *)__pyx_t_5)); __pyx_t_5 = 0; - /* "lxml/etree.pyx":2958 + /* "lxml/etree.pyx":2969 * while result is None: * event, element = self._nextEvent() # raises StopIteration * if event == u"start": # <<<<<<<<<<<<<< * result = element.text * elif element is not self._start_element: */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_event, __pyx_n_u_start, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2958, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_event, __pyx_n_u_start, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2969, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/etree.pyx":2959 + /* "lxml/etree.pyx":2970 * event, element = self._nextEvent() # raises StopIteration * if event == u"start": * result = element.text # <<<<<<<<<<<<<< * elif element is not self._start_element: * result = element.tail */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2959, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2958 + /* "lxml/etree.pyx":2969 * while result is None: * event, element = self._nextEvent() # raises StopIteration * if event == u"start": # <<<<<<<<<<<<<< @@ -79083,7 +79414,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ goto __pyx_L7; } - /* "lxml/etree.pyx":2960 + /* "lxml/etree.pyx":2971 * if event == u"start": * result = element.text * elif element is not self._start_element: # <<<<<<<<<<<<<< @@ -79094,19 +79425,19 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":2961 + /* "lxml/etree.pyx":2972 * result = element.text * elif element is not self._start_element: * result = element.tail # <<<<<<<<<<<<<< * return result * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2961, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":2960 + /* "lxml/etree.pyx":2971 * if event == u"start": * result = element.text * elif element is not self._start_element: # <<<<<<<<<<<<<< @@ -79117,7 +79448,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __pyx_L7:; } - /* "lxml/etree.pyx":2962 + /* "lxml/etree.pyx":2973 * elif element is not self._start_element: * result = element.tail * return result # <<<<<<<<<<<<<< @@ -79129,7 +79460,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ __pyx_r = __pyx_v_result; goto __pyx_L0; - /* "lxml/etree.pyx":2953 + /* "lxml/etree.pyx":2964 * return self * * def __next__(self): # <<<<<<<<<<<<<< @@ -79154,7 +79485,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19ElementTextIterator_4__next__(struct __ return __pyx_r; } -/* "lxml/etree.pyx":2964 +/* "lxml/etree.pyx":2975 * return result * * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: # <<<<<<<<<<<<<< @@ -79168,7 +79499,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createElement", 0); - /* "lxml/etree.pyx":2966 + /* "lxml/etree.pyx":2977 * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: * cdef xmlNode* c_node * c_node = tree.xmlNewDocNode(c_doc, NULL, _xcstr(name_utf), NULL) # <<<<<<<<<<<<<< @@ -79177,7 +79508,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj */ __pyx_v_c_node = xmlNewDocNode(__pyx_v_c_doc, NULL, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf), NULL); - /* "lxml/etree.pyx":2967 + /* "lxml/etree.pyx":2978 * cdef xmlNode* c_node * c_node = tree.xmlNewDocNode(c_doc, NULL, _xcstr(name_utf), NULL) * return c_node # <<<<<<<<<<<<<< @@ -79187,7 +79518,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2964 + /* "lxml/etree.pyx":2975 * return result * * cdef xmlNode* _createElement(xmlDoc* c_doc, object name_utf) except NULL: # <<<<<<<<<<<<<< @@ -79201,7 +79532,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createElement(xmlDoc *__pyx_v_c_doc, PyObj return __pyx_r; } -/* "lxml/etree.pyx":2969 +/* "lxml/etree.pyx":2980 * return c_node * * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -79215,7 +79546,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createComment", 0); - /* "lxml/etree.pyx":2971 + /* "lxml/etree.pyx":2982 * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): * cdef xmlNode* c_node * c_node = tree.xmlNewDocComment(c_doc, text) # <<<<<<<<<<<<<< @@ -79224,7 +79555,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const */ __pyx_v_c_node = xmlNewDocComment(__pyx_v_c_doc, __pyx_v_text); - /* "lxml/etree.pyx":2972 + /* "lxml/etree.pyx":2983 * cdef xmlNode* c_node * c_node = tree.xmlNewDocComment(c_doc, text) * return c_node # <<<<<<<<<<<<<< @@ -79234,7 +79565,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2969 + /* "lxml/etree.pyx":2980 * return c_node * * cdef xmlNode* _createComment(xmlDoc* c_doc, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -79248,7 +79579,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createComment(xmlDoc *__pyx_v_c_doc, const return __pyx_r; } -/* "lxml/etree.pyx":2974 +/* "lxml/etree.pyx":2985 * return c_node * * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -79262,7 +79593,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createPI", 0); - /* "lxml/etree.pyx":2976 + /* "lxml/etree.pyx":2987 * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): * cdef xmlNode* c_node * c_node = tree.xmlNewDocPI(c_doc, target, text) # <<<<<<<<<<<<<< @@ -79271,7 +79602,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC */ __pyx_v_c_node = xmlNewDocPI(__pyx_v_c_doc, __pyx_v_target, __pyx_v_text); - /* "lxml/etree.pyx":2977 + /* "lxml/etree.pyx":2988 * cdef xmlNode* c_node * c_node = tree.xmlNewDocPI(c_doc, target, text) * return c_node # <<<<<<<<<<<<<< @@ -79281,7 +79612,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2974 + /* "lxml/etree.pyx":2985 * return c_node * * cdef xmlNode* _createPI(xmlDoc* c_doc, const_xmlChar* target, const_xmlChar* text): # <<<<<<<<<<<<<< @@ -79295,7 +79626,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createPI(xmlDoc *__pyx_v_c_doc, const xmlC return __pyx_r; } -/* "lxml/etree.pyx":2979 +/* "lxml/etree.pyx":2990 * return c_node * * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -79309,7 +79640,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("_createEntity", 0); - /* "lxml/etree.pyx":2981 + /* "lxml/etree.pyx":2992 * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): * cdef xmlNode* c_node * c_node = tree.xmlNewReference(c_doc, name) # <<<<<<<<<<<<<< @@ -79318,7 +79649,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const */ __pyx_v_c_node = xmlNewReference(__pyx_v_c_doc, __pyx_v_name); - /* "lxml/etree.pyx":2982 + /* "lxml/etree.pyx":2993 * cdef xmlNode* c_node * c_node = tree.xmlNewReference(c_doc, name) * return c_node # <<<<<<<<<<<<<< @@ -79328,7 +79659,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const __pyx_r = __pyx_v_c_node; goto __pyx_L0; - /* "lxml/etree.pyx":2979 + /* "lxml/etree.pyx":2990 * return c_node * * cdef xmlNode* _createEntity(xmlDoc* c_doc, const_xmlChar* name): # <<<<<<<<<<<<<< @@ -79342,7 +79673,7 @@ static xmlNode *__pyx_f_4lxml_5etree__createEntity(xmlDoc *__pyx_v_c_doc, const return __pyx_r; } -/* "lxml/etree.pyx":2986 +/* "lxml/etree.pyx":2997 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -79401,7 +79732,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7Element(PyObject *__pyx_self, PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "Element") < 0)) __PYX_ERR(0, 2986, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "Element") < 0)) __PYX_ERR(0, 2997, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -79420,7 +79751,7 @@ static PyObject *__pyx_pw_4lxml_5etree_7Element(PyObject *__pyx_self, PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2986, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2997, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__extra); __pyx_v__extra = 0; __Pyx_AddTraceback("lxml.etree.Element", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -79441,7 +79772,7 @@ static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_se PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("Element", 0); - /* "lxml/etree.pyx":2996 + /* "lxml/etree.pyx":3007 * create an Element within a specific document or parser context. * """ * return _makeElement(_tag, NULL, None, None, None, None, # <<<<<<<<<<<<<< @@ -79450,20 +79781,20 @@ static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_se */ __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":2997 + /* "lxml/etree.pyx":3008 * """ * return _makeElement(_tag, NULL, None, None, None, None, * attrib, nsmap, _extra) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeElement(__pyx_v__tag, NULL, ((struct LxmlDocument *)Py_None), ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None), Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":2986 + /* "lxml/etree.pyx":2997 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -79482,7 +79813,7 @@ static PyObject *__pyx_pf_4lxml_5etree_6Element(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "lxml/etree.pyx":3000 +/* "lxml/etree.pyx":3011 * * * def Comment(text=None): # <<<<<<<<<<<<<< @@ -79521,7 +79852,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9Comment(PyObject *__pyx_self, PyObject * } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Comment") < 0)) __PYX_ERR(0, 3000, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Comment") < 0)) __PYX_ERR(0, 3011, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -79535,7 +79866,7 @@ static PyObject *__pyx_pw_4lxml_5etree_9Comment(PyObject *__pyx_self, PyObject * } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Comment", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3000, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Comment", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3011, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.Comment", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -79564,7 +79895,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se __Pyx_RefNannySetupContext("Comment", 0); __Pyx_INCREF(__pyx_v_text); - /* "lxml/etree.pyx":3010 + /* "lxml/etree.pyx":3021 * cdef xmlDoc* c_doc * * if text is None: # <<<<<<<<<<<<<< @@ -79575,7 +79906,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3011 + /* "lxml/etree.pyx":3022 * * if text is None: * text = b'' # <<<<<<<<<<<<<< @@ -79585,7 +79916,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_kp_b__11); __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); - /* "lxml/etree.pyx":3010 + /* "lxml/etree.pyx":3021 * cdef xmlDoc* c_doc * * if text is None: # <<<<<<<<<<<<<< @@ -79595,7 +79926,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "lxml/etree.pyx":3013 + /* "lxml/etree.pyx":3024 * text = b'' * else: * text = _utf8(text) # <<<<<<<<<<<<<< @@ -79603,26 +79934,26 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se * raise ValueError("Comment may not contain '--' or end with '-'") */ /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3013, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3014 + /* "lxml/etree.pyx":3025 * else: * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): # <<<<<<<<<<<<<< * raise ValueError("Comment may not contain '--' or end with '-'") * */ - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__44, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3014, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__44, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3025, __pyx_L1_error) __pyx_t_4 = (__pyx_t_1 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3014, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_text, __pyx_n_s_endswith); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -79636,29 +79967,29 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_b__2) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_b__2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3014, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3014, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3025, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3015 + /* "lxml/etree.pyx":3026 * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): * raise ValueError("Comment may not contain '--' or end with '-'") # <<<<<<<<<<<<<< * * c_doc = _newXMLDoc() */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3015, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3015, __pyx_L1_error) + __PYX_ERR(0, 3026, __pyx_L1_error) - /* "lxml/etree.pyx":3014 + /* "lxml/etree.pyx":3025 * else: * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): # <<<<<<<<<<<<<< @@ -79669,29 +80000,29 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L3:; - /* "lxml/etree.pyx":3017 + /* "lxml/etree.pyx":3028 * raise ValueError("Comment may not contain '--' or end with '-'") * * c_doc = _newXMLDoc() # <<<<<<<<<<<<<< * doc = _documentFactory(c_doc, None) * c_node = _createComment(c_doc, _xcstr(text)) */ - __pyx_t_7 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3017, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_7 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3028, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_7; - /* "lxml/etree.pyx":3018 + /* "lxml/etree.pyx":3029 * * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) # <<<<<<<<<<<<<< * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3018, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3019 + /* "lxml/etree.pyx":3030 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createComment(c_doc, _xcstr(text)) # <<<<<<<<<<<<<< @@ -79700,7 +80031,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_c_node = __pyx_f_4lxml_5etree__createComment(__pyx_v_c_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_text)); - /* "lxml/etree.pyx":3020 + /* "lxml/etree.pyx":3031 * doc = _documentFactory(c_doc, None) * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< @@ -79709,7 +80040,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se */ (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3021 + /* "lxml/etree.pyx":3032 * c_node = _createComment(c_doc, _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< @@ -79717,13 +80048,13 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3021, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3000 + /* "lxml/etree.pyx":3011 * * * def Comment(text=None): # <<<<<<<<<<<<<< @@ -79746,7 +80077,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8Comment(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "lxml/etree.pyx":3024 +/* "lxml/etree.pyx":3035 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< @@ -79792,7 +80123,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11ProcessingInstruction(PyObject *__pyx_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ProcessingInstruction") < 0)) __PYX_ERR(0, 3024, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ProcessingInstruction") < 0)) __PYX_ERR(0, 3035, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -79808,7 +80139,7 @@ static PyObject *__pyx_pw_4lxml_5etree_11ProcessingInstruction(PyObject *__pyx_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("ProcessingInstruction", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3024, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("ProcessingInstruction", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3035, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ProcessingInstruction", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -79840,35 +80171,35 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __Pyx_INCREF(__pyx_v_target); __Pyx_INCREF(__pyx_v_text); - /* "lxml/etree.pyx":3034 + /* "lxml/etree.pyx":3045 * cdef xmlDoc* c_doc * * target = _utf8(target) # <<<<<<<<<<<<<< * _tagValidOrRaise(target) * if target.lower() == b'xml': */ - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3034, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_target); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_target, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3035 + /* "lxml/etree.pyx":3046 * * target = _utf8(target) * _tagValidOrRaise(target) # <<<<<<<<<<<<<< * if target.lower() == b'xml': * raise ValueError, f"Invalid PI name '{target}'" */ - __pyx_t_2 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3035, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_5etree__tagValidOrRaise(__pyx_v_target); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 3046, __pyx_L1_error) - /* "lxml/etree.pyx":3036 + /* "lxml/etree.pyx":3047 * target = _utf8(target) * _tagValidOrRaise(target) * if target.lower() == b'xml': # <<<<<<<<<<<<<< * raise ValueError, f"Invalid PI name '{target}'" * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3036, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_target, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -79882,21 +80213,21 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3036, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_xml, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3036, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyBytes_Equals(__pyx_t_1, __pyx_n_b_xml, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3047, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3037 + /* "lxml/etree.pyx":3048 * _tagValidOrRaise(target) * if target.lower() == b'xml': * raise ValueError, f"Invalid PI name '{target}'" # <<<<<<<<<<<<<< * * if text is None: */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3037, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -79904,7 +80235,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __pyx_t_6 += 17; __Pyx_GIVEREF(__pyx_kp_u_Invalid_PI_name); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Invalid_PI_name); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_target, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3037, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_target, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -79915,14 +80246,14 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __pyx_t_6 += 1; __Pyx_GIVEREF(__pyx_kp_u__21); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__21); - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3037, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3037, __pyx_L1_error) + __PYX_ERR(0, 3048, __pyx_L1_error) - /* "lxml/etree.pyx":3036 + /* "lxml/etree.pyx":3047 * target = _utf8(target) * _tagValidOrRaise(target) * if target.lower() == b'xml': # <<<<<<<<<<<<<< @@ -79931,7 +80262,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO */ } - /* "lxml/etree.pyx":3039 + /* "lxml/etree.pyx":3050 * raise ValueError, f"Invalid PI name '{target}'" * * if text is None: # <<<<<<<<<<<<<< @@ -79942,7 +80273,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __pyx_t_8 = (__pyx_t_5 != 0); if (__pyx_t_8) { - /* "lxml/etree.pyx":3040 + /* "lxml/etree.pyx":3051 * * if text is None: * text = b'' # <<<<<<<<<<<<<< @@ -79952,7 +80283,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO __Pyx_INCREF(__pyx_kp_b__11); __Pyx_DECREF_SET(__pyx_v_text, __pyx_kp_b__11); - /* "lxml/etree.pyx":3039 + /* "lxml/etree.pyx":3050 * raise ValueError, f"Invalid PI name '{target}'" * * if text is None: # <<<<<<<<<<<<<< @@ -79962,7 +80293,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO goto __pyx_L4; } - /* "lxml/etree.pyx":3042 + /* "lxml/etree.pyx":3053 * text = b'' * else: * text = _utf8(text) # <<<<<<<<<<<<<< @@ -79970,23 +80301,23 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO * raise ValueError, "PI text must not contain '?>'" */ /*else*/ { - __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3042, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__utf8(__pyx_v_text); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3043 + /* "lxml/etree.pyx":3054 * else: * text = _utf8(text) * if b'?>' in text: # <<<<<<<<<<<<<< * raise ValueError, "PI text must not contain '?>'" * */ - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__46, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3043, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__46, __pyx_v_text, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3054, __pyx_L1_error) __pyx_t_5 = (__pyx_t_8 != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3044 + /* "lxml/etree.pyx":3055 * text = _utf8(text) * if b'?>' in text: * raise ValueError, "PI text must not contain '?>'" # <<<<<<<<<<<<<< @@ -79994,9 +80325,9 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO * c_doc = _newXMLDoc() */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_PI_text_must_not_contain, 0, 0); - __PYX_ERR(0, 3044, __pyx_L1_error) + __PYX_ERR(0, 3055, __pyx_L1_error) - /* "lxml/etree.pyx":3043 + /* "lxml/etree.pyx":3054 * else: * text = _utf8(text) * if b'?>' in text: # <<<<<<<<<<<<<< @@ -80007,29 +80338,29 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO } __pyx_L4:; - /* "lxml/etree.pyx":3046 + /* "lxml/etree.pyx":3057 * raise ValueError, "PI text must not contain '?>'" * * c_doc = _newXMLDoc() # <<<<<<<<<<<<<< * doc = _documentFactory(c_doc, None) * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) */ - __pyx_t_9 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_9 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3046, __pyx_L1_error) + __pyx_t_9 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_9 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3057, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_9; - /* "lxml/etree.pyx":3047 + /* "lxml/etree.pyx":3058 * * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) # <<<<<<<<<<<<<< * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3047, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3048 + /* "lxml/etree.pyx":3059 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) # <<<<<<<<<<<<<< @@ -80038,7 +80369,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO */ __pyx_v_c_node = __pyx_f_4lxml_5etree__createPI(__pyx_v_c_doc, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_target), (const xmlChar*)PyBytes_AS_STRING(__pyx_v_text)); - /* "lxml/etree.pyx":3049 + /* "lxml/etree.pyx":3060 * doc = _documentFactory(c_doc, None) * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< @@ -80047,7 +80378,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO */ (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3050 + /* "lxml/etree.pyx":3061 * c_node = _createPI(c_doc, _xcstr(target), _xcstr(text)) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< @@ -80055,13 +80386,13 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO * PI = ProcessingInstruction */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3050, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3024 + /* "lxml/etree.pyx":3035 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< @@ -80085,7 +80416,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10ProcessingInstruction(CYTHON_UNUSED PyO return __pyx_r; } -/* "lxml/etree.pyx":3070 +/* "lxml/etree.pyx":3081 * """ * cdef bytes _utf8_data * def __cinit__(self, data): # <<<<<<<<<<<<<< @@ -80119,7 +80450,7 @@ static int __pyx_pw_4lxml_5etree_5CDATA_1__cinit__(PyObject *__pyx_v_self, PyObj else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3070, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) __PYX_ERR(0, 3081, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -80130,7 +80461,7 @@ static int __pyx_pw_4lxml_5etree_5CDATA_1__cinit__(PyObject *__pyx_v_self, PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3070, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3081, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.CDATA.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -80152,30 +80483,30 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ int __pyx_t_3; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":3071 + /* "lxml/etree.pyx":3082 * cdef bytes _utf8_data * def __cinit__(self, data): * _utf8_data = _utf8(data) # <<<<<<<<<<<<<< * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" */ - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3071, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__utf8_data = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3072 + /* "lxml/etree.pyx":3083 * def __cinit__(self, data): * _utf8_data = _utf8(data) * if b']]>' in _utf8_data: # <<<<<<<<<<<<<< * raise ValueError, "']]>' not allowed inside CDATA" * self._utf8_data = _utf8_data */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__47, __pyx_v__utf8_data, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3072, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__47, __pyx_v__utf8_data, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3083, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "lxml/etree.pyx":3073 + /* "lxml/etree.pyx":3084 * _utf8_data = _utf8(data) * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" # <<<<<<<<<<<<<< @@ -80183,9 +80514,9 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_not_allowed_inside_CDATA, 0, 0); - __PYX_ERR(0, 3073, __pyx_L1_error) + __PYX_ERR(0, 3084, __pyx_L1_error) - /* "lxml/etree.pyx":3072 + /* "lxml/etree.pyx":3083 * def __cinit__(self, data): * _utf8_data = _utf8(data) * if b']]>' in _utf8_data: # <<<<<<<<<<<<<< @@ -80194,7 +80525,7 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ */ } - /* "lxml/etree.pyx":3074 + /* "lxml/etree.pyx":3085 * if b']]>' in _utf8_data: * raise ValueError, "']]>' not allowed inside CDATA" * self._utf8_data = _utf8_data # <<<<<<<<<<<<<< @@ -80207,7 +80538,7 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ __Pyx_DECREF(__pyx_v_self->_utf8_data); __pyx_v_self->_utf8_data = __pyx_v__utf8_data; - /* "lxml/etree.pyx":3070 + /* "lxml/etree.pyx":3081 * """ * cdef bytes _utf8_data * def __cinit__(self, data): # <<<<<<<<<<<<<< @@ -80228,7 +80559,7 @@ static int __pyx_pf_4lxml_5etree_5CDATA___cinit__(struct __pyx_obj_4lxml_5etree_ return __pyx_r; } -/* "lxml/etree.pyx":3077 +/* "lxml/etree.pyx":3088 * * * def Entity(name): # <<<<<<<<<<<<<< @@ -80267,19 +80598,19 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se xmlDoc *__pyx_t_6; __Pyx_RefNannySetupContext("Entity", 0); - /* "lxml/etree.pyx":3089 + /* "lxml/etree.pyx":3100 * cdef xmlNode* c_node * cdef xmlDoc* c_doc * name_utf = _utf8(name) # <<<<<<<<<<<<<< * c_name = _xcstr(name_utf) * if c_name[0] == c'#': */ - __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree__utf8(__pyx_v_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3100, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_name_utf = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3090 + /* "lxml/etree.pyx":3101 * cdef xmlDoc* c_doc * name_utf = _utf8(name) * c_name = _xcstr(name_utf) # <<<<<<<<<<<<<< @@ -80288,7 +80619,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_c_name = (const xmlChar*)PyBytes_AS_STRING(__pyx_v_name_utf); - /* "lxml/etree.pyx":3091 + /* "lxml/etree.pyx":3102 * name_utf = _utf8(name) * c_name = _xcstr(name_utf) * if c_name[0] == c'#': # <<<<<<<<<<<<<< @@ -80298,7 +80629,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = (((__pyx_v_c_name[0]) == '#') != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3092 + /* "lxml/etree.pyx":3103 * c_name = _xcstr(name_utf) * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): # <<<<<<<<<<<<<< @@ -80308,14 +80639,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__characterReferenceIsValid((__pyx_v_c_name + 1)) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3093 + /* "lxml/etree.pyx":3104 * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" # <<<<<<<<<<<<<< * elif not _xmlNameIsValid(c_name): * raise ValueError, f"Invalid entity reference: '{name}'" */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -80323,7 +80654,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_3 += 30; __Pyx_GIVEREF(__pyx_kp_u_Invalid_character_reference); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Invalid_character_reference); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -80334,14 +80665,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_3 += 1; __Pyx_GIVEREF(__pyx_kp_u__21); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__21); - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3093, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 3093, __pyx_L1_error) + __PYX_ERR(0, 3104, __pyx_L1_error) - /* "lxml/etree.pyx":3092 + /* "lxml/etree.pyx":3103 * c_name = _xcstr(name_utf) * if c_name[0] == c'#': * if not _characterReferenceIsValid(c_name + 1): # <<<<<<<<<<<<<< @@ -80350,7 +80681,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se */ } - /* "lxml/etree.pyx":3091 + /* "lxml/etree.pyx":3102 * name_utf = _utf8(name) * c_name = _xcstr(name_utf) * if c_name[0] == c'#': # <<<<<<<<<<<<<< @@ -80360,7 +80691,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se goto __pyx_L3; } - /* "lxml/etree.pyx":3094 + /* "lxml/etree.pyx":3105 * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): # <<<<<<<<<<<<<< @@ -80370,14 +80701,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_2 = ((!(__pyx_f_4lxml_5etree__xmlNameIsValid(__pyx_v_c_name) != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3095 + /* "lxml/etree.pyx":3106 * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): * raise ValueError, f"Invalid entity reference: '{name}'" # <<<<<<<<<<<<<< * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) */ - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3095, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -80385,7 +80716,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_3 += 27; __Pyx_GIVEREF(__pyx_kp_u_Invalid_entity_reference); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Invalid_entity_reference); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_4; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); @@ -80396,14 +80727,14 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se __pyx_t_3 += 1; __Pyx_GIVEREF(__pyx_kp_u__21); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__21); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 3095, __pyx_L1_error) + __PYX_ERR(0, 3106, __pyx_L1_error) - /* "lxml/etree.pyx":3094 + /* "lxml/etree.pyx":3105 * if not _characterReferenceIsValid(c_name + 1): * raise ValueError, f"Invalid character reference: '{name}'" * elif not _xmlNameIsValid(c_name): # <<<<<<<<<<<<<< @@ -80413,29 +80744,29 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se } __pyx_L3:; - /* "lxml/etree.pyx":3096 + /* "lxml/etree.pyx":3107 * elif not _xmlNameIsValid(c_name): * raise ValueError, f"Invalid entity reference: '{name}'" * c_doc = _newXMLDoc() # <<<<<<<<<<<<<< * doc = _documentFactory(c_doc, None) * c_node = _createEntity(c_doc, c_name) */ - __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3096, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_6 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3107, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_6; - /* "lxml/etree.pyx":3097 + /* "lxml/etree.pyx":3108 * raise ValueError, f"Invalid entity reference: '{name}'" * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) # <<<<<<<<<<<<<< * c_node = _createEntity(c_doc, c_name) * tree.xmlAddChild(c_doc, c_node) */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, ((struct __pyx_obj_4lxml_5etree__BaseParser *)Py_None))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3098 + /* "lxml/etree.pyx":3109 * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, None) * c_node = _createEntity(c_doc, c_name) # <<<<<<<<<<<<<< @@ -80444,7 +80775,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se */ __pyx_v_c_node = __pyx_f_4lxml_5etree__createEntity(__pyx_v_c_doc, __pyx_v_c_name); - /* "lxml/etree.pyx":3099 + /* "lxml/etree.pyx":3110 * doc = _documentFactory(c_doc, None) * c_node = _createEntity(c_doc, c_name) * tree.xmlAddChild(c_doc, c_node) # <<<<<<<<<<<<<< @@ -80453,7 +80784,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se */ (void)(xmlAddChild(((xmlNode *)__pyx_v_c_doc), __pyx_v_c_node)); - /* "lxml/etree.pyx":3100 + /* "lxml/etree.pyx":3111 * c_node = _createEntity(c_doc, c_name) * tree.xmlAddChild(c_doc, c_node) * return _elementFactory(doc, c_node) # <<<<<<<<<<<<<< @@ -80461,13 +80792,13 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3100, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__elementFactory(__pyx_v_doc, __pyx_v_c_node)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3077 + /* "lxml/etree.pyx":3088 * * * def Entity(name): # <<<<<<<<<<<<<< @@ -80489,7 +80820,7 @@ static PyObject *__pyx_pf_4lxml_5etree_12Entity(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "lxml/etree.pyx":3103 +/* "lxml/etree.pyx":3114 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -80516,7 +80847,7 @@ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObje static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parent,&__pyx_n_s_tag_2,&__pyx_n_s_attrib,&__pyx_n_s_nsmap,0}; PyObject* values[4] = {0,0,0,0}; - /* "lxml/etree.pyx":3104 + /* "lxml/etree.pyx":3115 * * def SubElement(_Element _parent not None, _tag, * attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< @@ -80549,7 +80880,7 @@ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_tag_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, 1); __PYX_ERR(0, 3103, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, 1); __PYX_ERR(0, 3114, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -80565,7 +80896,7 @@ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "SubElement") < 0)) __PYX_ERR(0, 3103, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__extra, values, pos_args, "SubElement") < 0)) __PYX_ERR(0, 3114, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -80586,17 +80917,17 @@ static PyObject *__pyx_pw_4lxml_5etree_15SubElement(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3103, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("SubElement", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3114, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__extra); __pyx_v__extra = 0; __Pyx_AddTraceback("lxml.etree.SubElement", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__parent), __pyx_ptype_4lxml_5etree__Element, 0, "_parent", 0))) __PYX_ERR(0, 3103, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v__parent), __pyx_ptype_4lxml_5etree__Element, 0, "_parent", 0))) __PYX_ERR(0, 3114, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_14SubElement(__pyx_self, __pyx_v__parent, __pyx_v__tag, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra); - /* "lxml/etree.pyx":3103 + /* "lxml/etree.pyx":3114 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -80620,7 +80951,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__py PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("SubElement", 0); - /* "lxml/etree.pyx":3110 + /* "lxml/etree.pyx":3121 * appends it to an existing element. * """ * return _makeSubElement(_parent, _tag, None, None, attrib, nsmap, _extra) # <<<<<<<<<<<<<< @@ -80628,13 +80959,13 @@ static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeSubElement(__pyx_v__parent, __pyx_v__tag, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3110, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_5etree__makeSubElement(__pyx_v__parent, __pyx_v__tag, Py_None, Py_None, __pyx_v_attrib, __pyx_v_nsmap, __pyx_v__extra)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3103 + /* "lxml/etree.pyx":3114 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< @@ -80653,7 +80984,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14SubElement(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "lxml/etree.pyx":3113 +/* "lxml/etree.pyx":3124 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -80703,7 +81034,7 @@ static PyObject *__pyx_pw_4lxml_5etree_17ElementTree(PyObject *__pyx_self, PyObj } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ElementTree") < 0)) __PYX_ERR(0, 3113, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "ElementTree") < 0)) __PYX_ERR(0, 3124, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -80719,14 +81050,14 @@ static PyObject *__pyx_pw_4lxml_5etree_17ElementTree(PyObject *__pyx_self, PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("ElementTree", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("ElementTree", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3124, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.ElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 1, "element", 0))) __PYX_ERR(0, 3113, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3113, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_5etree__Element, 1, "element", 0))) __PYX_ERR(0, 3124, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3124, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_16ElementTree(__pyx_self, __pyx_v_element, __pyx_v_file, __pyx_v_parser); /* function exit code */ @@ -80757,7 +81088,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p xmlDoc *__pyx_t_11; __Pyx_RefNannySetupContext("ElementTree", 0); - /* "lxml/etree.pyx":3125 + /* "lxml/etree.pyx":3136 * cdef _Document doc * * if element is not None: # <<<<<<<<<<<<<< @@ -80768,7 +81099,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3126 + /* "lxml/etree.pyx":3137 * * if element is not None: * doc = element._doc # <<<<<<<<<<<<<< @@ -80780,7 +81111,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3125 + /* "lxml/etree.pyx":3136 * cdef _Document doc * * if element is not None: # <<<<<<<<<<<<<< @@ -80790,7 +81121,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L3; } - /* "lxml/etree.pyx":3127 + /* "lxml/etree.pyx":3138 * if element is not None: * doc = element._doc * elif file is not None: # <<<<<<<<<<<<<< @@ -80801,7 +81132,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3128 + /* "lxml/etree.pyx":3139 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< @@ -80817,19 +81148,19 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3129 + /* "lxml/etree.pyx":3140 * elif file is not None: * try: * doc = _parseDocument(file, parser, None) # <<<<<<<<<<<<<< * except _TargetParserResult as result_container: * return result_container.result */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_file, __pyx_v_parser, Py_None)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3129, __pyx_L4_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_file, __pyx_v_parser, Py_None)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3140, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3128 + /* "lxml/etree.pyx":3139 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< @@ -80844,7 +81175,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3130 + /* "lxml/etree.pyx":3141 * try: * doc = _parseDocument(file, parser, None) * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -80852,7 +81183,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p * else: */ __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3130, __pyx_L6_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3141, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -80860,14 +81191,14 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("lxml.etree.ElementTree", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3130, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3141, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_v_result_container = __pyx_t_7; - /* "lxml/etree.pyx":3131 + /* "lxml/etree.pyx":3142 * doc = _parseDocument(file, parser, None) * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< @@ -80875,7 +81206,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p * c_doc = _newXMLDoc() */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3131, __pyx_L6_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3142, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -80887,7 +81218,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "lxml/etree.pyx":3128 + /* "lxml/etree.pyx":3139 * doc = element._doc * elif file is not None: * try: # <<<<<<<<<<<<<< @@ -80908,7 +81239,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p __pyx_L9_try_end:; } - /* "lxml/etree.pyx":3127 + /* "lxml/etree.pyx":3138 * if element is not None: * doc = element._doc * elif file is not None: # <<<<<<<<<<<<<< @@ -80918,7 +81249,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p goto __pyx_L3; } - /* "lxml/etree.pyx":3133 + /* "lxml/etree.pyx":3144 * return result_container.result * else: * c_doc = _newXMLDoc() # <<<<<<<<<<<<<< @@ -80926,24 +81257,24 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p * */ /*else*/ { - __pyx_t_11 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_11 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3133, __pyx_L1_error) + __pyx_t_11 = __pyx_f_4lxml_5etree__newXMLDoc(); if (unlikely(__pyx_t_11 == ((xmlDoc *)NULL))) __PYX_ERR(0, 3144, __pyx_L1_error) __pyx_v_c_doc = __pyx_t_11; - /* "lxml/etree.pyx":3134 + /* "lxml/etree.pyx":3145 * else: * c_doc = _newXMLDoc() * doc = _documentFactory(c_doc, parser) # <<<<<<<<<<<<<< * * return _elementTreeFactory(doc, element) */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3134, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__documentFactory(__pyx_v_c_doc, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3145, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; - /* "lxml/etree.pyx":3136 + /* "lxml/etree.pyx":3147 * doc = _documentFactory(c_doc, parser) * * return _elementTreeFactory(doc, element) # <<<<<<<<<<<<<< @@ -80951,13 +81282,13 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, __pyx_v_element)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3136, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, __pyx_v_element)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3113 + /* "lxml/etree.pyx":3124 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -80981,7 +81312,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16ElementTree(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "lxml/etree.pyx":3139 +/* "lxml/etree.pyx":3150 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81034,7 +81365,7 @@ static PyObject *__pyx_pw_4lxml_5etree_19HTML(PyObject *__pyx_self, PyObject *__ if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "HTML") < 0)) __PYX_ERR(0, 3139, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "HTML") < 0)) __PYX_ERR(0, 3150, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -81051,13 +81382,13 @@ static PyObject *__pyx_pw_4lxml_5etree_19HTML(PyObject *__pyx_self, PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("HTML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3139, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("HTML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3150, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.HTML", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3139, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3150, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_18HTML(__pyx_self, __pyx_v_text, __pyx_v_parser, __pyx_v_base_url); /* function exit code */ @@ -81087,7 +81418,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __Pyx_RefNannySetupContext("HTML", 0); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3154 + /* "lxml/etree.pyx":3165 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -81098,19 +81429,19 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3155 + /* "lxml/etree.pyx":3166 * cdef _Document doc * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3155, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3)); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3156 + /* "lxml/etree.pyx":3167 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): # <<<<<<<<<<<<<< @@ -81121,7 +81452,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3157 + /* "lxml/etree.pyx":3168 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER # <<<<<<<<<<<<<< @@ -81131,7 +81462,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_HTML_PARSER)); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_4lxml_5etree___DEFAULT_HTML_PARSER)); - /* "lxml/etree.pyx":3156 + /* "lxml/etree.pyx":3167 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, HTMLParser): # <<<<<<<<<<<<<< @@ -81140,7 +81471,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3154 + /* "lxml/etree.pyx":3165 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -81149,7 +81480,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3158 + /* "lxml/etree.pyx":3169 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< @@ -81165,19 +81496,19 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3159 + /* "lxml/etree.pyx":3170 * parser = __DEFAULT_HTML_PARSER * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3159, __pyx_L5_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3170, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3160 + /* "lxml/etree.pyx":3171 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< @@ -81185,13 +81516,13 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self * return result_container.result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3160, __pyx_L5_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3171, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "lxml/etree.pyx":3158 + /* "lxml/etree.pyx":3169 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< @@ -81202,7 +81533,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3161 + /* "lxml/etree.pyx":3172 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -81210,7 +81541,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self * */ __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3161, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3172, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -81218,14 +81549,14 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("lxml.etree.HTML", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3161, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3172, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_v_result_container = __pyx_t_7; - /* "lxml/etree.pyx":3162 + /* "lxml/etree.pyx":3173 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< @@ -81233,7 +81564,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3162, __pyx_L7_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3173, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -81245,7 +81576,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "lxml/etree.pyx":3158 + /* "lxml/etree.pyx":3169 * if not isinstance(parser, HTMLParser): * parser = __DEFAULT_HTML_PARSER * try: # <<<<<<<<<<<<<< @@ -81271,7 +81602,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self goto __pyx_L0; } - /* "lxml/etree.pyx":3139 + /* "lxml/etree.pyx":3150 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81296,7 +81627,7 @@ static PyObject *__pyx_pf_4lxml_5etree_18HTML(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "lxml/etree.pyx":3165 +/* "lxml/etree.pyx":3176 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81349,7 +81680,7 @@ static PyObject *__pyx_pw_4lxml_5etree_21XML(PyObject *__pyx_self, PyObject *__p if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 3165, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 3176, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -81366,13 +81697,13 @@ static PyObject *__pyx_pw_4lxml_5etree_21XML(PyObject *__pyx_self, PyObject *__p } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3165, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3176, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.XML", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3165, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3176, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_20XML(__pyx_self, __pyx_v_text, __pyx_v_parser, __pyx_v_base_url); /* function exit code */ @@ -81402,7 +81733,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_RefNannySetupContext("XML", 0); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3185 + /* "lxml/etree.pyx":3196 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -81413,19 +81744,19 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3186 + /* "lxml/etree.pyx":3197 * cdef _Document doc * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3186, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_3)); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3187 + /* "lxml/etree.pyx":3198 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): # <<<<<<<<<<<<<< @@ -81436,7 +81767,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3188 + /* "lxml/etree.pyx":3199 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER # <<<<<<<<<<<<<< @@ -81446,7 +81777,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER)); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_v_4lxml_5etree___DEFAULT_XML_PARSER)); - /* "lxml/etree.pyx":3187 + /* "lxml/etree.pyx":3198 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * if not isinstance(parser, XMLParser): # <<<<<<<<<<<<<< @@ -81455,7 +81786,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, */ } - /* "lxml/etree.pyx":3185 + /* "lxml/etree.pyx":3196 * """ * cdef _Document doc * if parser is None: # <<<<<<<<<<<<<< @@ -81464,7 +81795,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, */ } - /* "lxml/etree.pyx":3189 + /* "lxml/etree.pyx":3200 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< @@ -81480,19 +81811,19 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/etree.pyx":3190 + /* "lxml/etree.pyx":3201 * parser = __DEFAULT_XML_PARSER * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3190, __pyx_L5_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3201, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3191 + /* "lxml/etree.pyx":3202 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< @@ -81500,13 +81831,13 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, * return result_container.result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3191, __pyx_L5_error) + __pyx_t_3 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3202, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L9_try_return; - /* "lxml/etree.pyx":3189 + /* "lxml/etree.pyx":3200 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< @@ -81517,7 +81848,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __pyx_L5_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/etree.pyx":3192 + /* "lxml/etree.pyx":3203 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -81525,7 +81856,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, * */ __Pyx_ErrFetch(&__pyx_t_3, &__pyx_t_7, &__pyx_t_8); - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3192, __pyx_L7_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3203, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_3, __pyx_t_9); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -81533,14 +81864,14 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, __pyx_t_3 = 0; __pyx_t_7 = 0; __pyx_t_8 = 0; if (__pyx_t_10) { __Pyx_AddTraceback("lxml.etree.XML", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3192, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_7, &__pyx_t_3) < 0) __PYX_ERR(0, 3203, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __pyx_v_result_container = __pyx_t_7; - /* "lxml/etree.pyx":3193 + /* "lxml/etree.pyx":3204 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< @@ -81548,7 +81879,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3193, __pyx_L7_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3204, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; @@ -81560,7 +81891,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "lxml/etree.pyx":3189 + /* "lxml/etree.pyx":3200 * if not isinstance(parser, XMLParser): * parser = __DEFAULT_XML_PARSER * try: # <<<<<<<<<<<<<< @@ -81586,7 +81917,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, goto __pyx_L0; } - /* "lxml/etree.pyx":3165 + /* "lxml/etree.pyx":3176 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81611,7 +81942,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20XML(CYTHON_UNUSED PyObject *__pyx_self, return __pyx_r; } -/* "lxml/etree.pyx":3196 +/* "lxml/etree.pyx":3207 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81664,7 +81995,7 @@ static PyObject *__pyx_pw_4lxml_5etree_23fromstring(PyObject *__pyx_self, PyObje if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 3196, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 3207, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -81681,13 +82012,13 @@ static PyObject *__pyx_pw_4lxml_5etree_23fromstring(PyObject *__pyx_self, PyObje } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3196, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3207, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3196, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3207, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_22fromstring(__pyx_self, __pyx_v_text, __pyx_v_parser, __pyx_v_base_url); /* function exit code */ @@ -81714,7 +82045,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py int __pyx_t_8; __Pyx_RefNannySetupContext("fromstring", 0); - /* "lxml/etree.pyx":3210 + /* "lxml/etree.pyx":3221 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -81730,19 +82061,19 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":3211 + /* "lxml/etree.pyx":3222 * cdef _Document doc * try: * doc = _parseMemoryDocument(text, base_url, parser) # <<<<<<<<<<<<<< * return doc.getroot() * except _TargetParserResult as result_container: */ - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3211, __pyx_L3_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseMemoryDocument(__pyx_v_text, __pyx_v_base_url, __pyx_v_parser)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3222, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3212 + /* "lxml/etree.pyx":3223 * try: * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() # <<<<<<<<<<<<<< @@ -81750,13 +82081,13 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py * return result_container.result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3212, __pyx_L3_error) + __pyx_t_4 = __pyx_f_4lxml_5etree_9_Document_getroot(__pyx_v_doc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3223, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "lxml/etree.pyx":3210 + /* "lxml/etree.pyx":3221 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -81767,7 +82098,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3213 + /* "lxml/etree.pyx":3224 * doc = _parseMemoryDocument(text, base_url, parser) * return doc.getroot() * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -81775,7 +82106,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py * */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3213, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3224, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -81783,14 +82114,14 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; if (__pyx_t_8) { __Pyx_AddTraceback("lxml.etree.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3213, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3224, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_v_result_container = __pyx_t_5; - /* "lxml/etree.pyx":3214 + /* "lxml/etree.pyx":3225 * return doc.getroot() * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< @@ -81798,7 +82129,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3214, __pyx_L5_except_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3225, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; @@ -81810,7 +82141,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":3210 + /* "lxml/etree.pyx":3221 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -81836,7 +82167,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py goto __pyx_L0; } - /* "lxml/etree.pyx":3196 + /* "lxml/etree.pyx":3207 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -81860,7 +82191,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22fromstring(CYTHON_UNUSED PyObject *__py return __pyx_r; } -/* "lxml/etree.pyx":3217 +/* "lxml/etree.pyx":3228 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -81906,7 +82237,7 @@ static PyObject *__pyx_pw_4lxml_5etree_25fromstringlist(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstringlist") < 0)) __PYX_ERR(0, 3217, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstringlist") < 0)) __PYX_ERR(0, 3228, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -81922,13 +82253,13 @@ static PyObject *__pyx_pw_4lxml_5etree_25fromstringlist(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fromstringlist", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3217, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fromstringlist", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3228, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.fromstringlist", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3217, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3228, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_24fromstringlist(__pyx_self, __pyx_v_strings, __pyx_v_parser); /* function exit code */ @@ -81957,7 +82288,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_RefNannySetupContext("fromstringlist", 0); __Pyx_INCREF((PyObject *)__pyx_v_parser); - /* "lxml/etree.pyx":3227 + /* "lxml/etree.pyx":3238 * """ * cdef _Document doc * if isinstance(strings, (bytes, unicode)): # <<<<<<<<<<<<<< @@ -81978,20 +82309,20 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3228 + /* "lxml/etree.pyx":3239 * cdef _Document doc * if isinstance(strings, (bytes, unicode)): * raise ValueError("passing a single string into fromstringlist() is not" # <<<<<<<<<<<<<< * " efficient, use fromstring() instead") * if parser is None: */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 3228, __pyx_L1_error) + __PYX_ERR(0, 3239, __pyx_L1_error) - /* "lxml/etree.pyx":3227 + /* "lxml/etree.pyx":3238 * """ * cdef _Document doc * if isinstance(strings, (bytes, unicode)): # <<<<<<<<<<<<<< @@ -82000,7 +82331,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * */ } - /* "lxml/etree.pyx":3230 + /* "lxml/etree.pyx":3241 * raise ValueError("passing a single string into fromstringlist() is not" * " efficient, use fromstring() instead") * if parser is None: # <<<<<<<<<<<<<< @@ -82011,19 +82342,19 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3231 + /* "lxml/etree.pyx":3242 * " efficient, use fromstring() instead") * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() # <<<<<<<<<<<<<< * feed = parser.feed * for data in strings: */ - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3231, __pyx_L1_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree_24_ParserDictionaryContext_getDefaultParser(__pyx_v_4lxml_5etree___GLOBAL_PARSER_CONTEXT)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_parser, ((struct __pyx_obj_4lxml_5etree__BaseParser *)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3230 + /* "lxml/etree.pyx":3241 * raise ValueError("passing a single string into fromstringlist() is not" * " efficient, use fromstring() instead") * if parser is None: # <<<<<<<<<<<<<< @@ -82032,19 +82363,19 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * */ } - /* "lxml/etree.pyx":3232 + /* "lxml/etree.pyx":3243 * if parser is None: * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed # <<<<<<<<<<<<<< * for data in strings: * feed(data) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_feed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3232, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_feed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_feed = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":3233 + /* "lxml/etree.pyx":3244 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed * for data in strings: # <<<<<<<<<<<<<< @@ -82055,26 +82386,26 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __pyx_t_4 = __pyx_v_strings; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_strings); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_strings); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3244, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3244, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 3244, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3233, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -82084,7 +82415,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 3233, __pyx_L1_error) + else __PYX_ERR(0, 3244, __pyx_L1_error) } break; } @@ -82093,7 +82424,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * __Pyx_XDECREF_SET(__pyx_v_data, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":3234 + /* "lxml/etree.pyx":3245 * feed = parser.feed * for data in strings: * feed(data) # <<<<<<<<<<<<<< @@ -82113,12 +82444,12 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * } __pyx_t_7 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_data); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3234, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3245, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/etree.pyx":3233 + /* "lxml/etree.pyx":3244 * parser = __GLOBAL_PARSER_CONTEXT.getDefaultParser() * feed = parser.feed * for data in strings: # <<<<<<<<<<<<<< @@ -82128,7 +82459,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3235 + /* "lxml/etree.pyx":3246 * for data in strings: * feed(data) * return parser.close() # <<<<<<<<<<<<<< @@ -82136,7 +82467,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3235, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_parser), __pyx_n_s_close); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -82150,14 +82481,14 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * } __pyx_t_4 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3235, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3217 + /* "lxml/etree.pyx":3228 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -82182,7 +82513,7 @@ static PyObject *__pyx_pf_4lxml_5etree_24fromstringlist(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/etree.pyx":3238 +/* "lxml/etree.pyx":3249 * * * def iselement(element): # <<<<<<<<<<<<<< @@ -82213,7 +82544,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("iselement", 0); - /* "lxml/etree.pyx":3243 + /* "lxml/etree.pyx":3254 * Checks if an object appears to be a valid element object. * """ * return isinstance(element, _Element) and (<_Element>element)._c_node is not NULL # <<<<<<<<<<<<<< @@ -82224,14 +82555,14 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_element, __pyx_ptype_4lxml_5etree__Element); if (__pyx_t_2) { } else { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_2 = (((struct LxmlElement *)__pyx_v_element)->_c_node != NULL); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3243, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3254, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; @@ -82240,7 +82571,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3238 + /* "lxml/etree.pyx":3249 * * * def iselement(element): # <<<<<<<<<<<<<< @@ -82260,7 +82591,7 @@ static PyObject *__pyx_pf_4lxml_5etree_26iselement(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "lxml/etree.pyx":3246 +/* "lxml/etree.pyx":3257 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< @@ -82306,7 +82637,7 @@ static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dump") < 0)) __PYX_ERR(0, 3246, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dump") < 0)) __PYX_ERR(0, 3257, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -82315,7 +82646,7 @@ static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__ } __pyx_v_elem = ((struct LxmlElement *)values[0]); if (values[1]) { - __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3246, __pyx_L3_error) + __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3257, __pyx_L3_error) } else { __pyx_v_pretty_print = ((int)((int)1)); } @@ -82323,13 +82654,13 @@ static PyObject *__pyx_pw_4lxml_5etree_29dump(PyObject *__pyx_self, PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("dump", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3246, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("dump", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3257, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.dump", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elem), __pyx_ptype_4lxml_5etree__Element, 0, "elem", 0))) __PYX_ERR(0, 3246, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_elem), __pyx_ptype_4lxml_5etree__Element, 0, "elem", 0))) __PYX_ERR(0, 3257, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_28dump(__pyx_self, __pyx_v_elem, __pyx_v_pretty_print, __pyx_v_with_tail); /* function exit code */ @@ -82352,29 +82683,29 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self int __pyx_t_5; __Pyx_RefNannySetupContext("dump", 0); - /* "lxml/etree.pyx":3252 + /* "lxml/etree.pyx":3263 * should be used for debugging only. * """ * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, # <<<<<<<<<<<<<< * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3252, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_elem)); __Pyx_GIVEREF(((PyObject *)__pyx_v_elem)); PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_elem)); - __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_pretty_print); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_pretty_print); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pretty_print, __pyx_t_4) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_pretty_print, __pyx_t_4) < 0) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_with_tail, __pyx_v_with_tail) < 0) __PYX_ERR(0, 3263, __pyx_L1_error) - /* "lxml/etree.pyx":3253 + /* "lxml/etree.pyx":3264 * """ * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') # <<<<<<<<<<<<<< @@ -82388,17 +82719,17 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self __Pyx_INCREF(__pyx_n_s_unicode); __pyx_t_4 = __pyx_n_s_unicode; } - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_t_4) < 0) __PYX_ERR(0, 3252, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_encoding, __pyx_t_4) < 0) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3252 + /* "lxml/etree.pyx":3263 * should be used for debugging only. * """ * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, # <<<<<<<<<<<<<< * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3252, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -82406,7 +82737,7 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self __pyx_v_xml = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/etree.pyx":3254 + /* "lxml/etree.pyx":3265 * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: # <<<<<<<<<<<<<< @@ -82416,19 +82747,19 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self __pyx_t_5 = ((!(__pyx_v_pretty_print != 0)) != 0); if (__pyx_t_5) { - /* "lxml/etree.pyx":3255 + /* "lxml/etree.pyx":3266 * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: * xml += '\n' # <<<<<<<<<<<<<< * sys.stdout.write(xml) * */ - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_xml, __pyx_kp_s__18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3255, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_xml, __pyx_kp_s__18); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_xml, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3254 + /* "lxml/etree.pyx":3265 * xml = tostring(elem, pretty_print=pretty_print, with_tail=with_tail, * encoding=None if python.IS_PYTHON2 else 'unicode') * if not pretty_print: # <<<<<<<<<<<<<< @@ -82437,16 +82768,16 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self */ } - /* "lxml/etree.pyx":3256 + /* "lxml/etree.pyx":3267 * if not pretty_print: * xml += '\n' * sys.stdout.write(xml) # <<<<<<<<<<<<<< * * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_sys, __pyx_n_s_stdout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3256, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -82461,12 +82792,12 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_xml) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_xml); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3256, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3246 + /* "lxml/etree.pyx":3257 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< @@ -82491,7 +82822,7 @@ static PyObject *__pyx_pf_4lxml_5etree_28dump(CYTHON_UNUSED PyObject *__pyx_self return __pyx_r; } -/* "lxml/etree.pyx":3259 +/* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -82524,7 +82855,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject values[1] = ((PyObject *)((PyObject *)Py_None)); values[2] = ((PyObject *)((PyObject*)__pyx_n_s_xml)); - /* "lxml/etree.pyx":3260 + /* "lxml/etree.pyx":3271 * * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, # <<<<<<<<<<<<<< @@ -82533,7 +82864,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject */ values[3] = ((PyObject *)((PyObject *)Py_None)); - /* "lxml/etree.pyx":3261 + /* "lxml/etree.pyx":3272 * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, # <<<<<<<<<<<<<< @@ -82543,7 +82874,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject values[6] = ((PyObject *)((PyObject *)Py_None)); values[7] = ((PyObject *)((PyObject *)Py_None)); - /* "lxml/etree.pyx":3262 + /* "lxml/etree.pyx":3273 * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, * bint exclusive=False, bint with_comments=True, inclusive_ns_prefixes=None): # <<<<<<<<<<<<<< @@ -82574,7 +82905,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tostring") < 0)) __PYX_ERR(0, 3259, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tostring") < 0)) __PYX_ERR(0, 3270, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -82586,10 +82917,10 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject __pyx_v_method = values[2]; __pyx_v_xml_declaration = values[3]; if (values[4]) { - __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3260, __pyx_L3_error) + __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3260 + /* "lxml/etree.pyx":3271 * * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, # <<<<<<<<<<<<<< @@ -82599,17 +82930,17 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject __pyx_v_pretty_print = ((int)((int)0)); } if (values[5]) { - __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3260, __pyx_L3_error) + __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[5]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3271, __pyx_L3_error) } else { __pyx_v_with_tail = ((int)((int)1)); } __pyx_v_standalone = values[6]; __pyx_v_doctype = values[7]; if (values[8]) { - __pyx_v_exclusive = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_exclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3262, __pyx_L3_error) + __pyx_v_exclusive = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_exclusive == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3273, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3262 + /* "lxml/etree.pyx":3273 * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, * bint exclusive=False, bint with_comments=True, inclusive_ns_prefixes=None): # <<<<<<<<<<<<<< @@ -82619,7 +82950,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject __pyx_v_exclusive = ((int)((int)0)); } if (values[9]) { - __pyx_v_with_comments = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_with_comments == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3262, __pyx_L3_error) + __pyx_v_with_comments = __Pyx_PyObject_IsTrue(values[9]); if (unlikely((__pyx_v_with_comments == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3273, __pyx_L3_error) } else { __pyx_v_with_comments = ((int)((int)1)); } @@ -82627,7 +82958,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("tostring", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3259, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tostring", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3270, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -82635,7 +82966,7 @@ static PyObject *__pyx_pw_4lxml_5etree_31tostring(PyObject *__pyx_self, PyObject __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_30tostring(__pyx_self, __pyx_v_element_or_tree, __pyx_v_encoding, __pyx_v_method, __pyx_v_xml_declaration, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_standalone, __pyx_v_doctype, __pyx_v_exclusive, __pyx_v_with_comments, __pyx_v_inclusive_ns_prefixes); - /* "lxml/etree.pyx":3259 + /* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -82665,17 +82996,17 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_RefNannySetupContext("tostring", 0); __Pyx_INCREF(__pyx_v_encoding); - /* "lxml/etree.pyx":3308 + /* "lxml/etree.pyx":3319 * cdef int is_standalone * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_c14n, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3308, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_method, __pyx_n_s_c14n, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3319, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/etree.pyx":3309 + /* "lxml/etree.pyx":3320 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -82686,20 +83017,20 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3310 + /* "lxml/etree.pyx":3321 * if method == 'c14n': * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") # <<<<<<<<<<<<<< * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3310, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3310, __pyx_L1_error) + __PYX_ERR(0, 3321, __pyx_L1_error) - /* "lxml/etree.pyx":3309 + /* "lxml/etree.pyx":3320 * # C14N serialisation * if method == 'c14n': * if encoding is not None: # <<<<<<<<<<<<<< @@ -82708,30 +83039,30 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3311 + /* "lxml/etree.pyx":3322 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< * raise ValueError("Cannot enable XML declaration in C14N") * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3311, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3322, __pyx_L1_error) if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3312 + /* "lxml/etree.pyx":3323 * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") # <<<<<<<<<<<<<< * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) * if not with_comments: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3312, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3312, __pyx_L1_error) + __PYX_ERR(0, 3323, __pyx_L1_error) - /* "lxml/etree.pyx":3311 + /* "lxml/etree.pyx":3322 * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: # <<<<<<<<<<<<<< @@ -82740,7 +83071,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3313 + /* "lxml/etree.pyx":3324 * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) # <<<<<<<<<<<<<< @@ -82748,13 +83079,13 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ * raise ValueError("Can only discard comments in C14N serialisation") */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_5etree__tostringC14N(__pyx_v_element_or_tree, __pyx_v_exclusive, __pyx_v_with_comments, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3313, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__tostringC14N(__pyx_v_element_or_tree, __pyx_v_exclusive, __pyx_v_with_comments, __pyx_v_inclusive_ns_prefixes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3308 + /* "lxml/etree.pyx":3319 * cdef int is_standalone * # C14N serialisation * if method == 'c14n': # <<<<<<<<<<<<<< @@ -82763,7 +83094,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3314 + /* "lxml/etree.pyx":3325 * raise ValueError("Cannot enable XML declaration in C14N") * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) * if not with_comments: # <<<<<<<<<<<<<< @@ -82773,20 +83104,20 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = ((!(__pyx_v_with_comments != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3315 + /* "lxml/etree.pyx":3326 * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") # <<<<<<<<<<<<<< * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): * if xml_declaration: */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3315, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3315, __pyx_L1_error) + __PYX_ERR(0, 3326, __pyx_L1_error) - /* "lxml/etree.pyx":3314 + /* "lxml/etree.pyx":3325 * raise ValueError("Cannot enable XML declaration in C14N") * return _tostringC14N(element_or_tree, exclusive, with_comments, inclusive_ns_prefixes) * if not with_comments: # <<<<<<<<<<<<<< @@ -82795,7 +83126,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3316 + /* "lxml/etree.pyx":3327 * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): # <<<<<<<<<<<<<< @@ -82816,7 +83147,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = __pyx_t_1; goto __pyx_L8_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3316, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_lower); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -82830,26 +83161,26 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3316, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_unicode, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3316, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_unicode, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3327, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_1; __pyx_L8_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/etree.pyx":3317 + /* "lxml/etree.pyx":3328 * raise ValueError("Can only discard comments in C14N serialisation") * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): * if xml_declaration: # <<<<<<<<<<<<<< * raise ValueError, \ * u"Serialisation to unicode must not request an XML declaration" */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3317, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3328, __pyx_L1_error) if (unlikely(__pyx_t_2)) { - /* "lxml/etree.pyx":3318 + /* "lxml/etree.pyx":3329 * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): * if xml_declaration: * raise ValueError, \ # <<<<<<<<<<<<<< @@ -82857,9 +83188,9 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ * write_declaration = 0 */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Serialisation_to_unicode_must_no, 0, 0); - __PYX_ERR(0, 3318, __pyx_L1_error) + __PYX_ERR(0, 3329, __pyx_L1_error) - /* "lxml/etree.pyx":3317 + /* "lxml/etree.pyx":3328 * raise ValueError("Can only discard comments in C14N serialisation") * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): * if xml_declaration: # <<<<<<<<<<<<<< @@ -82868,7 +83199,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3320 + /* "lxml/etree.pyx":3331 * raise ValueError, \ * u"Serialisation to unicode must not request an XML declaration" * write_declaration = 0 # <<<<<<<<<<<<<< @@ -82877,7 +83208,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_write_declaration = 0; - /* "lxml/etree.pyx":3321 + /* "lxml/etree.pyx":3332 * u"Serialisation to unicode must not request an XML declaration" * write_declaration = 0 * encoding = unicode # <<<<<<<<<<<<<< @@ -82887,7 +83218,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_INCREF(((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF_SET(__pyx_v_encoding, ((PyObject *)(&PyUnicode_Type))); - /* "lxml/etree.pyx":3316 + /* "lxml/etree.pyx":3327 * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") * if encoding is unicode or (encoding is not None and encoding.lower() == 'unicode'): # <<<<<<<<<<<<<< @@ -82897,7 +83228,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L7; } - /* "lxml/etree.pyx":3322 + /* "lxml/etree.pyx":3333 * write_declaration = 0 * encoding = unicode * elif xml_declaration is None: # <<<<<<<<<<<<<< @@ -82908,7 +83239,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3324 + /* "lxml/etree.pyx":3335 * elif xml_declaration is None: * # by default, write an XML declaration only for non-standard encodings * write_declaration = encoding is not None and encoding.upper() not in \ # <<<<<<<<<<<<<< @@ -82922,7 +83253,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_1 = __pyx_t_4; goto __pyx_L12_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_encoding, __pyx_n_s_upper); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -82936,28 +83267,28 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ } __pyx_t_3 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_ASCII, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3335, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_4 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_UTF_8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3335, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_4 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_n_u_UTF8, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3335, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_4 = __pyx_t_2; goto __pyx_L14_bool_binop_done; } - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3324, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_US_ASCII, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 3335, __pyx_L1_error) __pyx_t_4 = __pyx_t_2; __pyx_L14_bool_binop_done:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -82966,7 +83297,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_L12_bool_binop_done:; __pyx_v_write_declaration = __pyx_t_1; - /* "lxml/etree.pyx":3322 + /* "lxml/etree.pyx":3333 * write_declaration = 0 * encoding = unicode * elif xml_declaration is None: # <<<<<<<<<<<<<< @@ -82976,7 +83307,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L7; } - /* "lxml/etree.pyx":3327 + /* "lxml/etree.pyx":3338 * (u'ASCII', u'UTF-8', u'UTF8', u'US-ASCII') * else: * write_declaration = xml_declaration # <<<<<<<<<<<<<< @@ -82984,12 +83315,12 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ * encoding = u'ASCII' */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3327, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_xml_declaration); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3338, __pyx_L1_error) __pyx_v_write_declaration = __pyx_t_1; } __pyx_L7:; - /* "lxml/etree.pyx":3328 + /* "lxml/etree.pyx":3339 * else: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -83000,7 +83331,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3329 + /* "lxml/etree.pyx":3340 * write_declaration = xml_declaration * if encoding is None: * encoding = u'ASCII' # <<<<<<<<<<<<<< @@ -83010,7 +83341,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_INCREF(__pyx_n_u_ASCII); __Pyx_DECREF_SET(__pyx_v_encoding, __pyx_n_u_ASCII); - /* "lxml/etree.pyx":3328 + /* "lxml/etree.pyx":3339 * else: * write_declaration = xml_declaration * if encoding is None: # <<<<<<<<<<<<<< @@ -83019,7 +83350,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3330 + /* "lxml/etree.pyx":3341 * if encoding is None: * encoding = u'ASCII' * if standalone is None: # <<<<<<<<<<<<<< @@ -83030,7 +83361,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/etree.pyx":3331 + /* "lxml/etree.pyx":3342 * encoding = u'ASCII' * if standalone is None: * is_standalone = -1 # <<<<<<<<<<<<<< @@ -83039,7 +83370,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_is_standalone = -1; - /* "lxml/etree.pyx":3330 + /* "lxml/etree.pyx":3341 * if encoding is None: * encoding = u'ASCII' * if standalone is None: # <<<<<<<<<<<<<< @@ -83049,17 +83380,17 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L19; } - /* "lxml/etree.pyx":3332 + /* "lxml/etree.pyx":3343 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< * write_declaration = 1 * is_standalone = 1 */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3332, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_standalone); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3343, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/etree.pyx":3333 + /* "lxml/etree.pyx":3344 * is_standalone = -1 * elif standalone: * write_declaration = 1 # <<<<<<<<<<<<<< @@ -83068,7 +83399,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":3334 + /* "lxml/etree.pyx":3345 * elif standalone: * write_declaration = 1 * is_standalone = 1 # <<<<<<<<<<<<<< @@ -83077,7 +83408,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ __pyx_v_is_standalone = 1; - /* "lxml/etree.pyx":3332 + /* "lxml/etree.pyx":3343 * if standalone is None: * is_standalone = -1 * elif standalone: # <<<<<<<<<<<<<< @@ -83087,7 +83418,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ goto __pyx_L19; } - /* "lxml/etree.pyx":3336 + /* "lxml/etree.pyx":3347 * is_standalone = 1 * else: * write_declaration = 1 # <<<<<<<<<<<<<< @@ -83097,7 +83428,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ /*else*/ { __pyx_v_write_declaration = 1; - /* "lxml/etree.pyx":3337 + /* "lxml/etree.pyx":3348 * else: * write_declaration = 1 * is_standalone = 0 # <<<<<<<<<<<<<< @@ -83108,7 +83439,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ } __pyx_L19:; - /* "lxml/etree.pyx":3339 + /* "lxml/etree.pyx":3350 * is_standalone = 0 * * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -83119,7 +83450,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3340 + /* "lxml/etree.pyx":3351 * * if isinstance(element_or_tree, _Element): * return _tostring(<_Element>element_or_tree, encoding, doctype, method, # <<<<<<<<<<<<<< @@ -83128,20 +83459,20 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":3342 + /* "lxml/etree.pyx":3353 * return _tostring(<_Element>element_or_tree, encoding, doctype, method, * write_declaration, 0, pretty_print, with_tail, * is_standalone) # <<<<<<<<<<<<<< * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, */ - __pyx_t_3 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_v_element_or_tree), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 0, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_is_standalone); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3340, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_v_element_or_tree), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 0, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_is_standalone); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3339 + /* "lxml/etree.pyx":3350 * is_standalone = 0 * * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -83150,7 +83481,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3343 + /* "lxml/etree.pyx":3354 * write_declaration, 0, pretty_print, with_tail, * is_standalone) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -83161,7 +83492,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":3344 + /* "lxml/etree.pyx":3355 * is_standalone) * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, # <<<<<<<<<<<<<< @@ -83172,21 +83503,21 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_element_or_tree)->_context_node); __Pyx_INCREF(__pyx_t_3); - /* "lxml/etree.pyx":3346 + /* "lxml/etree.pyx":3357 * return _tostring((<_ElementTree>element_or_tree)._context_node, * encoding, doctype, method, write_declaration, 1, * pretty_print, with_tail, is_standalone) # <<<<<<<<<<<<<< * else: * raise TypeError, f"Type '{python._fqtypename(element_or_tree).decode('utf8')}' cannot be serialized." */ - __pyx_t_5 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_t_3), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 1, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_is_standalone); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3344, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_t_3), __pyx_v_encoding, __pyx_v_doctype, __pyx_v_method, __pyx_v_write_declaration, 1, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_is_standalone); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3355, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3343 + /* "lxml/etree.pyx":3354 * write_declaration, 0, pretty_print, with_tail, * is_standalone) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -83195,7 +83526,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ */ } - /* "lxml/etree.pyx":3348 + /* "lxml/etree.pyx":3359 * pretty_print, with_tail, is_standalone) * else: * raise TypeError, f"Type '{python._fqtypename(element_or_tree).decode('utf8')}' cannot be serialized." # <<<<<<<<<<<<<< @@ -83203,7 +83534,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ * */ /*else*/ { - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = 0; __pyx_t_8 = 127; @@ -83212,7 +83543,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __Pyx_GIVEREF(__pyx_kp_u_Type); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Type); __pyx_t_9 = _fqtypename(__pyx_v_element_or_tree); - __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_9, 0, strlen(__pyx_t_9), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_c_string(__pyx_t_9, 0, strlen(__pyx_t_9), NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8; @@ -83224,15 +83555,15 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ __pyx_t_7 += 23; __Pyx_GIVEREF(__pyx_kp_u_cannot_be_serialized); PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_cannot_be_serialized); - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3348, __pyx_L1_error) + __PYX_ERR(0, 3359, __pyx_L1_error) } - /* "lxml/etree.pyx":3259 + /* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< @@ -83254,7 +83585,7 @@ static PyObject *__pyx_pf_4lxml_5etree_30tostring(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "lxml/etree.pyx":3352 +/* "lxml/etree.pyx":3363 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< @@ -83306,7 +83637,7 @@ static PyObject *__pyx_pw_4lxml_5etree_33tostringlist(PyObject *__pyx_self, PyOb } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "tostringlist") < 0)) __PYX_ERR(0, 3352, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "tostringlist") < 0)) __PYX_ERR(0, 3363, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -83317,7 +83648,7 @@ static PyObject *__pyx_pw_4lxml_5etree_33tostringlist(PyObject *__pyx_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("tostringlist", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3352, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tostringlist", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3363, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -83342,7 +83673,7 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("tostringlist", 0); - /* "lxml/etree.pyx":3361 + /* "lxml/etree.pyx":3372 * single string wrapped in a list. * """ * return [tostring(element_or_tree, *args, **kwargs)] # <<<<<<<<<<<<<< @@ -83350,21 +83681,21 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ * */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3361, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tostring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_element_or_tree); __Pyx_GIVEREF(__pyx_v_element_or_tree); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_element_or_tree); - __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3361, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -83373,7 +83704,7 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3352 + /* "lxml/etree.pyx":3363 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< @@ -83394,7 +83725,7 @@ static PyObject *__pyx_pf_4lxml_5etree_32tostringlist(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "lxml/etree.pyx":3364 +/* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -83420,7 +83751,7 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec PyObject* values[5] = {0,0,0,0,0}; values[1] = ((PyObject *)((PyObject*)__pyx_n_u_xml)); - /* "lxml/etree.pyx":3365 + /* "lxml/etree.pyx":3376 * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, * bint with_tail=True, doctype=None): # <<<<<<<<<<<<<< @@ -83451,7 +83782,7 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tounicode") < 0)) __PYX_ERR(0, 3364, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "tounicode") < 0)) __PYX_ERR(0, 3375, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -83461,10 +83792,10 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec __pyx_v_element_or_tree = values[0]; __pyx_v_method = values[1]; if (values[2]) { - __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3364, __pyx_L3_error) + __pyx_v_pretty_print = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_pretty_print == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3375, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -83474,10 +83805,10 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec __pyx_v_pretty_print = ((int)((int)0)); } if (values[3]) { - __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3365, __pyx_L3_error) + __pyx_v_with_tail = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_with_tail == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3376, __pyx_L3_error) } else { - /* "lxml/etree.pyx":3365 + /* "lxml/etree.pyx":3376 * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, * bint with_tail=True, doctype=None): # <<<<<<<<<<<<<< @@ -83490,7 +83821,7 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("tounicode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3364, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("tounicode", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3375, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.tounicode", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -83498,7 +83829,7 @@ static PyObject *__pyx_pw_4lxml_5etree_35tounicode(PyObject *__pyx_self, PyObjec __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_5etree_34tounicode(__pyx_self, __pyx_v_element_or_tree, __pyx_v_method, __pyx_v_pretty_print, __pyx_v_with_tail, __pyx_v_doctype); - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -83522,7 +83853,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx Py_UCS4 __pyx_t_6; __Pyx_RefNannySetupContext("tounicode", 0); - /* "lxml/etree.pyx":3387 + /* "lxml/etree.pyx":3398 * on the tail text of children, which will always be serialised. * """ * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -83533,7 +83864,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/etree.pyx":3388 + /* "lxml/etree.pyx":3399 * """ * if isinstance(element_or_tree, _Element): * return _tostring(<_Element>element_or_tree, unicode, doctype, method, # <<<<<<<<<<<<<< @@ -83542,20 +83873,20 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx */ __Pyx_XDECREF(__pyx_r); - /* "lxml/etree.pyx":3389 + /* "lxml/etree.pyx":3400 * if isinstance(element_or_tree, _Element): * return _tostring(<_Element>element_or_tree, unicode, doctype, method, * 0, 0, pretty_print, with_tail, -1) # <<<<<<<<<<<<<< * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, */ - __pyx_t_3 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_v_element_or_tree), ((PyObject *)(&PyUnicode_Type)), __pyx_v_doctype, __pyx_v_method, 0, 0, __pyx_v_pretty_print, __pyx_v_with_tail, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3388, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_v_element_or_tree), ((PyObject *)(&PyUnicode_Type)), __pyx_v_doctype, __pyx_v_method, 0, 0, __pyx_v_pretty_print, __pyx_v_with_tail, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3387 + /* "lxml/etree.pyx":3398 * on the tail text of children, which will always be serialised. * """ * if isinstance(element_or_tree, _Element): # <<<<<<<<<<<<<< @@ -83564,7 +83895,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx */ } - /* "lxml/etree.pyx":3390 + /* "lxml/etree.pyx":3401 * return _tostring(<_Element>element_or_tree, unicode, doctype, method, * 0, 0, pretty_print, with_tail, -1) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -83575,7 +83906,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/etree.pyx":3391 + /* "lxml/etree.pyx":3402 * 0, 0, pretty_print, with_tail, -1) * elif isinstance(element_or_tree, _ElementTree): * return _tostring((<_ElementTree>element_or_tree)._context_node, # <<<<<<<<<<<<<< @@ -83586,21 +83917,21 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_t_3 = ((PyObject *)((struct LxmlElementTree *)__pyx_v_element_or_tree)->_context_node); __Pyx_INCREF(__pyx_t_3); - /* "lxml/etree.pyx":3393 + /* "lxml/etree.pyx":3404 * return _tostring((<_ElementTree>element_or_tree)._context_node, * unicode, doctype, method, 0, 1, pretty_print, * with_tail, -1) # <<<<<<<<<<<<<< * else: * raise TypeError, f"Type '{type(element_or_tree)}' cannot be serialized." */ - __pyx_t_4 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_t_3), ((PyObject *)(&PyUnicode_Type)), __pyx_v_doctype, __pyx_v_method, 0, 1, __pyx_v_pretty_print, __pyx_v_with_tail, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3391, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_5etree__tostring(((struct LxmlElement *)__pyx_t_3), ((PyObject *)(&PyUnicode_Type)), __pyx_v_doctype, __pyx_v_method, 0, 1, __pyx_v_pretty_print, __pyx_v_with_tail, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3390 + /* "lxml/etree.pyx":3401 * return _tostring(<_Element>element_or_tree, unicode, doctype, method, * 0, 0, pretty_print, with_tail, -1) * elif isinstance(element_or_tree, _ElementTree): # <<<<<<<<<<<<<< @@ -83609,7 +83940,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx */ } - /* "lxml/etree.pyx":3395 + /* "lxml/etree.pyx":3406 * with_tail, -1) * else: * raise TypeError, f"Type '{type(element_or_tree)}' cannot be serialized." # <<<<<<<<<<<<<< @@ -83617,7 +83948,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx * */ /*else*/ { - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3395, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -83625,7 +83956,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_t_5 += 6; __Pyx_GIVEREF(__pyx_kp_u_Type); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Type); - __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_element_or_tree)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3395, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_element_or_tree)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3); @@ -83636,15 +83967,15 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx __pyx_t_5 += 23; __Pyx_GIVEREF(__pyx_kp_u_cannot_be_serialized); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_cannot_be_serialized); - __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3395, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_TypeError, __pyx_t_3, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 3395, __pyx_L1_error) + __PYX_ERR(0, 3406, __pyx_L1_error) } - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< @@ -83664,7 +83995,7 @@ static PyObject *__pyx_pf_4lxml_5etree_34tounicode(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "lxml/etree.pyx":3398 +/* "lxml/etree.pyx":3409 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -83717,7 +84048,7 @@ static PyObject *__pyx_pw_4lxml_5etree_37parse(PyObject *__pyx_self, PyObject *_ if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 3398, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 3409, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -83734,13 +84065,13 @@ static PyObject *__pyx_pw_4lxml_5etree_37parse(PyObject *__pyx_self, PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3398, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3409, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3398, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3409, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_36parse(__pyx_self, __pyx_v_source, __pyx_v_parser, __pyx_v_base_url); /* function exit code */ @@ -83767,7 +84098,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel int __pyx_t_8; __Pyx_RefNannySetupContext("parse", 0); - /* "lxml/etree.pyx":3423 + /* "lxml/etree.pyx":3434 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -83783,19 +84114,19 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "lxml/etree.pyx":3424 + /* "lxml/etree.pyx":3435 * cdef _Document doc * try: * doc = _parseDocument(source, parser, base_url) # <<<<<<<<<<<<<< * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: */ - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, __pyx_v_parser, __pyx_v_base_url)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3424, __pyx_L3_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__parseDocument(__pyx_v_source, __pyx_v_parser, __pyx_v_base_url)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3435, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3425 + /* "lxml/etree.pyx":3436 * try: * doc = _parseDocument(source, parser, base_url) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< @@ -83803,13 +84134,13 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel * return result_container.result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3425, __pyx_L3_error) + __pyx_t_4 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3436, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L7_try_return; - /* "lxml/etree.pyx":3423 + /* "lxml/etree.pyx":3434 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -83820,7 +84151,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/etree.pyx":3426 + /* "lxml/etree.pyx":3437 * doc = _parseDocument(source, parser, base_url) * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: # <<<<<<<<<<<<<< @@ -83828,7 +84159,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel * */ __Pyx_ErrFetch(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3426, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_TargetParserResult); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3437, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyErr_GivenExceptionMatches(__pyx_t_4, __pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -83836,14 +84167,14 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; if (__pyx_t_8) { __Pyx_AddTraceback("lxml.etree.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3426, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 3437, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_v_result_container = __pyx_t_5; - /* "lxml/etree.pyx":3427 + /* "lxml/etree.pyx":3438 * return _elementTreeFactory(doc, None) * except _TargetParserResult as result_container: * return result_container.result # <<<<<<<<<<<<<< @@ -83851,7 +84182,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3427, __pyx_L5_except_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_container, __pyx_n_s_result); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3438, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_7); __pyx_r = __pyx_t_7; __pyx_t_7 = 0; @@ -83863,7 +84194,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "lxml/etree.pyx":3423 + /* "lxml/etree.pyx":3434 * """ * cdef _Document doc * try: # <<<<<<<<<<<<<< @@ -83889,7 +84220,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel goto __pyx_L0; } - /* "lxml/etree.pyx":3398 + /* "lxml/etree.pyx":3409 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -83913,7 +84244,7 @@ static PyObject *__pyx_pf_4lxml_5etree_36parse(CYTHON_UNUSED PyObject *__pyx_sel return __pyx_r; } -/* "lxml/etree.pyx":3430 +/* "lxml/etree.pyx":3441 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -83959,7 +84290,7 @@ static PyObject *__pyx_pw_4lxml_5etree_39adopt_external_document(PyObject *__pyx } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adopt_external_document") < 0)) __PYX_ERR(0, 3430, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adopt_external_document") < 0)) __PYX_ERR(0, 3441, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -83975,13 +84306,13 @@ static PyObject *__pyx_pw_4lxml_5etree_39adopt_external_document(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("adopt_external_document", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3430, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("adopt_external_document", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3441, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree.adopt_external_document", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3430, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parser), __pyx_ptype_4lxml_5etree__BaseParser, 1, "parser", 0))) __PYX_ERR(0, 3441, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_5etree_38adopt_external_document(__pyx_self, __pyx_v_capsule, __pyx_v_parser); /* function exit code */ @@ -84004,7 +84335,7 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P struct __pyx_opt_args_4lxml_5etree__adoptForeignDoc __pyx_t_3; __Pyx_RefNannySetupContext("adopt_external_document", 0); - /* "lxml/etree.pyx":3462 + /* "lxml/etree.pyx":3473 * """ * cdef xmlDoc* c_doc * cdef bint is_owned = False # <<<<<<<<<<<<<< @@ -84013,17 +84344,17 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P */ __pyx_v_is_owned = 0; - /* "lxml/etree.pyx":3463 + /* "lxml/etree.pyx":3474 * cdef xmlDoc* c_doc * cdef bint is_owned = False * c_doc = python.lxml_unpack_xmldoc_capsule(capsule, &is_owned) # <<<<<<<<<<<<<< * doc = _adoptForeignDoc(c_doc, parser, is_owned) * return _elementTreeFactory(doc, None) */ - __pyx_t_1 = lxml_unpack_xmldoc_capsule(__pyx_v_capsule, (&__pyx_v_is_owned)); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 3463, __pyx_L1_error) + __pyx_t_1 = lxml_unpack_xmldoc_capsule(__pyx_v_capsule, (&__pyx_v_is_owned)); if (unlikely(__pyx_t_1 == ((void *)NULL) && PyErr_Occurred())) __PYX_ERR(0, 3474, __pyx_L1_error) __pyx_v_c_doc = ((xmlDoc *)__pyx_t_1); - /* "lxml/etree.pyx":3464 + /* "lxml/etree.pyx":3475 * cdef bint is_owned = False * c_doc = python.lxml_unpack_xmldoc_capsule(capsule, &is_owned) * doc = _adoptForeignDoc(c_doc, parser, is_owned) # <<<<<<<<<<<<<< @@ -84033,12 +84364,12 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P __pyx_t_3.__pyx_n = 2; __pyx_t_3.parser = __pyx_v_parser; __pyx_t_3.is_owned = __pyx_v_is_owned; - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__adoptForeignDoc(__pyx_v_c_doc, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3464, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__adoptForeignDoc(__pyx_v_c_doc, &__pyx_t_3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3465 + /* "lxml/etree.pyx":3476 * c_doc = python.lxml_unpack_xmldoc_capsule(capsule, &is_owned) * doc = _adoptForeignDoc(c_doc, parser, is_owned) * return _elementTreeFactory(doc, None) # <<<<<<<<<<<<<< @@ -84046,13 +84377,13 @@ static PyObject *__pyx_pf_4lxml_5etree_38adopt_external_document(CYTHON_UNUSED P * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3465, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)__pyx_f_4lxml_5etree__elementTreeFactory(__pyx_v_doc, ((struct LxmlElement *)Py_None))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3476, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3430 + /* "lxml/etree.pyx":3441 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< @@ -84277,7 +84608,7 @@ static void __pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use(struct __pyx_ob * """ * self._free_after_use = 1 # <<<<<<<<<<<<<< * - * property tag: + * @property */ __pyx_v_self->_free_after_use = 1; @@ -84293,12 +84624,12 @@ static void __pyx_f_4lxml_5etree_14_ReadOnlyProxy_free_after_use(struct __pyx_ob __Pyx_RefNannyFinishContext(); } -/* "src/lxml/readonlytree.pxi":32 - * u"""Element tag +/* "src/lxml/readonlytree.pxi":30 + * + * @property + * def tag(self): # <<<<<<<<<<<<<< + * """Element tag * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: */ /* Python wrapper */ @@ -84322,30 +84653,30 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":33 + * """Element tag * """ - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _namespacedName(self._c_node) + * self._assertNode() # <<<<<<<<<<<<<< + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _namespacedName(self._c_node) */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 33, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":34 - * def __get__(self): - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * return _namespacedName(self._c_node) - * elif self._c_node.type == tree.XML_PI_NODE: + * """ + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * return _namespacedName(self._c_node) + * elif self._c_node.type == tree.XML_PI_NODE: */ switch (__pyx_v_self->_c_node->type) { case XML_ELEMENT_NODE: /* "src/lxml/readonlytree.pxi":35 - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _namespacedName(self._c_node) # <<<<<<<<<<<<<< - * elif self._c_node.type == tree.XML_PI_NODE: - * return ProcessingInstruction + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _namespacedName(self._c_node) # <<<<<<<<<<<<<< + * elif self._c_node.type == tree.XML_PI_NODE: + * return ProcessingInstruction */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__namespacedName(__pyx_v_self->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 35, __pyx_L1_error) @@ -84355,21 +84686,21 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py goto __pyx_L0; /* "src/lxml/readonlytree.pxi":34 - * def __get__(self): - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * return _namespacedName(self._c_node) - * elif self._c_node.type == tree.XML_PI_NODE: + * """ + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * return _namespacedName(self._c_node) + * elif self._c_node.type == tree.XML_PI_NODE: */ break; case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":37 - * return _namespacedName(self._c_node) - * elif self._c_node.type == tree.XML_PI_NODE: - * return ProcessingInstruction # <<<<<<<<<<<<<< - * elif self._c_node.type == tree.XML_COMMENT_NODE: - * return Comment + * return _namespacedName(self._c_node) + * elif self._c_node.type == tree.XML_PI_NODE: + * return ProcessingInstruction # <<<<<<<<<<<<<< + * elif self._c_node.type == tree.XML_COMMENT_NODE: + * return Comment */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 37, __pyx_L1_error) @@ -84379,21 +84710,21 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py goto __pyx_L0; /* "src/lxml/readonlytree.pxi":36 - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _namespacedName(self._c_node) - * elif self._c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< - * return ProcessingInstruction - * elif self._c_node.type == tree.XML_COMMENT_NODE: + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _namespacedName(self._c_node) + * elif self._c_node.type == tree.XML_PI_NODE: # <<<<<<<<<<<<<< + * return ProcessingInstruction + * elif self._c_node.type == tree.XML_COMMENT_NODE: */ break; case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":39 - * return ProcessingInstruction - * elif self._c_node.type == tree.XML_COMMENT_NODE: - * return Comment # <<<<<<<<<<<<<< - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - * return Entity + * return ProcessingInstruction + * elif self._c_node.type == tree.XML_COMMENT_NODE: + * return Comment # <<<<<<<<<<<<<< + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + * return Entity */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 39, __pyx_L1_error) @@ -84403,21 +84734,21 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py goto __pyx_L0; /* "src/lxml/readonlytree.pxi":38 - * elif self._c_node.type == tree.XML_PI_NODE: - * return ProcessingInstruction - * elif self._c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< - * return Comment - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + * elif self._c_node.type == tree.XML_PI_NODE: + * return ProcessingInstruction + * elif self._c_node.type == tree.XML_COMMENT_NODE: # <<<<<<<<<<<<<< + * return Comment + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: */ break; case XML_ENTITY_REF_NODE: /* "src/lxml/readonlytree.pxi":41 - * return Comment - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - * return Entity # <<<<<<<<<<<<<< - * else: - * self._raise_unsupported_type() + * return Comment + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + * return Entity # <<<<<<<<<<<<<< + * else: + * self._raise_unsupported_type() */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_Entity); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 41, __pyx_L1_error) @@ -84427,32 +84758,32 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py goto __pyx_L0; /* "src/lxml/readonlytree.pxi":40 - * elif self._c_node.type == tree.XML_COMMENT_NODE: - * return Comment - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< - * return Entity - * else: + * elif self._c_node.type == tree.XML_COMMENT_NODE: + * return Comment + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< + * return Entity + * else: */ break; default: /* "src/lxml/readonlytree.pxi":43 - * return Entity - * else: - * self._raise_unsupported_type() # <<<<<<<<<<<<<< + * return Entity + * else: + * self._raise_unsupported_type() # <<<<<<<<<<<<<< * - * property text: + * @property */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_raise_unsupported_type(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 43, __pyx_L1_error) break; } - /* "src/lxml/readonlytree.pxi":32 - * u"""Element tag + /* "src/lxml/readonlytree.pxi":30 + * + * @property + * def tag(self): # <<<<<<<<<<<<<< + * """Element tag * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: */ /* function exit code */ @@ -84468,12 +84799,12 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_3tag___get__(struct __py return __pyx_r; } -/* "src/lxml/readonlytree.pxi":49 +/* "src/lxml/readonlytree.pxi":46 + * + * @property + * def text(self): # <<<<<<<<<<<<<< + * """Text before the first subelement. This is either a string or * the value None, if there was no text. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: */ /* Python wrapper */ @@ -84502,30 +84833,30 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":50 + * the value None, if there was no text. * """ - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _collectText(self._c_node.children) + * self._assertNode() # <<<<<<<<<<<<<< + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _collectText(self._c_node.children) */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 50, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":51 - * def __get__(self): - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * return _collectText(self._c_node.children) - * elif self._c_node.type in (tree.XML_PI_NODE, + * """ + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * return _collectText(self._c_node.children) + * elif self._c_node.type in (tree.XML_PI_NODE, */ switch (__pyx_v_self->_c_node->type) { case XML_ELEMENT_NODE: /* "src/lxml/readonlytree.pxi":52 - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _collectText(self._c_node.children) # <<<<<<<<<<<<<< - * elif self._c_node.type in (tree.XML_PI_NODE, - * tree.XML_COMMENT_NODE): + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _collectText(self._c_node.children) # <<<<<<<<<<<<<< + * elif self._c_node.type in (tree.XML_PI_NODE, + * tree.XML_COMMENT_NODE): */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->_c_node->children); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 52, __pyx_L1_error) @@ -84535,40 +84866,40 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p goto __pyx_L0; /* "src/lxml/readonlytree.pxi":51 - * def __get__(self): - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< - * return _collectText(self._c_node.children) - * elif self._c_node.type in (tree.XML_PI_NODE, + * """ + * self._assertNode() + * if self._c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< + * return _collectText(self._c_node.children) + * elif self._c_node.type in (tree.XML_PI_NODE, */ break; case XML_PI_NODE: /* "src/lxml/readonlytree.pxi":53 - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _collectText(self._c_node.children) - * elif self._c_node.type in (tree.XML_PI_NODE, # <<<<<<<<<<<<<< - * tree.XML_COMMENT_NODE): - * if self._c_node.content is NULL: + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _collectText(self._c_node.children) + * elif self._c_node.type in (tree.XML_PI_NODE, # <<<<<<<<<<<<<< + * tree.XML_COMMENT_NODE): + * if self._c_node.content is NULL: */ case XML_COMMENT_NODE: /* "src/lxml/readonlytree.pxi":55 - * elif self._c_node.type in (tree.XML_PI_NODE, - * tree.XML_COMMENT_NODE): - * if self._c_node.content is NULL: # <<<<<<<<<<<<<< - * return '' - * else: + * elif self._c_node.type in (tree.XML_PI_NODE, + * tree.XML_COMMENT_NODE): + * if self._c_node.content is NULL: # <<<<<<<<<<<<<< + * return '' + * else: */ __pyx_t_3 = ((__pyx_v_self->_c_node->content == NULL) != 0); if (__pyx_t_3) { /* "src/lxml/readonlytree.pxi":56 - * tree.XML_COMMENT_NODE): - * if self._c_node.content is NULL: - * return '' # <<<<<<<<<<<<<< - * else: - * return funicode(self._c_node.content) + * tree.XML_COMMENT_NODE): + * if self._c_node.content is NULL: + * return '' # <<<<<<<<<<<<<< + * else: + * return funicode(self._c_node.content) */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_kp_s__11); @@ -84576,20 +84907,20 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p goto __pyx_L0; /* "src/lxml/readonlytree.pxi":55 - * elif self._c_node.type in (tree.XML_PI_NODE, - * tree.XML_COMMENT_NODE): - * if self._c_node.content is NULL: # <<<<<<<<<<<<<< - * return '' - * else: + * elif self._c_node.type in (tree.XML_PI_NODE, + * tree.XML_COMMENT_NODE): + * if self._c_node.content is NULL: # <<<<<<<<<<<<<< + * return '' + * else: */ } /* "src/lxml/readonlytree.pxi":58 - * return '' - * else: - * return funicode(self._c_node.content) # <<<<<<<<<<<<<< - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - * return f'&{funicode(self._c_node.name)};' + * return '' + * else: + * return funicode(self._c_node.content) # <<<<<<<<<<<<<< + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + * return f'&{funicode(self._c_node.name)};' */ /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -84601,21 +84932,21 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p } /* "src/lxml/readonlytree.pxi":53 - * if self._c_node.type == tree.XML_ELEMENT_NODE: - * return _collectText(self._c_node.children) - * elif self._c_node.type in (tree.XML_PI_NODE, # <<<<<<<<<<<<<< - * tree.XML_COMMENT_NODE): - * if self._c_node.content is NULL: + * if self._c_node.type == tree.XML_ELEMENT_NODE: + * return _collectText(self._c_node.children) + * elif self._c_node.type in (tree.XML_PI_NODE, # <<<<<<<<<<<<<< + * tree.XML_COMMENT_NODE): + * if self._c_node.content is NULL: */ break; case XML_ENTITY_REF_NODE: /* "src/lxml/readonlytree.pxi":60 - * return funicode(self._c_node.content) - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< - * else: - * self._raise_unsupported_type() + * return funicode(self._c_node.content) + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< + * else: + * self._raise_unsupported_type() */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 60, __pyx_L1_error) @@ -84648,32 +84979,32 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p goto __pyx_L0; /* "src/lxml/readonlytree.pxi":59 - * else: - * return funicode(self._c_node.content) - * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< - * return f'&{funicode(self._c_node.name)};' * else: + * return funicode(self._c_node.content) + * elif self._c_node.type == tree.XML_ENTITY_REF_NODE: # <<<<<<<<<<<<<< + * return f'&{funicode(self._c_node.name)};' + * else: */ break; default: /* "src/lxml/readonlytree.pxi":62 - * return f'&{funicode(self._c_node.name)};' - * else: - * self._raise_unsupported_type() # <<<<<<<<<<<<<< + * return f'&{funicode(self._c_node.name)};' + * else: + * self._raise_unsupported_type() # <<<<<<<<<<<<<< * - * property tail: + * @property */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_raise_unsupported_type(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 62, __pyx_L1_error) break; } - /* "src/lxml/readonlytree.pxi":49 + /* "src/lxml/readonlytree.pxi":46 + * + * @property + * def text(self): # <<<<<<<<<<<<<< + * """Text before the first subelement. This is either a string or * the value None, if there was no text. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.type == tree.XML_ELEMENT_NODE: */ /* function exit code */ @@ -84691,12 +85022,12 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4text___get__(struct __p return __pyx_r; } -/* "src/lxml/readonlytree.pxi":69 - * there was no text. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return _collectText(self._c_node.next) +/* "src/lxml/readonlytree.pxi":65 + * + * @property + * def tail(self): # <<<<<<<<<<<<<< + * """Text after this element's end tag, but before the next sibling + * element's start tag. This is either a string or the value None, if */ /* Python wrapper */ @@ -84720,20 +85051,20 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":70 + * there was no text. * """ - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * return _collectText(self._c_node.next) + * self._assertNode() # <<<<<<<<<<<<<< + * return _collectText(self._c_node.next) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 70, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":71 - * def __get__(self): - * self._assertNode() - * return _collectText(self._c_node.next) # <<<<<<<<<<<<<< + * """ + * self._assertNode() + * return _collectText(self._c_node.next) # <<<<<<<<<<<<<< * - * property sourceline: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectText(__pyx_v_self->_c_node->next); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 71, __pyx_L1_error) @@ -84742,12 +85073,12 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/readonlytree.pxi":69 - * there was no text. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return _collectText(self._c_node.next) + /* "src/lxml/readonlytree.pxi":65 + * + * @property + * def tail(self): # <<<<<<<<<<<<<< + * """Text after this element's end tag, but before the next sibling + * element's start tag. This is either a string or the value None, if */ /* function exit code */ @@ -84761,12 +85092,12 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_4tail___get__(struct __p return __pyx_r; } -/* "src/lxml/readonlytree.pxi":76 - * u"""Original line number as found by the parser or None if unknown. +/* "src/lxml/readonlytree.pxi":74 + * + * @property + * def sourceline(self): # <<<<<<<<<<<<<< + * """Original line number as found by the parser or None if unknown. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef long line - * self._assertNode() */ /* Python wrapper */ @@ -84792,39 +85123,39 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":78 - * def __get__(self): - * cdef long line - * self._assertNode() # <<<<<<<<<<<<<< - * line = tree.xmlGetLineNo(self._c_node) - * if line > 0: + * """ + * cdef long line + * self._assertNode() # <<<<<<<<<<<<<< + * line = tree.xmlGetLineNo(self._c_node) + * if line > 0: */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self->__pyx_vtab)->_assertNode(__pyx_v_self); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 78, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":79 - * cdef long line - * self._assertNode() - * line = tree.xmlGetLineNo(self._c_node) # <<<<<<<<<<<<<< - * if line > 0: - * return line + * cdef long line + * self._assertNode() + * line = tree.xmlGetLineNo(self._c_node) # <<<<<<<<<<<<<< + * if line > 0: + * return line */ __pyx_v_line = xmlGetLineNo(__pyx_v_self->_c_node); /* "src/lxml/readonlytree.pxi":80 - * self._assertNode() - * line = tree.xmlGetLineNo(self._c_node) - * if line > 0: # <<<<<<<<<<<<<< - * return line - * else: + * self._assertNode() + * line = tree.xmlGetLineNo(self._c_node) + * if line > 0: # <<<<<<<<<<<<<< + * return line + * else: */ __pyx_t_2 = ((__pyx_v_line > 0) != 0); if (__pyx_t_2) { /* "src/lxml/readonlytree.pxi":81 - * line = tree.xmlGetLineNo(self._c_node) - * if line > 0: - * return line # <<<<<<<<<<<<<< - * else: - * return None + * line = tree.xmlGetLineNo(self._c_node) + * if line > 0: + * return line # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(6, 81, __pyx_L1_error) @@ -84834,18 +85165,18 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str goto __pyx_L0; /* "src/lxml/readonlytree.pxi":80 - * self._assertNode() - * line = tree.xmlGetLineNo(self._c_node) - * if line > 0: # <<<<<<<<<<<<<< - * return line - * else: + * self._assertNode() + * line = tree.xmlGetLineNo(self._c_node) + * if line > 0: # <<<<<<<<<<<<<< + * return line + * else: */ } /* "src/lxml/readonlytree.pxi":83 - * return line - * else: - * return None # <<<<<<<<<<<<<< + * return line + * else: + * return None # <<<<<<<<<<<<<< * * def __repr__(self): */ @@ -84855,12 +85186,12 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str goto __pyx_L0; } - /* "src/lxml/readonlytree.pxi":76 - * u"""Original line number as found by the parser or None if unknown. + /* "src/lxml/readonlytree.pxi":74 + * + * @property + * def sourceline(self): # <<<<<<<<<<<<<< + * """Original line number as found by the parser or None if unknown. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef long line - * self._assertNode() */ /* function exit code */ @@ -84875,7 +85206,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_10sourceline___get__(str } /* "src/lxml/readonlytree.pxi":85 - * return None + * return None * * def __repr__(self): # <<<<<<<<<<<<<< * self._assertNode() @@ -85128,7 +85459,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_2__repr__(struct __pyx_o } /* "src/lxml/readonlytree.pxi":85 - * return None + * return None * * def __repr__(self): # <<<<<<<<<<<<<< * self._assertNode() @@ -85866,7 +86197,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); @@ -85896,7 +86227,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -85904,7 +86235,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy___copy__(struct __pyx_obj } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } @@ -86507,7 +86838,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); @@ -86537,7 +86868,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -86545,7 +86876,7 @@ static PyObject *__pyx_f_4lxml_5etree_14_ReadOnlyProxy_getchildren(struct __pyx_ } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } @@ -87078,11 +87409,11 @@ static PyObject *__pyx_pf_4lxml_5etree_14_ReadOnlyProxy_24getprevious(struct __p } /* "src/lxml/readonlytree.pxi":251 - * u"A read-only proxy for processing instructions (for internal use only!)" - * property target: - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return funicode(self._c_node.name) + * """A read-only proxy for processing instructions (for internal use only!)""" + * @property + * def target(self): # <<<<<<<<<<<<<< + * self._assertNode() + * return funicode(self._c_node.name) */ /* Python wrapper */ @@ -87106,18 +87437,18 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":252 - * property target: - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * return funicode(self._c_node.name) + * @property + * def target(self): + * self._assertNode() # <<<<<<<<<<<<<< + * return funicode(self._c_node.name) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyPIProxy *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 252, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":253 - * def __get__(self): - * self._assertNode() - * return funicode(self._c_node.name) # <<<<<<<<<<<<<< + * def target(self): + * self._assertNode() + * return funicode(self._c_node.name) # <<<<<<<<<<<<<< * * @cython.final */ @@ -87129,11 +87460,11 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct goto __pyx_L0; /* "src/lxml/readonlytree.pxi":251 - * u"A read-only proxy for processing instructions (for internal use only!)" - * property target: - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return funicode(self._c_node.name) + * """A read-only proxy for processing instructions (for internal use only!)""" + * @property + * def target(self): # <<<<<<<<<<<<<< + * self._assertNode() + * return funicode(self._c_node.name) */ /* function exit code */ @@ -87148,7 +87479,7 @@ static PyObject *__pyx_pf_4lxml_5etree_16_ReadOnlyPIProxy_6target___get__(struct } /* "src/lxml/readonlytree.pxi":260 - * u"A read-only proxy for entity references (for internal use only!)" + * """A read-only proxy for entity references (for internal use only!)""" * property name: * def __get__(self): # <<<<<<<<<<<<<< * return funicode(self._c_node.name) @@ -87189,7 +87520,7 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name___get__(stru goto __pyx_L0; /* "src/lxml/readonlytree.pxi":260 - * u"A read-only proxy for entity references (for internal use only!)" + * """A read-only proxy for entity references (for internal use only!)""" * property name: * def __get__(self): # <<<<<<<<<<<<<< * return funicode(self._c_node.name) @@ -87323,7 +87654,7 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ * raise ValueError(f"Invalid entity name '{value}'") * tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) # <<<<<<<<<<<<<< * - * property text: + * @property */ xmlNodeSetName(__pyx_v_self->__pyx_base._c_node, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_value_utf)); @@ -87351,9 +87682,9 @@ static int __pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4name_2__set__(struct __ /* "src/lxml/readonlytree.pxi":270 * - * property text: - * def __get__(self): # <<<<<<<<<<<<<< - * return f'&{funicode(self._c_node.name)};' + * @property + * def text(self): # <<<<<<<<<<<<<< + * return f'&{funicode(self._c_node.name)};' * */ @@ -87381,9 +87712,9 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":271 - * property text: - * def __get__(self): - * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< + * @property + * def text(self): + * return f'&{funicode(self._c_node.name)};' # <<<<<<<<<<<<<< * * */ @@ -87419,9 +87750,9 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru /* "src/lxml/readonlytree.pxi":270 * - * property text: - * def __get__(self): # <<<<<<<<<<<<<< - * return f'&{funicode(self._c_node.name)};' + * @property + * def text(self): # <<<<<<<<<<<<<< + * return f'&{funicode(self._c_node.name)};' * */ @@ -87440,10 +87771,10 @@ static PyObject *__pyx_pf_4lxml_5etree_20_ReadOnlyEntityProxy_4text___get__(stru /* "src/lxml/readonlytree.pxi":279 * - * property attrib: - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return dict(_collectAttributes(self._c_node, 3)) + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * self._assertNode() + * return dict(_collectAttributes(self._c_node, 3)) */ /* Python wrapper */ @@ -87468,20 +87799,20 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":280 - * property attrib: - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * return dict(_collectAttributes(self._c_node, 3)) + * @property + * def attrib(self): + * self._assertNode() # <<<<<<<<<<<<<< + * return dict(_collectAttributes(self._c_node, 3)) * */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 280, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":281 - * def __get__(self): - * self._assertNode() - * return dict(_collectAttributes(self._c_node, 3)) # <<<<<<<<<<<<<< + * def attrib(self): + * self._assertNode() + * return dict(_collectAttributes(self._c_node, 3)) # <<<<<<<<<<<<<< * - * property prefix: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree__collectAttributes(__pyx_v_self->__pyx_base._c_node, 3); if (unlikely(!__pyx_t_2)) __PYX_ERR(6, 281, __pyx_L1_error) @@ -87495,10 +87826,10 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s /* "src/lxml/readonlytree.pxi":279 * - * property attrib: - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * return dict(_collectAttributes(self._c_node, 3)) + * @property + * def attrib(self): # <<<<<<<<<<<<<< + * self._assertNode() + * return dict(_collectAttributes(self._c_node, 3)) */ /* function exit code */ @@ -87513,12 +87844,12 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6attrib___get__(s return __pyx_r; } -/* "src/lxml/readonlytree.pxi":286 - * u"""Namespace prefix or None. +/* "src/lxml/readonlytree.pxi":284 + * + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * """Namespace prefix or None. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.ns is not NULL: */ /* Python wrapper */ @@ -87543,39 +87874,39 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/readonlytree.pxi":287 + * """Namespace prefix or None. * """ - * def __get__(self): - * self._assertNode() # <<<<<<<<<<<<<< - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: + * self._assertNode() # <<<<<<<<<<<<<< + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: */ __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ReadOnlyElementProxy *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base._assertNode(((struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *)__pyx_v_self)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(6, 287, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":288 - * def __get__(self): - * self._assertNode() - * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) + * """ + * self._assertNode() + * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._c_node->ns != NULL) != 0); if (__pyx_t_2) { /* "src/lxml/readonlytree.pxi":289 - * self._assertNode() - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< - * return funicode(self._c_node.ns.prefix) - * return None + * self._assertNode() + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< + * return funicode(self._c_node.ns.prefix) + * return None */ __pyx_t_2 = ((__pyx_v_self->__pyx_base._c_node->ns->prefix != NULL) != 0); if (__pyx_t_2) { /* "src/lxml/readonlytree.pxi":290 - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) # <<<<<<<<<<<<<< - * return None + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) # <<<<<<<<<<<<<< + * return None * */ __Pyx_XDECREF(__pyx_r); @@ -87586,27 +87917,27 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s goto __pyx_L0; /* "src/lxml/readonlytree.pxi":289 - * self._assertNode() - * if self._c_node.ns is not NULL: - * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< - * return funicode(self._c_node.ns.prefix) - * return None + * self._assertNode() + * if self._c_node.ns is not NULL: + * if self._c_node.ns.prefix is not NULL: # <<<<<<<<<<<<<< + * return funicode(self._c_node.ns.prefix) + * return None */ } /* "src/lxml/readonlytree.pxi":288 - * def __get__(self): - * self._assertNode() - * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) + * """ + * self._assertNode() + * if self._c_node.ns is not NULL: # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) */ } /* "src/lxml/readonlytree.pxi":291 - * if self._c_node.ns.prefix is not NULL: - * return funicode(self._c_node.ns.prefix) - * return None # <<<<<<<<<<<<<< + * if self._c_node.ns.prefix is not NULL: + * return funicode(self._c_node.ns.prefix) + * return None # <<<<<<<<<<<<<< * * def get(self, key, default=None): */ @@ -87614,12 +87945,12 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "src/lxml/readonlytree.pxi":286 - * u"""Namespace prefix or None. + /* "src/lxml/readonlytree.pxi":284 + * + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * """Namespace prefix or None. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * self._assertNode() - * if self._c_node.ns is not NULL: */ /* function exit code */ @@ -87634,7 +87965,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_6prefix___get__(s } /* "src/lxml/readonlytree.pxi":293 - * return None + * return None * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""Gets an element attribute. @@ -87739,7 +88070,7 @@ static PyObject *__pyx_pf_4lxml_5etree_21_ReadOnlyElementProxy_get(struct __pyx_ goto __pyx_L0; /* "src/lxml/readonlytree.pxi":293 - * return None + * return None * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""Gets an element attribute. @@ -89443,7 +89774,7 @@ static int __pyx_pf_4lxml_5etree_25_ModifyContentOnlyPIProxy_6target_2__set__(st } /* "src/lxml/readonlytree.pxi":459 - * u"A read-only proxy for entity references (for internal use only!)" + * "A read-only proxy for entity references (for internal use only!)" * property name: * def __get__(self): # <<<<<<<<<<<<<< * return funicode(self._c_node.name) @@ -89484,7 +89815,7 @@ static PyObject *__pyx_pf_4lxml_5etree_29_ModifyContentOnlyEntityProxy_4name___g goto __pyx_L0; /* "src/lxml/readonlytree.pxi":459 - * u"A read-only proxy for entity references (for internal use only!)" + * "A read-only proxy for entity references (for internal use only!)" * property name: * def __get__(self): # <<<<<<<<<<<<<< * return funicode(self._c_node.name) @@ -108342,7 +108673,7 @@ static void __pyx_f_4lxml_5etree__receiveParserError(void *__pyx_v_c_context, xm * _forwardParserError(c_context, error) * * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, # <<<<<<<<<<<<<< - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ */ @@ -108376,7 +108707,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":624 * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ # <<<<<<<<<<<<<< * ctxt.lastError.domain == xmlerror.XML_FROM_IO: * if isinstance(filename, bytes): @@ -108390,7 +108721,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py } /* "src/lxml/parser.pxi":625 - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ * ctxt.lastError.domain == xmlerror.XML_FROM_IO: # <<<<<<<<<<<<<< * if isinstance(filename, bytes): @@ -108402,7 +108733,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":624 * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ # <<<<<<<<<<<<<< * ctxt.lastError.domain == xmlerror.XML_FROM_IO: * if isinstance(filename, bytes): @@ -108684,7 +109015,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py /* "src/lxml/parser.pxi":624 * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ # <<<<<<<<<<<<<< * ctxt.lastError.domain == xmlerror.XML_FROM_IO: * if isinstance(filename, bytes): @@ -109034,7 +109365,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py * _forwardParserError(c_context, error) * * cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, # <<<<<<<<<<<<<< - * _ErrorLog error_log) except 0: + * _ErrorLog error_log) except -1: * if filename is not None and \ */ @@ -109048,7 +109379,7 @@ static int __pyx_f_4lxml_5etree__raiseParseError(xmlParserCtxt *__pyx_v_ctxt, Py __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); __Pyx_AddTraceback("lxml.etree._raiseParseError", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; + __pyx_r = -1; __Pyx_XDECREF(__pyx_v_message); __Pyx_XDECREF(__pyx_v_filename); __Pyx_RefNannyFinishContext(); @@ -109879,7 +110210,7 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e */ __pyx_t_5 = ((PyObject *)__pyx_v_context->_error_log); __Pyx_INCREF(__pyx_t_5); - __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_5)); if (unlikely(__pyx_t_11 == ((int)0))) __PYX_ERR(2, 711, __pyx_L1_error) + __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_5)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "src/lxml/parser.pxi":710 @@ -109900,7 +110231,7 @@ static xmlDoc *__pyx_f_4lxml_5etree__handleParseResult(struct __pyx_obj_4lxml_5e * if result.URL is NULL and filename is not None: */ /*else*/ { - __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None)); if (unlikely(__pyx_t_11 == ((int)0))) __PYX_ERR(2, 713, __pyx_L1_error) + __pyx_t_11 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)Py_None)); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(2, 713, __pyx_L1_error) } __pyx_L37:; @@ -112505,7 +112836,7 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru * c_ctxt.sax.startDocument = _initSaxDocument * return c_ctxt # <<<<<<<<<<<<<< * - * property error_log: + * @property */ __pyx_r = __pyx_v_c_ctxt; goto __pyx_L0; @@ -112528,12 +112859,12 @@ static xmlParserCtxt *__pyx_f_4lxml_5etree_11_BaseParser__newPushParserCtxt(stru return __pyx_r; } -/* "src/lxml/parser.pxi":946 - * u"""The error log of the last parser run. +/* "src/lxml/parser.pxi":944 + * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last parser run. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef _ParserContext context - * context = self._getParserContext() */ /* Python wrapper */ @@ -112557,10 +112888,10 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/parser.pxi":948 - * def __get__(self): - * cdef _ParserContext context - * context = self._getParserContext() # <<<<<<<<<<<<<< - * return context._error_log.copy() + * """ + * cdef _ParserContext context + * context = self._getParserContext() # <<<<<<<<<<<<<< + * return context._error_log.copy() * */ __pyx_t_1 = ((PyObject *)((struct __pyx_vtabstruct_4lxml_5etree__BaseParser *)__pyx_v_self->__pyx_vtab)->_getParserContext(__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 948, __pyx_L1_error) @@ -112569,11 +112900,11 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ __pyx_t_1 = 0; /* "src/lxml/parser.pxi":949 - * cdef _ParserContext context - * context = self._getParserContext() - * return context._error_log.copy() # <<<<<<<<<<<<<< + * cdef _ParserContext context + * context = self._getParserContext() + * return context._error_log.copy() # <<<<<<<<<<<<<< * - * property resolvers: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_context->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_context->_error_log), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 949, __pyx_L1_error) @@ -112582,12 +112913,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/parser.pxi":946 - * u"""The error log of the last parser run. + /* "src/lxml/parser.pxi":944 + * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last parser run. * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef _ParserContext context - * context = self._getParserContext() */ /* function exit code */ @@ -112602,12 +112933,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9error_log___get__(struct _ return __pyx_r; } -/* "src/lxml/parser.pxi":953 - * property resolvers: - * u"The custom resolver registry of this parser." - * def __get__(self): # <<<<<<<<<<<<<< - * return self._resolvers +/* "src/lxml/parser.pxi":952 * + * @property + * def resolvers(self): # <<<<<<<<<<<<<< + * """The custom resolver registry of this parser.""" + * return self._resolvers */ /* Python wrapper */ @@ -112629,23 +112960,23 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9resolvers___get__(struct _ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/parser.pxi":954 - * u"The custom resolver registry of this parser." - * def __get__(self): - * return self._resolvers # <<<<<<<<<<<<<< + * def resolvers(self): + * """The custom resolver registry of this parser.""" + * return self._resolvers # <<<<<<<<<<<<<< * - * property version: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_self->_resolvers)); __pyx_r = ((PyObject *)__pyx_v_self->_resolvers); goto __pyx_L0; - /* "src/lxml/parser.pxi":953 - * property resolvers: - * u"The custom resolver registry of this parser." - * def __get__(self): # <<<<<<<<<<<<<< - * return self._resolvers + /* "src/lxml/parser.pxi":952 * + * @property + * def resolvers(self): # <<<<<<<<<<<<<< + * """The custom resolver registry of this parser.""" + * return self._resolvers */ /* function exit code */ @@ -112655,12 +112986,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_9resolvers___get__(struct _ return __pyx_r; } -/* "src/lxml/parser.pxi":958 - * property version: - * u"The version of the underlying XML parser." - * def __get__(self): # <<<<<<<<<<<<<< - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION +/* "src/lxml/parser.pxi":957 * + * @property + * def version(self): # <<<<<<<<<<<<<< + * """The version of the underlying XML parser.""" + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION */ /* Python wrapper */ @@ -112684,9 +113015,9 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/parser.pxi":959 - * u"The version of the underlying XML parser." - * def __get__(self): - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION # <<<<<<<<<<<<<< + * def version(self): + * """The version of the underlying XML parser.""" + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION # <<<<<<<<<<<<<< * * def setElementClassLookup(self, ElementClassLookup lookup = None): */ @@ -112700,12 +113031,12 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/parser.pxi":958 - * property version: - * u"The version of the underlying XML parser." - * def __get__(self): # <<<<<<<<<<<<<< - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION + /* "src/lxml/parser.pxi":957 * + * @property + * def version(self): # <<<<<<<<<<<<<< + * """The version of the underlying XML parser.""" + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION */ /* function exit code */ @@ -112721,7 +113052,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_7version___get__(CYTHON_UNU } /* "src/lxml/parser.pxi":961 - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION * * def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." @@ -112826,7 +113157,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_BaseParser_2setElementClassLookup(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/parser.pxi":961 - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION * * def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." @@ -115657,11 +115988,11 @@ static void __pyx_f_4lxml_5etree__initSaxDocument(void *__pyx_v_ctxt) { #endif } -/* "src/lxml/parser.pxi":1239 - * different from what the ``error_log`` property returns. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._getPushParserContext()._error_log.copy() +/* "src/lxml/parser.pxi":1234 + * + * @property + * def feed_error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last (or current) run of the feed parser. * */ @@ -115686,9 +116017,9 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(st __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/parser.pxi":1240 + * different from what the ``error_log`` property returns. * """ - * def __get__(self): - * return self._getPushParserContext()._error_log.copy() # <<<<<<<<<<<<<< + * return self._getPushParserContext()._error_log.copy() # <<<<<<<<<<<<<< * * cpdef feed(self, data): */ @@ -115702,11 +116033,11 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(st __pyx_t_2 = 0; goto __pyx_L0; - /* "src/lxml/parser.pxi":1239 - * different from what the ``error_log`` property returns. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._getPushParserContext()._error_log.copy() + /* "src/lxml/parser.pxi":1234 + * + * @property + * def feed_error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last (or current) run of the feed parser. * */ @@ -115723,7 +116054,7 @@ static PyObject *__pyx_pf_4lxml_5etree_11_FeedParser_14feed_error_log___get__(st } /* "src/lxml/parser.pxi":1242 - * return self._getPushParserContext()._error_log.copy() + * return self._getPushParserContext()._error_log.copy() * * cpdef feed(self, data): # <<<<<<<<<<<<<< * u"""feed(self, data) @@ -115775,7 +116106,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); @@ -115805,7 +116136,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -115813,7 +116144,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } @@ -116968,7 +117299,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_feed(struct __pyx_obj_4lxml_ } /* "src/lxml/parser.pxi":1242 - * return self._getPushParserContext()._error_log.copy() + * return self._getPushParserContext()._error_log.copy() * * cpdef feed(self, data): # <<<<<<<<<<<<<< * u"""feed(self, data) @@ -117070,7 +117401,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); @@ -117100,7 +117431,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -117108,7 +117439,7 @@ static PyObject *__pyx_f_4lxml_5etree_11_FeedParser_close(struct __pyx_obj_4lxml } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } @@ -133296,7 +133627,7 @@ static PyObject *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResult( */ __pyx_t_7 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._error_log); __Pyx_INCREF(__pyx_t_7); - __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_7)); if (unlikely(__pyx_t_6 == ((int)0))) __PYX_ERR(13, 138, __pyx_L3_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_7)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 138, __pyx_L3_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parsertarget.pxi":137 @@ -133714,7 +134045,7 @@ static xmlDoc *__pyx_f_4lxml_5etree_20_TargetParserContext__handleParseResultDoc */ __pyx_t_7 = ((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._error_log); __Pyx_INCREF(__pyx_t_7); - __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_7)); if (unlikely(__pyx_t_6 == ((int)0))) __PYX_ERR(13, 162, __pyx_L6_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_self->__pyx_base.__pyx_base._c_ctxt, __pyx_v_filename, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_7)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(13, 162, __pyx_L6_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "src/lxml/parsertarget.pxi":161 @@ -154225,7 +154556,7 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr * self._parser = parser * self._source = source # <<<<<<<<<<<<<< * - * property error_log: + * @property */ __Pyx_INCREF(__pyx_v_source); __Pyx_GIVEREF(__pyx_v_source); @@ -154260,12 +154591,12 @@ static int __pyx_pf_4lxml_5etree_9iterparse___init__(struct __pyx_obj_4lxml_5etr return __pyx_r; } -/* "src/lxml/iterparse.pxi":134 - * u"""The error log of the last (or current) parser run. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.feed_error_log +/* "src/lxml/iterparse.pxi":132 * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last (or current) parser run. + * """ */ /* Python wrapper */ @@ -154288,11 +154619,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __py __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/iterparse.pxi":135 + * """The error log of the last (or current) parser run. * """ - * def __get__(self): - * return self._parser.feed_error_log # <<<<<<<<<<<<<< + * return self._parser.feed_error_log # <<<<<<<<<<<<<< * - * property resolvers: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_feed_error_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 135, __pyx_L1_error) @@ -154301,12 +154632,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/iterparse.pxi":134 - * u"""The error log of the last (or current) parser run. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.feed_error_log + /* "src/lxml/iterparse.pxi":132 * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The error log of the last (or current) parser run. + * """ */ /* function exit code */ @@ -154320,12 +154651,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9error_log___get__(struct __py return __pyx_r; } -/* "src/lxml/iterparse.pxi":140 - * u"""The custom resolver registry of the last (or current) parser run. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.resolvers +/* "src/lxml/iterparse.pxi":138 * + * @property + * def resolvers(self): # <<<<<<<<<<<<<< + * """The custom resolver registry of the last (or current) parser run. + * """ */ /* Python wrapper */ @@ -154348,11 +154679,11 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __py __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/iterparse.pxi":141 + * """The custom resolver registry of the last (or current) parser run. * """ - * def __get__(self): - * return self._parser.resolvers # <<<<<<<<<<<<<< + * return self._parser.resolvers # <<<<<<<<<<<<<< * - * property version: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->_parser), __pyx_n_s_resolvers); if (unlikely(!__pyx_t_1)) __PYX_ERR(14, 141, __pyx_L1_error) @@ -154361,12 +154692,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __py __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/iterparse.pxi":140 - * u"""The custom resolver registry of the last (or current) parser run. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.resolvers + /* "src/lxml/iterparse.pxi":138 * + * @property + * def resolvers(self): # <<<<<<<<<<<<<< + * """The custom resolver registry of the last (or current) parser run. + * """ */ /* function exit code */ @@ -154380,12 +154711,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_9resolvers___get__(struct __py return __pyx_r; } -/* "src/lxml/iterparse.pxi":145 - * property version: - * u"""The version of the underlying XML parser.""" - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.version +/* "src/lxml/iterparse.pxi":144 * + * @property + * def version(self): # <<<<<<<<<<<<<< + * """The version of the underlying XML parser.""" + * return self._parser.version */ /* Python wrapper */ @@ -154408,9 +154739,9 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/iterparse.pxi":146 - * u"""The version of the underlying XML parser.""" - * def __get__(self): - * return self._parser.version # <<<<<<<<<<<<<< + * def version(self): + * """The version of the underlying XML parser.""" + * return self._parser.version # <<<<<<<<<<<<<< * * def set_element_class_lookup(self, ElementClassLookup lookup = None): */ @@ -154421,12 +154752,12 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/iterparse.pxi":145 - * property version: - * u"""The version of the underlying XML parser.""" - * def __get__(self): # <<<<<<<<<<<<<< - * return self._parser.version + /* "src/lxml/iterparse.pxi":144 * + * @property + * def version(self): # <<<<<<<<<<<<<< + * """The version of the underlying XML parser.""" + * return self._parser.version */ /* function exit code */ @@ -154441,7 +154772,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_7version___get__(struct __pyx_ } /* "src/lxml/iterparse.pxi":148 - * return self._parser.version + * return self._parser.version * * def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u"""set_element_class_lookup(self, lookup = None) @@ -154546,7 +154877,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_2set_element_class_lookup(stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/iterparse.pxi":148 - * return self._parser.version + * return self._parser.version * * def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u"""set_element_class_lookup(self, lookup = None) @@ -155697,7 +156028,7 @@ static PyObject *__pyx_pf_4lxml_5etree_9iterparse_8__next__(struct __pyx_obj_4lx * context._error_log) * # no errors => all done */ - __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_context->__pyx_base._c_ctxt, __pyx_t_9, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_4)); if (unlikely(__pyx_t_6 == ((int)0))) __PYX_ERR(14, 212, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_5etree__raiseParseError(__pyx_v_context->__pyx_base._c_ctxt, __pyx_t_9, ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_4)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(14, 212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -160632,7 +160963,7 @@ static int __pyx_pf_4lxml_5etree_8XInclude___init__(struct __pyx_obj_4lxml_5etre * def __init__(self): * self._error_log = _ErrorLog() # <<<<<<<<<<<<<< * - * property error_log: + * @property */ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(16, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -160664,10 +160995,10 @@ static int __pyx_pf_4lxml_5etree_8XInclude___init__(struct __pyx_obj_4lxml_5etre /* "src/lxml/xinclude.pxi":23 * - * property error_log: - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XInclude instance not initialised" - * return self._error_log.copy() + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * assert self._error_log is not None, "XInclude instance not initialised" + * return self._error_log.copy() */ /* Python wrapper */ @@ -160691,10 +161022,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xinclude.pxi":24 - * property error_log: - * def __get__(self): - * assert self._error_log is not None, "XInclude instance not initialised" # <<<<<<<<<<<<<< - * return self._error_log.copy() + * @property + * def error_log(self): + * assert self._error_log is not None, "XInclude instance not initialised" # <<<<<<<<<<<<<< + * return self._error_log.copy() * */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -160708,9 +161039,9 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx #endif /* "src/lxml/xinclude.pxi":25 - * def __get__(self): - * assert self._error_log is not None, "XInclude instance not initialised" - * return self._error_log.copy() # <<<<<<<<<<<<<< + * def error_log(self): + * assert self._error_log is not None, "XInclude instance not initialised" + * return self._error_log.copy() # <<<<<<<<<<<<<< * * def __call__(self, _Element node not None): */ @@ -160723,10 +161054,10 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx /* "src/lxml/xinclude.pxi":23 * - * property error_log: - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XInclude instance not initialised" - * return self._error_log.copy() + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * assert self._error_log is not None, "XInclude instance not initialised" + * return self._error_log.copy() */ /* function exit code */ @@ -160741,7 +161072,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_9error_log___get__(struct __pyx } /* "src/lxml/xinclude.pxi":27 - * return self._error_log.copy() + * return self._error_log.copy() * * def __call__(self, _Element node not None): # <<<<<<<<<<<<<< * u"__call__(self, node)" @@ -161148,7 +161479,7 @@ static PyObject *__pyx_pf_4lxml_5etree_8XInclude_2__call__(struct __pyx_obj_4lxm } /* "src/lxml/xinclude.pxi":27 - * return self._error_log.copy() + * return self._error_log.copy() * * def __call__(self, _Element node not None): # <<<<<<<<<<<<<< * u"__call__(self, node)" @@ -167106,10 +167437,10 @@ static PyObject *__pyx_f_4lxml_5etree_12_BaseContext__find_cached_function(struc /* "src/lxml/extensions.pxi":299 * - * property context_node: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef xmlNode* c_node - * if self._xpathCtxt is NULL: + * @property + * def context_node(self): # <<<<<<<<<<<<<< + * cdef xmlNode* c_node + * if self._xpathCtxt is NULL: */ /* Python wrapper */ @@ -167137,138 +167468,138 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/extensions.pxi":301 - * def __get__(self): - * cdef xmlNode* c_node - * if self._xpathCtxt is NULL: # <<<<<<<<<<<<<< - * raise XPathError, \ - * u"XPath context is only usable during the evaluation" + * def context_node(self): + * cdef xmlNode* c_node + * if self._xpathCtxt is NULL: # <<<<<<<<<<<<<< + * raise XPathError, \ + * u"XPath context is only usable during the evaluation" */ __pyx_t_1 = ((__pyx_v_self->_xpathCtxt == NULL) != 0); if (unlikely(__pyx_t_1)) { /* "src/lxml/extensions.pxi":302 - * cdef xmlNode* c_node - * if self._xpathCtxt is NULL: - * raise XPathError, \ # <<<<<<<<<<<<<< - * u"XPath context is only usable during the evaluation" - * c_node = self._xpathCtxt.node + * cdef xmlNode* c_node + * if self._xpathCtxt is NULL: + * raise XPathError, \ # <<<<<<<<<<<<<< + * u"XPath context is only usable during the evaluation" + * c_node = self._xpathCtxt.node */ __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_XPath_context_is_only_usable_dur, 0, 0); __PYX_ERR(9, 302, __pyx_L1_error) /* "src/lxml/extensions.pxi":301 - * def __get__(self): - * cdef xmlNode* c_node - * if self._xpathCtxt is NULL: # <<<<<<<<<<<<<< - * raise XPathError, \ - * u"XPath context is only usable during the evaluation" + * def context_node(self): + * cdef xmlNode* c_node + * if self._xpathCtxt is NULL: # <<<<<<<<<<<<<< + * raise XPathError, \ + * u"XPath context is only usable during the evaluation" */ } /* "src/lxml/extensions.pxi":304 - * raise XPathError, \ - * u"XPath context is only usable during the evaluation" - * c_node = self._xpathCtxt.node # <<<<<<<<<<<<<< - * if c_node is NULL: - * raise XPathError, u"no context node" + * raise XPathError, \ + * u"XPath context is only usable during the evaluation" + * c_node = self._xpathCtxt.node # <<<<<<<<<<<<<< + * if c_node is NULL: + * raise XPathError, u"no context node" */ __pyx_t_2 = __pyx_v_self->_xpathCtxt->node; __pyx_v_c_node = __pyx_t_2; /* "src/lxml/extensions.pxi":305 - * u"XPath context is only usable during the evaluation" - * c_node = self._xpathCtxt.node - * if c_node is NULL: # <<<<<<<<<<<<<< - * raise XPathError, u"no context node" - * if c_node.doc != self._xpathCtxt.doc: + * u"XPath context is only usable during the evaluation" + * c_node = self._xpathCtxt.node + * if c_node is NULL: # <<<<<<<<<<<<<< + * raise XPathError, u"no context node" + * if c_node.doc != self._xpathCtxt.doc: */ __pyx_t_1 = ((__pyx_v_c_node == NULL) != 0); if (unlikely(__pyx_t_1)) { /* "src/lxml/extensions.pxi":306 - * c_node = self._xpathCtxt.node - * if c_node is NULL: - * raise XPathError, u"no context node" # <<<<<<<<<<<<<< - * if c_node.doc != self._xpathCtxt.doc: - * raise XPathError, \ + * c_node = self._xpathCtxt.node + * if c_node is NULL: + * raise XPathError, u"no context node" # <<<<<<<<<<<<<< + * if c_node.doc != self._xpathCtxt.doc: + * raise XPathError, \ */ __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_no_context_node, 0, 0); __PYX_ERR(9, 306, __pyx_L1_error) /* "src/lxml/extensions.pxi":305 - * u"XPath context is only usable during the evaluation" - * c_node = self._xpathCtxt.node - * if c_node is NULL: # <<<<<<<<<<<<<< - * raise XPathError, u"no context node" - * if c_node.doc != self._xpathCtxt.doc: + * u"XPath context is only usable during the evaluation" + * c_node = self._xpathCtxt.node + * if c_node is NULL: # <<<<<<<<<<<<<< + * raise XPathError, u"no context node" + * if c_node.doc != self._xpathCtxt.doc: */ } /* "src/lxml/extensions.pxi":307 - * if c_node is NULL: - * raise XPathError, u"no context node" - * if c_node.doc != self._xpathCtxt.doc: # <<<<<<<<<<<<<< - * raise XPathError, \ - * u"document-external context nodes are not supported" + * if c_node is NULL: + * raise XPathError, u"no context node" + * if c_node.doc != self._xpathCtxt.doc: # <<<<<<<<<<<<<< + * raise XPathError, \ + * u"document-external context nodes are not supported" */ __pyx_t_1 = ((__pyx_v_c_node->doc != __pyx_v_self->_xpathCtxt->doc) != 0); if (unlikely(__pyx_t_1)) { /* "src/lxml/extensions.pxi":308 - * raise XPathError, u"no context node" - * if c_node.doc != self._xpathCtxt.doc: - * raise XPathError, \ # <<<<<<<<<<<<<< - * u"document-external context nodes are not supported" - * if self._doc is None: + * raise XPathError, u"no context node" + * if c_node.doc != self._xpathCtxt.doc: + * raise XPathError, \ # <<<<<<<<<<<<<< + * u"document-external context nodes are not supported" + * if self._doc is None: */ __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_document_external_context_nodes, 0, 0); __PYX_ERR(9, 308, __pyx_L1_error) /* "src/lxml/extensions.pxi":307 - * if c_node is NULL: - * raise XPathError, u"no context node" - * if c_node.doc != self._xpathCtxt.doc: # <<<<<<<<<<<<<< - * raise XPathError, \ - * u"document-external context nodes are not supported" + * if c_node is NULL: + * raise XPathError, u"no context node" + * if c_node.doc != self._xpathCtxt.doc: # <<<<<<<<<<<<<< + * raise XPathError, \ + * u"document-external context nodes are not supported" */ } /* "src/lxml/extensions.pxi":310 - * raise XPathError, \ - * u"document-external context nodes are not supported" - * if self._doc is None: # <<<<<<<<<<<<<< - * raise XPathError, u"document context is missing" - * return _elementFactory(self._doc, c_node) + * raise XPathError, \ + * u"document-external context nodes are not supported" + * if self._doc is None: # <<<<<<<<<<<<<< + * raise XPathError, u"document context is missing" + * return _elementFactory(self._doc, c_node) */ __pyx_t_1 = (((PyObject *)__pyx_v_self->_doc) == Py_None); __pyx_t_3 = (__pyx_t_1 != 0); if (unlikely(__pyx_t_3)) { /* "src/lxml/extensions.pxi":311 - * u"document-external context nodes are not supported" - * if self._doc is None: - * raise XPathError, u"document context is missing" # <<<<<<<<<<<<<< - * return _elementFactory(self._doc, c_node) + * u"document-external context nodes are not supported" + * if self._doc is None: + * raise XPathError, u"document context is missing" # <<<<<<<<<<<<<< + * return _elementFactory(self._doc, c_node) * */ __Pyx_Raise(((PyObject *)__pyx_ptype_4lxml_5etree_XPathError), __pyx_kp_u_document_context_is_missing, 0, 0); __PYX_ERR(9, 311, __pyx_L1_error) /* "src/lxml/extensions.pxi":310 - * raise XPathError, \ - * u"document-external context nodes are not supported" - * if self._doc is None: # <<<<<<<<<<<<<< - * raise XPathError, u"document context is missing" - * return _elementFactory(self._doc, c_node) + * raise XPathError, \ + * u"document-external context nodes are not supported" + * if self._doc is None: # <<<<<<<<<<<<<< + * raise XPathError, u"document context is missing" + * return _elementFactory(self._doc, c_node) */ } /* "src/lxml/extensions.pxi":312 - * if self._doc is None: - * raise XPathError, u"document context is missing" - * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< + * if self._doc is None: + * raise XPathError, u"document context is missing" + * return _elementFactory(self._doc, c_node) # <<<<<<<<<<<<<< * - * property eval_context: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_4 = ((PyObject *)__pyx_v_self->_doc); @@ -167282,10 +167613,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str /* "src/lxml/extensions.pxi":299 * - * property context_node: - * def __get__(self): # <<<<<<<<<<<<<< - * cdef xmlNode* c_node - * if self._xpathCtxt is NULL: + * @property + * def context_node(self): # <<<<<<<<<<<<<< + * cdef xmlNode* c_node + * if self._xpathCtxt is NULL: */ /* function exit code */ @@ -167302,10 +167633,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12context_node___get__(str /* "src/lxml/extensions.pxi":315 * - * property eval_context: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._eval_context_dict is None: - * self._eval_context_dict = {} + * @property + * def eval_context(self): # <<<<<<<<<<<<<< + * if self._eval_context_dict is None: + * self._eval_context_dict = {} */ /* Python wrapper */ @@ -167330,21 +167661,21 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/extensions.pxi":316 - * property eval_context: - * def __get__(self): - * if self._eval_context_dict is None: # <<<<<<<<<<<<<< - * self._eval_context_dict = {} - * return self._eval_context_dict + * @property + * def eval_context(self): + * if self._eval_context_dict is None: # <<<<<<<<<<<<<< + * self._eval_context_dict = {} + * return self._eval_context_dict */ __pyx_t_1 = (__pyx_v_self->_eval_context_dict == ((PyObject*)Py_None)); __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "src/lxml/extensions.pxi":317 - * def __get__(self): - * if self._eval_context_dict is None: - * self._eval_context_dict = {} # <<<<<<<<<<<<<< - * return self._eval_context_dict + * def eval_context(self): + * if self._eval_context_dict is None: + * self._eval_context_dict = {} # <<<<<<<<<<<<<< + * return self._eval_context_dict * */ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(9, 317, __pyx_L1_error) @@ -167356,18 +167687,18 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str __pyx_t_3 = 0; /* "src/lxml/extensions.pxi":316 - * property eval_context: - * def __get__(self): - * if self._eval_context_dict is None: # <<<<<<<<<<<<<< - * self._eval_context_dict = {} - * return self._eval_context_dict + * @property + * def eval_context(self): + * if self._eval_context_dict is None: # <<<<<<<<<<<<<< + * self._eval_context_dict = {} + * return self._eval_context_dict */ } /* "src/lxml/extensions.pxi":318 - * if self._eval_context_dict is None: - * self._eval_context_dict = {} - * return self._eval_context_dict # <<<<<<<<<<<<<< + * if self._eval_context_dict is None: + * self._eval_context_dict = {} + * return self._eval_context_dict # <<<<<<<<<<<<<< * * # Python reference keeping during XPath function evaluation */ @@ -167378,10 +167709,10 @@ static PyObject *__pyx_pf_4lxml_5etree_12_BaseContext_12eval_context___get__(str /* "src/lxml/extensions.pxi":315 * - * property eval_context: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._eval_context_dict is None: - * self._eval_context_dict = {} + * @property + * def eval_context(self): # <<<<<<<<<<<<<< + * if self._eval_context_dict is None: + * self._eval_context_dict = {} */ /* function exit code */ @@ -175687,10 +176018,10 @@ static int __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_2__init__(struct __pyx_ob /* "src/lxml/xpath.pxi":137 * - * property error_log: - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * assert self._error_log is not None, "XPath evaluator not initialised" + * return self._error_log.copy() */ /* Python wrapper */ @@ -175714,10 +176045,10 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xpath.pxi":138 - * property error_log: - * def __get__(self): - * assert self._error_log is not None, "XPath evaluator not initialised" # <<<<<<<<<<<<<< - * return self._error_log.copy() + * @property + * def error_log(self): + * assert self._error_log is not None, "XPath evaluator not initialised" # <<<<<<<<<<<<<< + * return self._error_log.copy() * */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -175731,9 +176062,9 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( #endif /* "src/lxml/xpath.pxi":139 - * def __get__(self): - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() # <<<<<<<<<<<<<< + * def error_log(self): + * assert self._error_log is not None, "XPath evaluator not initialised" + * return self._error_log.copy() # <<<<<<<<<<<<<< * * def __dealloc__(self): */ @@ -175746,10 +176077,10 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( /* "src/lxml/xpath.pxi":137 * - * property error_log: - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * assert self._error_log is not None, "XPath evaluator not initialised" + * return self._error_log.copy() */ /* function exit code */ @@ -175764,7 +176095,7 @@ static PyObject *__pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_9error_log___get__( } /* "src/lxml/xpath.pxi":141 - * return self._error_log.copy() + * return self._error_log.copy() * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._xpathCtxt is not NULL: @@ -175863,7 +176194,7 @@ static void __pyx_pf_4lxml_5etree_19_XPathEvaluatorBase_4__dealloc__(struct __py } /* "src/lxml/xpath.pxi":141 - * return self._error_log.copy() + * return self._error_log.copy() * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._xpathCtxt is not NULL: @@ -179751,7 +180082,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 * self._unlock() * return result # <<<<<<<<<<<<<< * - * property path: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_result); @@ -179780,12 +180111,12 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4__call__(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "src/lxml/xpath.pxi":454 - * u"""The literal XPath expression. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._path.decode(u'UTF-8') +/* "src/lxml/xpath.pxi":452 * + * @property + * def path(self): # <<<<<<<<<<<<<< + * """The literal XPath expression. + * """ */ /* Python wrapper */ @@ -179808,9 +180139,9 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lx __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xpath.pxi":455 + * """The literal XPath expression. * """ - * def __get__(self): - * return self._path.decode(u'UTF-8') # <<<<<<<<<<<<<< + * return self._path.decode(u'UTF-8') # <<<<<<<<<<<<<< * * def __dealloc__(self): */ @@ -179825,12 +180156,12 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lx __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xpath.pxi":454 - * u"""The literal XPath expression. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * return self._path.decode(u'UTF-8') + /* "src/lxml/xpath.pxi":452 * + * @property + * def path(self): # <<<<<<<<<<<<<< + * """The literal XPath expression. + * """ */ /* function exit code */ @@ -179845,7 +180176,7 @@ static PyObject *__pyx_pf_4lxml_5etree_5XPath_4path___get__(struct __pyx_obj_4lx } /* "src/lxml/xpath.pxi":457 - * return self._path.decode(u'UTF-8') + * return self._path.decode(u'UTF-8') * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._xpath is not NULL: @@ -179897,7 +180228,7 @@ static void __pyx_pf_4lxml_5etree_5XPath_6__dealloc__(struct __pyx_obj_4lxml_5et } /* "src/lxml/xpath.pxi":457 - * return self._path.decode(u'UTF-8') + * return self._path.decode(u'UTF-8') * * def __dealloc__(self): # <<<<<<<<<<<<<< * if self._xpath is not NULL: @@ -182373,7 +182704,7 @@ static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct * cdef void _register_in_context(self, xslt.xsltTransformContext* ctxt): * xslt.xsltSetCtxtSecurityPrefs(self._prefs, ctxt) # <<<<<<<<<<<<<< * - * property options: + * @property */ (void)(xsltSetCtxtSecurityPrefs(__pyx_v_self->_prefs, __pyx_v_ctxt)); @@ -182389,12 +182720,12 @@ static void __pyx_f_4lxml_5etree_17XSLTAccessControl__register_in_context(struct __Pyx_RefNannyFinishContext(); } -/* "src/lxml/xslt.pxi":231 - * property options: - * u"The access control configuration as a map of options." - * def __get__(self): # <<<<<<<<<<<<<< - * return { - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), +/* "src/lxml/xslt.pxi":230 + * + * @property + * def options(self): # <<<<<<<<<<<<<< + * """The access control configuration as a map of options.""" + * return { */ /* Python wrapper */ @@ -182418,20 +182749,20 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xslt.pxi":232 - * u"The access control configuration as a map of options." - * def __get__(self): - * return { # <<<<<<<<<<<<<< - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), - * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), + * def options(self): + * """The access control configuration as a map of options.""" + * return { # <<<<<<<<<<<<<< + * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), + * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), */ __Pyx_XDECREF(__pyx_r); /* "src/lxml/xslt.pxi":233 - * def __get__(self): - * return { - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), # <<<<<<<<<<<<<< - * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), - * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), + * """The access control configuration as a map of options.""" + * return { + * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), # <<<<<<<<<<<<<< + * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), + * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), */ __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -182441,11 +182772,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xslt.pxi":234 - * return { - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), - * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), # <<<<<<<<<<<<<< - * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), - * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), + * return { + * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), + * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), # <<<<<<<<<<<<<< + * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), + * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), */ __pyx_t_2 = __pyx_f_4lxml_5etree_17XSLTAccessControl__optval(__pyx_v_self, XSLT_SECPREF_WRITE_FILE); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -182453,11 +182784,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xslt.pxi":235 - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), - * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), - * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), # <<<<<<<<<<<<<< - * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), - * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), + * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), + * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), + * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), # <<<<<<<<<<<<<< + * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), + * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), */ __pyx_t_2 = __pyx_f_4lxml_5etree_17XSLTAccessControl__optval(__pyx_v_self, XSLT_SECPREF_CREATE_DIRECTORY); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -182465,11 +182796,11 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xslt.pxi":236 - * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), - * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), - * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), # <<<<<<<<<<<<<< - * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), - * } + * u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), + * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), + * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), # <<<<<<<<<<<<<< + * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), + * } */ __pyx_t_2 = __pyx_f_4lxml_5etree_17XSLTAccessControl__optval(__pyx_v_self, XSLT_SECPREF_READ_NETWORK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -182477,10 +182808,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/xslt.pxi":237 - * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), - * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), - * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), # <<<<<<<<<<<<<< - * } + * u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), + * u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), + * u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), # <<<<<<<<<<<<<< + * } * */ __pyx_t_2 = __pyx_f_4lxml_5etree_17XSLTAccessControl__optval(__pyx_v_self, XSLT_SECPREF_WRITE_NETWORK); if (unlikely(!__pyx_t_2)) __PYX_ERR(3, 237, __pyx_L1_error) @@ -182491,12 +182822,12 @@ static PyObject *__pyx_pf_4lxml_5etree_17XSLTAccessControl_7options___get__(stru __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xslt.pxi":231 - * property options: - * u"The access control configuration as a map of options." - * def __get__(self): # <<<<<<<<<<<<<< - * return { - * u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), + /* "src/lxml/xslt.pxi":230 + * + * @property + * def options(self): # <<<<<<<<<<<<<< + * """The access control configuration as a map of options.""" + * return { */ /* function exit code */ @@ -184691,7 +185022,7 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr * if self._c_style is not NULL: * xslt.xsltFreeStylesheet(self._c_style) # <<<<<<<<<<<<<< * - * property error_log: + * @property */ xsltFreeStylesheet(__pyx_v_self->_c_style); @@ -184716,12 +185047,12 @@ static void __pyx_pf_4lxml_5etree_4XSLT_4__dealloc__(struct __pyx_obj_4lxml_5etr __Pyx_RefNannyFinishContext(); } -/* "src/lxml/xslt.pxi":432 - * property error_log: - * u"The log of errors and warnings of an XSLT execution." - * def __get__(self): # <<<<<<<<<<<<<< - * return self._error_log.copy() +/* "src/lxml/xslt.pxi":431 * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The log of errors and warnings of an XSLT execution.""" + * return self._error_log.copy() */ /* Python wrapper */ @@ -184744,9 +185075,9 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/xslt.pxi":433 - * u"The log of errors and warnings of an XSLT execution." - * def __get__(self): - * return self._error_log.copy() # <<<<<<<<<<<<<< + * def error_log(self): + * """The log of errors and warnings of an XSLT execution.""" + * return self._error_log.copy() # <<<<<<<<<<<<<< * * @staticmethod */ @@ -184757,12 +185088,12 @@ static PyObject *__pyx_pf_4lxml_5etree_4XSLT_9error_log___get__(struct __pyx_obj __pyx_t_1 = 0; goto __pyx_L0; - /* "src/lxml/xslt.pxi":432 - * property error_log: - * u"The log of errors and warnings of an XSLT execution." - * def __get__(self): # <<<<<<<<<<<<<< - * return self._error_log.copy() + /* "src/lxml/xslt.pxi":431 * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The log of errors and warnings of an XSLT execution.""" + * return self._error_log.copy() */ /* function exit code */ @@ -189505,7 +189836,7 @@ static void __pyx_pf_4lxml_5etree_15_XSLTResultTree_8__releasebuffer__(struct __ } /* "src/lxml/xslt.pxi":852 - * u"""Return an ElementTree with profiling data for the stylesheet run. + * """Return an ElementTree with profiling data for the stylesheet run. * """ * def __get__(self): # <<<<<<<<<<<<<< * cdef object root @@ -189640,7 +189971,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_XSLTResultTree_12xslt_profile___get__( goto __pyx_L0; /* "src/lxml/xslt.pxi":852 - * u"""Return an ElementTree with profiling data for the stylesheet run. + * """Return an ElementTree with profiling data for the stylesheet run. * """ * def __get__(self): # <<<<<<<<<<<<<< * cdef object root @@ -193386,7 +193717,7 @@ static void __pyx_f_4lxml_5etree__callExtensionElement(xsltTransformContext *__p #endif } -/* "lxml/etree.pyx":3508 +/* "lxml/etree.pyx":3519 * u"Base class for XML validators." * cdef _ErrorLog _error_log * def __cinit__(self): # <<<<<<<<<<<<<< @@ -193416,14 +193747,14 @@ static int __pyx_pf_4lxml_5etree_10_Validator___cinit__(struct __pyx_obj_4lxml_5 PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__cinit__", 0); - /* "lxml/etree.pyx":3509 + /* "lxml/etree.pyx":3520 * cdef _ErrorLog _error_log * def __cinit__(self): * self._error_log = _ErrorLog() # <<<<<<<<<<<<<< * * def validate(self, etree): */ - __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3509, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->_error_log); @@ -193431,7 +193762,7 @@ static int __pyx_pf_4lxml_5etree_10_Validator___cinit__(struct __pyx_obj_4lxml_5 __pyx_v_self->_error_log = ((struct __pyx_obj_4lxml_5etree__ErrorLog *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3508 + /* "lxml/etree.pyx":3519 * u"Base class for XML validators." * cdef _ErrorLog _error_log * def __cinit__(self): # <<<<<<<<<<<<<< @@ -193451,7 +193782,7 @@ static int __pyx_pf_4lxml_5etree_10_Validator___cinit__(struct __pyx_obj_4lxml_5 return __pyx_r; } -/* "lxml/etree.pyx":3511 +/* "lxml/etree.pyx":3522 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< @@ -193482,7 +193813,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4 PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("validate", 0); - /* "lxml/etree.pyx":3518 + /* "lxml/etree.pyx":3529 * Returns true if document is valid, false if not. * """ * return self(etree) # <<<<<<<<<<<<<< @@ -193503,14 +193834,14 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_etree) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3518, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3511 + /* "lxml/etree.pyx":3522 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< @@ -193531,7 +193862,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_2validate(struct __pyx_obj_4 return __pyx_r; } -/* "lxml/etree.pyx":3520 +/* "lxml/etree.pyx":3531 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< @@ -193564,7 +193895,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob int __pyx_t_5; __Pyx_RefNannySetupContext("assertValid", 0); - /* "lxml/etree.pyx":3525 + /* "lxml/etree.pyx":3536 * Raises `DocumentInvalid` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -193584,32 +193915,32 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_etree) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3525, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3525, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3536, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3526 + /* "lxml/etree.pyx":3537 * """ * if not self(etree): * raise DocumentInvalid(self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema"), * self._error_log) */ - __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Document_does_not_comply_with_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3526, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Document_does_not_comply_with_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "lxml/etree.pyx":3528 + /* "lxml/etree.pyx":3539 * raise DocumentInvalid(self._error_log._buildExceptionMessage( * u"Document does not comply with schema"), * self._error_log) # <<<<<<<<<<<<<< * * def assert_(self, etree): */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3526, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -193618,21 +193949,21 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self->_error_log)); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3526 + /* "lxml/etree.pyx":3537 * """ * if not self(etree): * raise DocumentInvalid(self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema"), * self._error_log) */ - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DocumentInvalid), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3526, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree_DocumentInvalid), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_1, 0, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 3526, __pyx_L1_error) + __PYX_ERR(0, 3537, __pyx_L1_error) - /* "lxml/etree.pyx":3525 + /* "lxml/etree.pyx":3536 * Raises `DocumentInvalid` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -193641,7 +193972,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob */ } - /* "lxml/etree.pyx":3520 + /* "lxml/etree.pyx":3531 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< @@ -193664,7 +193995,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_4assertValid(struct __pyx_ob return __pyx_r; } -/* "lxml/etree.pyx":3530 +/* "lxml/etree.pyx":3541 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< @@ -193697,7 +194028,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l int __pyx_t_5; __Pyx_RefNannySetupContext("assert_", 0); - /* "lxml/etree.pyx":3535 + /* "lxml/etree.pyx":3546 * Raises `AssertionError` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -193717,28 +194048,28 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_etree) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_etree); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3535, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3535, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3546, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = ((!__pyx_t_4) != 0); if (unlikely(__pyx_t_5)) { - /* "lxml/etree.pyx":3536 + /* "lxml/etree.pyx":3547 * """ * if not self(etree): * raise AssertionError, self._error_log._buildExceptionMessage( # <<<<<<<<<<<<<< * u"Document does not comply with schema") * */ - __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Document_does_not_comply_with_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3536, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_kp_u_Document_does_not_comply_with_sc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_builtin_AssertionError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 3536, __pyx_L1_error) + __PYX_ERR(0, 3547, __pyx_L1_error) - /* "lxml/etree.pyx":3535 + /* "lxml/etree.pyx":3546 * Raises `AssertionError` if the document does not comply with the schema. * """ * if not self(etree): # <<<<<<<<<<<<<< @@ -193747,7 +194078,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l */ } - /* "lxml/etree.pyx":3530 + /* "lxml/etree.pyx":3541 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< @@ -193770,7 +194101,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_6assert_(struct __pyx_obj_4l return __pyx_r; } -/* "lxml/etree.pyx":3539 +/* "lxml/etree.pyx":3550 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -193797,22 +194128,22 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append_log_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append_log_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_domain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_domain); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_level); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_level); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_line); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL; @@ -193830,7 +194161,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_message, __pyx_v_filename}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -193842,7 +194173,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6, __pyx_v_message, __pyx_v_filename}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -193852,7 +194183,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ } else #endif { - __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -193875,7 +194206,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -193885,7 +194216,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -193893,12 +194224,12 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "lxml/etree.pyx":3541 + /* "lxml/etree.pyx":3552 * cpdef _append_log_message(self, int domain, int type, int level, int line, * message, filename): * self._error_log._receiveGeneric(domain, type, level, line, message, # <<<<<<<<<<<<<< @@ -193907,7 +194238,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__append_log_message(struct __ */ __pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), __pyx_v_domain, __pyx_v_type, __pyx_v_level, __pyx_v_line, __pyx_v_message, __pyx_v_filename); - /* "lxml/etree.pyx":3539 + /* "lxml/etree.pyx":3550 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< @@ -193980,35 +194311,35 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 1); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 1); __PYX_ERR(0, 3550, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_level)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 2); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 2); __PYX_ERR(0, 3550, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_line_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 3); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 3); __PYX_ERR(0, 3550, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 4); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 4); __PYX_ERR(0, 3550, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_filename)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 5); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, 5); __PYX_ERR(0, 3550, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_append_log_message") < 0)) __PYX_ERR(0, 3539, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_append_log_message") < 0)) __PYX_ERR(0, 3550, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -194020,16 +194351,16 @@ static PyObject *__pyx_pw_4lxml_5etree_10_Validator_9_append_log_message(PyObjec values[4] = PyTuple_GET_ITEM(__pyx_args, 4); values[5] = PyTuple_GET_ITEM(__pyx_args, 5); } - __pyx_v_domain = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_domain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3539, __pyx_L3_error) - __pyx_v_type = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3539, __pyx_L3_error) - __pyx_v_level = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3539, __pyx_L3_error) - __pyx_v_line = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3539, __pyx_L3_error) + __pyx_v_domain = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_domain == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L3_error) + __pyx_v_type = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_type == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L3_error) + __pyx_v_level = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_level == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L3_error) + __pyx_v_line = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_line == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 3550, __pyx_L3_error) __pyx_v_message = values[4]; __pyx_v_filename = values[5]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("_append_log_message", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3550, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.etree._Validator._append_log_message", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -194048,7 +194379,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_8_append_log_message(struct PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_append_log_message", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_10_Validator__append_log_message(__pyx_v_self, __pyx_v_domain, __pyx_v_type, __pyx_v_level, __pyx_v_line, __pyx_v_message, __pyx_v_filename, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10_Validator__append_log_message(__pyx_v_self, __pyx_v_domain, __pyx_v_type, __pyx_v_level, __pyx_v_line, __pyx_v_message, __pyx_v_filename, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -194065,7 +194396,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_8_append_log_message(struct return __pyx_r; } -/* "lxml/etree.pyx":3544 +/* "lxml/etree.pyx":3555 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< @@ -194086,12 +194417,12 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT; if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear_error_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_clear_error_log); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_4lxml_5etree_10_Validator_11_clear_error_log)) { __Pyx_XDECREF(__pyx_r); @@ -194108,7 +194439,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3544, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -194116,7 +194447,7 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; } - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_type_dict_guard != __pyx_tp_dict_version)) { @@ -194124,23 +194455,23 @@ static PyObject *__pyx_f_4lxml_5etree_10_Validator__clear_error_log(struct __pyx } #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS } #endif } - /* "lxml/etree.pyx":3545 + /* "lxml/etree.pyx":3556 * * cpdef _clear_error_log(self): * self._error_log.clear() # <<<<<<<<<<<<<< * - * property error_log: + * @property */ - __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->_error_log, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3545, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->clear(__pyx_v_self->_error_log, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3544 + /* "lxml/etree.pyx":3555 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< @@ -194184,7 +194515,7 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_10_clear_error_log(struct __ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_clear_error_log", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_5etree_10_Validator__clear_error_log(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_5etree_10_Validator__clear_error_log(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -194201,12 +194532,12 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_10_clear_error_log(struct __ return __pyx_r; } -/* "lxml/etree.pyx":3549 - * property error_log: - * u"The log of validation errors and warnings." - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() +/* "lxml/etree.pyx":3559 + * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The log of validation errors and warnings.""" + * assert self._error_log is not None, "XPath evaluator not initialised" */ /* Python wrapper */ @@ -194229,11 +194560,11 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_9error_log___get__(struct __ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/etree.pyx":3550 - * u"The log of validation errors and warnings." - * def __get__(self): - * assert self._error_log is not None, "XPath evaluator not initialised" # <<<<<<<<<<<<<< - * return self._error_log.copy() + /* "lxml/etree.pyx":3561 + * def error_log(self): + * """The log of validation errors and warnings.""" + * assert self._error_log is not None, "XPath evaluator not initialised" # <<<<<<<<<<<<<< + * return self._error_log.copy() * */ #ifndef CYTHON_WITHOUT_ASSERTIONS @@ -194241,31 +194572,31 @@ static PyObject *__pyx_pf_4lxml_5etree_10_Validator_9error_log___get__(struct __ __pyx_t_1 = (((PyObject *)__pyx_v_self->_error_log) != Py_None); if (unlikely(!(__pyx_t_1 != 0))) { PyErr_SetObject(PyExc_AssertionError, __pyx_kp_s_XPath_evaluator_not_initialised); - __PYX_ERR(0, 3550, __pyx_L1_error) + __PYX_ERR(0, 3561, __pyx_L1_error) } } #endif - /* "lxml/etree.pyx":3551 - * def __get__(self): - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() # <<<<<<<<<<<<<< + /* "lxml/etree.pyx":3562 + * """The log of validation errors and warnings.""" + * assert self._error_log is not None, "XPath evaluator not initialised" + * return self._error_log.copy() # <<<<<<<<<<<<<< * * include "dtd.pxi" # DTD */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3551, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_4lxml_5etree__ErrorLog *)__pyx_v_self->_error_log->__pyx_base.__pyx_base.__pyx_vtab)->__pyx_base.__pyx_base.copy(((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_v_self->_error_log), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/etree.pyx":3549 - * property error_log: - * u"The log of validation errors and warnings." - * def __get__(self): # <<<<<<<<<<<<<< - * assert self._error_log is not None, "XPath evaluator not initialised" - * return self._error_log.copy() + /* "lxml/etree.pyx":3559 + * + * @property + * def error_log(self): # <<<<<<<<<<<<<< + * """The log of validation errors and warnings.""" + * assert self._error_log is not None, "XPath evaluator not initialised" */ /* function exit code */ @@ -194375,7 +194706,7 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct * def __repr__(self): * return "<%s.%s object name=%r type=%r occur=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.type, self.occur, id(self)) # <<<<<<<<<<<<<< * - * property name: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 29, __pyx_L1_error) @@ -194450,10 +194781,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl___repr__(struct /* "src/lxml/dtd.pxi":32 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* Python wrapper */ @@ -194478,20 +194809,20 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":33 - * property name: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 33, __pyx_L1_error) /* "src/lxml/dtd.pxi":34 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< + * def name(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< * - * property type: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { @@ -194509,10 +194840,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st /* "src/lxml/dtd.pxi":32 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* function exit code */ @@ -194529,10 +194860,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4name___get__(st /* "src/lxml/dtd.pxi":37 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.type + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.type */ /* Python wrapper */ @@ -194557,40 +194888,40 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":38 - * property type: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef int type = self._c_node.type - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: + * @property + * def type(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef int type = self._c_node.type + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 38, __pyx_L1_error) /* "src/lxml/dtd.pxi":39 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.type # <<<<<<<<<<<<<< - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: - * return "pcdata" + * def type(self): + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.type # <<<<<<<<<<<<<< + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: + * return "pcdata" */ __pyx_t_2 = __pyx_v_self->_c_node->type; __pyx_v_type = __pyx_t_2; /* "src/lxml/dtd.pxi":40 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.type - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: # <<<<<<<<<<<<<< - * return "pcdata" - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.type + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: # <<<<<<<<<<<<<< + * return "pcdata" + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: */ switch (__pyx_v_type) { case XML_ELEMENT_CONTENT_PCDATA: /* "src/lxml/dtd.pxi":41 - * cdef int type = self._c_node.type - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: - * return "pcdata" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: - * return "element" + * cdef int type = self._c_node.type + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: + * return "pcdata" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + * return "element" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_pcdata); @@ -194598,21 +194929,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st goto __pyx_L0; /* "src/lxml/dtd.pxi":40 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.type - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: # <<<<<<<<<<<<<< - * return "pcdata" - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.type + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: # <<<<<<<<<<<<<< + * return "pcdata" + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: */ break; case XML_ELEMENT_CONTENT_ELEMENT: /* "src/lxml/dtd.pxi":43 - * return "pcdata" - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: - * return "element" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: - * return "seq" + * return "pcdata" + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + * return "element" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_CONTENT_SEQ: + * return "seq" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_element); @@ -194620,21 +194951,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st goto __pyx_L0; /* "src/lxml/dtd.pxi":42 - * if type == tree.XML_ELEMENT_CONTENT_PCDATA: - * return "pcdata" - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: # <<<<<<<<<<<<<< - * return "element" - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: + * if type == tree.XML_ELEMENT_CONTENT_PCDATA: + * return "pcdata" + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: # <<<<<<<<<<<<<< + * return "element" + * elif type == tree.XML_ELEMENT_CONTENT_SEQ: */ break; case XML_ELEMENT_CONTENT_SEQ: /* "src/lxml/dtd.pxi":45 - * return "element" - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: - * return "seq" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_CONTENT_OR: - * return "or" + * return "element" + * elif type == tree.XML_ELEMENT_CONTENT_SEQ: + * return "seq" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_CONTENT_OR: + * return "or" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_seq); @@ -194642,21 +194973,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st goto __pyx_L0; /* "src/lxml/dtd.pxi":44 - * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: - * return "element" - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: # <<<<<<<<<<<<<< - * return "seq" - * elif type == tree.XML_ELEMENT_CONTENT_OR: + * elif type == tree.XML_ELEMENT_CONTENT_ELEMENT: + * return "element" + * elif type == tree.XML_ELEMENT_CONTENT_SEQ: # <<<<<<<<<<<<<< + * return "seq" + * elif type == tree.XML_ELEMENT_CONTENT_OR: */ break; case XML_ELEMENT_CONTENT_OR: /* "src/lxml/dtd.pxi":47 - * return "seq" - * elif type == tree.XML_ELEMENT_CONTENT_OR: - * return "or" # <<<<<<<<<<<<<< - * else: - * return None + * return "seq" + * elif type == tree.XML_ELEMENT_CONTENT_OR: + * return "or" # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_or); @@ -194664,21 +194995,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st goto __pyx_L0; /* "src/lxml/dtd.pxi":46 - * elif type == tree.XML_ELEMENT_CONTENT_SEQ: - * return "seq" - * elif type == tree.XML_ELEMENT_CONTENT_OR: # <<<<<<<<<<<<<< - * return "or" - * else: + * elif type == tree.XML_ELEMENT_CONTENT_SEQ: + * return "seq" + * elif type == tree.XML_ELEMENT_CONTENT_OR: # <<<<<<<<<<<<<< + * return "or" + * else: */ break; default: /* "src/lxml/dtd.pxi":49 - * return "or" - * else: - * return None # <<<<<<<<<<<<<< + * return "or" + * else: + * return None # <<<<<<<<<<<<<< * - * property occur: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -194688,10 +195019,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st /* "src/lxml/dtd.pxi":37 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.type + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.type */ /* function exit code */ @@ -194706,10 +195037,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4type___get__(st /* "src/lxml/dtd.pxi":52 * - * property occur: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int occur = self._c_node.ocur + * @property + * def occur(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int occur = self._c_node.ocur */ /* Python wrapper */ @@ -194734,40 +195065,40 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":53 - * property occur: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef int occur = self._c_node.ocur - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: + * @property + * def occur(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef int occur = self._c_node.ocur + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 53, __pyx_L1_error) /* "src/lxml/dtd.pxi":54 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef int occur = self._c_node.ocur # <<<<<<<<<<<<<< - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: - * return "once" + * def occur(self): + * _assertValidDTDNode(self, self._c_node) + * cdef int occur = self._c_node.ocur # <<<<<<<<<<<<<< + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: + * return "once" */ __pyx_t_2 = __pyx_v_self->_c_node->ocur; __pyx_v_occur = __pyx_t_2; /* "src/lxml/dtd.pxi":55 - * _assertValidDTDNode(self, self._c_node) - * cdef int occur = self._c_node.ocur - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: # <<<<<<<<<<<<<< - * return "once" - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: + * _assertValidDTDNode(self, self._c_node) + * cdef int occur = self._c_node.ocur + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: # <<<<<<<<<<<<<< + * return "once" + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: */ switch (__pyx_v_occur) { case XML_ELEMENT_CONTENT_ONCE: /* "src/lxml/dtd.pxi":56 - * cdef int occur = self._c_node.ocur - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: - * return "once" # <<<<<<<<<<<<<< - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: - * return "opt" + * cdef int occur = self._c_node.ocur + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: + * return "once" # <<<<<<<<<<<<<< + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: + * return "opt" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_once); @@ -194775,21 +195106,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s goto __pyx_L0; /* "src/lxml/dtd.pxi":55 - * _assertValidDTDNode(self, self._c_node) - * cdef int occur = self._c_node.ocur - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: # <<<<<<<<<<<<<< - * return "once" - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: + * _assertValidDTDNode(self, self._c_node) + * cdef int occur = self._c_node.ocur + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: # <<<<<<<<<<<<<< + * return "once" + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: */ break; case XML_ELEMENT_CONTENT_OPT: /* "src/lxml/dtd.pxi":58 - * return "once" - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: - * return "opt" # <<<<<<<<<<<<<< - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: - * return "mult" + * return "once" + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: + * return "opt" # <<<<<<<<<<<<<< + * elif occur == tree.XML_ELEMENT_CONTENT_MULT: + * return "mult" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_opt); @@ -194797,21 +195128,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s goto __pyx_L0; /* "src/lxml/dtd.pxi":57 - * if occur == tree.XML_ELEMENT_CONTENT_ONCE: - * return "once" - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: # <<<<<<<<<<<<<< - * return "opt" - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: + * if occur == tree.XML_ELEMENT_CONTENT_ONCE: + * return "once" + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: # <<<<<<<<<<<<<< + * return "opt" + * elif occur == tree.XML_ELEMENT_CONTENT_MULT: */ break; case XML_ELEMENT_CONTENT_MULT: /* "src/lxml/dtd.pxi":60 - * return "opt" - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: - * return "mult" # <<<<<<<<<<<<<< - * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: - * return "plus" + * return "opt" + * elif occur == tree.XML_ELEMENT_CONTENT_MULT: + * return "mult" # <<<<<<<<<<<<<< + * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: + * return "plus" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_mult); @@ -194819,21 +195150,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s goto __pyx_L0; /* "src/lxml/dtd.pxi":59 - * elif occur == tree.XML_ELEMENT_CONTENT_OPT: - * return "opt" - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: # <<<<<<<<<<<<<< - * return "mult" - * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: + * elif occur == tree.XML_ELEMENT_CONTENT_OPT: + * return "opt" + * elif occur == tree.XML_ELEMENT_CONTENT_MULT: # <<<<<<<<<<<<<< + * return "mult" + * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: */ break; case XML_ELEMENT_CONTENT_PLUS: /* "src/lxml/dtd.pxi":62 - * return "mult" - * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: - * return "plus" # <<<<<<<<<<<<<< - * else: - * return None + * return "mult" + * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: + * return "plus" # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_plus); @@ -194841,21 +195172,21 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s goto __pyx_L0; /* "src/lxml/dtd.pxi":61 - * elif occur == tree.XML_ELEMENT_CONTENT_MULT: - * return "mult" - * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: # <<<<<<<<<<<<<< - * return "plus" - * else: + * elif occur == tree.XML_ELEMENT_CONTENT_MULT: + * return "mult" + * elif occur == tree.XML_ELEMENT_CONTENT_PLUS: # <<<<<<<<<<<<<< + * return "plus" + * else: */ break; default: /* "src/lxml/dtd.pxi":64 - * return "plus" - * else: - * return None # <<<<<<<<<<<<<< + * return "plus" + * else: + * return None # <<<<<<<<<<<<<< * - * property left: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -194865,10 +195196,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s /* "src/lxml/dtd.pxi":52 * - * property occur: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int occur = self._c_node.ocur + * @property + * def occur(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int occur = self._c_node.ocur */ /* function exit code */ @@ -194883,10 +195214,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5occur___get__(s /* "src/lxml/dtd.pxi":67 * - * property left: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * c1 = self._c_node.c1 + * @property + * def left(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * c1 = self._c_node.c1 */ /* Python wrapper */ @@ -194915,40 +195246,40 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":68 - * property left: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * c1 = self._c_node.c1 - * if c1: + * @property + * def left(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * c1 = self._c_node.c1 + * if c1: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 68, __pyx_L1_error) /* "src/lxml/dtd.pxi":69 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * c1 = self._c_node.c1 # <<<<<<<<<<<<<< - * if c1: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * def left(self): + * _assertValidDTDNode(self, self._c_node) + * c1 = self._c_node.c1 # <<<<<<<<<<<<<< + * if c1: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ __pyx_t_2 = __pyx_v_self->_c_node->c1; __pyx_v_c1 = __pyx_t_2; /* "src/lxml/dtd.pxi":70 - * _assertValidDTDNode(self, self._c_node) - * c1 = self._c_node.c1 - * if c1: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * c1 = self._c_node.c1 + * if c1: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ __pyx_t_3 = (__pyx_v_c1 != 0); if (__pyx_t_3) { /* "src/lxml/dtd.pxi":71 - * c1 = self._c_node.c1 - * if c1: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< - * node._dtd = self._dtd - * node._c_node = c1 + * c1 = self._c_node.c1 + * if c1: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< + * node._dtd = self._dtd + * node._c_node = c1 */ __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(((PyTypeObject *)__pyx_ptype_4lxml_5etree__DTDElementContentDecl), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 71, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); @@ -194959,11 +195290,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":72 - * if c1: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd # <<<<<<<<<<<<<< - * node._c_node = c1 - * return node + * if c1: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd # <<<<<<<<<<<<<< + * node._c_node = c1 + * return node */ __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); @@ -194974,20 +195305,20 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":73 - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd - * node._c_node = c1 # <<<<<<<<<<<<<< - * return node - * else: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd + * node._c_node = c1 # <<<<<<<<<<<<<< + * return node + * else: */ __pyx_v_node->_c_node = ((xmlElementContent *)__pyx_v_c1); /* "src/lxml/dtd.pxi":74 - * node._dtd = self._dtd - * node._c_node = c1 - * return node # <<<<<<<<<<<<<< - * else: - * return None + * node._dtd = self._dtd + * node._c_node = c1 + * return node # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); @@ -194995,20 +195326,20 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st goto __pyx_L0; /* "src/lxml/dtd.pxi":70 - * _assertValidDTDNode(self, self._c_node) - * c1 = self._c_node.c1 - * if c1: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * c1 = self._c_node.c1 + * if c1: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ } /* "src/lxml/dtd.pxi":76 - * return node - * else: - * return None # <<<<<<<<<<<<<< + * return node + * else: + * return None # <<<<<<<<<<<<<< * - * property right: + * @property */ /*else*/ { __Pyx_XDECREF(__pyx_r); @@ -195018,10 +195349,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st /* "src/lxml/dtd.pxi":67 * - * property left: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * c1 = self._c_node.c1 + * @property + * def left(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * c1 = self._c_node.c1 */ /* function exit code */ @@ -195039,10 +195370,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_4left___get__(st /* "src/lxml/dtd.pxi":79 * - * property right: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * c2 = self._c_node.c2 + * @property + * def right(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * c2 = self._c_node.c2 */ /* Python wrapper */ @@ -195071,40 +195402,40 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":80 - * property right: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * c2 = self._c_node.c2 - * if c2: + * @property + * def right(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * c2 = self._c_node.c2 + * if c2: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 80, __pyx_L1_error) /* "src/lxml/dtd.pxi":81 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * c2 = self._c_node.c2 # <<<<<<<<<<<<<< - * if c2: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * def right(self): + * _assertValidDTDNode(self, self._c_node) + * c2 = self._c_node.c2 # <<<<<<<<<<<<<< + * if c2: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ __pyx_t_2 = __pyx_v_self->_c_node->c2; __pyx_v_c2 = __pyx_t_2; /* "src/lxml/dtd.pxi":82 - * _assertValidDTDNode(self, self._c_node) - * c2 = self._c_node.c2 - * if c2: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * c2 = self._c_node.c2 + * if c2: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ __pyx_t_3 = (__pyx_v_c2 != 0); if (__pyx_t_3) { /* "src/lxml/dtd.pxi":83 - * c2 = self._c_node.c2 - * if c2: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< - * node._dtd = self._dtd - * node._c_node = c2 + * c2 = self._c_node.c2 + * if c2: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< + * node._dtd = self._dtd + * node._c_node = c2 */ __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(((PyTypeObject *)__pyx_ptype_4lxml_5etree__DTDElementContentDecl), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 83, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); @@ -195115,11 +195446,11 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":84 - * if c2: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd # <<<<<<<<<<<<<< - * node._c_node = c2 - * return node + * if c2: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd # <<<<<<<<<<<<<< + * node._c_node = c2 + * return node */ __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); @@ -195130,20 +195461,20 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":85 - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd - * node._c_node = c2 # <<<<<<<<<<<<<< - * return node - * else: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd + * node._c_node = c2 # <<<<<<<<<<<<<< + * return node + * else: */ __pyx_v_node->_c_node = ((xmlElementContent *)__pyx_v_c2); /* "src/lxml/dtd.pxi":86 - * node._dtd = self._dtd - * node._c_node = c2 - * return node # <<<<<<<<<<<<<< - * else: - * return None + * node._dtd = self._dtd + * node._c_node = c2 + * return node # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); @@ -195151,18 +195482,18 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s goto __pyx_L0; /* "src/lxml/dtd.pxi":82 - * _assertValidDTDNode(self, self._c_node) - * c2 = self._c_node.c2 - * if c2: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * c2 = self._c_node.c2 + * if c2: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ } /* "src/lxml/dtd.pxi":88 - * return node - * else: - * return None # <<<<<<<<<<<<<< + * return node + * else: + * return None # <<<<<<<<<<<<<< * * */ @@ -195174,10 +195505,10 @@ static PyObject *__pyx_pf_4lxml_5etree_22_DTDElementContentDecl_5right___get__(s /* "src/lxml/dtd.pxi":79 * - * property right: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * c2 = self._c_node.c2 + * @property + * def right(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * c2 = self._c_node.c2 */ /* function exit code */ @@ -195234,7 +195565,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx * def __repr__(self): * return "<%s.%s object name=%r elemname=%r prefix=%r type=%r default=%r default_value=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.elemname, self.prefix, self.type, self.default, self.default_value, id(self)) # <<<<<<<<<<<<<< * - * property name: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 99, __pyx_L1_error) @@ -195327,10 +195658,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl___repr__(struct __pyx /* "src/lxml/dtd.pxi":102 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* Python wrapper */ @@ -195355,20 +195686,20 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":103 - * property name: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 103, __pyx_L1_error) /* "src/lxml/dtd.pxi":104 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< + * def name(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< * - * property elemname: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { @@ -195386,10 +195717,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct /* "src/lxml/dtd.pxi":102 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* function exit code */ @@ -195406,10 +195737,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4name___get__(struct /* "src/lxml/dtd.pxi":107 * - * property elemname: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None + * @property + * def elemname(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None */ /* Python wrapper */ @@ -195434,20 +195765,20 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":108 - * property elemname: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None + * @property + * def elemname(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 108, __pyx_L1_error) /* "src/lxml/dtd.pxi":109 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None # <<<<<<<<<<<<<< + * def elemname(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None # <<<<<<<<<<<<<< * - * property prefix: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->elem != NULL) != 0)) { @@ -195465,10 +195796,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str /* "src/lxml/dtd.pxi":107 * - * property elemname: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None + * @property + * def elemname(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.elem) if self._c_node.elem is not NULL else None */ /* function exit code */ @@ -195485,10 +195816,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_8elemname___get__(str /* "src/lxml/dtd.pxi":112 * - * property prefix: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None */ /* Python wrapper */ @@ -195513,20 +195844,20 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":113 - * property prefix: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 113, __pyx_L1_error) /* "src/lxml/dtd.pxi":114 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None # <<<<<<<<<<<<<< + * def prefix(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None # <<<<<<<<<<<<<< * - * property type: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->prefix != NULL) != 0)) { @@ -195544,10 +195875,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc /* "src/lxml/dtd.pxi":112 * - * property prefix: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None */ /* function exit code */ @@ -195564,10 +195895,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_6prefix___get__(struc /* "src/lxml/dtd.pxi":117 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.atype + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.atype */ /* Python wrapper */ @@ -195592,40 +195923,40 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":118 - * property type: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef int type = self._c_node.atype - * if type == tree.XML_ATTRIBUTE_CDATA: + * @property + * def type(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef int type = self._c_node.atype + * if type == tree.XML_ATTRIBUTE_CDATA: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 118, __pyx_L1_error) /* "src/lxml/dtd.pxi":119 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.atype # <<<<<<<<<<<<<< - * if type == tree.XML_ATTRIBUTE_CDATA: - * return "cdata" + * def type(self): + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.atype # <<<<<<<<<<<<<< + * if type == tree.XML_ATTRIBUTE_CDATA: + * return "cdata" */ __pyx_t_2 = __pyx_v_self->_c_node->atype; __pyx_v_type = __pyx_t_2; /* "src/lxml/dtd.pxi":120 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.atype - * if type == tree.XML_ATTRIBUTE_CDATA: # <<<<<<<<<<<<<< - * return "cdata" - * elif type == tree.XML_ATTRIBUTE_ID: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.atype + * if type == tree.XML_ATTRIBUTE_CDATA: # <<<<<<<<<<<<<< + * return "cdata" + * elif type == tree.XML_ATTRIBUTE_ID: */ switch (__pyx_v_type) { case XML_ATTRIBUTE_CDATA: /* "src/lxml/dtd.pxi":121 - * cdef int type = self._c_node.atype - * if type == tree.XML_ATTRIBUTE_CDATA: - * return "cdata" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_ID: - * return "id" + * cdef int type = self._c_node.atype + * if type == tree.XML_ATTRIBUTE_CDATA: + * return "cdata" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_ID: + * return "id" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_cdata); @@ -195633,21 +195964,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":120 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.atype - * if type == tree.XML_ATTRIBUTE_CDATA: # <<<<<<<<<<<<<< - * return "cdata" - * elif type == tree.XML_ATTRIBUTE_ID: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.atype + * if type == tree.XML_ATTRIBUTE_CDATA: # <<<<<<<<<<<<<< + * return "cdata" + * elif type == tree.XML_ATTRIBUTE_ID: */ break; case XML_ATTRIBUTE_ID: /* "src/lxml/dtd.pxi":123 - * return "cdata" - * elif type == tree.XML_ATTRIBUTE_ID: - * return "id" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_IDREF: - * return "idref" + * return "cdata" + * elif type == tree.XML_ATTRIBUTE_ID: + * return "id" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_IDREF: + * return "idref" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_id); @@ -195655,21 +195986,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":122 - * if type == tree.XML_ATTRIBUTE_CDATA: - * return "cdata" - * elif type == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< - * return "id" - * elif type == tree.XML_ATTRIBUTE_IDREF: + * if type == tree.XML_ATTRIBUTE_CDATA: + * return "cdata" + * elif type == tree.XML_ATTRIBUTE_ID: # <<<<<<<<<<<<<< + * return "id" + * elif type == tree.XML_ATTRIBUTE_IDREF: */ break; case XML_ATTRIBUTE_IDREF: /* "src/lxml/dtd.pxi":125 - * return "id" - * elif type == tree.XML_ATTRIBUTE_IDREF: - * return "idref" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_IDREFS: - * return "idrefs" + * return "id" + * elif type == tree.XML_ATTRIBUTE_IDREF: + * return "idref" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_IDREFS: + * return "idrefs" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_idref); @@ -195677,21 +196008,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":124 - * elif type == tree.XML_ATTRIBUTE_ID: - * return "id" - * elif type == tree.XML_ATTRIBUTE_IDREF: # <<<<<<<<<<<<<< - * return "idref" - * elif type == tree.XML_ATTRIBUTE_IDREFS: + * elif type == tree.XML_ATTRIBUTE_ID: + * return "id" + * elif type == tree.XML_ATTRIBUTE_IDREF: # <<<<<<<<<<<<<< + * return "idref" + * elif type == tree.XML_ATTRIBUTE_IDREFS: */ break; case XML_ATTRIBUTE_IDREFS: /* "src/lxml/dtd.pxi":127 - * return "idref" - * elif type == tree.XML_ATTRIBUTE_IDREFS: - * return "idrefs" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_ENTITY: - * return "entity" + * return "idref" + * elif type == tree.XML_ATTRIBUTE_IDREFS: + * return "idrefs" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_ENTITY: + * return "entity" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_idrefs); @@ -195699,21 +196030,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":126 - * elif type == tree.XML_ATTRIBUTE_IDREF: - * return "idref" - * elif type == tree.XML_ATTRIBUTE_IDREFS: # <<<<<<<<<<<<<< - * return "idrefs" - * elif type == tree.XML_ATTRIBUTE_ENTITY: + * elif type == tree.XML_ATTRIBUTE_IDREF: + * return "idref" + * elif type == tree.XML_ATTRIBUTE_IDREFS: # <<<<<<<<<<<<<< + * return "idrefs" + * elif type == tree.XML_ATTRIBUTE_ENTITY: */ break; case XML_ATTRIBUTE_ENTITY: /* "src/lxml/dtd.pxi":129 - * return "idrefs" - * elif type == tree.XML_ATTRIBUTE_ENTITY: - * return "entity" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_ENTITIES: - * return "entities" + * return "idrefs" + * elif type == tree.XML_ATTRIBUTE_ENTITY: + * return "entity" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_ENTITIES: + * return "entities" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_entity); @@ -195721,21 +196052,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":128 - * elif type == tree.XML_ATTRIBUTE_IDREFS: - * return "idrefs" - * elif type == tree.XML_ATTRIBUTE_ENTITY: # <<<<<<<<<<<<<< - * return "entity" - * elif type == tree.XML_ATTRIBUTE_ENTITIES: + * elif type == tree.XML_ATTRIBUTE_IDREFS: + * return "idrefs" + * elif type == tree.XML_ATTRIBUTE_ENTITY: # <<<<<<<<<<<<<< + * return "entity" + * elif type == tree.XML_ATTRIBUTE_ENTITIES: */ break; case XML_ATTRIBUTE_ENTITIES: /* "src/lxml/dtd.pxi":131 - * return "entity" - * elif type == tree.XML_ATTRIBUTE_ENTITIES: - * return "entities" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_NMTOKEN: - * return "nmtoken" + * return "entity" + * elif type == tree.XML_ATTRIBUTE_ENTITIES: + * return "entities" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_NMTOKEN: + * return "nmtoken" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_entities); @@ -195743,21 +196074,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":130 - * elif type == tree.XML_ATTRIBUTE_ENTITY: - * return "entity" - * elif type == tree.XML_ATTRIBUTE_ENTITIES: # <<<<<<<<<<<<<< - * return "entities" - * elif type == tree.XML_ATTRIBUTE_NMTOKEN: + * elif type == tree.XML_ATTRIBUTE_ENTITY: + * return "entity" + * elif type == tree.XML_ATTRIBUTE_ENTITIES: # <<<<<<<<<<<<<< + * return "entities" + * elif type == tree.XML_ATTRIBUTE_NMTOKEN: */ break; case XML_ATTRIBUTE_NMTOKEN: /* "src/lxml/dtd.pxi":133 - * return "entities" - * elif type == tree.XML_ATTRIBUTE_NMTOKEN: - * return "nmtoken" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_NMTOKENS: - * return "nmtokens" + * return "entities" + * elif type == tree.XML_ATTRIBUTE_NMTOKEN: + * return "nmtoken" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_NMTOKENS: + * return "nmtokens" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_nmtoken); @@ -195765,21 +196096,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":132 - * elif type == tree.XML_ATTRIBUTE_ENTITIES: - * return "entities" - * elif type == tree.XML_ATTRIBUTE_NMTOKEN: # <<<<<<<<<<<<<< - * return "nmtoken" - * elif type == tree.XML_ATTRIBUTE_NMTOKENS: + * elif type == tree.XML_ATTRIBUTE_ENTITIES: + * return "entities" + * elif type == tree.XML_ATTRIBUTE_NMTOKEN: # <<<<<<<<<<<<<< + * return "nmtoken" + * elif type == tree.XML_ATTRIBUTE_NMTOKENS: */ break; case XML_ATTRIBUTE_NMTOKENS: /* "src/lxml/dtd.pxi":135 - * return "nmtoken" - * elif type == tree.XML_ATTRIBUTE_NMTOKENS: - * return "nmtokens" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: - * return "enumeration" + * return "nmtoken" + * elif type == tree.XML_ATTRIBUTE_NMTOKENS: + * return "nmtokens" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_ENUMERATION: + * return "enumeration" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_nmtokens); @@ -195787,21 +196118,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":134 - * elif type == tree.XML_ATTRIBUTE_NMTOKEN: - * return "nmtoken" - * elif type == tree.XML_ATTRIBUTE_NMTOKENS: # <<<<<<<<<<<<<< - * return "nmtokens" - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: + * elif type == tree.XML_ATTRIBUTE_NMTOKEN: + * return "nmtoken" + * elif type == tree.XML_ATTRIBUTE_NMTOKENS: # <<<<<<<<<<<<<< + * return "nmtokens" + * elif type == tree.XML_ATTRIBUTE_ENUMERATION: */ break; case XML_ATTRIBUTE_ENUMERATION: /* "src/lxml/dtd.pxi":137 - * return "nmtokens" - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: - * return "enumeration" # <<<<<<<<<<<<<< - * elif type == tree.XML_ATTRIBUTE_NOTATION: - * return "notation" + * return "nmtokens" + * elif type == tree.XML_ATTRIBUTE_ENUMERATION: + * return "enumeration" # <<<<<<<<<<<<<< + * elif type == tree.XML_ATTRIBUTE_NOTATION: + * return "notation" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_enumeration); @@ -195809,21 +196140,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":136 - * elif type == tree.XML_ATTRIBUTE_NMTOKENS: - * return "nmtokens" - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: # <<<<<<<<<<<<<< - * return "enumeration" - * elif type == tree.XML_ATTRIBUTE_NOTATION: + * elif type == tree.XML_ATTRIBUTE_NMTOKENS: + * return "nmtokens" + * elif type == tree.XML_ATTRIBUTE_ENUMERATION: # <<<<<<<<<<<<<< + * return "enumeration" + * elif type == tree.XML_ATTRIBUTE_NOTATION: */ break; case XML_ATTRIBUTE_NOTATION: /* "src/lxml/dtd.pxi":139 - * return "enumeration" - * elif type == tree.XML_ATTRIBUTE_NOTATION: - * return "notation" # <<<<<<<<<<<<<< - * else: - * return None + * return "enumeration" + * elif type == tree.XML_ATTRIBUTE_NOTATION: + * return "notation" # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_notation); @@ -195831,21 +196162,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":138 - * elif type == tree.XML_ATTRIBUTE_ENUMERATION: - * return "enumeration" - * elif type == tree.XML_ATTRIBUTE_NOTATION: # <<<<<<<<<<<<<< - * return "notation" - * else: + * elif type == tree.XML_ATTRIBUTE_ENUMERATION: + * return "enumeration" + * elif type == tree.XML_ATTRIBUTE_NOTATION: # <<<<<<<<<<<<<< + * return "notation" + * else: */ break; default: /* "src/lxml/dtd.pxi":141 - * return "notation" - * else: - * return None # <<<<<<<<<<<<<< + * return "notation" + * else: + * return None # <<<<<<<<<<<<<< * - * property default: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -195855,10 +196186,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct /* "src/lxml/dtd.pxi":117 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.atype + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.atype */ /* function exit code */ @@ -195873,10 +196204,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_4type___get__(struct /* "src/lxml/dtd.pxi":144 * - * property default: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int default = self._c_node.def_ + * @property + * def default(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int default = self._c_node.def_ */ /* Python wrapper */ @@ -195901,40 +196232,40 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":145 - * property default: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef int default = self._c_node.def_ - * if default == tree.XML_ATTRIBUTE_NONE: + * @property + * def default(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef int default = self._c_node.def_ + * if default == tree.XML_ATTRIBUTE_NONE: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 145, __pyx_L1_error) /* "src/lxml/dtd.pxi":146 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef int default = self._c_node.def_ # <<<<<<<<<<<<<< - * if default == tree.XML_ATTRIBUTE_NONE: - * return "none" + * def default(self): + * _assertValidDTDNode(self, self._c_node) + * cdef int default = self._c_node.def_ # <<<<<<<<<<<<<< + * if default == tree.XML_ATTRIBUTE_NONE: + * return "none" */ __pyx_t_2 = __pyx_v_self->_c_node->def; __pyx_v_default = __pyx_t_2; /* "src/lxml/dtd.pxi":147 - * _assertValidDTDNode(self, self._c_node) - * cdef int default = self._c_node.def_ - * if default == tree.XML_ATTRIBUTE_NONE: # <<<<<<<<<<<<<< - * return "none" - * elif default == tree.XML_ATTRIBUTE_REQUIRED: + * _assertValidDTDNode(self, self._c_node) + * cdef int default = self._c_node.def_ + * if default == tree.XML_ATTRIBUTE_NONE: # <<<<<<<<<<<<<< + * return "none" + * elif default == tree.XML_ATTRIBUTE_REQUIRED: */ switch (__pyx_v_default) { case XML_ATTRIBUTE_NONE: /* "src/lxml/dtd.pxi":148 - * cdef int default = self._c_node.def_ - * if default == tree.XML_ATTRIBUTE_NONE: - * return "none" # <<<<<<<<<<<<<< - * elif default == tree.XML_ATTRIBUTE_REQUIRED: - * return "required" + * cdef int default = self._c_node.def_ + * if default == tree.XML_ATTRIBUTE_NONE: + * return "none" # <<<<<<<<<<<<<< + * elif default == tree.XML_ATTRIBUTE_REQUIRED: + * return "required" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_none); @@ -195942,21 +196273,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru goto __pyx_L0; /* "src/lxml/dtd.pxi":147 - * _assertValidDTDNode(self, self._c_node) - * cdef int default = self._c_node.def_ - * if default == tree.XML_ATTRIBUTE_NONE: # <<<<<<<<<<<<<< - * return "none" - * elif default == tree.XML_ATTRIBUTE_REQUIRED: + * _assertValidDTDNode(self, self._c_node) + * cdef int default = self._c_node.def_ + * if default == tree.XML_ATTRIBUTE_NONE: # <<<<<<<<<<<<<< + * return "none" + * elif default == tree.XML_ATTRIBUTE_REQUIRED: */ break; case XML_ATTRIBUTE_REQUIRED: /* "src/lxml/dtd.pxi":150 - * return "none" - * elif default == tree.XML_ATTRIBUTE_REQUIRED: - * return "required" # <<<<<<<<<<<<<< - * elif default == tree.XML_ATTRIBUTE_IMPLIED: - * return "implied" + * return "none" + * elif default == tree.XML_ATTRIBUTE_REQUIRED: + * return "required" # <<<<<<<<<<<<<< + * elif default == tree.XML_ATTRIBUTE_IMPLIED: + * return "implied" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_required); @@ -195964,21 +196295,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru goto __pyx_L0; /* "src/lxml/dtd.pxi":149 - * if default == tree.XML_ATTRIBUTE_NONE: - * return "none" - * elif default == tree.XML_ATTRIBUTE_REQUIRED: # <<<<<<<<<<<<<< - * return "required" - * elif default == tree.XML_ATTRIBUTE_IMPLIED: + * if default == tree.XML_ATTRIBUTE_NONE: + * return "none" + * elif default == tree.XML_ATTRIBUTE_REQUIRED: # <<<<<<<<<<<<<< + * return "required" + * elif default == tree.XML_ATTRIBUTE_IMPLIED: */ break; case XML_ATTRIBUTE_IMPLIED: /* "src/lxml/dtd.pxi":152 - * return "required" - * elif default == tree.XML_ATTRIBUTE_IMPLIED: - * return "implied" # <<<<<<<<<<<<<< - * elif default == tree.XML_ATTRIBUTE_FIXED: - * return "fixed" + * return "required" + * elif default == tree.XML_ATTRIBUTE_IMPLIED: + * return "implied" # <<<<<<<<<<<<<< + * elif default == tree.XML_ATTRIBUTE_FIXED: + * return "fixed" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_implied); @@ -195986,21 +196317,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru goto __pyx_L0; /* "src/lxml/dtd.pxi":151 - * elif default == tree.XML_ATTRIBUTE_REQUIRED: - * return "required" - * elif default == tree.XML_ATTRIBUTE_IMPLIED: # <<<<<<<<<<<<<< - * return "implied" - * elif default == tree.XML_ATTRIBUTE_FIXED: + * elif default == tree.XML_ATTRIBUTE_REQUIRED: + * return "required" + * elif default == tree.XML_ATTRIBUTE_IMPLIED: # <<<<<<<<<<<<<< + * return "implied" + * elif default == tree.XML_ATTRIBUTE_FIXED: */ break; case XML_ATTRIBUTE_FIXED: /* "src/lxml/dtd.pxi":154 - * return "implied" - * elif default == tree.XML_ATTRIBUTE_FIXED: - * return "fixed" # <<<<<<<<<<<<<< - * else: - * return None + * return "implied" + * elif default == tree.XML_ATTRIBUTE_FIXED: + * return "fixed" # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_fixed); @@ -196008,21 +196339,21 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru goto __pyx_L0; /* "src/lxml/dtd.pxi":153 - * elif default == tree.XML_ATTRIBUTE_IMPLIED: - * return "implied" - * elif default == tree.XML_ATTRIBUTE_FIXED: # <<<<<<<<<<<<<< - * return "fixed" - * else: + * elif default == tree.XML_ATTRIBUTE_IMPLIED: + * return "implied" + * elif default == tree.XML_ATTRIBUTE_FIXED: # <<<<<<<<<<<<<< + * return "fixed" + * else: */ break; default: /* "src/lxml/dtd.pxi":156 - * return "fixed" - * else: - * return None # <<<<<<<<<<<<<< + * return "fixed" + * else: + * return None # <<<<<<<<<<<<<< * - * property default_value: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -196032,10 +196363,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru /* "src/lxml/dtd.pxi":144 * - * property default: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int default = self._c_node.def_ + * @property + * def default(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int default = self._c_node.def_ */ /* function exit code */ @@ -196050,10 +196381,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_7default___get__(stru /* "src/lxml/dtd.pxi":159 * - * property default_value: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * @property + * def default_value(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None */ /* Python wrapper */ @@ -196078,18 +196409,18 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":160 - * property default_value: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * @property + * def default_value(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 160, __pyx_L1_error) /* "src/lxml/dtd.pxi":161 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None # <<<<<<<<<<<<<< + * def default_value(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None # <<<<<<<<<<<<<< * * def itervalues(self): */ @@ -196109,10 +196440,10 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get /* "src/lxml/dtd.pxi":159 * - * property default_value: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * @property + * def default_value(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None */ /* function exit code */ @@ -196129,7 +196460,7 @@ static PyObject *__pyx_pf_4lxml_5etree_17_DTDAttributeDecl_13default_value___get static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/lxml/dtd.pxi":163 - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -196266,7 +196597,7 @@ static PyObject *__pyx_gb_4lxml_5etree_17_DTDAttributeDecl_4generator11(__pyx_Co CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "src/lxml/dtd.pxi":163 - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -196411,7 +196742,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_o * def __repr__(self): * return "<%s.%s object name=%r prefix=%r type=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, self.prefix, self.type, id(self)) # <<<<<<<<<<<<<< * - * property name: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 182, __pyx_L1_error) @@ -196486,10 +196817,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl___repr__(struct __pyx_o /* "src/lxml/dtd.pxi":185 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* Python wrapper */ @@ -196514,20 +196845,20 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":186 - * property name: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 186, __pyx_L1_error) /* "src/lxml/dtd.pxi":187 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< + * def name(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< * - * property prefix: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { @@ -196545,10 +196876,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ /* "src/lxml/dtd.pxi":185 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* function exit code */ @@ -196565,10 +196896,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4name___get__(struct __ /* "src/lxml/dtd.pxi":190 * - * property prefix: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None */ /* Python wrapper */ @@ -196593,20 +196924,20 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":191 - * property prefix: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 191, __pyx_L1_error) /* "src/lxml/dtd.pxi":192 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None # <<<<<<<<<<<<<< + * def prefix(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None # <<<<<<<<<<<<<< * - * property type: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->prefix != NULL) != 0)) { @@ -196624,10 +196955,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct /* "src/lxml/dtd.pxi":190 * - * property prefix: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None + * @property + * def prefix(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.prefix) if self._c_node.prefix is not NULL else None */ /* function exit code */ @@ -196644,10 +196975,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_6prefix___get__(struct /* "src/lxml/dtd.pxi":195 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.etype + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.etype */ /* Python wrapper */ @@ -196672,40 +197003,40 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":196 - * property type: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef int type = self._c_node.etype - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: + * @property + * def type(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef int type = self._c_node.etype + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 196, __pyx_L1_error) /* "src/lxml/dtd.pxi":197 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.etype # <<<<<<<<<<<<<< - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: - * return "undefined" + * def type(self): + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.etype # <<<<<<<<<<<<<< + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: + * return "undefined" */ __pyx_t_2 = __pyx_v_self->_c_node->etype; __pyx_v_type = __pyx_t_2; /* "src/lxml/dtd.pxi":198 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.etype - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: # <<<<<<<<<<<<<< - * return "undefined" - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.etype + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: # <<<<<<<<<<<<<< + * return "undefined" + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: */ switch (__pyx_v_type) { case XML_ELEMENT_TYPE_UNDEFINED: /* "src/lxml/dtd.pxi":199 - * cdef int type = self._c_node.etype - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: - * return "undefined" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: - * return "empty" + * cdef int type = self._c_node.etype + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: + * return "undefined" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: + * return "empty" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_undefined); @@ -196713,21 +197044,21 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ goto __pyx_L0; /* "src/lxml/dtd.pxi":198 - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.etype - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: # <<<<<<<<<<<<<< - * return "undefined" - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.etype + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: # <<<<<<<<<<<<<< + * return "undefined" + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: */ break; case XML_ELEMENT_TYPE_EMPTY: /* "src/lxml/dtd.pxi":201 - * return "undefined" - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: - * return "empty" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_TYPE_ANY: - * return "any" + * return "undefined" + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: + * return "empty" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_TYPE_ANY: + * return "any" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_empty); @@ -196735,21 +197066,21 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ goto __pyx_L0; /* "src/lxml/dtd.pxi":200 - * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: - * return "undefined" - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: # <<<<<<<<<<<<<< - * return "empty" - * elif type == tree.XML_ELEMENT_TYPE_ANY: + * if type == tree.XML_ELEMENT_TYPE_UNDEFINED: + * return "undefined" + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: # <<<<<<<<<<<<<< + * return "empty" + * elif type == tree.XML_ELEMENT_TYPE_ANY: */ break; case XML_ELEMENT_TYPE_ANY: /* "src/lxml/dtd.pxi":203 - * return "empty" - * elif type == tree.XML_ELEMENT_TYPE_ANY: - * return "any" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_TYPE_MIXED: - * return "mixed" + * return "empty" + * elif type == tree.XML_ELEMENT_TYPE_ANY: + * return "any" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_TYPE_MIXED: + * return "mixed" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_any); @@ -196757,21 +197088,21 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ goto __pyx_L0; /* "src/lxml/dtd.pxi":202 - * elif type == tree.XML_ELEMENT_TYPE_EMPTY: - * return "empty" - * elif type == tree.XML_ELEMENT_TYPE_ANY: # <<<<<<<<<<<<<< - * return "any" - * elif type == tree.XML_ELEMENT_TYPE_MIXED: + * elif type == tree.XML_ELEMENT_TYPE_EMPTY: + * return "empty" + * elif type == tree.XML_ELEMENT_TYPE_ANY: # <<<<<<<<<<<<<< + * return "any" + * elif type == tree.XML_ELEMENT_TYPE_MIXED: */ break; case XML_ELEMENT_TYPE_MIXED: /* "src/lxml/dtd.pxi":205 - * return "any" - * elif type == tree.XML_ELEMENT_TYPE_MIXED: - * return "mixed" # <<<<<<<<<<<<<< - * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: - * return "element" + * return "any" + * elif type == tree.XML_ELEMENT_TYPE_MIXED: + * return "mixed" # <<<<<<<<<<<<<< + * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: + * return "element" */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_mixed); @@ -196779,21 +197110,21 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ goto __pyx_L0; /* "src/lxml/dtd.pxi":204 - * elif type == tree.XML_ELEMENT_TYPE_ANY: - * return "any" - * elif type == tree.XML_ELEMENT_TYPE_MIXED: # <<<<<<<<<<<<<< - * return "mixed" - * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: + * elif type == tree.XML_ELEMENT_TYPE_ANY: + * return "any" + * elif type == tree.XML_ELEMENT_TYPE_MIXED: # <<<<<<<<<<<<<< + * return "mixed" + * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: */ break; case XML_ELEMENT_TYPE_ELEMENT: /* "src/lxml/dtd.pxi":207 - * return "mixed" - * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: - * return "element" # <<<<<<<<<<<<<< - * else: - * return None + * return "mixed" + * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: + * return "element" # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_n_s_element); @@ -196801,21 +197132,21 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ goto __pyx_L0; /* "src/lxml/dtd.pxi":206 - * elif type == tree.XML_ELEMENT_TYPE_MIXED: - * return "mixed" - * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: # <<<<<<<<<<<<<< - * return "element" - * else: + * elif type == tree.XML_ELEMENT_TYPE_MIXED: + * return "mixed" + * elif type == tree.XML_ELEMENT_TYPE_ELEMENT: # <<<<<<<<<<<<<< + * return "element" + * else: */ break; default: /* "src/lxml/dtd.pxi":209 - * return "element" - * else: - * return None # <<<<<<<<<<<<<< + * return "element" + * else: + * return None # <<<<<<<<<<<<<< * - * property content: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -196825,10 +197156,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ /* "src/lxml/dtd.pxi":195 * - * property type: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef int type = self._c_node.etype + * @property + * def type(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef int type = self._c_node.etype */ /* function exit code */ @@ -196843,10 +197174,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_4type___get__(struct __ /* "src/lxml/dtd.pxi":212 * - * property content: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef tree.xmlElementContent *content = self._c_node.content + * @property + * def content(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef tree.xmlElementContent *content = self._c_node.content */ /* Python wrapper */ @@ -196875,40 +197206,40 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":213 - * property content: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * cdef tree.xmlElementContent *content = self._c_node.content - * if content: + * @property + * def content(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * cdef tree.xmlElementContent *content = self._c_node.content + * if content: */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 213, __pyx_L1_error) /* "src/lxml/dtd.pxi":214 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * cdef tree.xmlElementContent *content = self._c_node.content # <<<<<<<<<<<<<< - * if content: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * def content(self): + * _assertValidDTDNode(self, self._c_node) + * cdef tree.xmlElementContent *content = self._c_node.content # <<<<<<<<<<<<<< + * if content: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) */ __pyx_t_2 = __pyx_v_self->_c_node->content; __pyx_v_content = __pyx_t_2; /* "src/lxml/dtd.pxi":215 - * _assertValidDTDNode(self, self._c_node) - * cdef tree.xmlElementContent *content = self._c_node.content - * if content: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * cdef tree.xmlElementContent *content = self._c_node.content + * if content: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ __pyx_t_3 = (__pyx_v_content != 0); if (__pyx_t_3) { /* "src/lxml/dtd.pxi":216 - * cdef tree.xmlElementContent *content = self._c_node.content - * if content: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< - * node._dtd = self._dtd - * node._c_node = content + * cdef tree.xmlElementContent *content = self._c_node.content + * if content: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) # <<<<<<<<<<<<<< + * node._dtd = self._dtd + * node._c_node = content */ __pyx_t_4 = ((PyObject *)__pyx_tp_new_4lxml_5etree__DTDElementContentDecl(((PyTypeObject *)__pyx_ptype_4lxml_5etree__DTDElementContentDecl), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_4)) __PYX_ERR(20, 216, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_4)); @@ -196919,11 +197250,11 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":217 - * if content: - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd # <<<<<<<<<<<<<< - * node._c_node = content - * return node + * if content: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd # <<<<<<<<<<<<<< + * node._c_node = content + * return node */ __pyx_t_5 = ((PyObject *)__pyx_v_self->_dtd); __Pyx_INCREF(__pyx_t_5); @@ -196934,20 +197265,20 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct __pyx_t_5 = 0; /* "src/lxml/dtd.pxi":218 - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd - * node._c_node = content # <<<<<<<<<<<<<< - * return node - * else: + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd + * node._c_node = content # <<<<<<<<<<<<<< + * return node + * else: */ __pyx_v_node->_c_node = __pyx_v_content; /* "src/lxml/dtd.pxi":219 - * node._dtd = self._dtd - * node._c_node = content - * return node # <<<<<<<<<<<<<< - * else: - * return None + * node._dtd = self._dtd + * node._c_node = content + * return node # <<<<<<<<<<<<<< + * else: + * return None */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(((PyObject *)__pyx_v_node)); @@ -196955,18 +197286,18 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct goto __pyx_L0; /* "src/lxml/dtd.pxi":215 - * _assertValidDTDNode(self, self._c_node) - * cdef tree.xmlElementContent *content = self._c_node.content - * if content: # <<<<<<<<<<<<<< - * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) - * node._dtd = self._dtd + * _assertValidDTDNode(self, self._c_node) + * cdef tree.xmlElementContent *content = self._c_node.content + * if content: # <<<<<<<<<<<<<< + * node = <_DTDElementContentDecl>_DTDElementContentDecl.__new__(_DTDElementContentDecl) + * node._dtd = self._dtd */ } /* "src/lxml/dtd.pxi":221 - * return node - * else: - * return None # <<<<<<<<<<<<<< + * return node + * else: + * return None # <<<<<<<<<<<<<< * * def iterattributes(self): */ @@ -196978,10 +197309,10 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct /* "src/lxml/dtd.pxi":212 * - * property content: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * cdef tree.xmlElementContent *content = self._c_node.content + * @property + * def content(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * cdef tree.xmlElementContent *content = self._c_node.content */ /* function exit code */ @@ -196999,7 +197330,7 @@ static PyObject *__pyx_pf_4lxml_5etree_15_DTDElementDecl_7content___get__(struct static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/lxml/dtd.pxi":223 - * return None + * return None * * def iterattributes(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -197176,7 +197507,7 @@ static PyObject *__pyx_gb_4lxml_5etree_15_DTDElementDecl_4generator12(__pyx_Coro CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "src/lxml/dtd.pxi":223 - * return None + * return None * * def iterattributes(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -197320,7 +197651,7 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_ob * def __repr__(self): * return "<%s.%s object name=%r at 0x%x>" % (self.__class__.__module__, self.__class__.__name__, self.name, id(self)) # <<<<<<<<<<<<<< * - * property name: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(20, 244, __pyx_L1_error) @@ -197383,10 +197714,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl___repr__(struct __pyx_ob /* "src/lxml/dtd.pxi":247 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* Python wrapper */ @@ -197411,20 +197742,20 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":248 - * property name: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 248, __pyx_L1_error) /* "src/lxml/dtd.pxi":249 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< + * def name(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None # <<<<<<<<<<<<<< * - * property orig: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->name != NULL) != 0)) { @@ -197442,10 +197773,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p /* "src/lxml/dtd.pxi":247 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.name) if self._c_node.name is not NULL else None + * @property + * def name(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.name) if self._c_node.name is not NULL else None */ /* function exit code */ @@ -197462,10 +197793,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4name___get__(struct __p /* "src/lxml/dtd.pxi":252 * - * property orig: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None + * @property + * def orig(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None */ /* Python wrapper */ @@ -197490,20 +197821,20 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":253 - * property orig: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None + * @property + * def orig(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 253, __pyx_L1_error) /* "src/lxml/dtd.pxi":254 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None # <<<<<<<<<<<<<< + * def orig(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None # <<<<<<<<<<<<<< * - * property content: + * @property */ __Pyx_XDECREF(__pyx_r); if (((__pyx_v_self->_c_node->orig != NULL) != 0)) { @@ -197521,10 +197852,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p /* "src/lxml/dtd.pxi":252 * - * property orig: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None + * @property + * def orig(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.orig) if self._c_node.orig is not NULL else None */ /* function exit code */ @@ -197541,10 +197872,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_4orig___get__(struct __p /* "src/lxml/dtd.pxi":257 * - * property content: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.content) if self._c_node.content is not NULL else None + * @property + * def content(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.content) if self._c_node.content is not NULL else None */ /* Python wrapper */ @@ -197569,18 +197900,18 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":258 - * property content: - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< - * return funicode(self._c_node.content) if self._c_node.content is not NULL else None + * @property + * def content(self): + * _assertValidDTDNode(self, self._c_node) # <<<<<<<<<<<<<< + * return funicode(self._c_node.content) if self._c_node.content is not NULL else None * */ __pyx_t_1 = __pyx_f_4lxml_5etree__assertValidDTDNode(((PyObject *)__pyx_v_self), __pyx_v_self->_c_node); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(20, 258, __pyx_L1_error) /* "src/lxml/dtd.pxi":259 - * def __get__(self): - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.content) if self._c_node.content is not NULL else None # <<<<<<<<<<<<<< + * def content(self): + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.content) if self._c_node.content is not NULL else None # <<<<<<<<<<<<<< * * */ @@ -197600,10 +197931,10 @@ static PyObject *__pyx_pf_4lxml_5etree_14_DTDEntityDecl_7content___get__(struct /* "src/lxml/dtd.pxi":257 * - * property content: - * def __get__(self): # <<<<<<<<<<<<<< - * _assertValidDTDNode(self, self._c_node) - * return funicode(self._c_node.content) if self._c_node.content is not NULL else None + * @property + * def content(self): # <<<<<<<<<<<<<< + * _assertValidDTDNode(self, self._c_node) + * return funicode(self._c_node.content) if self._c_node.content is not NULL else None */ /* function exit code */ @@ -198110,10 +198441,10 @@ static int __pyx_pf_4lxml_5etree_3DTD___init__(struct __pyx_obj_4lxml_5etree_DTD /* "src/lxml/dtd.pxi":297 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def name(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* Python wrapper */ @@ -198137,20 +198468,20 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":298 - * property name: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.name) + * @property + * def name(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.name) */ __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { /* "src/lxml/dtd.pxi":299 - * def __get__(self): - * if self._c_dtd is NULL: - * return None # <<<<<<<<<<<<<< - * return funicodeOrNone(self._c_dtd.name) + * def name(self): + * if self._c_dtd is NULL: + * return None # <<<<<<<<<<<<<< + * return funicodeOrNone(self._c_dtd.name) * */ __Pyx_XDECREF(__pyx_r); @@ -198158,20 +198489,20 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml goto __pyx_L0; /* "src/lxml/dtd.pxi":298 - * property name: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.name) + * @property + * def name(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.name) */ } /* "src/lxml/dtd.pxi":300 - * if self._c_dtd is NULL: - * return None - * return funicodeOrNone(self._c_dtd.name) # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None + * return funicodeOrNone(self._c_dtd.name) # <<<<<<<<<<<<<< * - * property external_id: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_self->_c_dtd->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 300, __pyx_L1_error) @@ -198182,10 +198513,10 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml /* "src/lxml/dtd.pxi":297 * - * property name: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def name(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* function exit code */ @@ -198201,10 +198532,10 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_4name___get__(struct __pyx_obj_4lxml /* "src/lxml/dtd.pxi":303 * - * property external_id: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def external_id(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* Python wrapper */ @@ -198228,20 +198559,20 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":304 - * property external_id: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.ExternalID) + * @property + * def external_id(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.ExternalID) */ __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { /* "src/lxml/dtd.pxi":305 - * def __get__(self): - * if self._c_dtd is NULL: - * return None # <<<<<<<<<<<<<< - * return funicodeOrNone(self._c_dtd.ExternalID) + * def external_id(self): + * if self._c_dtd is NULL: + * return None # <<<<<<<<<<<<<< + * return funicodeOrNone(self._c_dtd.ExternalID) * */ __Pyx_XDECREF(__pyx_r); @@ -198249,20 +198580,20 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o goto __pyx_L0; /* "src/lxml/dtd.pxi":304 - * property external_id: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.ExternalID) + * @property + * def external_id(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.ExternalID) */ } /* "src/lxml/dtd.pxi":306 - * if self._c_dtd is NULL: - * return None - * return funicodeOrNone(self._c_dtd.ExternalID) # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None + * return funicodeOrNone(self._c_dtd.ExternalID) # <<<<<<<<<<<<<< * - * property system_url: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_2 = __pyx_f_4lxml_5etree_funicodeOrNone(__pyx_v_self->_c_dtd->ExternalID); if (unlikely(!__pyx_t_2)) __PYX_ERR(20, 306, __pyx_L1_error) @@ -198273,10 +198604,10 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o /* "src/lxml/dtd.pxi":303 * - * property external_id: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def external_id(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* function exit code */ @@ -198292,10 +198623,10 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_11external_id___get__(struct __pyx_o /* "src/lxml/dtd.pxi":309 * - * property system_url: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def system_url(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* Python wrapper */ @@ -198319,20 +198650,20 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob __Pyx_RefNannySetupContext("__get__", 0); /* "src/lxml/dtd.pxi":310 - * property system_url: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.SystemID) + * @property + * def system_url(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.SystemID) */ __pyx_t_1 = ((__pyx_v_self->_c_dtd == NULL) != 0); if (__pyx_t_1) { /* "src/lxml/dtd.pxi":311 - * def __get__(self): - * if self._c_dtd is NULL: - * return None # <<<<<<<<<<<<<< - * return funicodeOrNone(self._c_dtd.SystemID) + * def system_url(self): + * if self._c_dtd is NULL: + * return None # <<<<<<<<<<<<<< + * return funicodeOrNone(self._c_dtd.SystemID) * */ __Pyx_XDECREF(__pyx_r); @@ -198340,18 +198671,18 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob goto __pyx_L0; /* "src/lxml/dtd.pxi":310 - * property system_url: - * def __get__(self): - * if self._c_dtd is NULL: # <<<<<<<<<<<<<< - * return None - * return funicodeOrNone(self._c_dtd.SystemID) + * @property + * def system_url(self): + * if self._c_dtd is NULL: # <<<<<<<<<<<<<< + * return None + * return funicodeOrNone(self._c_dtd.SystemID) */ } /* "src/lxml/dtd.pxi":312 - * if self._c_dtd is NULL: - * return None - * return funicodeOrNone(self._c_dtd.SystemID) # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None + * return funicodeOrNone(self._c_dtd.SystemID) # <<<<<<<<<<<<<< * * def iterelements(self): */ @@ -198364,10 +198695,10 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob /* "src/lxml/dtd.pxi":309 * - * property system_url: - * def __get__(self): # <<<<<<<<<<<<<< - * if self._c_dtd is NULL: - * return None + * @property + * def system_url(self): # <<<<<<<<<<<<<< + * if self._c_dtd is NULL: + * return None */ /* function exit code */ @@ -198383,7 +198714,7 @@ static PyObject *__pyx_pf_4lxml_5etree_3DTD_10system_url___get__(struct __pyx_ob static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ /* "src/lxml/dtd.pxi":314 - * return funicodeOrNone(self._c_dtd.SystemID) + * return funicodeOrNone(self._c_dtd.SystemID) * * def iterelements(self): # <<<<<<<<<<<<<< * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL @@ -198567,7 +198898,7 @@ static PyObject *__pyx_gb_4lxml_5etree_3DTD_4generator13(__pyx_CoroutineObject * CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); /* "src/lxml/dtd.pxi":314 - * return funicodeOrNone(self._c_dtd.SystemID) + * return funicodeOrNone(self._c_dtd.SystemID) * * def iterelements(self): # <<<<<<<<<<<<<< * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL @@ -209070,8 +209401,8 @@ static struct PyGetSetDef __pyx_getsets_4lxml_5etree__LogEntry[] = { {(char *)"domain_name", __pyx_getprop_4lxml_5etree_9_LogEntry_domain_name, 0, (char *)"The name of the error domain. See lxml.etree.ErrorDomains\n ", 0}, {(char *)"type_name", __pyx_getprop_4lxml_5etree_9_LogEntry_type_name, 0, (char *)"The name of the error type. See lxml.etree.ErrorTypes\n ", 0}, {(char *)"level_name", __pyx_getprop_4lxml_5etree_9_LogEntry_level_name, 0, (char *)"The name of the error level. See lxml.etree.ErrorLevels\n ", 0}, - {(char *)"message", __pyx_getprop_4lxml_5etree_9_LogEntry_message, 0, (char *)0, 0}, - {(char *)"filename", __pyx_getprop_4lxml_5etree_9_LogEntry_filename, 0, (char *)0, 0}, + {(char *)"message", __pyx_getprop_4lxml_5etree_9_LogEntry_message, 0, (char *)"The log message string.\n ", 0}, + {(char *)"filename", __pyx_getprop_4lxml_5etree_9_LogEntry_filename, 0, (char *)"The file path where the report originated, if any.\n ", 0}, {(char *)"path", __pyx_getprop_4lxml_5etree_9_LogEntry_path, 0, (char *)"The XPath for the node where the error was detected.\n ", 0}, {(char *)"domain", __pyx_getprop_4lxml_5etree_9_LogEntry_domain, 0, (char *)0, 0}, {(char *)"type", __pyx_getprop_4lxml_5etree_9_LogEntry_type, 0, (char *)0, 0}, @@ -212731,7 +213062,7 @@ static PyMethodDef __pyx_methods_4lxml_5etree__ReadOnlyProxy[] = { static struct PyGetSetDef __pyx_getsets_4lxml_5etree__ReadOnlyProxy[] = { {(char *)"tag", __pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_tag, 0, (char *)"Element tag\n ", 0}, - {(char *)"text", __pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_text, 0, (char *)"Text before the first subelement. This is either a string or \n the value None, if there was no text.\n ", 0}, + {(char *)"text", __pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_text, 0, (char *)"Text before the first subelement. This is either a string or\n the value None, if there was no text.\n ", 0}, {(char *)"tail", __pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_tail, 0, (char *)"Text after this element's end tag, but before the next sibling\n element's start tag. This is either a string or the value None, if\n there was no text.\n ", 0}, {(char *)"sourceline", __pyx_getprop_4lxml_5etree_14_ReadOnlyProxy_sourceline, 0, (char *)"Original line number as found by the parser or None if unknown.\n ", 0}, {0, 0, 0, 0, 0} @@ -225944,7 +226275,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_XMLSyntaxError, __pyx_k_XMLSyntaxError, sizeof(__pyx_k_XMLSyntaxError), 0, 0, 1, 1}, {&__pyx_n_s_XMLTreeBuilder, __pyx_k_XMLTreeBuilder, sizeof(__pyx_k_XMLTreeBuilder), 0, 0, 1, 1}, {&__pyx_kp_s_XML_declaration_already_written, __pyx_k_XML_declaration_already_written, sizeof(__pyx_k_XML_declaration_already_written), 0, 0, 1, 0}, - {&__pyx_kp_u_XML_line_3165, __pyx_k_XML_line_3165, sizeof(__pyx_k_XML_line_3165), 0, 1, 0, 0}, + {&__pyx_kp_u_XML_line_3176, __pyx_k_XML_line_3176, sizeof(__pyx_k_XML_line_3176), 0, 1, 0, 0}, {&__pyx_kp_u_XML_text_parser_None_base_url_No, __pyx_k_XML_text_parser_None_base_url_No, sizeof(__pyx_k_XML_text_parser_None_base_url_No), 0, 1, 0, 0}, {&__pyx_n_u_XPATH_LOCATIONSET, __pyx_k_XPATH_LOCATIONSET, sizeof(__pyx_k_XPATH_LOCATIONSET), 0, 1, 0, 1}, {&__pyx_n_u_XPATH_POINT, __pyx_k_XPATH_POINT, sizeof(__pyx_k_XPATH_POINT), 0, 1, 0, 1}, @@ -226795,7 +227126,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 91, __pyx_L1_error) __pyx_builtin_SyntaxError = __Pyx_GetBuiltinName(__pyx_n_s_SyntaxError); if (!__pyx_builtin_SyntaxError) __PYX_ERR(0, 211, __pyx_L1_error) - __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 804, __pyx_L1_error) + __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(1, 808, __pyx_L1_error) __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(2, 18, __pyx_L1_error) __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(3, 435, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 96, __pyx_L1_error) @@ -226811,21 +227142,21 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { #else __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(5, 1004, __pyx_L1_error) #endif - __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(5, 1542, __pyx_L1_error) - __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(5, 1560, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 311, __pyx_L1_error) + __pyx_builtin_UnicodeEncodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeEncodeError); if (!__pyx_builtin_UnicodeEncodeError) __PYX_ERR(5, 1544, __pyx_L1_error) + __pyx_builtin_UnicodeDecodeError = __Pyx_GetBuiltinName(__pyx_n_s_UnicodeDecodeError); if (!__pyx_builtin_UnicodeDecodeError) __PYX_ERR(5, 1562, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(1, 315, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 741, __pyx_L1_error) __pyx_builtin_FutureWarning = __Pyx_GetBuiltinName(__pyx_n_s_FutureWarning); if (!__pyx_builtin_FutureWarning) __PYX_ERR(0, 1182, __pyx_L1_error) - __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 1843, __pyx_L1_error) - __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 2034, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_builtin_NotImplemented = __Pyx_GetBuiltinName(__pyx_n_s_NotImplemented); if (!__pyx_builtin_NotImplemented) __PYX_ERR(0, 1854, __pyx_L1_error) + __pyx_builtin_DeprecationWarning = __Pyx_GetBuiltinName(__pyx_n_s_DeprecationWarning); if (!__pyx_builtin_DeprecationWarning) __PYX_ERR(0, 2045, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 2557, __pyx_L1_error) __pyx_builtin_ReferenceError = __Pyx_GetBuiltinName(__pyx_n_s_ReferenceError); if (!__pyx_builtin_ReferenceError) __PYX_ERR(6, 18, __pyx_L1_error) __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(7, 52, __pyx_L1_error) __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(2, 638, __pyx_L1_error) __pyx_builtin_LookupError = __Pyx_GetBuiltinName(__pyx_n_s_LookupError); if (!__pyx_builtin_LookupError) __PYX_ERR(2, 823, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(8, 701, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(9, 632, __pyx_L1_error) - __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 3536, __pyx_L1_error) + __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 3547, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; @@ -226893,69 +227224,69 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__8); __Pyx_GIVEREF(__pyx_slice__8); - /* "src/lxml/proxy.pxi":588 + /* "src/lxml/proxy.pxi":596 * """ * if c_doc is NULL: * raise ValueError("Illegal document provided: NULL") # <<<<<<<<<<<<<< * if c_doc.type not in (tree.XML_DOCUMENT_NODE, tree.XML_HTML_DOCUMENT_NODE): * doc_type = c_doc.type */ - __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Illegal_document_provided_NULL); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(4, 588, __pyx_L1_error) + __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_Illegal_document_provided_NULL); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(4, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__9); __Pyx_GIVEREF(__pyx_tuple__9); - /* "src/lxml/apihelpers.pxi":1292 + /* "src/lxml/apihelpers.pxi":1294 * # prevent cycles * if _isAncestorOrSame(c_node, parent._c_node): * raise ValueError("cannot append parent to itself") # <<<<<<<<<<<<<< * # store possible text node * c_next = c_node.next */ - __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_parent_to_itself); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(5, 1292, __pyx_L1_error) + __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_cannot_append_parent_to_itself); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(5, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__12); __Pyx_GIVEREF(__pyx_tuple__12); - /* "src/lxml/apihelpers.pxi":1346 + /* "src/lxml/apihelpers.pxi":1348 * if element._c_node is c_node: * return 0 # nothing to do * raise ValueError("cannot add ancestor as sibling, please break cycle first") # <<<<<<<<<<<<<< * # store possible text node * c_next = c_node.next */ - __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_cannot_add_ancestor_as_sibling_p); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(5, 1346, __pyx_L1_error) + __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_cannot_add_ancestor_as_sibling_p); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(5, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__13); __Pyx_GIVEREF(__pyx_tuple__13); - /* "src/lxml/apihelpers.pxi":1491 + /* "src/lxml/apihelpers.pxi":1493 * raise TypeError("Argument must be bytes or unicode, got '%.200s'" % type(s).__name__) * if not valid: * raise ValueError( # <<<<<<<<<<<<<< * "All strings must be XML compatible: Unicode or ASCII, no NULL bytes or control characters") * return utf8_string */ - __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_All_strings_must_be_XML_compatib); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(5, 1491, __pyx_L1_error) + __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_All_strings_must_be_XML_compatib); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(5, 1493, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__14); __Pyx_GIVEREF(__pyx_tuple__14); - /* "src/lxml/apihelpers.pxi":1546 + /* "src/lxml/apihelpers.pxi":1548 * return filename8 * else: * raise TypeError("Argument must be string or unicode.") # <<<<<<<<<<<<<< * * cdef object _decodeFilename(const_xmlChar* c_path): */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Argument_must_be_string_or_unico); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(5, 1546, __pyx_L1_error) + __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_Argument_must_be_string_or_unico); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(5, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__15); __Pyx_GIVEREF(__pyx_tuple__15); - /* "src/lxml/xmlerror.pxi":595 + /* "src/lxml/xmlerror.pxi":599 * except KeyError: * log = (thread_dict)[name] = \ * _RotatingErrorLog(__MAX_LOG_SIZE) # <<<<<<<<<<<<<< * return log * */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_100); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 595, __pyx_L1_error) + __pyx_tuple__19 = PyTuple_Pack(1, __pyx_int_100); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(1, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__19); __Pyx_GIVEREF(__pyx_tuple__19); @@ -226981,102 +227312,102 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__27); __Pyx_GIVEREF(__pyx_tuple__27); - /* "lxml/etree.pyx":1998 + /* "lxml/etree.pyx":2009 * if method == 'c14n': * if encoding is not None: * raise ValueError("Cannot specify encoding with C14N") # <<<<<<<<<<<<<< * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") */ - __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_Cannot_specify_encoding_with_C14); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1998, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_Cannot_specify_encoding_with_C14); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2009, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__32); __Pyx_GIVEREF(__pyx_tuple__32); - /* "lxml/etree.pyx":2000 + /* "lxml/etree.pyx":2011 * raise ValueError("Cannot specify encoding with C14N") * if xml_declaration: * raise ValueError("Cannot enable XML declaration in C14N") # <<<<<<<<<<<<<< * * _tofilelikeC14N(file, self._context_node, exclusive, with_comments, */ - __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Cannot_enable_XML_declaration_in); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2000, __pyx_L1_error) + __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Cannot_enable_XML_declaration_in); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2011, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__33); __Pyx_GIVEREF(__pyx_tuple__33); - /* "lxml/etree.pyx":2006 + /* "lxml/etree.pyx":2017 * return * if not with_comments: * raise ValueError("Can only discard comments in C14N serialisation") # <<<<<<<<<<<<<< * # suppress decl. in default case (purely for ElementTree compatibility) * if xml_declaration is not None: */ - __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_Can_only_discard_comments_in_C14); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2006, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_Can_only_discard_comments_in_C14); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__34); __Pyx_GIVEREF(__pyx_tuple__34); - /* "lxml/etree.pyx":2032 + /* "lxml/etree.pyx":2043 * if docstring is not None and doctype is None: * import warnings * warnings.warn( # <<<<<<<<<<<<<< * "The 'docstring' option is deprecated. Use 'doctype' instead.", * DeprecationWarning) */ - __pyx_tuple__35 = PyTuple_Pack(2, __pyx_kp_s_The_docstring_option_is_deprecat, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2032, __pyx_L1_error) + __pyx_tuple__35 = PyTuple_Pack(2, __pyx_kp_s_The_docstring_option_is_deprecat, __pyx_builtin_DeprecationWarning); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__35); __Pyx_GIVEREF(__pyx_tuple__35); - /* "lxml/etree.pyx":2198 + /* "lxml/etree.pyx":2209 * root = self.getroot() * if _isString(path): * if path[:1] == "/": # <<<<<<<<<<<<<< * path = "." + path * return root.find(path, namespaces) */ - __pyx_slice__39 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_slice__39 = PySlice_New(Py_None, __pyx_int_1, Py_None); if (unlikely(!__pyx_slice__39)) __PYX_ERR(0, 2209, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__39); __Pyx_GIVEREF(__pyx_slice__39); - /* "lxml/etree.pyx":2944 + /* "lxml/etree.pyx":2955 * _assertValidNode(element) * if with_tail: * events = (u"start", u"end") # <<<<<<<<<<<<<< * else: * events = (u"start",) */ - __pyx_tuple__42 = PyTuple_Pack(2, __pyx_n_u_start, __pyx_n_u_end); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 2944, __pyx_L1_error) + __pyx_tuple__42 = PyTuple_Pack(2, __pyx_n_u_start, __pyx_n_u_end); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 2955, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__42); __Pyx_GIVEREF(__pyx_tuple__42); - /* "lxml/etree.pyx":2946 + /* "lxml/etree.pyx":2957 * events = (u"start", u"end") * else: * events = (u"start",) # <<<<<<<<<<<<<< * self._start_element = element * self._nextEvent = iterwalk(element, events=events, tag=tag).__next__ */ - __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_u_start); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 2946, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_u_start); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 2957, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - /* "lxml/etree.pyx":3015 + /* "lxml/etree.pyx":3026 * text = _utf8(text) * if b'--' in text or text.endswith(b'-'): * raise ValueError("Comment may not contain '--' or end with '-'") # <<<<<<<<<<<<<< * * c_doc = _newXMLDoc() */ - __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Comment_may_not_contain_or_end_w); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3015, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_Comment_may_not_contain_or_end_w); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 3026, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); - /* "lxml/etree.pyx":3228 + /* "lxml/etree.pyx":3239 * cdef _Document doc * if isinstance(strings, (bytes, unicode)): * raise ValueError("passing a single string into fromstringlist() is not" # <<<<<<<<<<<<<< * " efficient, use fromstring() instead") * if parser is None: */ - __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_passing_a_single_string_into_fro); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3228, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_passing_a_single_string_into_fro); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 3239, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); @@ -227426,287 +227757,287 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { */ __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_clear_error_log_2, 11, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(1, 11, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":187 + /* "src/lxml/xmlerror.pxi":191 * self.last_error = last_error * * cpdef copy(self): # <<<<<<<<<<<<<< * return _BaseErrorLog(self._first_error, self.last_error) * */ - __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_tuple__107 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__107); __Pyx_GIVEREF(__pyx_tuple__107); - __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 187, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_codeobj__108 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__107, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 191, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__108)) __PYX_ERR(1, 191, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":193 + /* "src/lxml/xmlerror.pxi":197 * return u'' * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * pass * */ - __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_tuple__109 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__109)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__109); __Pyx_GIVEREF(__pyx_tuple__109); - __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_codeobj__110 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__109, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__110)) __PYX_ERR(1, 197, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":283 + /* "src/lxml/xmlerror.pxi":287 * self._entries = entries * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Creates a shallow copy of this error log. Reuses the list of * entries. */ - __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_tuple__111 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__111); __Pyx_GIVEREF(__pyx_tuple__111); - __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 283, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(1, 287, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":321 + /* "src/lxml/xmlerror.pxi":325 * return len(self._entries) > self._offset * * def filter_domains(self, domains): # <<<<<<<<<<<<<< * u"""Filter the errors by the given domains and return a new error log * containing the matches. */ - __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_domains, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(1, 321, __pyx_L1_error) + __pyx_tuple__113 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_domains, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(1, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__113); __Pyx_GIVEREF(__pyx_tuple__113); - __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_domains, 321, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(1, 321, __pyx_L1_error) + __pyx_codeobj__114 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__113, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_domains, 325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__114)) __PYX_ERR(1, 325, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":331 + /* "src/lxml/xmlerror.pxi":335 * return _ListErrorLog(filtered, None, None) * * def filter_types(self, types): # <<<<<<<<<<<<<< * u"""filter_types(self, types) * */ - __pyx_tuple__115 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_types, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(1, 331, __pyx_L1_error) + __pyx_tuple__115 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_types, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__115)) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__115); __Pyx_GIVEREF(__pyx_tuple__115); - __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_types, 331, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(1, 331, __pyx_L1_error) + __pyx_codeobj__116 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__115, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_types, 335, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__116)) __PYX_ERR(1, 335, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":343 + /* "src/lxml/xmlerror.pxi":347 * return _ListErrorLog(filtered, None, None) * * def filter_levels(self, levels): # <<<<<<<<<<<<<< * u"""filter_levels(self, levels) * */ - __pyx_tuple__117 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_levels, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(1, 343, __pyx_L1_error) + __pyx_tuple__117 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_levels, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__117)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__117); __Pyx_GIVEREF(__pyx_tuple__117); - __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_levels, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(1, 343, __pyx_L1_error) + __pyx_codeobj__118 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__117, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_levels, 347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__118)) __PYX_ERR(1, 347, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":355 + /* "src/lxml/xmlerror.pxi":359 * return _ListErrorLog(filtered, None, None) * * def filter_from_level(self, level): # <<<<<<<<<<<<<< * u"""filter_from_level(self, level) * */ - __pyx_tuple__119 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_tuple__119 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_level, __pyx_n_s_entry, __pyx_n_s_filtered); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(1, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__119); __Pyx_GIVEREF(__pyx_tuple__119); - __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_level, 355, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_level, 359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(1, 359, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":364 + /* "src/lxml/xmlerror.pxi":368 * return _ListErrorLog(filtered, None, None) * * def filter_from_fatals(self): # <<<<<<<<<<<<<< * u"""filter_from_fatals(self) * */ - __pyx_tuple__121 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(1, 364, __pyx_L1_error) + __pyx_tuple__121 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__121); __Pyx_GIVEREF(__pyx_tuple__121); - __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_fatals, 364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(1, 364, __pyx_L1_error) + __pyx_codeobj__122 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__121, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_fatals, 368, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__122)) __PYX_ERR(1, 368, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":371 + /* "src/lxml/xmlerror.pxi":375 * return self.filter_from_level(ErrorLevels.FATAL) * * def filter_from_errors(self): # <<<<<<<<<<<<<< * u"""filter_from_errors(self) * */ - __pyx_tuple__123 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(1, 371, __pyx_L1_error) + __pyx_tuple__123 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__123)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__123); __Pyx_GIVEREF(__pyx_tuple__123); - __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_errors, 371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(1, 371, __pyx_L1_error) + __pyx_codeobj__124 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__123, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_errors, 375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__124)) __PYX_ERR(1, 375, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":378 + /* "src/lxml/xmlerror.pxi":382 * return self.filter_from_level(ErrorLevels.ERROR) * * def filter_from_warnings(self): # <<<<<<<<<<<<<< * u"""filter_from_warnings(self) * */ - __pyx_tuple__125 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_tuple__125 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__125); __Pyx_GIVEREF(__pyx_tuple__125); - __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_warnings, 378, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_filter_from_warnings, 382, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(1, 382, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":437 + /* "src/lxml/xmlerror.pxi":441 * return self.connect() * * def __exit__(self, *args): # <<<<<<<<<<<<<< * # TODO: make this a cdef function when Cython supports it * self.disconnect() */ - __pyx_tuple__127 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(1, 437, __pyx_L1_error) + __pyx_tuple__127 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(1, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__127); __Pyx_GIVEREF(__pyx_tuple__127); - __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_exit, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(1, 437, __pyx_L1_error) + __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_exit, 441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(1, 441, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":457 + /* "src/lxml/xmlerror.pxi":461 * return 0 * * cpdef clear(self): # <<<<<<<<<<<<<< * self._first_error = None * self.last_error = None */ - __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(1, 457, __pyx_L1_error) + __pyx_tuple__129 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__129)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__129); __Pyx_GIVEREF(__pyx_tuple__129); - __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_clear, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(1, 457, __pyx_L1_error) + __pyx_codeobj__130 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__129, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_clear, 461, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__130)) __PYX_ERR(1, 461, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":463 + /* "src/lxml/xmlerror.pxi":467 * del self._entries[:] * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Creates a shallow copy of this error log and the list of entries. * """ */ - __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(1, 463, __pyx_L1_error) + __pyx_tuple__131 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__131)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__131); __Pyx_GIVEREF(__pyx_tuple__131); - __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(1, 463, __pyx_L1_error) + __pyx_codeobj__132 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__131, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 467, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__132)) __PYX_ERR(1, 467, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":473 + /* "src/lxml/xmlerror.pxi":477 * return iter(self._entries[self._offset:]) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_tuple__133 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_tuple__133 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__133)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__133); __Pyx_GIVEREF(__pyx_tuple__133); - __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_codeobj__134 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__133, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__134)) __PYX_ERR(1, 477, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":483 + /* "src/lxml/xmlerror.pxi":487 * self._accepted_domains = tuple(domains) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if entry.domain in self._accepted_domains: * _ErrorLog.receive(self, entry) */ - __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(1, 483, __pyx_L1_error) + __pyx_tuple__135 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__135)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__135); __Pyx_GIVEREF(__pyx_tuple__135); - __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 483, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(1, 483, __pyx_L1_error) + __pyx_codeobj__136 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__135, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 487, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__136)) __PYX_ERR(1, 487, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":493 + /* "src/lxml/xmlerror.pxi":497 * self._max_len = max_len * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_tuple__137 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_entry); if (unlikely(!__pyx_tuple__137)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__137); __Pyx_GIVEREF(__pyx_tuple__137); - __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_codeobj__138 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__137, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__138)) __PYX_ERR(1, 497, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":544 + /* "src/lxml/xmlerror.pxi":548 * self._log = logger.log * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Dummy method that returns an empty error log. * """ */ - __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(1, 544, __pyx_L1_error) + __pyx_tuple__139 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__139)) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__139); __Pyx_GIVEREF(__pyx_tuple__139); - __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(1, 544, __pyx_L1_error) + __pyx_codeobj__140 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__139, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_copy, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__140)) __PYX_ERR(1, 548, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":549 + /* "src/lxml/xmlerror.pxi":553 * return _ListErrorLog([], None, None) * * def log(self, log_entry, message, *args): # <<<<<<<<<<<<<< * u"""log(self, log_entry, message, *args) * */ - __pyx_tuple__141 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_log_entry, __pyx_n_s_message, __pyx_n_s_args); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(1, 549, __pyx_L1_error) + __pyx_tuple__141 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_log_entry, __pyx_n_s_message, __pyx_n_s_args); if (unlikely(!__pyx_tuple__141)) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__141); __Pyx_GIVEREF(__pyx_tuple__141); - __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_log, 549, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(1, 549, __pyx_L1_error) + __pyx_codeobj__142 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__141, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_log, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__142)) __PYX_ERR(1, 553, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":566 + /* "src/lxml/xmlerror.pxi":570 * ) * * cpdef receive(self, _LogEntry log_entry): # <<<<<<<<<<<<<< * u"""receive(self, log_entry) * */ - __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_log_entry); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_tuple__143 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_log_entry); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__143); __Pyx_GIVEREF(__pyx_tuple__143); - __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_receive, 570, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(1, 570, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":616 + /* "src/lxml/xmlerror.pxi":620 * * * def use_global_python_log(PyErrorLog log not None): # <<<<<<<<<<<<<< * u"""use_global_python_log(log) * */ - __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_log); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(1, 616, __pyx_L1_error) + __pyx_tuple__145 = PyTuple_Pack(1, __pyx_n_s_log); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(1, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__145); __Pyx_GIVEREF(__pyx_tuple__145); - __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_use_global_python_log, 616, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(1, 616, __pyx_L1_error) + __pyx_codeobj__146 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__145, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xmlerror_pxi, __pyx_n_s_use_global_python_log, 620, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__146)) __PYX_ERR(1, 620, __pyx_L1_error) - /* "src/lxml/xmlerror.pxi":804 + /* "src/lxml/xmlerror.pxi":808 * * * class ErrorLevels(object): # <<<<<<<<<<<<<< * u"Libxml2 error levels" * */ - __pyx_tuple__147 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 804, __pyx_L1_error) + __pyx_tuple__147 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__147)) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__147); __Pyx_GIVEREF(__pyx_tuple__147); - /* "src/lxml/xmlerror.pxi":807 + /* "src/lxml/xmlerror.pxi":811 * u"Libxml2 error levels" * * class ErrorDomains(object): # <<<<<<<<<<<<<< * u"Libxml2 error domains" * */ - __pyx_tuple__148 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(1, 807, __pyx_L1_error) + __pyx_tuple__148 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(1, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__148); __Pyx_GIVEREF(__pyx_tuple__148); - /* "src/lxml/xmlerror.pxi":810 + /* "src/lxml/xmlerror.pxi":814 * u"Libxml2 error domains" * * class ErrorTypes(object): # <<<<<<<<<<<<<< * u"Libxml2 error types" * */ - __pyx_tuple__149 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 810, __pyx_L1_error) + __pyx_tuple__149 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__149)) __PYX_ERR(1, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__149); __Pyx_GIVEREF(__pyx_tuple__149); - /* "src/lxml/xmlerror.pxi":813 + /* "src/lxml/xmlerror.pxi":817 * u"Libxml2 error types" * * class RelaxNGErrorTypes(object): # <<<<<<<<<<<<<< * u"Libxml2 RelaxNG error types" * */ - __pyx_tuple__150 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(1, 813, __pyx_L1_error) + __pyx_tuple__150 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(1, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__150); __Pyx_GIVEREF(__pyx_tuple__150); @@ -228009,900 +228340,900 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__198); __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itersiblings, 1376, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 1376, __pyx_L1_error) - /* "lxml/etree.pyx":1394 + /* "lxml/etree.pyx":1399 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterancestors(self, tag=None, *tags) * */ - __pyx_tuple__200 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_tuple__200 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__200); __Pyx_GIVEREF(__pyx_tuple__200); - __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterancestors, 1394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterancestors, 1399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 1399, __pyx_L1_error) - /* "lxml/etree.pyx":1406 + /* "lxml/etree.pyx":1413 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterdescendants(self, tag=None, *tags) * */ - __pyx_tuple__202 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_tuple__202 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__202); __Pyx_GIVEREF(__pyx_tuple__202); - __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterdescendants, 1406, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterdescendants, 1413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 1413, __pyx_L1_error) - /* "lxml/etree.pyx":1419 + /* "lxml/etree.pyx":1428 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< * u"""iterchildren(self, tag=None, *tags, reversed=False) * */ - __pyx_tuple__204 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_reversed, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_tuple__204 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_reversed, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__204); __Pyx_GIVEREF(__pyx_tuple__204); - __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterchildren, 1419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterchildren, 1428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1428, __pyx_L1_error) - /* "lxml/etree.pyx":1432 + /* "lxml/etree.pyx":1443 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< * u"""getroottree(self) * */ - __pyx_tuple__206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_tuple__206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__206); __Pyx_GIVEREF(__pyx_tuple__206); - __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroottree, 1432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroottree, 1443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1443, __pyx_L1_error) - /* "lxml/etree.pyx":1444 + /* "lxml/etree.pyx":1455 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, tag=None, *tags) * */ - __pyx_tuple__208 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_tuple__208 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__208); __Pyx_GIVEREF(__pyx_tuple__208); - __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 1444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 1455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1455, __pyx_L1_error) - /* "lxml/etree.pyx":1466 + /* "lxml/etree.pyx":1477 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_tuple__210 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_tuple__210 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__210); __Pyx_GIVEREF(__pyx_tuple__210); - __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 1466, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 1477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1477, __pyx_L1_error) - /* "lxml/etree.pyx":1490 + /* "lxml/etree.pyx":1501 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< * u"""itertext(self, tag=None, *tags, with_tail=True) * */ - __pyx_tuple__212 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_with_tail, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_tuple__212 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_with_tail, __pyx_n_s_tags); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__212); __Pyx_GIVEREF(__pyx_tuple__212); - __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itertext, 1490, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itertext, 1501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1501, __pyx_L1_error) - /* "lxml/etree.pyx":1505 + /* "lxml/etree.pyx":1516 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_tuple__214 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_tuple__214 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__214); __Pyx_GIVEREF(__pyx_tuple__214); - __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_makeelement, 1505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_makeelement, 1516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1516, __pyx_L1_error) - /* "lxml/etree.pyx":1514 + /* "lxml/etree.pyx":1525 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_tuple__216 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_tuple__216 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__216); __Pyx_GIVEREF(__pyx_tuple__216); - __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 1514, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 1525, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1525, __pyx_L1_error) - /* "lxml/etree.pyx":1527 + /* "lxml/etree.pyx":1538 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_tuple__218 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_tuple__218 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__218); __Pyx_GIVEREF(__pyx_tuple__218); - __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 1527, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 1538, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 1538, __pyx_L1_error) - /* "lxml/etree.pyx":1540 + /* "lxml/etree.pyx":1551 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_tuple__220 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_tuple__220 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__220); __Pyx_GIVEREF(__pyx_tuple__220); - __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 1540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 1551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 1551, __pyx_L1_error) - /* "lxml/etree.pyx":1553 + /* "lxml/etree.pyx":1564 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_tuple__222 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_tuple__222 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__222); __Pyx_GIVEREF(__pyx_tuple__222); - __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 1553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 1564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 1564, __pyx_L1_error) - /* "lxml/etree.pyx":1566 + /* "lxml/etree.pyx":1577 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< * smart_strings=True, **_variables): * u"""xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables) */ - __pyx_tuple__224 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_path_2, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_smart_strings, __pyx_n_s_variables_2, __pyx_n_s_evaluator); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_tuple__224 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_path_2, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_smart_strings, __pyx_n_s_variables_2, __pyx_n_s_evaluator); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__224); __Pyx_GIVEREF(__pyx_tuple__224); - __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(2, 3, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 1566, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(2, 3, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 1577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 1577, __pyx_L1_error) - /* "lxml/etree.pyx":1577 + /* "lxml/etree.pyx":1588 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< * """ * Run the CSS expression on this element and its children, */ - __pyx_tuple__226 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_expr, __pyx_n_s_translator, __pyx_n_s_CSSSelector); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_tuple__226 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_expr, __pyx_n_s_translator, __pyx_n_s_CSSSelector); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__226); __Pyx_GIVEREF(__pyx_tuple__226); - __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_cssselect, 1577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(2, 1, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_cssselect, 1588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1588, __pyx_L1_error) - /* "lxml/etree.pyx":1627 + /* "lxml/etree.pyx":1638 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< * u"set(self, key, value)" * self._raiseImmutable() */ - __pyx_tuple__228 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_tuple__228 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__228); __Pyx_GIVEREF(__pyx_tuple__228); - __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_set, 1627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_codeobj__229 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__228, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_set, 1638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__229)) __PYX_ERR(0, 1638, __pyx_L1_error) - /* "lxml/etree.pyx":1631 + /* "lxml/etree.pyx":1642 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< * u"append(self, value)" * self._raiseImmutable() */ - __pyx_tuple__230 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_tuple__230 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_value); if (unlikely(!__pyx_tuple__230)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__230); __Pyx_GIVEREF(__pyx_tuple__230); - __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append, 1631, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_codeobj__231 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__230, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append, 1642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__231)) __PYX_ERR(0, 1642, __pyx_L1_error) - /* "lxml/etree.pyx":1635 + /* "lxml/etree.pyx":1646 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< * u"insert(self, index, value)" * self._raiseImmutable() */ - __pyx_tuple__232 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1635, __pyx_L1_error) + __pyx_tuple__232 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_index, __pyx_n_s_value); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__232); __Pyx_GIVEREF(__pyx_tuple__232); - __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_insert, 1635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 1635, __pyx_L1_error) + __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_insert, 1646, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 1646, __pyx_L1_error) - /* "lxml/etree.pyx":1674 + /* "lxml/etree.pyx":1685 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"get(self, key, default=None)" * return None */ - __pyx_tuple__234 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_tuple__234 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__234); __Pyx_GIVEREF(__pyx_tuple__234); - __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1674, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1685, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 1685, __pyx_L1_error) - /* "lxml/etree.pyx":1678 + /* "lxml/etree.pyx":1689 * return None * * def keys(self): # <<<<<<<<<<<<<< * u"keys(self)" * return [] */ - __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1678, __pyx_L1_error) + __pyx_tuple__236 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__236); __Pyx_GIVEREF(__pyx_tuple__236); - __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 1678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 1678, __pyx_L1_error) + __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 1689, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 1689, __pyx_L1_error) - /* "lxml/etree.pyx":1682 + /* "lxml/etree.pyx":1693 * return [] * * def items(self): # <<<<<<<<<<<<<< * u"items(self)" * return [] */ - __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_tuple__238 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__238); __Pyx_GIVEREF(__pyx_tuple__238); - __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 1682, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 1693, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 1693, __pyx_L1_error) - /* "lxml/etree.pyx":1686 + /* "lxml/etree.pyx":1697 * return [] * * def values(self): # <<<<<<<<<<<<<< * u"values(self)" * return [] */ - __pyx_tuple__240 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_tuple__240 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__240); __Pyx_GIVEREF(__pyx_tuple__240); - __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 1686, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 1697, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 1697, __pyx_L1_error) - /* "lxml/etree.pyx":1723 + /* "lxml/etree.pyx":1734 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __pyx_tuple__242 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_tuple__242 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1734, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__242); __Pyx_GIVEREF(__pyx_tuple__242); - __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 1734, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1734, __pyx_L1_error) - /* "lxml/etree.pyx":1867 + /* "lxml/etree.pyx":1878 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(self, source, parser=None, base_url=None) * */ - __pyx_tuple__244 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1867, __pyx_L1_error) + __pyx_tuple__244 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__244); __Pyx_GIVEREF(__pyx_tuple__244); - __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(3, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 1867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 1867, __pyx_L1_error) + __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(3, 1, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 1878, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 1878, __pyx_L1_error) - /* "lxml/etree.pyx":1883 + /* "lxml/etree.pyx":1894 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< * u"""_setroot(self, root) * */ - __pyx_tuple__246 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_root); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1883, __pyx_L1_error) + __pyx_tuple__246 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_root); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1894, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__246); __Pyx_GIVEREF(__pyx_tuple__246); - __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setroot, 1883, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1883, __pyx_L1_error) + __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_setroot, 1894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1894, __pyx_L1_error) - /* "lxml/etree.pyx":1894 + /* "lxml/etree.pyx":1905 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< * u"""getroot(self) * */ - __pyx_tuple__248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_tuple__248 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1905, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__248); __Pyx_GIVEREF(__pyx_tuple__248); - __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroot, 1894, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getroot, 1905, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 1905, __pyx_L1_error) - /* "lxml/etree.pyx":1901 + /* "lxml/etree.pyx":1912 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< * return _elementTreeFactory(self._doc, self._context_node) * */ - __pyx_tuple__250 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1901, __pyx_L1_error) + __pyx_tuple__250 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__250); __Pyx_GIVEREF(__pyx_tuple__250); - __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 1901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 1901, __pyx_L1_error) + __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 1912, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 1912, __pyx_L1_error) - /* "lxml/etree.pyx":1904 + /* "lxml/etree.pyx":1915 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * cdef _Element root * cdef _Document doc */ - __pyx_tuple__252 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_memo, __pyx_n_s_root, __pyx_n_s_doc_2, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1904, __pyx_L1_error) + __pyx_tuple__252 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_memo, __pyx_n_s_root, __pyx_n_s_doc_2, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__252); __Pyx_GIVEREF(__pyx_tuple__252); - __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 1904, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 1904, __pyx_L1_error) + __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 1915, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 1915, __pyx_L1_error) - /* "lxml/etree.pyx":1944 - * return None + /* "lxml/etree.pyx":1955 + * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, */ - __pyx_tuple__254 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_encoding, __pyx_n_s_method, __pyx_n_s_pretty_print, __pyx_n_s_xml_declaration, __pyx_n_s_with_tail, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_compression, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_inclusive_ns_prefixes, __pyx_n_s_docstring, __pyx_n_s_write_declaration, __pyx_n_s_is_standalone, __pyx_n_s_warnings); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_tuple__254 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_encoding, __pyx_n_s_method, __pyx_n_s_pretty_print, __pyx_n_s_xml_declaration, __pyx_n_s_with_tail, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_compression, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_inclusive_ns_prefixes, __pyx_n_s_docstring, __pyx_n_s_write_declaration, __pyx_n_s_is_standalone, __pyx_n_s_warnings); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 1955, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__254); __Pyx_GIVEREF(__pyx_tuple__254); - __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 12, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write, 1944, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 12, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write, 1955, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 1955, __pyx_L1_error) - /* "lxml/etree.pyx":2041 + /* "lxml/etree.pyx":2052 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getpath(self, element) * */ - __pyx_tuple__256 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_root, __pyx_n_s_c_doc, __pyx_n_s_c_path, __pyx_n_s_path); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 2041, __pyx_L1_error) + __pyx_tuple__256 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_doc_2, __pyx_n_s_root, __pyx_n_s_c_doc, __pyx_n_s_c_path, __pyx_n_s_path); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__256); __Pyx_GIVEREF(__pyx_tuple__256); - __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getpath, 2041, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 2041, __pyx_L1_error) + __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getpath, 2052, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 2052, __pyx_L1_error) - /* "lxml/etree.pyx":2079 + /* "lxml/etree.pyx":2090 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getelementpath(self, element) * */ - __pyx_tuple__258 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_root, __pyx_n_s_count, __pyx_n_s_path, __pyx_n_s_c_element, __pyx_n_s_c_name, __pyx_n_s_c_href, __pyx_n_s_tag, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 2079, __pyx_L1_error) + __pyx_tuple__258 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_element, __pyx_n_s_root, __pyx_n_s_count, __pyx_n_s_path, __pyx_n_s_c_element, __pyx_n_s_c_name, __pyx_n_s_c_href, __pyx_n_s_tag, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__258); __Pyx_GIVEREF(__pyx_tuple__258); - __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getelementpath, 2079, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 2079, __pyx_L1_error) + __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getelementpath, 2090, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 2090, __pyx_L1_error) - /* "lxml/etree.pyx":2143 + /* "lxml/etree.pyx":2154 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, *tags, tag=None) * */ - __pyx_tuple__260 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 2143, __pyx_L1_error) + __pyx_tuple__260 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__260); __Pyx_GIVEREF(__pyx_tuple__260); - __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 2143, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 2143, __pyx_L1_error) + __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_getiterator, 2154, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 2154, __pyx_L1_error) - /* "lxml/etree.pyx":2167 + /* "lxml/etree.pyx":2178 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_tuple__262 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 2167, __pyx_L1_error) + __pyx_tuple__262 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_tag, __pyx_n_s_tags, __pyx_n_s_root); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 2178, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__262); __Pyx_GIVEREF(__pyx_tuple__262); - __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 2167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 2167, __pyx_L1_error) + __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iter, 2178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 2178, __pyx_L1_error) - /* "lxml/etree.pyx":2185 + /* "lxml/etree.pyx":2196 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_tuple__264 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_tuple__264 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__264); __Pyx_GIVEREF(__pyx_tuple__264); - __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 2185, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_find, 2196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 2196, __pyx_L1_error) - /* "lxml/etree.pyx":2202 + /* "lxml/etree.pyx":2213 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_tuple__266 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_tuple__266 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_default, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 2213, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__266); __Pyx_GIVEREF(__pyx_tuple__266); - __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 2202, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findtext, 2213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 2213, __pyx_L1_error) - /* "lxml/etree.pyx":2219 + /* "lxml/etree.pyx":2230 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_tuple__268 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 2219, __pyx_L1_error) + __pyx_tuple__268 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__268); __Pyx_GIVEREF(__pyx_tuple__268); - __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 2219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 2219, __pyx_L1_error) + __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_findall, 2230, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 2230, __pyx_L1_error) - /* "lxml/etree.pyx":2236 + /* "lxml/etree.pyx":2247 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_tuple__270 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 2236, __pyx_L1_error) + __pyx_tuple__270 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_path, __pyx_n_s_namespaces, __pyx_n_s_root); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__270); __Pyx_GIVEREF(__pyx_tuple__270); - __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 2236, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 2236, __pyx_L1_error) + __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterfind, 2247, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 2247, __pyx_L1_error) - /* "lxml/etree.pyx":2253 + /* "lxml/etree.pyx":2264 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< * smart_strings=True, **_variables): * u"""xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables) */ - __pyx_tuple__272 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_path_2, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_smart_strings, __pyx_n_s_variables_2, __pyx_n_s_evaluator); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_tuple__272 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_path_2, __pyx_n_s_namespaces, __pyx_n_s_extensions, __pyx_n_s_smart_strings, __pyx_n_s_variables_2, __pyx_n_s_evaluator); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 2264, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__272); __Pyx_GIVEREF(__pyx_tuple__272); - __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(2, 3, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 2253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(2, 3, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xpath, 2264, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(0, 2264, __pyx_L1_error) - /* "lxml/etree.pyx":2278 + /* "lxml/etree.pyx":2289 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< * u"""xslt(self, _xslt, extensions=None, access_control=None, **_kw) * */ - __pyx_tuple__274 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_xslt, __pyx_n_s_extensions, __pyx_n_s_access_control, __pyx_n_s_kw, __pyx_n_s_style); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 2278, __pyx_L1_error) + __pyx_tuple__274 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_xslt, __pyx_n_s_extensions, __pyx_n_s_access_control, __pyx_n_s_kw, __pyx_n_s_style); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__274); __Pyx_GIVEREF(__pyx_tuple__274); - __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xslt_3, 2278, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 2278, __pyx_L1_error) + __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xslt_3, 2289, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 2289, __pyx_L1_error) - /* "lxml/etree.pyx":2297 + /* "lxml/etree.pyx":2308 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< * u"""relaxng(self, relaxng) * */ - __pyx_tuple__276 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_relaxng, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 2297, __pyx_L1_error) + __pyx_tuple__276 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_relaxng, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__276); __Pyx_GIVEREF(__pyx_tuple__276); - __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_relaxng, 2297, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 2297, __pyx_L1_error) + __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_relaxng, 2308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 2308, __pyx_L1_error) - /* "lxml/etree.pyx":2315 + /* "lxml/etree.pyx":2326 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< * u"""xmlschema(self, xmlschema) * */ - __pyx_tuple__278 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xmlschema, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 2315, __pyx_L1_error) + __pyx_tuple__278 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xmlschema, __pyx_n_s_schema); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 2326, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__278); __Pyx_GIVEREF(__pyx_tuple__278); - __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xmlschema, 2315, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 2315, __pyx_L1_error) + __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xmlschema, 2326, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 2326, __pyx_L1_error) - /* "lxml/etree.pyx":2333 + /* "lxml/etree.pyx":2344 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< * u"""xinclude(self) * */ - __pyx_tuple__280 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_tuple__280 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__280); __Pyx_GIVEREF(__pyx_tuple__280); - __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xinclude, 2333, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_xinclude, 2344, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 2344, __pyx_L1_error) - /* "lxml/etree.pyx":2348 + /* "lxml/etree.pyx":2359 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< * compression=0, inclusive_ns_prefixes=None): * u"""write_c14n(self, file, exclusive=False, with_comments=True, */ - __pyx_tuple__282 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_compression, __pyx_n_s_inclusive_ns_prefixes); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 2348, __pyx_L1_error) + __pyx_tuple__282 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_file, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_compression, __pyx_n_s_inclusive_ns_prefixes); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 2359, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__282); __Pyx_GIVEREF(__pyx_tuple__282); - __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(2, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write_c14n, 2348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(0, 2348, __pyx_L1_error) + __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(2, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_write_c14n, 2359, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(0, 2359, __pyx_L1_error) - /* "lxml/etree.pyx":2412 + /* "lxml/etree.pyx":2423 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): */ - __pyx_tuple__284 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sequence_or_dict, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 2412, __pyx_L1_error) + __pyx_tuple__284 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_sequence_or_dict, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__284); __Pyx_GIVEREF(__pyx_tuple__284); - __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_update, 2412, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(0, 2412, __pyx_L1_error) + __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_update, 2423, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(0, 2423, __pyx_L1_error) - /* "lxml/etree.pyx":2419 + /* "lxml/etree.pyx":2430 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< * if len(default) > 1: * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" */ - __pyx_tuple__286 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_result); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 2419, __pyx_L1_error) + __pyx_tuple__286 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default, __pyx_n_s_result); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__286); __Pyx_GIVEREF(__pyx_tuple__286); - __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_pop, 2419, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 2419, __pyx_L1_error) + __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_pop, 2430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 2430, __pyx_L1_error) - /* "lxml/etree.pyx":2432 + /* "lxml/etree.pyx":2443 * return result * * def clear(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node */ - __pyx_tuple__288 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 2432, __pyx_L1_error) + __pyx_tuple__288 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_c_node); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__288); __Pyx_GIVEREF(__pyx_tuple__288); - __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 2432, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 2432, __pyx_L1_error) + __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear, 2443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 2443, __pyx_L1_error) - /* "lxml/etree.pyx":2443 + /* "lxml/etree.pyx":2454 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 2454, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__290); __Pyx_GIVEREF(__pyx_tuple__290); - __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 2443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_codeobj__291 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__290, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_copy_2, 2454, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__291)) __PYX_ERR(0, 2454, __pyx_L1_error) - /* "lxml/etree.pyx":2447 + /* "lxml/etree.pyx":2458 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __pyx_tuple__292 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 2447, __pyx_L1_error) + __pyx_tuple__292 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__292)) __PYX_ERR(0, 2458, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__292); __Pyx_GIVEREF(__pyx_tuple__292); - __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 2447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 2447, __pyx_L1_error) + __pyx_codeobj__293 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__292, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_deepcopy, 2458, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__293)) __PYX_ERR(0, 2458, __pyx_L1_error) - /* "lxml/etree.pyx":2477 + /* "lxml/etree.pyx":2488 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) */ - __pyx_tuple__294 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 2477, __pyx_L1_error) + __pyx_tuple__294 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_key, __pyx_n_s_default); if (unlikely(!__pyx_tuple__294)) __PYX_ERR(0, 2488, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__294); __Pyx_GIVEREF(__pyx_tuple__294); - __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 2477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 2477, __pyx_L1_error) + __pyx_codeobj__295 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__294, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_get, 2488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__295)) __PYX_ERR(0, 2488, __pyx_L1_error) - /* "lxml/etree.pyx":2481 + /* "lxml/etree.pyx":2492 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) */ - __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 2481, __pyx_L1_error) + __pyx_tuple__296 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__296)) __PYX_ERR(0, 2492, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__296); __Pyx_GIVEREF(__pyx_tuple__296); - __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 2481, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(0, 2481, __pyx_L1_error) + __pyx_codeobj__297 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__296, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_keys, 2492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__297)) __PYX_ERR(0, 2492, __pyx_L1_error) - /* "lxml/etree.pyx":2489 + /* "lxml/etree.pyx":2500 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) */ - __pyx_tuple__298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 2489, __pyx_L1_error) + __pyx_tuple__298 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__298)) __PYX_ERR(0, 2500, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__298); __Pyx_GIVEREF(__pyx_tuple__298); - __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterkeys, 2489, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(0, 2489, __pyx_L1_error) + __pyx_codeobj__299 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__298, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iterkeys, 2500, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__299)) __PYX_ERR(0, 2500, __pyx_L1_error) - /* "lxml/etree.pyx":2493 + /* "lxml/etree.pyx":2504 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) */ - __pyx_tuple__300 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_tuple__300 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__300)) __PYX_ERR(0, 2504, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__300); __Pyx_GIVEREF(__pyx_tuple__300); - __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 2493, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_codeobj__301 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__300, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_values, 2504, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__301)) __PYX_ERR(0, 2504, __pyx_L1_error) - /* "lxml/etree.pyx":2497 + /* "lxml/etree.pyx":2508 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) */ - __pyx_tuple__302 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_tuple__302 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__302)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__302); __Pyx_GIVEREF(__pyx_tuple__302); - __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itervalues, 2497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_codeobj__303 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__302, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_itervalues, 2508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__303)) __PYX_ERR(0, 2508, __pyx_L1_error) - /* "lxml/etree.pyx":2501 + /* "lxml/etree.pyx":2512 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) */ - __pyx_tuple__304 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_tuple__304 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__304)) __PYX_ERR(0, 2512, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__304); __Pyx_GIVEREF(__pyx_tuple__304); - __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 2501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_codeobj__305 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__304, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_items, 2512, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__305)) __PYX_ERR(0, 2512, __pyx_L1_error) - /* "lxml/etree.pyx":2505 + /* "lxml/etree.pyx":2516 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) */ - __pyx_tuple__306 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_tuple__306 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__306)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__306); __Pyx_GIVEREF(__pyx_tuple__306); - __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iteritems, 2505, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_codeobj__307 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__306, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iteritems, 2516, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__307)) __PYX_ERR(0, 2516, __pyx_L1_error) - /* "lxml/etree.pyx":2509 + /* "lxml/etree.pyx":2520 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return key in self */ - __pyx_tuple__308 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_tuple__308 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_key); if (unlikely(!__pyx_tuple__308)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__308); __Pyx_GIVEREF(__pyx_tuple__308); - __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_has_key, 2509, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_codeobj__309 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__308, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_has_key, 2520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__309)) __PYX_ERR(0, 2520, __pyx_L1_error) - /* "lxml/etree.pyx":2986 + /* "lxml/etree.pyx":2997 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_tuple__310 = PyTuple_Pack(4, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 2986, __pyx_L1_error) + __pyx_tuple__310 = PyTuple_Pack(4, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__310)) __PYX_ERR(0, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__310); __Pyx_GIVEREF(__pyx_tuple__310); - __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Element, 2986, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 2986, __pyx_L1_error) - __pyx_tuple__312 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 2986, __pyx_L1_error) + __pyx_codeobj__311 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__310, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Element, 2997, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__311)) __PYX_ERR(0, 2997, __pyx_L1_error) + __pyx_tuple__312 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__312)) __PYX_ERR(0, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__312); __Pyx_GIVEREF(__pyx_tuple__312); - /* "lxml/etree.pyx":3000 + /* "lxml/etree.pyx":3011 * * * def Comment(text=None): # <<<<<<<<<<<<<< * u"""Comment(text=None) * */ - __pyx_tuple__313 = PyTuple_Pack(4, __pyx_n_s_text, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 3000, __pyx_L1_error) + __pyx_tuple__313 = PyTuple_Pack(4, __pyx_n_s_text, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 3011, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__313); __Pyx_GIVEREF(__pyx_tuple__313); - __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Comment, 3000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(0, 3000, __pyx_L1_error) - __pyx_tuple__315 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 3000, __pyx_L1_error) + __pyx_codeobj__314 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__313, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Comment, 3011, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__314)) __PYX_ERR(0, 3011, __pyx_L1_error) + __pyx_tuple__315 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__315)) __PYX_ERR(0, 3011, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__315); __Pyx_GIVEREF(__pyx_tuple__315); - /* "lxml/etree.pyx":3024 + /* "lxml/etree.pyx":3035 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< * u"""ProcessingInstruction(target, text=None) * */ - __pyx_tuple__316 = PyTuple_Pack(5, __pyx_n_s_target, __pyx_n_s_text, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_tuple__316 = PyTuple_Pack(5, __pyx_n_s_target, __pyx_n_s_text, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 3035, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__316); __Pyx_GIVEREF(__pyx_tuple__316); - __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ProcessingInstruction, 3024, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(0, 3024, __pyx_L1_error) - __pyx_tuple__318 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ProcessingInstruction, 3035, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(0, 3035, __pyx_L1_error) + __pyx_tuple__318 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 3035, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__318); __Pyx_GIVEREF(__pyx_tuple__318); - /* "lxml/etree.pyx":3077 + /* "lxml/etree.pyx":3088 * * * def Entity(name): # <<<<<<<<<<<<<< * u"""Entity(name) * */ - __pyx_tuple__319 = PyTuple_Pack(6, __pyx_n_s_name_2, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc, __pyx_n_s_name_utf, __pyx_n_s_c_name); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_tuple__319 = PyTuple_Pack(6, __pyx_n_s_name_2, __pyx_n_s_doc_2, __pyx_n_s_c_node, __pyx_n_s_c_doc, __pyx_n_s_name_utf, __pyx_n_s_c_name); if (unlikely(!__pyx_tuple__319)) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__319); __Pyx_GIVEREF(__pyx_tuple__319); - __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Entity, 3077, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_codeobj__320 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__319, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_Entity, 3088, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__320)) __PYX_ERR(0, 3088, __pyx_L1_error) - /* "lxml/etree.pyx":3103 + /* "lxml/etree.pyx":3114 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< * attrib=None, nsmap=None, **_extra): * u"""SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra) */ - __pyx_tuple__321 = PyTuple_Pack(5, __pyx_n_s_parent, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 3103, __pyx_L1_error) + __pyx_tuple__321 = PyTuple_Pack(5, __pyx_n_s_parent, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_extra); if (unlikely(!__pyx_tuple__321)) __PYX_ERR(0, 3114, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__321); __Pyx_GIVEREF(__pyx_tuple__321); - __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_SubElement, 3103, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(0, 3103, __pyx_L1_error) - __pyx_tuple__323 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 3103, __pyx_L1_error) + __pyx_codeobj__322 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__321, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_SubElement, 3114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__322)) __PYX_ERR(0, 3114, __pyx_L1_error) + __pyx_tuple__323 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__323)) __PYX_ERR(0, 3114, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__323); __Pyx_GIVEREF(__pyx_tuple__323); - /* "lxml/etree.pyx":3113 + /* "lxml/etree.pyx":3124 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""ElementTree(element=None, file=None, parser=None) * */ - __pyx_tuple__324 = PyTuple_Pack(10, __pyx_n_s_element, __pyx_n_s_file, __pyx_n_s_parser, __pyx_n_s_c_next, __pyx_n_s_c_node, __pyx_n_s_c_node_copy, __pyx_n_s_c_doc, __pyx_n_s_etree, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 3113, __pyx_L1_error) + __pyx_tuple__324 = PyTuple_Pack(10, __pyx_n_s_element, __pyx_n_s_file, __pyx_n_s_parser, __pyx_n_s_c_next, __pyx_n_s_c_node, __pyx_n_s_c_node_copy, __pyx_n_s_c_doc, __pyx_n_s_etree, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__324); __Pyx_GIVEREF(__pyx_tuple__324); - __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(1, 2, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ElementTree, 3113, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 3113, __pyx_L1_error) - __pyx_tuple__326 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 3113, __pyx_L1_error) + __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(1, 2, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_ElementTree, 3124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 3124, __pyx_L1_error) + __pyx_tuple__326 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__326); __Pyx_GIVEREF(__pyx_tuple__326); - /* "lxml/etree.pyx":3139 + /* "lxml/etree.pyx":3150 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""HTML(text, parser=None, base_url=None) * */ - __pyx_tuple__327 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 3139, __pyx_L1_error) + __pyx_tuple__327 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__327)) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__327); __Pyx_GIVEREF(__pyx_tuple__327); - __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_HTML, 3139, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(0, 3139, __pyx_L1_error) - __pyx_tuple__329 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 3139, __pyx_L1_error) + __pyx_codeobj__328 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__327, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_HTML, 3150, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__328)) __PYX_ERR(0, 3150, __pyx_L1_error) + __pyx_tuple__329 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__329)) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__329); __Pyx_GIVEREF(__pyx_tuple__329); - /* "lxml/etree.pyx":3165 + /* "lxml/etree.pyx":3176 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(text, parser=None, base_url=None) * */ - __pyx_tuple__330 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 3165, __pyx_L1_error) + __pyx_tuple__330 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__330); __Pyx_GIVEREF(__pyx_tuple__330); - __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_XML, 3165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 3165, __pyx_L1_error) - __pyx_tuple__332 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 3165, __pyx_L1_error) + __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_XML, 3176, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 3176, __pyx_L1_error) + __pyx_tuple__332 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__332); __Pyx_GIVEREF(__pyx_tuple__332); - /* "lxml/etree.pyx":3196 + /* "lxml/etree.pyx":3207 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(text, parser=None, base_url=None) * */ - __pyx_tuple__333 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 3196, __pyx_L1_error) + __pyx_tuple__333 = PyTuple_Pack(5, __pyx_n_s_text, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__333)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__333); __Pyx_GIVEREF(__pyx_tuple__333); - __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstring, 3196, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(0, 3196, __pyx_L1_error) - __pyx_tuple__335 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 3196, __pyx_L1_error) + __pyx_codeobj__334 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__333, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstring, 3207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__334)) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_tuple__335 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__335)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__335); __Pyx_GIVEREF(__pyx_tuple__335); - /* "lxml/etree.pyx":3217 + /* "lxml/etree.pyx":3228 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""fromstringlist(strings, parser=None) * */ - __pyx_tuple__336 = PyTuple_Pack(5, __pyx_n_s_strings, __pyx_n_s_parser, __pyx_n_s_doc_2, __pyx_n_s_feed, __pyx_n_s_data); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 3217, __pyx_L1_error) + __pyx_tuple__336 = PyTuple_Pack(5, __pyx_n_s_strings, __pyx_n_s_parser, __pyx_n_s_doc_2, __pyx_n_s_feed, __pyx_n_s_data); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__336); __Pyx_GIVEREF(__pyx_tuple__336); - __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstringlist, 3217, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(0, 3217, __pyx_L1_error) - __pyx_tuple__338 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 3217, __pyx_L1_error) + __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_fromstringlist, 3228, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(0, 3228, __pyx_L1_error) + __pyx_tuple__338 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__338); __Pyx_GIVEREF(__pyx_tuple__338); - /* "lxml/etree.pyx":3238 + /* "lxml/etree.pyx":3249 * * * def iselement(element): # <<<<<<<<<<<<<< * u"""iselement(element) * */ - __pyx_tuple__339 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 3238, __pyx_L1_error) + __pyx_tuple__339 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__339)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__339); __Pyx_GIVEREF(__pyx_tuple__339); - __pyx_codeobj__340 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iselement, 3238, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(0, 3238, __pyx_L1_error) + __pyx_codeobj__340 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__339, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_iselement, 3249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__340)) __PYX_ERR(0, 3249, __pyx_L1_error) - /* "lxml/etree.pyx":3246 + /* "lxml/etree.pyx":3257 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< * u"""dump(elem, pretty_print=True, with_tail=True) * */ - __pyx_tuple__341 = PyTuple_Pack(4, __pyx_n_s_elem, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_xml); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_tuple__341 = PyTuple_Pack(4, __pyx_n_s_elem, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_xml); if (unlikely(!__pyx_tuple__341)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__341); __Pyx_GIVEREF(__pyx_tuple__341); - __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(1, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_dump, 3246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_codeobj__342 = (PyObject*)__Pyx_PyCode_New(1, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__341, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_dump, 3257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__342)) __PYX_ERR(0, 3257, __pyx_L1_error) - /* "lxml/etree.pyx":3259 + /* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, */ - __pyx_tuple__343 = PyTuple_Pack(13, __pyx_n_s_element_or_tree, __pyx_n_s_encoding, __pyx_n_s_method, __pyx_n_s_xml_declaration, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_inclusive_ns_prefixes, __pyx_n_s_write_declaration, __pyx_n_s_is_standalone); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 3259, __pyx_L1_error) + __pyx_tuple__343 = PyTuple_Pack(13, __pyx_n_s_element_or_tree, __pyx_n_s_encoding, __pyx_n_s_method, __pyx_n_s_xml_declaration, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_standalone, __pyx_n_s_doctype, __pyx_n_s_exclusive, __pyx_n_s_with_comments, __pyx_n_s_inclusive_ns_prefixes, __pyx_n_s_write_declaration, __pyx_n_s_is_standalone); if (unlikely(!__pyx_tuple__343)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__343); __Pyx_GIVEREF(__pyx_tuple__343); - __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(1, 10, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostring, 3259, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(0, 3259, __pyx_L1_error) + __pyx_codeobj__344 = (PyObject*)__Pyx_PyCode_New(1, 10, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__343, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostring, 3270, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__344)) __PYX_ERR(0, 3270, __pyx_L1_error) - /* "lxml/etree.pyx":3352 + /* "lxml/etree.pyx":3363 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< * u"""tostringlist(element_or_tree, *args, **kwargs) * */ - __pyx_tuple__345 = PyTuple_Pack(3, __pyx_n_s_element_or_tree, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_tuple__345 = PyTuple_Pack(3, __pyx_n_s_element_or_tree, __pyx_n_s_args, __pyx_n_s_kwargs); if (unlikely(!__pyx_tuple__345)) __PYX_ERR(0, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__345); __Pyx_GIVEREF(__pyx_tuple__345); - __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostringlist, 3352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_codeobj__346 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__345, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tostringlist, 3363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__346)) __PYX_ERR(0, 3363, __pyx_L1_error) - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< * bint with_tail=True, doctype=None): * u"""tounicode(element_or_tree, method="xml", pretty_print=False, */ - __pyx_tuple__347 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_method, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_doctype); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 3364, __pyx_L1_error) + __pyx_tuple__347 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_method, __pyx_n_s_pretty_print, __pyx_n_s_with_tail, __pyx_n_s_doctype); if (unlikely(!__pyx_tuple__347)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__347); __Pyx_GIVEREF(__pyx_tuple__347); - __pyx_codeobj__348 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tounicode, 3364, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__348)) __PYX_ERR(0, 3364, __pyx_L1_error) + __pyx_codeobj__348 = (PyObject*)__Pyx_PyCode_New(1, 4, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__347, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_tounicode, 3375, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__348)) __PYX_ERR(0, 3375, __pyx_L1_error) - /* "lxml/etree.pyx":3398 + /* "lxml/etree.pyx":3409 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(source, parser=None, base_url=None) * */ - __pyx_tuple__349 = PyTuple_Pack(5, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 3398, __pyx_L1_error) + __pyx_tuple__349 = PyTuple_Pack(5, __pyx_n_s_source, __pyx_n_s_parser, __pyx_n_s_base_url, __pyx_n_s_doc_2, __pyx_n_s_result_container); if (unlikely(!__pyx_tuple__349)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__349); __Pyx_GIVEREF(__pyx_tuple__349); - __pyx_codeobj__350 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 3398, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__350)) __PYX_ERR(0, 3398, __pyx_L1_error) - __pyx_tuple__351 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 3398, __pyx_L1_error) + __pyx_codeobj__350 = (PyObject*)__Pyx_PyCode_New(2, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__349, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_parse, 3409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__350)) __PYX_ERR(0, 3409, __pyx_L1_error) + __pyx_tuple__351 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__351)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__351); __Pyx_GIVEREF(__pyx_tuple__351); - /* "lxml/etree.pyx":3430 + /* "lxml/etree.pyx":3441 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< * """adopt_external_document(capsule, parser=None) * */ - __pyx_tuple__352 = PyTuple_Pack(5, __pyx_n_s_capsule, __pyx_n_s_parser, __pyx_n_s_c_doc, __pyx_n_s_is_owned, __pyx_n_s_doc_2); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 3430, __pyx_L1_error) + __pyx_tuple__352 = PyTuple_Pack(5, __pyx_n_s_capsule, __pyx_n_s_parser, __pyx_n_s_c_doc, __pyx_n_s_is_owned, __pyx_n_s_doc_2); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 3441, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__352); __Pyx_GIVEREF(__pyx_tuple__352); - __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_adopt_external_document, 3430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(0, 3430, __pyx_L1_error) - __pyx_tuple__354 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 3430, __pyx_L1_error) + __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_adopt_external_document, 3441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(0, 3441, __pyx_L1_error) + __pyx_tuple__354 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 3441, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__354); __Pyx_GIVEREF(__pyx_tuple__354); @@ -228991,7 +229322,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_readonlytree_pxi, __pyx_n_s_getprevious, 235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(6, 235, __pyx_L1_error) /* "src/lxml/readonlytree.pxi":293 - * return None + * return None * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""Gets an element attribute. @@ -229369,7 +229700,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__432 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_position, 23, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__432)) __PYX_ERR(2, 23, __pyx_L1_error) /* "src/lxml/parser.pxi":961 - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION * * def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." @@ -229417,7 +229748,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__440 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__439, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_parser_pxi, __pyx_n_s_makeelement, 999, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__440)) __PYX_ERR(2, 999, __pyx_L1_error) /* "src/lxml/parser.pxi":1242 - * return self._getPushParserContext()._error_log.copy() + * return self._getPushParserContext()._error_log.copy() * * cpdef feed(self, data): # <<<<<<<<<<<<<< * u"""feed(self, data) @@ -229908,7 +230239,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__510, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_serializer_pxi, __pyx_n_s_aexit, 1439, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(8, 1439, __pyx_L1_error) /* "src/lxml/iterparse.pxi":148 - * return self._parser.version + * return self._parser.version * * def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u"""set_element_class_lookup(self, lookup = None) @@ -230482,68 +230813,68 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__606); __pyx_codeobj__607 = (PyObject*)__Pyx_PyCode_New(3, 2, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__606, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_xsltext_pxi, __pyx_n_s_process_children, 74, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__607)) __PYX_ERR(19, 74, __pyx_L1_error) - /* "lxml/etree.pyx":3511 + /* "lxml/etree.pyx":3522 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< * u"""validate(self, etree) * */ - __pyx_tuple__608 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__608)) __PYX_ERR(0, 3511, __pyx_L1_error) + __pyx_tuple__608 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__608)) __PYX_ERR(0, 3522, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__608); __Pyx_GIVEREF(__pyx_tuple__608); - __pyx_codeobj__609 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_validate, 3511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__609)) __PYX_ERR(0, 3511, __pyx_L1_error) + __pyx_codeobj__609 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__608, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_validate, 3522, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__609)) __PYX_ERR(0, 3522, __pyx_L1_error) - /* "lxml/etree.pyx":3520 + /* "lxml/etree.pyx":3531 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< * u"""assertValid(self, etree) * */ - __pyx_tuple__610 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__610)) __PYX_ERR(0, 3520, __pyx_L1_error) + __pyx_tuple__610 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__610)) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__610); __Pyx_GIVEREF(__pyx_tuple__610); - __pyx_codeobj__611 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__610, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assertValid, 3520, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__611)) __PYX_ERR(0, 3520, __pyx_L1_error) + __pyx_codeobj__611 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__610, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assertValid, 3531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__611)) __PYX_ERR(0, 3531, __pyx_L1_error) - /* "lxml/etree.pyx":3530 + /* "lxml/etree.pyx":3541 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< * u"""assert_(self, etree) * */ - __pyx_tuple__612 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__612)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_tuple__612 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_etree); if (unlikely(!__pyx_tuple__612)) __PYX_ERR(0, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__612); __Pyx_GIVEREF(__pyx_tuple__612); - __pyx_codeobj__613 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assert, 3530, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__613)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_codeobj__613 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__612, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_assert, 3541, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__613)) __PYX_ERR(0, 3541, __pyx_L1_error) - /* "lxml/etree.pyx":3539 + /* "lxml/etree.pyx":3550 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< * message, filename): * self._error_log._receiveGeneric(domain, type, level, line, message, */ - __pyx_tuple__614 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_domain, __pyx_n_s_type, __pyx_n_s_level, __pyx_n_s_line_2, __pyx_n_s_message, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__614)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_tuple__614 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_domain, __pyx_n_s_type, __pyx_n_s_level, __pyx_n_s_line_2, __pyx_n_s_message, __pyx_n_s_filename); if (unlikely(!__pyx_tuple__614)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__614); __Pyx_GIVEREF(__pyx_tuple__614); - __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append_log_message, 3539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_codeobj__615 = (PyObject*)__Pyx_PyCode_New(7, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__614, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_append_log_message, 3550, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__615)) __PYX_ERR(0, 3550, __pyx_L1_error) - /* "lxml/etree.pyx":3544 + /* "lxml/etree.pyx":3555 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< * self._error_log.clear() * */ - __pyx_tuple__616 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_tuple__616 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__616)) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__616); __Pyx_GIVEREF(__pyx_tuple__616); - __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear_error_log, 3544, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_codeobj__617 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__616, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_etree_pyx, __pyx_n_s_clear_error_log, 3555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__617)) __PYX_ERR(0, 3555, __pyx_L1_error) /* "src/lxml/dtd.pxi":163 - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -230567,7 +230898,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__620 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__619, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_values, 170, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__620)) __PYX_ERR(20, 170, __pyx_L1_error) /* "src/lxml/dtd.pxi":223 - * return None + * return None * * def iterattributes(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -230591,7 +230922,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __pyx_codeobj__623 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__622, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_dtd_pxi, __pyx_n_s_attributes, 233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__623)) __PYX_ERR(20, 233, __pyx_L1_error) /* "src/lxml/dtd.pxi":314 - * return funicodeOrNone(self._c_dtd.SystemID) + * return funicodeOrNone(self._c_dtd.SystemID) * * def iterelements(self): # <<<<<<<<<<<<<< * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL @@ -230951,35 +231282,35 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__BaseErrorLog._receiveGeneric = (void (*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int, int, int, int, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__receiveGeneric; __pyx_vtable_4lxml_5etree__BaseErrorLog._buildParseException = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildParseException; __pyx_vtable_4lxml_5etree__BaseErrorLog._buildExceptionMessage = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, PyObject *))__pyx_f_4lxml_5etree_13_BaseErrorLog__buildExceptionMessage; - if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 180, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 184, __pyx_L1_error) __pyx_type_4lxml_5etree__BaseErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__BaseErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree__BaseErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__BaseErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 180, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 180, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__BaseErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 184, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BaseErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__BaseErrorLog) < 0) __PYX_ERR(1, 184, __pyx_L1_error) __pyx_ptype_4lxml_5etree__BaseErrorLog = &__pyx_type_4lxml_5etree__BaseErrorLog; __pyx_vtabptr_4lxml_5etree__ListErrorLog = &__pyx_vtable_4lxml_5etree__ListErrorLog; __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog; __pyx_vtable_4lxml_5etree__ListErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_13_ListErrorLog_copy; __pyx_type_4lxml_5etree__ListErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 270, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 274, __pyx_L1_error) __pyx_type_4lxml_5etree__ListErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ListErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree__ListErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ListErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ListErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 270, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ListErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 270, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ListErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 274, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ListErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__ListErrorLog) < 0) __PYX_ERR(1, 274, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ListErrorLog = &__pyx_type_4lxml_5etree__ListErrorLog; __pyx_vtabptr_4lxml_5etree__ErrorLogContext = &__pyx_vtable_4lxml_5etree__ErrorLogContext; __pyx_vtable_4lxml_5etree__ErrorLogContext.push_error_log = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLogContext *, struct __pyx_obj_4lxml_5etree__BaseErrorLog *))__pyx_f_4lxml_5etree_16_ErrorLogContext_push_error_log; __pyx_vtable_4lxml_5etree__ErrorLogContext.pop_error_log = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLogContext *))__pyx_f_4lxml_5etree_16_ErrorLogContext_pop_error_log; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLogContext) < 0) __PYX_ERR(1, 388, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLogContext) < 0) __PYX_ERR(1, 392, __pyx_L1_error) __pyx_type_4lxml_5etree__ErrorLogContext.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ErrorLogContext.tp_dictoffset && __pyx_type_4lxml_5etree__ErrorLogContext.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ErrorLogContext.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLogContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLogContext) < 0) __PYX_ERR(1, 388, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLogContext.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLogContext) < 0) __PYX_ERR(1, 392, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ErrorLogContext = &__pyx_type_4lxml_5etree__ErrorLogContext; __pyx_vtabptr_4lxml_5etree__ErrorLog = &__pyx_vtable_4lxml_5etree__ErrorLog; __pyx_vtable_4lxml_5etree__ErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ListErrorLog; @@ -230990,50 +231321,50 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__ErrorLog.disconnect = (int (*)(struct __pyx_obj_4lxml_5etree__ErrorLog *))__pyx_f_4lxml_5etree_9_ErrorLog_disconnect; __pyx_vtable_4lxml_5etree__ErrorLog.clear = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_9_ErrorLog_clear; __pyx_type_4lxml_5etree__ErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ListErrorLog; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 429, __pyx_L1_error) __pyx_type_4lxml_5etree__ErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree__ErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 425, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 425, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 429, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__ErrorLog) < 0) __PYX_ERR(1, 429, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ErrorLog = &__pyx_type_4lxml_5etree__ErrorLog; __pyx_vtabptr_4lxml_5etree__DomainErrorLog = &__pyx_vtable_4lxml_5etree__DomainErrorLog; __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog; __pyx_vtable_4lxml_5etree__DomainErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_15_DomainErrorLog_receive; __pyx_type_4lxml_5etree__DomainErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog; - if (PyType_Ready(&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 478, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 482, __pyx_L1_error) __pyx_type_4lxml_5etree__DomainErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__DomainErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree__DomainErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__DomainErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__DomainErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 478, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DomainErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 478, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__DomainErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 482, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DomainErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__DomainErrorLog) < 0) __PYX_ERR(1, 482, __pyx_L1_error) __pyx_ptype_4lxml_5etree__DomainErrorLog = &__pyx_type_4lxml_5etree__DomainErrorLog; __pyx_vtabptr_4lxml_5etree__RotatingErrorLog = &__pyx_vtable_4lxml_5etree__RotatingErrorLog; __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ErrorLog; __pyx_vtable_4lxml_5etree__RotatingErrorLog.__pyx_base.__pyx_base.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_17_RotatingErrorLog_receive; __pyx_type_4lxml_5etree__RotatingErrorLog.tp_base = __pyx_ptype_4lxml_5etree__ErrorLog; - if (PyType_Ready(&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 487, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 491, __pyx_L1_error) __pyx_type_4lxml_5etree__RotatingErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__RotatingErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree__RotatingErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__RotatingErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__RotatingErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 487, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RotatingErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 487, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__RotatingErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 491, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RotatingErrorLog, (PyObject *)&__pyx_type_4lxml_5etree__RotatingErrorLog) < 0) __PYX_ERR(1, 491, __pyx_L1_error) __pyx_ptype_4lxml_5etree__RotatingErrorLog = &__pyx_type_4lxml_5etree__RotatingErrorLog; __pyx_vtabptr_4lxml_5etree_PyErrorLog = &__pyx_vtable_4lxml_5etree_PyErrorLog; __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base = *__pyx_vtabptr_4lxml_5etree__BaseErrorLog; __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.copy = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_copy; __pyx_vtable_4lxml_5etree_PyErrorLog.__pyx_base.receive = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__BaseErrorLog *, struct __pyx_obj_4lxml_5etree__LogEntry *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10PyErrorLog_receive; __pyx_type_4lxml_5etree_PyErrorLog.tp_base = __pyx_ptype_4lxml_5etree__BaseErrorLog; - if (PyType_Ready(&__pyx_type_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 505, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 509, __pyx_L1_error) __pyx_type_4lxml_5etree_PyErrorLog.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_PyErrorLog.tp_dictoffset && __pyx_type_4lxml_5etree_PyErrorLog.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_PyErrorLog.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PyErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 505, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyErrorLog, (PyObject *)&__pyx_type_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 505, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_PyErrorLog.tp_dict, __pyx_vtabptr_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 509, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyErrorLog, (PyObject *)&__pyx_type_4lxml_5etree_PyErrorLog) < 0) __PYX_ERR(1, 509, __pyx_L1_error) __pyx_ptype_4lxml_5etree_PyErrorLog = &__pyx_type_4lxml_5etree_PyErrorLog; __pyx_vtabptr_4lxml_5etree__Document = &__pyx_vtable_4lxml_5etree__Document; __pyx_vtable_4lxml_5etree__Document.getroot = (PyObject *(*)(struct LxmlDocument *))__pyx_f_4lxml_5etree_9_Document_getroot; @@ -231142,14 +231473,14 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtabptr_4lxml_5etree___ContentOnlyElement = &__pyx_vtable_4lxml_5etree___ContentOnlyElement; __pyx_vtable_4lxml_5etree___ContentOnlyElement._raiseImmutable = (int (*)(struct __pyx_obj_4lxml_5etree___ContentOnlyElement *))__pyx_f_4lxml_5etree_20__ContentOnlyElement__raiseImmutable; __pyx_type_4lxml_5etree___ContentOnlyElement.tp_base = __pyx_ptype_4lxml_5etree__Element; - if (PyType_Ready(&__pyx_type_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) __pyx_type_4lxml_5etree___ContentOnlyElement.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree___ContentOnlyElement.tp_dictoffset && __pyx_type_4lxml_5etree___ContentOnlyElement.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree___ContentOnlyElement.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__setitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1634, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_6__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_6__setitem__.doc = __pyx_doc_4lxml_5etree_20__ContentOnlyElement_6__setitem__; @@ -231159,7 +231490,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__getitem__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1634, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_8__getitem__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_8__getitem__.doc = __pyx_doc_4lxml_5etree_20__ContentOnlyElement_8__getitem__; @@ -231169,7 +231500,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1623, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_5etree___ContentOnlyElement, "__len__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1634, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_10__len__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_5etree_20__ContentOnlyElement_10__len__.doc = __pyx_doc_4lxml_5etree_20__ContentOnlyElement_10__len__; @@ -231177,66 +231508,66 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree___ContentOnlyElement.tp_dict, __pyx_vtabptr_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1623, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree___ContentOnlyElement.tp_dict, __pyx_vtabptr_4lxml_5etree___ContentOnlyElement) < 0) __PYX_ERR(0, 1634, __pyx_L1_error) __pyx_ptype_4lxml_5etree___ContentOnlyElement = &__pyx_type_4lxml_5etree___ContentOnlyElement; __pyx_vtabptr_4lxml_5etree__Comment = &__pyx_vtable_4lxml_5etree__Comment; __pyx_vtable_4lxml_5etree__Comment.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement; __pyx_type_4lxml_5etree__Comment.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement; - if (PyType_Ready(&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1690, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1701, __pyx_L1_error) __pyx_type_4lxml_5etree__Comment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__Comment.tp_dictoffset && __pyx_type_4lxml_5etree__Comment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__Comment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Comment.tp_dict, __pyx_vtabptr_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1690, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Comment_2, (PyObject *)&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1690, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Comment.tp_dict, __pyx_vtabptr_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1701, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Comment_2, (PyObject *)&__pyx_type_4lxml_5etree__Comment) < 0) __PYX_ERR(0, 1701, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Comment = &__pyx_type_4lxml_5etree__Comment; __pyx_vtabptr_4lxml_5etree__ProcessingInstruction = &__pyx_vtable_4lxml_5etree__ProcessingInstruction; __pyx_vtable_4lxml_5etree__ProcessingInstruction.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement; __pyx_type_4lxml_5etree__ProcessingInstruction.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1698, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) __pyx_type_4lxml_5etree__ProcessingInstruction.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ProcessingInstruction.tp_dictoffset && __pyx_type_4lxml_5etree__ProcessingInstruction.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ProcessingInstruction.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1698, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProcessingInstruction_2, (PyObject *)&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1698, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ProcessingInstruction.tp_dict, __pyx_vtabptr_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ProcessingInstruction_2, (PyObject *)&__pyx_type_4lxml_5etree__ProcessingInstruction) < 0) __PYX_ERR(0, 1709, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ProcessingInstruction = &__pyx_type_4lxml_5etree__ProcessingInstruction; __pyx_vtabptr_4lxml_5etree__Entity = &__pyx_vtable_4lxml_5etree__Entity; __pyx_vtable_4lxml_5etree__Entity.__pyx_base = *__pyx_vtabptr_4lxml_5etree___ContentOnlyElement; __pyx_type_4lxml_5etree__Entity.tp_base = __pyx_ptype_4lxml_5etree___ContentOnlyElement; - if (PyType_Ready(&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1749, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1760, __pyx_L1_error) __pyx_type_4lxml_5etree__Entity.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__Entity.tp_dictoffset && __pyx_type_4lxml_5etree__Entity.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__Entity.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Entity.tp_dict, __pyx_vtabptr_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1749, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Entity_2, (PyObject *)&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1749, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Entity.tp_dict, __pyx_vtabptr_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1760, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Entity_2, (PyObject *)&__pyx_type_4lxml_5etree__Entity) < 0) __PYX_ERR(0, 1760, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Entity = &__pyx_type_4lxml_5etree__Entity; - if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1778, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1789, __pyx_L1_error) __pyx_type_4lxml_5etree_QName.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_QName.tp_dictoffset && __pyx_type_4lxml_5etree_QName.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_QName.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QName, (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1778, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_QName, (PyObject *)&__pyx_type_4lxml_5etree_QName) < 0) __PYX_ERR(0, 1789, __pyx_L1_error) __pyx_ptype_4lxml_5etree_QName = &__pyx_type_4lxml_5etree_QName; __pyx_vtabptr_4lxml_5etree__ElementTree = &__pyx_vtable_4lxml_5etree__ElementTree; __pyx_vtable_4lxml_5etree__ElementTree._assertHasRoot = (int (*)(struct LxmlElementTree *))__pyx_f_4lxml_5etree_12_ElementTree__assertHasRoot; - if (PyType_Ready(&LxmlElementTreeType) < 0) __PYX_ERR(0, 1847, __pyx_L1_error) + if (PyType_Ready(&LxmlElementTreeType) < 0) __PYX_ERR(0, 1858, __pyx_L1_error) LxmlElementTreeType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlElementTreeType.tp_dictoffset && LxmlElementTreeType.tp_getattro == PyObject_GenericGetAttr)) { LxmlElementTreeType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(LxmlElementTreeType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTree) < 0) __PYX_ERR(0, 1847, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTree_2, (PyObject *)&LxmlElementTreeType) < 0) __PYX_ERR(0, 1847, __pyx_L1_error) + if (__Pyx_SetVtable(LxmlElementTreeType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTree) < 0) __PYX_ERR(0, 1858, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTree_2, (PyObject *)&LxmlElementTreeType) < 0) __PYX_ERR(0, 1858, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ElementTree = &LxmlElementTreeType; - if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2395, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2406, __pyx_L1_error) __pyx_type_4lxml_5etree__Attrib.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__Attrib.tp_dictoffset && __pyx_type_4lxml_5etree__Attrib.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__Attrib.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Attrib, (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2395, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Attrib, (PyObject *)&__pyx_type_4lxml_5etree__Attrib) < 0) __PYX_ERR(0, 2406, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Attrib = &__pyx_type_4lxml_5etree__Attrib; - if (PyType_Ready(&__pyx_type_4lxml_5etree__AttribIterator) < 0) __PYX_ERR(0, 2533, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__AttribIterator) < 0) __PYX_ERR(0, 2544, __pyx_L1_error) __pyx_type_4lxml_5etree__AttribIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__AttribIterator.tp_dictoffset && __pyx_type_4lxml_5etree__AttribIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__AttribIterator.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; @@ -231244,25 +231575,25 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_4lxml_5etree__AttribIterator = &__pyx_type_4lxml_5etree__AttribIterator; __pyx_vtabptr_4lxml_5etree__ElementTagMatcher = &__pyx_vtable_4lxml_5etree__ElementTagMatcher; __pyx_vtable_4lxml_5etree__ElementTagMatcher._initTagMatch = (PyObject *(*)(struct LxmlElementTagMatcher *, PyObject *))__pyx_f_4lxml_5etree_18_ElementTagMatcher__initTagMatch; - if (PyType_Ready(&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2574, __pyx_L1_error) + if (PyType_Ready(&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2585, __pyx_L1_error) LxmlElementTagMatcherType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlElementTagMatcherType.tp_dictoffset && LxmlElementTagMatcherType.tp_getattro == PyObject_GenericGetAttr)) { LxmlElementTagMatcherType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(LxmlElementTagMatcherType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTagMatcher) < 0) __PYX_ERR(0, 2574, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTagMatcher, (PyObject *)&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2574, __pyx_L1_error) + if (__Pyx_SetVtable(LxmlElementTagMatcherType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementTagMatcher) < 0) __PYX_ERR(0, 2585, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTagMatcher, (PyObject *)&LxmlElementTagMatcherType) < 0) __PYX_ERR(0, 2585, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ElementTagMatcher = &LxmlElementTagMatcherType; __pyx_vtabptr_4lxml_5etree__ElementIterator = &__pyx_vtable_4lxml_5etree__ElementIterator; __pyx_vtable_4lxml_5etree__ElementIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementTagMatcher; __pyx_vtable_4lxml_5etree__ElementIterator._storeNext = (void (*)(struct LxmlElementIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_16_ElementIterator__storeNext; LxmlElementIteratorType.tp_base = __pyx_ptype_4lxml_5etree__ElementTagMatcher; - if (PyType_Ready(&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2605, __pyx_L1_error) + if (PyType_Ready(&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2616, __pyx_L1_error) LxmlElementIteratorType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!LxmlElementIteratorType.tp_dictoffset && LxmlElementIteratorType.tp_getattro == PyObject_GenericGetAttr)) { LxmlElementIteratorType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(LxmlElementIteratorType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementIterator) < 0) __PYX_ERR(0, 2605, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementIterator, (PyObject *)&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2605, __pyx_L1_error) + if (__Pyx_SetVtable(LxmlElementIteratorType.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementIterator) < 0) __PYX_ERR(0, 2616, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementIterator, (PyObject *)&LxmlElementIteratorType) < 0) __PYX_ERR(0, 2616, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ElementIterator = &LxmlElementIteratorType; __pyx_vtabptr_4lxml_5etree__MultiTagMatcher = &__pyx_vtable_4lxml_5etree__MultiTagMatcher; __pyx_vtable_4lxml_5etree__MultiTagMatcher.rejectsAll = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_rejectsAll; @@ -231275,81 +231606,81 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_4lxml_5etree__MultiTagMatcher.matches = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlNode *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matches; __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesNsTag = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, const xmlChar *, const xmlChar *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesNsTag; __pyx_vtable_4lxml_5etree__MultiTagMatcher.matchesAttribute = (int (*)(struct __pyx_obj_4lxml_5etree__MultiTagMatcher *, xmlAttr *))__pyx_f_4lxml_5etree_16_MultiTagMatcher_matchesAttribute; - if (PyType_Ready(&__pyx_type_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2642, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2653, __pyx_L1_error) __pyx_type_4lxml_5etree__MultiTagMatcher.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dictoffset && __pyx_type_4lxml_5etree__MultiTagMatcher.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__MultiTagMatcher.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dict, __pyx_vtabptr_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2642, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__MultiTagMatcher.tp_dict, __pyx_vtabptr_4lxml_5etree__MultiTagMatcher) < 0) __PYX_ERR(0, 2653, __pyx_L1_error) __pyx_ptype_4lxml_5etree__MultiTagMatcher = &__pyx_type_4lxml_5etree__MultiTagMatcher; __pyx_vtabptr_4lxml_5etree__ElementMatchIterator = &__pyx_vtable_4lxml_5etree__ElementMatchIterator; __pyx_vtable_4lxml_5etree__ElementMatchIterator._initTagMatcher = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, PyObject *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__initTagMatcher; __pyx_vtable_4lxml_5etree__ElementMatchIterator._storeNext = (int (*)(struct __pyx_obj_4lxml_5etree__ElementMatchIterator *, struct LxmlElement *))__pyx_f_4lxml_5etree_21_ElementMatchIterator__storeNext; - if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2779, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2790, __pyx_L1_error) __pyx_type_4lxml_5etree__ElementMatchIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__ElementMatchIterator.tp_dictoffset && __pyx_type_4lxml_5etree__ElementMatchIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__ElementMatchIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ElementMatchIterator.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2779, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMatchIterator, (PyObject *)&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2779, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__ElementMatchIterator.tp_dict, __pyx_vtabptr_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2790, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMatchIterator, (PyObject *)&__pyx_type_4lxml_5etree__ElementMatchIterator) < 0) __PYX_ERR(0, 2790, __pyx_L1_error) __pyx_ptype_4lxml_5etree__ElementMatchIterator = &__pyx_type_4lxml_5etree__ElementMatchIterator; __pyx_vtabptr_4lxml_5etree_ElementChildIterator = &__pyx_vtable_4lxml_5etree_ElementChildIterator; __pyx_vtable_4lxml_5etree_ElementChildIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator; __pyx_type_4lxml_5etree_ElementChildIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2808, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2819, __pyx_L1_error) __pyx_type_4lxml_5etree_ElementChildIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ElementChildIterator.tp_dictoffset && __pyx_type_4lxml_5etree_ElementChildIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ElementChildIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementChildIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2808, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementChildIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2808, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementChildIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2819, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementChildIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementChildIterator) < 0) __PYX_ERR(0, 2819, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementChildIterator = &__pyx_type_4lxml_5etree_ElementChildIterator; __pyx_vtabptr_4lxml_5etree_SiblingsIterator = &__pyx_vtable_4lxml_5etree_SiblingsIterator; __pyx_vtable_4lxml_5etree_SiblingsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator; __pyx_type_4lxml_5etree_SiblingsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2828, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2839, __pyx_L1_error) __pyx_type_4lxml_5etree_SiblingsIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_SiblingsIterator.tp_dictoffset && __pyx_type_4lxml_5etree_SiblingsIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_SiblingsIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_SiblingsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2828, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SiblingsIterator, (PyObject *)&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2828, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_SiblingsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2839, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SiblingsIterator, (PyObject *)&__pyx_type_4lxml_5etree_SiblingsIterator) < 0) __PYX_ERR(0, 2839, __pyx_L1_error) __pyx_ptype_4lxml_5etree_SiblingsIterator = &__pyx_type_4lxml_5etree_SiblingsIterator; __pyx_vtabptr_4lxml_5etree_AncestorsIterator = &__pyx_vtable_4lxml_5etree_AncestorsIterator; __pyx_vtable_4lxml_5etree_AncestorsIterator.__pyx_base = *__pyx_vtabptr_4lxml_5etree__ElementMatchIterator; __pyx_type_4lxml_5etree_AncestorsIterator.tp_base = __pyx_ptype_4lxml_5etree__ElementMatchIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2843, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2854, __pyx_L1_error) __pyx_type_4lxml_5etree_AncestorsIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_AncestorsIterator.tp_dictoffset && __pyx_type_4lxml_5etree_AncestorsIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_AncestorsIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AncestorsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2843, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AncestorsIterator, (PyObject *)&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2843, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_AncestorsIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2854, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AncestorsIterator, (PyObject *)&__pyx_type_4lxml_5etree_AncestorsIterator) < 0) __PYX_ERR(0, 2854, __pyx_L1_error) __pyx_ptype_4lxml_5etree_AncestorsIterator = &__pyx_type_4lxml_5etree_AncestorsIterator; __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator = &__pyx_vtable_4lxml_5etree_ElementDepthFirstIterator; __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeAnyTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeAnyTag; __pyx_vtable_4lxml_5etree_ElementDepthFirstIterator._nextNodeMatchTag = (xmlNode *(*)(struct __pyx_obj_4lxml_5etree_ElementDepthFirstIterator *, xmlNode *))__pyx_f_4lxml_5etree_25ElementDepthFirstIterator__nextNodeMatchTag; - if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2864, __pyx_L1_error) __pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_dictoffset && __pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementDepthFirstIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2853, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree_ElementDepthFirstIterator.tp_dict, __pyx_vtabptr_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2864, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementDepthFirstIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementDepthFirstIterator) < 0) __PYX_ERR(0, 2864, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementDepthFirstIterator = &__pyx_type_4lxml_5etree_ElementDepthFirstIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2929, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2940, __pyx_L1_error) __pyx_type_4lxml_5etree_ElementTextIterator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_ElementTextIterator.tp_dictoffset && __pyx_type_4lxml_5etree_ElementTextIterator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_ElementTextIterator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTextIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2929, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementTextIterator, (PyObject *)&__pyx_type_4lxml_5etree_ElementTextIterator) < 0) __PYX_ERR(0, 2940, __pyx_L1_error) __pyx_ptype_4lxml_5etree_ElementTextIterator = &__pyx_type_4lxml_5etree_ElementTextIterator; - if (PyType_Ready(&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3055, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3066, __pyx_L1_error) __pyx_type_4lxml_5etree_CDATA.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_CDATA.tp_dictoffset && __pyx_type_4lxml_5etree_CDATA.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_CDATA.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CDATA, (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3055, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CDATA, (PyObject *)&__pyx_type_4lxml_5etree_CDATA) < 0) __PYX_ERR(0, 3066, __pyx_L1_error) __pyx_ptype_4lxml_5etree_CDATA = &__pyx_type_4lxml_5etree_CDATA; __pyx_vtabptr_4lxml_5etree__ReadOnlyProxy = &__pyx_vtable_4lxml_5etree__ReadOnlyProxy; __pyx_vtable_4lxml_5etree__ReadOnlyProxy._assertNode = (int (*)(struct __pyx_obj_4lxml_5etree__ReadOnlyProxy *))__pyx_f_4lxml_5etree_14_ReadOnlyProxy__assertNode; @@ -232392,23 +232723,23 @@ static int __Pyx_modinit_type_init_code(void) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_XSLTExtension, (PyObject *)&__pyx_type_4lxml_5etree_XSLTExtension) < 0) __PYX_ERR(19, 3, __pyx_L1_error) __pyx_ptype_4lxml_5etree_XSLTExtension = &__pyx_type_4lxml_5etree_XSLTExtension; __pyx_type_4lxml_5etree_DocumentInvalid.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; - if (PyType_Ready(&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3497, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3508, __pyx_L1_error) __pyx_type_4lxml_5etree_DocumentInvalid.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree_DocumentInvalid.tp_dictoffset && __pyx_type_4lxml_5etree_DocumentInvalid.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree_DocumentInvalid.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DocumentInvalid, (PyObject *)&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3497, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_DocumentInvalid, (PyObject *)&__pyx_type_4lxml_5etree_DocumentInvalid) < 0) __PYX_ERR(0, 3508, __pyx_L1_error) __pyx_ptype_4lxml_5etree_DocumentInvalid = &__pyx_type_4lxml_5etree_DocumentInvalid; __pyx_vtabptr_4lxml_5etree__Validator = &__pyx_vtable_4lxml_5etree__Validator; __pyx_vtable_4lxml_5etree__Validator._append_log_message = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int, int, int, int, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__append_log_message; __pyx_vtable_4lxml_5etree__Validator._clear_error_log = (PyObject *(*)(struct __pyx_obj_4lxml_5etree__Validator *, int __pyx_skip_dispatch))__pyx_f_4lxml_5etree_10_Validator__clear_error_log; - if (PyType_Ready(&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3516, __pyx_L1_error) __pyx_type_4lxml_5etree__Validator.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_5etree__Validator.tp_dictoffset && __pyx_type_4lxml_5etree__Validator.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_5etree__Validator.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Validator.tp_dict, __pyx_vtabptr_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Validator, (PyObject *)&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3505, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_5etree__Validator.tp_dict, __pyx_vtabptr_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3516, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Validator, (PyObject *)&__pyx_type_4lxml_5etree__Validator) < 0) __PYX_ERR(0, 3516, __pyx_L1_error) __pyx_ptype_4lxml_5etree__Validator = &__pyx_type_4lxml_5etree__Validator; __pyx_type_4lxml_5etree_DTDError.tp_base = __pyx_ptype_4lxml_5etree_LxmlError; if (PyType_Ready(&__pyx_type_4lxml_5etree_DTDError) < 0) __PYX_ERR(20, 4, __pyx_L1_error) @@ -234285,352 +234616,352 @@ if (!__Pyx_RefNanny) { if (PyDict_SetItem(__pyx_d, __pyx_n_s_clear_error_log_2, __pyx_t_7) < 0) __PYX_ERR(1, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":187 + /* "src/lxml/xmlerror.pxi":191 * self.last_error = last_error * * cpdef copy(self): # <<<<<<<<<<<<<< * return _BaseErrorLog(self._first_error, self.last_error) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_BaseErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 187, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_BaseErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__108)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 187, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__BaseErrorLog); - /* "src/lxml/xmlerror.pxi":193 + /* "src/lxml/xmlerror.pxi":197 * return u'' * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * pass * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_BaseErrorLog_7receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 193, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_BaseErrorLog_7receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BaseErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__110)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 193, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__BaseErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__BaseErrorLog); - /* "src/lxml/xmlerror.pxi":283 + /* "src/lxml/xmlerror.pxi":287 * self._entries = entries * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Creates a shallow copy of this error log. Reuses the list of * entries. */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 283, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 283, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 287, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":321 + /* "src/lxml/xmlerror.pxi":325 * return len(self._entries) > self._offset * * def filter_domains(self, domains): # <<<<<<<<<<<<<< * u"""Filter the errors by the given domains and return a new error log * containing the matches. */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_17filter_domains, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_domains, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 321, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_17filter_domains, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_domains, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__114)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_domains, __pyx_t_7) < 0) __PYX_ERR(1, 321, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_domains, __pyx_t_7) < 0) __PYX_ERR(1, 325, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":331 + /* "src/lxml/xmlerror.pxi":335 * return _ListErrorLog(filtered, None, None) * * def filter_types(self, types): # <<<<<<<<<<<<<< * u"""filter_types(self, types) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_19filter_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_types, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 331, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_19filter_types, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_types, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__116)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_types, __pyx_t_7) < 0) __PYX_ERR(1, 331, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_types, __pyx_t_7) < 0) __PYX_ERR(1, 335, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":343 + /* "src/lxml/xmlerror.pxi":347 * return _ListErrorLog(filtered, None, None) * * def filter_levels(self, levels): # <<<<<<<<<<<<<< * u"""filter_levels(self, levels) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_21filter_levels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_levels, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 343, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_21filter_levels, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_levels, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__118)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_levels, __pyx_t_7) < 0) __PYX_ERR(1, 343, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_levels, __pyx_t_7) < 0) __PYX_ERR(1, 347, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":355 + /* "src/lxml/xmlerror.pxi":359 * return _ListErrorLog(filtered, None, None) * * def filter_from_level(self, level): # <<<<<<<<<<<<<< * u"""filter_from_level(self, level) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_23filter_from_level, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_level, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 355, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_23filter_from_level, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_level, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_level, __pyx_t_7) < 0) __PYX_ERR(1, 355, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_level, __pyx_t_7) < 0) __PYX_ERR(1, 359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":364 + /* "src/lxml/xmlerror.pxi":368 * return _ListErrorLog(filtered, None, None) * * def filter_from_fatals(self): # <<<<<<<<<<<<<< * u"""filter_from_fatals(self) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_25filter_from_fatals, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_fatals, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 364, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_25filter_from_fatals, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_fatals, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__122)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_fatals, __pyx_t_7) < 0) __PYX_ERR(1, 364, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_fatals, __pyx_t_7) < 0) __PYX_ERR(1, 368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":371 + /* "src/lxml/xmlerror.pxi":375 * return self.filter_from_level(ErrorLevels.FATAL) * * def filter_from_errors(self): # <<<<<<<<<<<<<< * u"""filter_from_errors(self) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_27filter_from_errors, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_errors, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 371, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_27filter_from_errors, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_errors, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__124)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_errors, __pyx_t_7) < 0) __PYX_ERR(1, 371, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_errors, __pyx_t_7) < 0) __PYX_ERR(1, 375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":378 + /* "src/lxml/xmlerror.pxi":382 * return self.filter_from_level(ErrorLevels.ERROR) * * def filter_from_warnings(self): # <<<<<<<<<<<<<< * u"""filter_from_warnings(self) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_29filter_from_warnings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_warnin, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 378, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13_ListErrorLog_29filter_from_warnings, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ListErrorLog_filter_from_warnin, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_warnings, __pyx_t_7) < 0) __PYX_ERR(1, 378, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ListErrorLog->tp_dict, __pyx_n_s_filter_from_warnings, __pyx_t_7) < 0) __PYX_ERR(1, 382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ListErrorLog); - /* "src/lxml/xmlerror.pxi":437 + /* "src/lxml/xmlerror.pxi":441 * return self.connect() * * def __exit__(self, *args): # <<<<<<<<<<<<<< * # TODO: make this a cdef function when Cython supports it * self.disconnect() */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 437, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_5__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog___exit, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_exit, __pyx_t_7) < 0) __PYX_ERR(1, 437, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_exit, __pyx_t_7) < 0) __PYX_ERR(1, 441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ErrorLog); - /* "src/lxml/xmlerror.pxi":457 + /* "src/lxml/xmlerror.pxi":461 * return 0 * * cpdef clear(self): # <<<<<<<<<<<<<< * self._first_error = None * self.last_error = None */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_7clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 457, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_7clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__130)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(1, 457, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_clear, __pyx_t_7) < 0) __PYX_ERR(1, 461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ErrorLog); - /* "src/lxml/xmlerror.pxi":463 + /* "src/lxml/xmlerror.pxi":467 * del self._entries[:] * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Creates a shallow copy of this error log and the list of entries. * """ */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 463, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_9copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__132)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 463, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ErrorLog); - /* "src/lxml/xmlerror.pxi":473 + /* "src/lxml/xmlerror.pxi":477 * return iter(self._entries[self._offset:]) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_13receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 473, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9_ErrorLog_13receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__134)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 473, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ErrorLog); - /* "src/lxml/xmlerror.pxi":483 + /* "src/lxml/xmlerror.pxi":487 * self._accepted_domains = tuple(domains) * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if entry.domain in self._accepted_domains: * _ErrorLog.receive(self, entry) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DomainErrorLog_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DomainErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 483, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15_DomainErrorLog_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_DomainErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__136)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DomainErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 483, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__DomainErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 487, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__DomainErrorLog); - /* "src/lxml/xmlerror.pxi":493 + /* "src/lxml/xmlerror.pxi":497 * self._max_len = max_len * * cpdef receive(self, _LogEntry entry): # <<<<<<<<<<<<<< * if self._first_error is None and entry.level >= xmlerror.XML_ERR_ERROR: * self._first_error = entry */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_RotatingErrorLog_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RotatingErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 493, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17_RotatingErrorLog_3receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_RotatingErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__138)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 493, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__RotatingErrorLog); - /* "src/lxml/xmlerror.pxi":544 + /* "src/lxml/xmlerror.pxi":548 * self._log = logger.log * * cpdef copy(self): # <<<<<<<<<<<<<< * u"""Dummy method that returns an empty error log. * """ */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 544, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_3copy, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__140)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 544, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_copy, __pyx_t_7) < 0) __PYX_ERR(1, 548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_PyErrorLog); - /* "src/lxml/xmlerror.pxi":549 + /* "src/lxml/xmlerror.pxi":553 * return _ListErrorLog([], None, None) * * def log(self, log_entry, message, *args): # <<<<<<<<<<<<<< * u"""log(self, log_entry, message, *args) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_5log, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 549, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_5log, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__142)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_log, __pyx_t_7) < 0) __PYX_ERR(1, 549, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_log, __pyx_t_7) < 0) __PYX_ERR(1, 553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_PyErrorLog); - /* "src/lxml/xmlerror.pxi":566 + /* "src/lxml/xmlerror.pxi":570 * ) * * cpdef receive(self, _LogEntry log_entry): # <<<<<<<<<<<<<< * u"""receive(self, log_entry) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_7receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 566, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10PyErrorLog_7receive, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyErrorLog_receive, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 566, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree_PyErrorLog->tp_dict, __pyx_n_s_receive, __pyx_t_7) < 0) __PYX_ERR(1, 570, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_PyErrorLog); - /* "src/lxml/xmlerror.pxi":582 + /* "src/lxml/xmlerror.pxi":586 * # libxml2/libxslt * * cdef _BaseErrorLog __GLOBAL_ERROR_LOG = _RotatingErrorLog(__MAX_LOG_SIZE) # <<<<<<<<<<<<<< * * */ - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 582, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_5etree__RotatingErrorLog), __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 586, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG)); __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___GLOBAL_ERROR_LOG, ((struct __pyx_obj_4lxml_5etree__BaseErrorLog *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":616 + /* "src/lxml/xmlerror.pxi":620 * * * def use_global_python_log(PyErrorLog log not None): # <<<<<<<<<<<<<< * u"""use_global_python_log(log) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_5use_global_python_log, 0, __pyx_n_s_use_global_python_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 616, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_5use_global_python_log, 0, __pyx_n_s_use_global_python_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__146)); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 620, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_use_global_python_log, __pyx_t_7) < 0) __PYX_ERR(1, 616, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_use_global_python_log, __pyx_t_7) < 0) __PYX_ERR(1, 620, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":804 + /* "src/lxml/xmlerror.pxi":808 * * * class ErrorLevels(object): # <<<<<<<<<<<<<< * u"Libxml2 error levels" * */ - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__147); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 804, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__147); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__147, __pyx_n_s_ErrorLevels, __pyx_n_s_ErrorLevels, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_levels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 804, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__147, __pyx_n_s_ErrorLevels, __pyx_n_s_ErrorLevels, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_levels); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorLevels, __pyx_tuple__147, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 804, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorLevels, __pyx_tuple__147, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorLevels, __pyx_t_1) < 0) __PYX_ERR(1, 804, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorLevels, __pyx_t_1) < 0) __PYX_ERR(1, 808, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":807 + /* "src/lxml/xmlerror.pxi":811 * u"Libxml2 error levels" * * class ErrorDomains(object): # <<<<<<<<<<<<<< * u"Libxml2 error domains" * */ - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__148); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 807, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__148); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__148, __pyx_n_s_ErrorDomains, __pyx_n_s_ErrorDomains, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_domains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 807, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__148, __pyx_n_s_ErrorDomains, __pyx_n_s_ErrorDomains, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_domains); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorDomains, __pyx_tuple__148, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 807, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorDomains, __pyx_tuple__148, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 811, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorDomains, __pyx_t_1) < 0) __PYX_ERR(1, 807, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorDomains, __pyx_t_1) < 0) __PYX_ERR(1, 811, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":810 + /* "src/lxml/xmlerror.pxi":814 * u"Libxml2 error domains" * * class ErrorTypes(object): # <<<<<<<<<<<<<< * u"Libxml2 error types" * */ - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__149); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 810, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__149); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__149, __pyx_n_s_ErrorTypes, __pyx_n_s_ErrorTypes, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 810, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__149, __pyx_n_s_ErrorTypes, __pyx_n_s_ErrorTypes, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_error_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorTypes, __pyx_tuple__149, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 810, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_ErrorTypes, __pyx_tuple__149, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 814, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorTypes, __pyx_t_1) < 0) __PYX_ERR(1, 810, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ErrorTypes, __pyx_t_1) < 0) __PYX_ERR(1, 814, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":813 + /* "src/lxml/xmlerror.pxi":817 * u"Libxml2 error types" * * class RelaxNGErrorTypes(object): # <<<<<<<<<<<<<< * u"Libxml2 RelaxNG error types" * */ - __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__150); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 813, __pyx_L1_error) + __pyx_t_7 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__150); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__150, __pyx_n_s_RelaxNGErrorTypes, __pyx_n_s_RelaxNGErrorTypes, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_RelaxNG_error_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 813, __pyx_L1_error) + __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_7, __pyx_tuple__150, __pyx_n_s_RelaxNGErrorTypes, __pyx_n_s_RelaxNGErrorTypes, (PyObject *) NULL, __pyx_n_s_lxml_etree, __pyx_kp_s_Libxml2_RelaxNG_error_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_RelaxNGErrorTypes, __pyx_tuple__150, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 813, __pyx_L1_error) + __pyx_t_1 = __Pyx_Py3ClassCreate(__pyx_t_7, __pyx_n_s_RelaxNGErrorTypes, __pyx_tuple__150, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_RelaxNGErrorTypes, __pyx_t_1) < 0) __PYX_ERR(1, 813, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_RelaxNGErrorTypes, __pyx_t_1) < 0) __PYX_ERR(1, 817, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "src/lxml/xmlerror.pxi":820 + /* "src/lxml/xmlerror.pxi":824 * # This section is generated by the script 'update-error-constants.py'. * * cdef object __ERROR_LEVELS = """\ # <<<<<<<<<<<<<< @@ -234642,7 +234973,7 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___ERROR_LEVELS, __pyx_kp_s_NONE_0_WARNING_1_ERROR_2_FATAL_3); __Pyx_GIVEREF(__pyx_kp_s_NONE_0_WARNING_1_ERROR_2_FATAL_3); - /* "src/lxml/xmlerror.pxi":827 + /* "src/lxml/xmlerror.pxi":831 * """ * * cdef object __ERROR_DOMAINS = """\ # <<<<<<<<<<<<<< @@ -234654,7 +234985,7 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___ERROR_DOMAINS, __pyx_kp_s_NONE_0_PARSER_1_TREE_2_NAMESPACE); __Pyx_GIVEREF(__pyx_kp_s_NONE_0_PARSER_1_TREE_2_NAMESPACE); - /* "src/lxml/xmlerror.pxi":861 + /* "src/lxml/xmlerror.pxi":865 * """ * * cdef object __PARSER_ERROR_TYPES = """\ # <<<<<<<<<<<<<< @@ -234666,7 +234997,7 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___PARSER_ERROR_TYPES, __pyx_kp_s_ERR_OK_0_ERR_INTERNAL_ERROR_1_ER); __Pyx_GIVEREF(__pyx_kp_s_ERR_OK_0_ERR_INTERNAL_ERROR_1_ER); - /* "src/lxml/xmlerror.pxi":1598 + /* "src/lxml/xmlerror.pxi":1602 * """ * * cdef object __RELAXNG_ERROR_TYPES = """\ # <<<<<<<<<<<<<< @@ -234678,12 +235009,12 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_4lxml_5etree___RELAXNG_ERROR_TYPES, __pyx_kp_s_RELAXNG_OK_0_RELAXNG_ERR_MEMORY); __Pyx_GIVEREF(__pyx_kp_s_RELAXNG_OK_0_RELAXNG_ERR_MEMORY); - /* "src/lxml/xmlerror.pxi":1642 + /* "src/lxml/xmlerror.pxi":1646 * # --- END: GENERATED CONSTANTS --- * * __initErrorConstants() # <<<<<<<<<<<<<< */ - __pyx_t_7 = __pyx_f_4lxml_5etree___initErrorConstants(); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1642, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_5etree___initErrorConstants(); if (unlikely(!__pyx_t_7)) __PYX_ERR(1, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -235041,304 +235372,304 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1394 + /* "lxml/etree.pyx":1399 * return SiblingsIterator(self, tags, preceding=preceding) * * def iterancestors(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterancestors(self, tag=None, *tags) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_65iterancestors, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterancestors, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_65iterancestors, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterancestors, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterancestors, __pyx_t_7) < 0) __PYX_ERR(0, 1394, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterancestors, __pyx_t_7) < 0) __PYX_ERR(0, 1399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1406 + /* "lxml/etree.pyx":1413 * return AncestorsIterator(self, tags) * * def iterdescendants(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iterdescendants(self, tag=None, *tags) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_67iterdescendants, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterdescendants, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1406, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_67iterdescendants, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterdescendants, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterdescendants, __pyx_t_7) < 0) __PYX_ERR(0, 1406, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterdescendants, __pyx_t_7) < 0) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1419 + /* "lxml/etree.pyx":1428 * return ElementDepthFirstIterator(self, tags, inclusive=False) * * def iterchildren(self, tag=None, *tags, reversed=False): # <<<<<<<<<<<<<< * u"""iterchildren(self, tag=None, *tags, reversed=False) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_69iterchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_69iterchildren, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterchildren, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterchildren, __pyx_t_7) < 0) __PYX_ERR(0, 1419, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterchildren, __pyx_t_7) < 0) __PYX_ERR(0, 1428, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1432 + /* "lxml/etree.pyx":1443 * return ElementChildIterator(self, tags, reversed=reversed) * * def getroottree(self): # <<<<<<<<<<<<<< * u"""getroottree(self) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_71getroottree, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getroottree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_71getroottree, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getroottree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getroottree, __pyx_t_7) < 0) __PYX_ERR(0, 1432, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getroottree, __pyx_t_7) < 0) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1444 + /* "lxml/etree.pyx":1455 * return _elementTreeFactory(self._doc, None) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, tag=None, *tags) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_73getiterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getiterator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1444, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_73getiterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_getiterator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getiterator, __pyx_t_7) < 0) __PYX_ERR(0, 1444, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_getiterator, __pyx_t_7) < 0) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1466 + /* "lxml/etree.pyx":1477 * return ElementDepthFirstIterator(self, tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_75iter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1466, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_75iter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 1466, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iter, __pyx_t_7) < 0) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1490 + /* "lxml/etree.pyx":1501 * return ElementDepthFirstIterator(self, tags) * * def itertext(self, tag=None, *tags, with_tail=True): # <<<<<<<<<<<<<< * u"""itertext(self, tag=None, *tags, with_tail=True) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_77itertext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_itertext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1490, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_77itertext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_itertext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_itertext, __pyx_t_7) < 0) __PYX_ERR(0, 1490, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_itertext, __pyx_t_7) < 0) __PYX_ERR(0, 1501, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1505 + /* "lxml/etree.pyx":1516 * return ElementTextIterator(self, tags, with_tail=with_tail) * * def makeelement(self, _tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""makeelement(self, _tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_79makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_79makeelement, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_makeelement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_makeelement, __pyx_t_7) < 0) __PYX_ERR(0, 1505, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_makeelement, __pyx_t_7) < 0) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1514 + /* "lxml/etree.pyx":1525 * attrib, nsmap, _extra) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_81find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_find, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_81find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_find, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_find, __pyx_t_7) < 0) __PYX_ERR(0, 1514, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_find, __pyx_t_7) < 0) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1527 + /* "lxml/etree.pyx":1538 * return _elementpath.find(self, path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_83findtext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_findtext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_83findtext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_findtext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_findtext, __pyx_t_7) < 0) __PYX_ERR(0, 1527, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_findtext, __pyx_t_7) < 0) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1540 + /* "lxml/etree.pyx":1551 * return _elementpath.findtext(self, path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_85findall, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_findall, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_85findall, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_findall, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_findall, __pyx_t_7) < 0) __PYX_ERR(0, 1540, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_findall, __pyx_t_7) < 0) __PYX_ERR(0, 1551, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1553 + /* "lxml/etree.pyx":1564 * return _elementpath.findall(self, path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_87iterfind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterfind, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1553, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_87iterfind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_iterfind, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterfind, __pyx_t_7) < 0) __PYX_ERR(0, 1553, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_iterfind, __pyx_t_7) < 0) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1566 + /* "lxml/etree.pyx":1577 * return _elementpath.iterfind(self, path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< * smart_strings=True, **_variables): * u"""xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables) */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_89xpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_xpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_89xpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_xpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_xpath, __pyx_t_7) < 0) __PYX_ERR(0, 1566, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_xpath, __pyx_t_7) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1577 + /* "lxml/etree.pyx":1588 * return evaluator(_path, **_variables) * * def cssselect(self, expr, *, translator='xml'): # <<<<<<<<<<<<<< * """ * Run the CSS expression on this element and its children, */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_91cssselect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_cssselect, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1577, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_8_Element_91cssselect, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Element_cssselect, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_cssselect, __pyx_t_7) < 0) __PYX_ERR(0, 1577, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Element->tp_dict, __pyx_n_s_cssselect, __pyx_t_7) < 0) __PYX_ERR(0, 1588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Element); - /* "lxml/etree.pyx":1627 + /* "lxml/etree.pyx":1638 * raise TypeError, u"this element does not have children or attributes" * * def set(self, key, value): # <<<<<<<<<<<<<< * u"set(self, key, value)" * self._raiseImmutable() */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_1set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_1set, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_set, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__229)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_set, __pyx_t_7) < 0) __PYX_ERR(0, 1627, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_set, __pyx_t_7) < 0) __PYX_ERR(0, 1638, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1631 + /* "lxml/etree.pyx":1642 * self._raiseImmutable() * * def append(self, value): # <<<<<<<<<<<<<< * u"append(self, value)" * self._raiseImmutable() */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_3append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1631, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_3append, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_append, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__231)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_append, __pyx_t_7) < 0) __PYX_ERR(0, 1631, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_append, __pyx_t_7) < 0) __PYX_ERR(0, 1642, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1635 + /* "lxml/etree.pyx":1646 * self._raiseImmutable() * * def insert(self, index, value): # <<<<<<<<<<<<<< * u"insert(self, index, value)" * self._raiseImmutable() */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_5insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_insert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1635, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_5insert, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_insert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_insert, __pyx_t_7) < 0) __PYX_ERR(0, 1635, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_insert, __pyx_t_7) < 0) __PYX_ERR(0, 1646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1674 + /* "lxml/etree.pyx":1685 * return 0 * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"get(self, key, default=None)" * return None */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_13get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_13get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1674, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1678 + /* "lxml/etree.pyx":1689 * return None * * def keys(self): # <<<<<<<<<<<<<< * u"keys(self)" * return [] */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_15keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1678, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_15keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(0, 1678, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_keys, __pyx_t_7) < 0) __PYX_ERR(0, 1689, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1682 + /* "lxml/etree.pyx":1693 * return [] * * def items(self): # <<<<<<<<<<<<<< * u"items(self)" * return [] */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_17items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1682, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_17items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(0, 1682, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_items, __pyx_t_7) < 0) __PYX_ERR(0, 1693, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1686 + /* "lxml/etree.pyx":1697 * return [] * * def values(self): # <<<<<<<<<<<<<< * u"values(self)" * return [] */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_19values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1686, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_20__ContentOnlyElement_19values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ContentOnlyElement_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(0, 1686, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree___ContentOnlyElement->tp_dict, __pyx_n_s_values, __pyx_t_7) < 0) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree___ContentOnlyElement); - /* "lxml/etree.pyx":1723 + /* "lxml/etree.pyx":1734 * return "" % strrepr(self.target) * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""get(self, key, default=None) * */ - __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_ProcessingInstruction_3get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProcessingInstruction_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_22_ProcessingInstruction_3get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ProcessingInstruction_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1734, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ProcessingInstruction->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1723, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ProcessingInstruction->tp_dict, __pyx_n_s_get, __pyx_t_7) < 0) __PYX_ERR(0, 1734, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ProcessingInstruction); - /* "lxml/etree.pyx":1747 - * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } + /* "lxml/etree.pyx":1758 + * for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } * * cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall # <<<<<<<<<<<<<< * * cdef class _Entity(__ContentOnlyElement): */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_compile); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_U); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_5etree_re, __pyx_n_s_U); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u_s_w_s_s); __Pyx_GIVEREF(__pyx_kp_u_s_w_s_s); @@ -235346,11 +235677,11 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_findall); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XGOTREF(__pyx_v_4lxml_5etree__FIND_PI_ATTRIBUTES); @@ -235358,775 +235689,775 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":1867 + /* "lxml/etree.pyx":1878 * return 0 * * def parse(self, source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(self, source, parser=None, base_url=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_1parse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_1parse, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_parse, __pyx_t_1) < 0) __PYX_ERR(0, 1867, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_parse, __pyx_t_1) < 0) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1883 + /* "lxml/etree.pyx":1894 * return self._context_node * * def _setroot(self, _Element root not None): # <<<<<<<<<<<<<< * u"""_setroot(self, root) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_3_setroot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree__setroot, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1883, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_3_setroot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree__setroot, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_setroot, __pyx_t_1) < 0) __PYX_ERR(0, 1883, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_setroot, __pyx_t_1) < 0) __PYX_ERR(0, 1894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1894 + /* "lxml/etree.pyx":1905 * self._doc = None * * def getroot(self): # <<<<<<<<<<<<<< * u"""getroot(self) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_5getroot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getroot, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_5getroot, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getroot, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getroot, __pyx_t_1) < 0) __PYX_ERR(0, 1894, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getroot, __pyx_t_1) < 0) __PYX_ERR(0, 1905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1901 + /* "lxml/etree.pyx":1912 * return self._context_node * * def __copy__(self): # <<<<<<<<<<<<<< * return _elementTreeFactory(self._doc, self._context_node) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_7__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1901, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_7__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_copy_2, __pyx_t_1) < 0) __PYX_ERR(0, 1901, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_copy_2, __pyx_t_1) < 0) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1904 + /* "lxml/etree.pyx":1915 * return _elementTreeFactory(self._doc, self._context_node) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * cdef _Element root * cdef _Document doc */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_9__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_9__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(0, 1904, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":1944 - * return None + /* "lxml/etree.pyx":1955 + * return None * * def write(self, file, *, encoding=None, method=u"xml", # <<<<<<<<<<<<<< * pretty_print=False, xml_declaration=None, with_tail=True, * standalone=None, doctype=None, compression=0, */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_11write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1944, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_11write, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_write, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_write, __pyx_t_1) < 0) __PYX_ERR(0, 1944, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_write, __pyx_t_1) < 0) __PYX_ERR(0, 1955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2041 + /* "lxml/etree.pyx":2052 * is_standalone, compression) * * def getpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getpath(self, element) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_13getpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2041, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_13getpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getpath, __pyx_t_1) < 0) __PYX_ERR(0, 2041, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getpath, __pyx_t_1) < 0) __PYX_ERR(0, 2052, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2079 + /* "lxml/etree.pyx":2090 * return path * * def getelementpath(self, _Element element not None): # <<<<<<<<<<<<<< * u"""getelementpath(self, element) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_15getelementpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getelementpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2079, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_15getelementpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getelementpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getelementpath, __pyx_t_1) < 0) __PYX_ERR(0, 2079, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getelementpath, __pyx_t_1) < 0) __PYX_ERR(0, 2090, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2143 + /* "lxml/etree.pyx":2154 * return '/'.join(path) * * def getiterator(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""getiterator(self, *tags, tag=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_17getiterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getiterator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2143, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_17getiterator, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_getiterator, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getiterator, __pyx_t_1) < 0) __PYX_ERR(0, 2143, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_getiterator, __pyx_t_1) < 0) __PYX_ERR(0, 2154, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2167 + /* "lxml/etree.pyx":2178 * return root.getiterator(*tags) * * def iter(self, tag=None, *tags): # <<<<<<<<<<<<<< * u"""iter(self, tag=None, *tags) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_19iter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_19iter, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_iter, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2178, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_iter, __pyx_t_1) < 0) __PYX_ERR(0, 2167, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_iter, __pyx_t_1) < 0) __PYX_ERR(0, 2178, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2185 + /* "lxml/etree.pyx":2196 * return root.iter(*tags) * * def find(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""find(self, path, namespaces=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_21find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_find, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_21find, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_find, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_find, __pyx_t_1) < 0) __PYX_ERR(0, 2185, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_find, __pyx_t_1) < 0) __PYX_ERR(0, 2196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2202 + /* "lxml/etree.pyx":2213 * return root.find(path, namespaces) * * def findtext(self, path, default=None, namespaces=None): # <<<<<<<<<<<<<< * u"""findtext(self, path, default=None, namespaces=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_23findtext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_findtext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_23findtext, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_findtext, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_findtext, __pyx_t_1) < 0) __PYX_ERR(0, 2202, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_findtext, __pyx_t_1) < 0) __PYX_ERR(0, 2213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2219 + /* "lxml/etree.pyx":2230 * return root.findtext(path, default, namespaces) * * def findall(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""findall(self, path, namespaces=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_25findall, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_findall, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2219, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_25findall, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_findall, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_findall, __pyx_t_1) < 0) __PYX_ERR(0, 2219, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_findall, __pyx_t_1) < 0) __PYX_ERR(0, 2230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2236 + /* "lxml/etree.pyx":2247 * return root.findall(path, namespaces) * * def iterfind(self, path, namespaces=None): # <<<<<<<<<<<<<< * u"""iterfind(self, path, namespaces=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_27iterfind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_iterfind, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2236, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_27iterfind, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_iterfind, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_iterfind, __pyx_t_1) < 0) __PYX_ERR(0, 2236, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_iterfind, __pyx_t_1) < 0) __PYX_ERR(0, 2247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2253 + /* "lxml/etree.pyx":2264 * return root.iterfind(path, namespaces) * * def xpath(self, _path, *, namespaces=None, extensions=None, # <<<<<<<<<<<<<< * smart_strings=True, **_variables): * u"""xpath(self, _path, namespaces=None, extensions=None, smart_strings=True, **_variables) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_29xpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_29xpath, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xpath, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xpath, __pyx_t_1) < 0) __PYX_ERR(0, 2253, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xpath, __pyx_t_1) < 0) __PYX_ERR(0, 2264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2278 + /* "lxml/etree.pyx":2289 * return evaluator(_path, **_variables) * * def xslt(self, _xslt, extensions=None, access_control=None, **_kw): # <<<<<<<<<<<<<< * u"""xslt(self, _xslt, extensions=None, access_control=None, **_kw) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_31xslt, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xslt, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_31xslt, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xslt, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xslt_3, __pyx_t_1) < 0) __PYX_ERR(0, 2278, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xslt_3, __pyx_t_1) < 0) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2297 + /* "lxml/etree.pyx":2308 * return style(self, **_kw) * * def relaxng(self, relaxng): # <<<<<<<<<<<<<< * u"""relaxng(self, relaxng) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_33relaxng, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_relaxng, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_33relaxng, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_relaxng, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_relaxng, __pyx_t_1) < 0) __PYX_ERR(0, 2297, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_relaxng, __pyx_t_1) < 0) __PYX_ERR(0, 2308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2315 + /* "lxml/etree.pyx":2326 * return schema.validate(self) * * def xmlschema(self, xmlschema): # <<<<<<<<<<<<<< * u"""xmlschema(self, xmlschema) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_35xmlschema, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xmlschema, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2315, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_35xmlschema, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xmlschema, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xmlschema, __pyx_t_1) < 0) __PYX_ERR(0, 2315, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xmlschema, __pyx_t_1) < 0) __PYX_ERR(0, 2326, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2333 + /* "lxml/etree.pyx":2344 * return schema.validate(self) * * def xinclude(self): # <<<<<<<<<<<<<< * u"""xinclude(self) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_37xinclude, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xinclude, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_37xinclude, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_xinclude, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xinclude, __pyx_t_1) < 0) __PYX_ERR(0, 2333, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_xinclude, __pyx_t_1) < 0) __PYX_ERR(0, 2344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2348 + /* "lxml/etree.pyx":2359 * XInclude()(self._context_node) * * def write_c14n(self, file, *, exclusive=False, with_comments=True, # <<<<<<<<<<<<<< * compression=0, inclusive_ns_prefixes=None): * u"""write_c14n(self, file, exclusive=False, with_comments=True, */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_39write_c14n, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_write_c14n, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2348, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_12_ElementTree_39write_c14n, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_ElementTree_write_c14n, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_write_c14n, __pyx_t_1) < 0) __PYX_ERR(0, 2348, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__ElementTree->tp_dict, __pyx_n_s_write_c14n, __pyx_t_1) < 0) __PYX_ERR(0, 2359, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__ElementTree); - /* "lxml/etree.pyx":2412 + /* "lxml/etree.pyx":2423 * _delAttribute(self._element, key) * * def update(self, sequence_or_dict): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * if isinstance(sequence_or_dict, (dict, _Attrib)): */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_7update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_update, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2412, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_7update, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_update, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_update, __pyx_t_1) < 0) __PYX_ERR(0, 2412, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_update, __pyx_t_1) < 0) __PYX_ERR(0, 2423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2419 + /* "lxml/etree.pyx":2430 * _setAttributeValue(self._element, key, value) * * def pop(self, key, *default): # <<<<<<<<<<<<<< * if len(default) > 1: * raise TypeError, f"pop expected at most 2 arguments, got {len(default)+1}" */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_9pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_pop, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2419, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_9pop, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_pop, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_pop, __pyx_t_1) < 0) __PYX_ERR(0, 2419, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_pop, __pyx_t_1) < 0) __PYX_ERR(0, 2430, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2432 + /* "lxml/etree.pyx":2443 * return result * * def clear(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * cdef xmlNode* c_node = self._element._c_node */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_11clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2432, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_11clear, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_clear, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_clear, __pyx_t_1) < 0) __PYX_ERR(0, 2432, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_clear, __pyx_t_1) < 0) __PYX_ERR(0, 2443, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2443 + /* "lxml/etree.pyx":2454 * return repr(dict( _collectAttributes(self._element._c_node, 3) )) * * def __copy__(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_15__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2443, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_15__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib___copy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__291)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_copy_2, __pyx_t_1) < 0) __PYX_ERR(0, 2443, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_copy_2, __pyx_t_1) < 0) __PYX_ERR(0, 2454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2447 + /* "lxml/etree.pyx":2458 * return dict(_collectAttributes(self._element._c_node, 3)) * * def __deepcopy__(self, memo): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return dict(_collectAttributes(self._element._c_node, 3)) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_17__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2447, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_17__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib___deepcopy, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__293)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(0, 2447, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(0, 2458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2477 + /* "lxml/etree.pyx":2488 * return c * * def get(self, key, default=None): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _getAttributeValue(self._element, key, default) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_25get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2477, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_25get, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_get, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__295)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(0, 2477, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_get, __pyx_t_1) < 0) __PYX_ERR(0, 2488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2481 + /* "lxml/etree.pyx":2492 * return _getAttributeValue(self._element, key, default) * * def keys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 1) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_27keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2481, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_27keys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_keys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__297)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2492, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_keys, __pyx_t_1) < 0) __PYX_ERR(0, 2481, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_keys, __pyx_t_1) < 0) __PYX_ERR(0, 2492, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2489 + /* "lxml/etree.pyx":2500 * return iter(_collectAttributes(self._element._c_node, 1)) * * def iterkeys(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 1)) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_31iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_iterkeys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2489, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_31iterkeys, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_iterkeys, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__299)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_iterkeys, __pyx_t_1) < 0) __PYX_ERR(0, 2489, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_iterkeys, __pyx_t_1) < 0) __PYX_ERR(0, 2500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2493 + /* "lxml/etree.pyx":2504 * return iter(_collectAttributes(self._element._c_node, 1)) * * def values(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 2) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_33values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2493, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_33values, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_values, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__301)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_values, __pyx_t_1) < 0) __PYX_ERR(0, 2493, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_values, __pyx_t_1) < 0) __PYX_ERR(0, 2504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2497 + /* "lxml/etree.pyx":2508 * return _collectAttributes(self._element._c_node, 2) * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 2)) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_35itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2497, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_35itervalues, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_itervalues, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__303)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_itervalues, __pyx_t_1) < 0) __PYX_ERR(0, 2497, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_itervalues, __pyx_t_1) < 0) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2501 + /* "lxml/etree.pyx":2512 * return iter(_collectAttributes(self._element._c_node, 2)) * * def items(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return _collectAttributes(self._element._c_node, 3) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_37items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_37items, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_items, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__305)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_items, __pyx_t_1) < 0) __PYX_ERR(0, 2501, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_items, __pyx_t_1) < 0) __PYX_ERR(0, 2512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2505 + /* "lxml/etree.pyx":2516 * return _collectAttributes(self._element._c_node, 3) * * def iteritems(self): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return iter(_collectAttributes(self._element._c_node, 3)) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_39iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_39iteritems, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_iteritems, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__307)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_iteritems, __pyx_t_1) < 0) __PYX_ERR(0, 2505, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_iteritems, __pyx_t_1) < 0) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2509 + /* "lxml/etree.pyx":2520 * return iter(_collectAttributes(self._element._c_node, 3)) * * def has_key(self, key): # <<<<<<<<<<<<<< * _assertValidNode(self._element) * return key in self */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_41has_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_has_key, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7_Attrib_41has_key, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Attrib_has_key, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__309)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_has_key, __pyx_t_1) < 0) __PYX_ERR(0, 2509, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Attrib->tp_dict, __pyx_n_s_has_key, __pyx_t_1) < 0) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Attrib); - /* "lxml/etree.pyx":2986 + /* "lxml/etree.pyx":2997 * # module-level API for ElementTree * * def Element(_tag, attrib=None, nsmap=None, **_extra): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, **_extra) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7Element, 0, __pyx_n_s_Element, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_7Element, 0, __pyx_n_s_Element, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__311)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2997, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__312); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 2986, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 2997, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3000 + /* "lxml/etree.pyx":3011 * * * def Comment(text=None): # <<<<<<<<<<<<<< * u"""Comment(text=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9Comment, 0, __pyx_n_s_Comment, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3000, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_9Comment, 0, __pyx_n_s_Comment, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__314)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__315); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comment, __pyx_t_1) < 0) __PYX_ERR(0, 3000, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Comment, __pyx_t_1) < 0) __PYX_ERR(0, 3011, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3024 + /* "lxml/etree.pyx":3035 * * * def ProcessingInstruction(target, text=None): # <<<<<<<<<<<<<< * u"""ProcessingInstruction(target, text=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11ProcessingInstruction, 0, __pyx_n_s_ProcessingInstruction, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3024, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_11ProcessingInstruction, 0, __pyx_n_s_ProcessingInstruction, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__318); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessingInstruction, __pyx_t_1) < 0) __PYX_ERR(0, 3024, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessingInstruction, __pyx_t_1) < 0) __PYX_ERR(0, 3035, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3052 + /* "lxml/etree.pyx":3063 * return _elementFactory(doc, c_node) * * PI = ProcessingInstruction # <<<<<<<<<<<<<< * * */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ProcessingInstruction); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI, __pyx_t_1) < 0) __PYX_ERR(0, 3052, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_PI, __pyx_t_1) < 0) __PYX_ERR(0, 3063, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3077 + /* "lxml/etree.pyx":3088 * * * def Entity(name): # <<<<<<<<<<<<<< * u"""Entity(name) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13Entity, 0, __pyx_n_s_Entity, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__320)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3077, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_13Entity, 0, __pyx_n_s_Entity, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__320)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Entity, __pyx_t_1) < 0) __PYX_ERR(0, 3077, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Entity, __pyx_t_1) < 0) __PYX_ERR(0, 3088, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3103 + /* "lxml/etree.pyx":3114 * * * def SubElement(_Element _parent not None, _tag, # <<<<<<<<<<<<<< * attrib=None, nsmap=None, **_extra): * u"""SubElement(_parent, _tag, attrib=None, nsmap=None, **_extra) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15SubElement, 0, __pyx_n_s_SubElement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3103, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_15SubElement, 0, __pyx_n_s_SubElement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__322)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__323); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 3103, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 3114, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3113 + /* "lxml/etree.pyx":3124 * * * def ElementTree(_Element element=None, *, file=None, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""ElementTree(element=None, file=None, parser=None) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3113, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_file, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3113, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parser, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3113, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17ElementTree, 0, __pyx_n_s_ElementTree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_file, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3124, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_parser, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3124, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_17ElementTree, 0, __pyx_n_s_ElementTree, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__326); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 3113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 3124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3139 + /* "lxml/etree.pyx":3150 * * * def HTML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""HTML(text, parser=None, base_url=None) * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3139, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19HTML, 0, __pyx_n_s_HTML, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3150, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_19HTML, 0, __pyx_n_s_HTML, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__328)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__329); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTML, __pyx_t_1) < 0) __PYX_ERR(0, 3139, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_HTML, __pyx_t_1) < 0) __PYX_ERR(0, 3150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3165 + /* "lxml/etree.pyx":3176 * * * def XML(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(text, parser=None, base_url=None) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3165, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XML, 0, __pyx_n_s_XML, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3165, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3176, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_21XML, 0, __pyx_n_s_XML, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__332); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_2) < 0) __PYX_ERR(0, 3165, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_2) < 0) __PYX_ERR(0, 3176, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3196 + /* "lxml/etree.pyx":3207 * * * def fromstring(text, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(text, parser=None, base_url=None) * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3196, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3196, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23fromstring, 0, __pyx_n_s_fromstring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3196, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3207, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_23fromstring, 0, __pyx_n_s_fromstring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__334)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__335); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_1) < 0) __PYX_ERR(0, 3196, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_1) < 0) __PYX_ERR(0, 3207, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3217 + /* "lxml/etree.pyx":3228 * * * def fromstringlist(strings, _BaseParser parser=None): # <<<<<<<<<<<<<< * u"""fromstringlist(strings, parser=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_25fromstringlist, 0, __pyx_n_s_fromstringlist, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__337)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3217, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_25fromstringlist, 0, __pyx_n_s_fromstringlist, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__337)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__338); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3217, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3238 + /* "lxml/etree.pyx":3249 * * * def iselement(element): # <<<<<<<<<<<<<< * u"""iselement(element) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27iselement, 0, __pyx_n_s_iselement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__340)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_27iselement, 0, __pyx_n_s_iselement, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__340)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_iselement, __pyx_t_1) < 0) __PYX_ERR(0, 3238, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_iselement, __pyx_t_1) < 0) __PYX_ERR(0, 3249, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3246 + /* "lxml/etree.pyx":3257 * * * def dump(_Element elem not None, *, bint pretty_print=True, with_tail=True): # <<<<<<<<<<<<<< * u"""dump(elem, pretty_print=True, with_tail=True) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_with_tail, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 3246, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_29dump, 0, __pyx_n_s_dump, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_with_tail, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 3257, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_29dump, 0, __pyx_n_s_dump, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__342)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 3246, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 3257, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3259 + /* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3259, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, ((PyObject*)__pyx_n_s_xml)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xml_declaration, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, ((PyObject*)__pyx_n_s_xml)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xml_declaration, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) - /* "lxml/etree.pyx":3260 + /* "lxml/etree.pyx":3271 * * def tostring(element_or_tree, *, encoding=None, method="xml", * xml_declaration=None, bint pretty_print=False, bint with_tail=True, # <<<<<<<<<<<<<< * standalone=None, doctype=None, * bint exclusive=False, bint with_comments=True, inclusive_ns_prefixes=None): */ - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pretty_print, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pretty_print, __pyx_t_1) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_tail, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_tail, __pyx_t_1) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_standalone, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_standalone, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) - /* "lxml/etree.pyx":3262 + /* "lxml/etree.pyx":3273 * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, * bint exclusive=False, bint with_comments=True, inclusive_ns_prefixes=None): # <<<<<<<<<<<<<< * u"""tostring(element_or_tree, encoding=None, method="xml", * xml_declaration=None, pretty_print=False, with_tail=True, */ - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_exclusive, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_exclusive, __pyx_t_1) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_comments, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_with_comments, __pyx_t_1) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inclusive_ns_prefixes, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inclusive_ns_prefixes, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) - /* "lxml/etree.pyx":3259 + /* "lxml/etree.pyx":3270 * * * def tostring(element_or_tree, *, encoding=None, method="xml", # <<<<<<<<<<<<<< * xml_declaration=None, bint pretty_print=False, bint with_tail=True, * standalone=None, doctype=None, */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_31tostring, 0, __pyx_n_s_tostring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3259, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_31tostring, 0, __pyx_n_s_tostring, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__344)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostring, __pyx_t_1) < 0) __PYX_ERR(0, 3259, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostring, __pyx_t_1) < 0) __PYX_ERR(0, 3270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3352 + /* "lxml/etree.pyx":3363 * * * def tostringlist(element_or_tree, *args, **kwargs): # <<<<<<<<<<<<<< * u"""tostringlist(element_or_tree, *args, **kwargs) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_33tostringlist, 0, __pyx_n_s_tostringlist, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3352, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_33tostringlist, 0, __pyx_n_s_tostringlist, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__346)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3352, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tostringlist, __pyx_t_1) < 0) __PYX_ERR(0, 3363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< * bint with_tail=True, doctype=None): * u"""tounicode(element_or_tree, method="xml", pretty_print=False, */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3364, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_method, ((PyObject*)__pyx_n_u_xml)) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_method, ((PyObject*)__pyx_n_u_xml)) < 0) __PYX_ERR(0, 3375, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pretty_print, __pyx_t_2) < 0) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3365 + /* "lxml/etree.pyx":3376 * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, * bint with_tail=True, doctype=None): # <<<<<<<<<<<<<< * u"""tounicode(element_or_tree, method="xml", pretty_print=False, * with_tail=True, doctype=None) */ - __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3365, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_with_tail, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_with_tail, __pyx_t_2) < 0) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_doctype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3375, __pyx_L1_error) - /* "lxml/etree.pyx":3364 + /* "lxml/etree.pyx":3375 * * * def tounicode(element_or_tree, *, method=u"xml", bint pretty_print=False, # <<<<<<<<<<<<<< * bint with_tail=True, doctype=None): * u"""tounicode(element_or_tree, method="xml", pretty_print=False, */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_35tounicode, 0, __pyx_n_s_tounicode, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__348)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3364, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_35tounicode, 0, __pyx_n_s_tounicode, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__348)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_tounicode, __pyx_t_2) < 0) __PYX_ERR(0, 3364, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_tounicode, __pyx_t_2) < 0) __PYX_ERR(0, 3375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/etree.pyx":3398 + /* "lxml/etree.pyx":3409 * * * def parse(source, _BaseParser parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(source, parser=None, base_url=None) * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3398, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3398, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_37parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__350)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3398, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 3409, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_37parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__350)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__351); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_1) < 0) __PYX_ERR(0, 3398, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_1) < 0) __PYX_ERR(0, 3409, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/etree.pyx":3430 + /* "lxml/etree.pyx":3441 * * * def adopt_external_document(capsule, _BaseParser parser=None): # <<<<<<<<<<<<<< * """adopt_external_document(capsule, parser=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_39adopt_external_document, 0, __pyx_n_s_adopt_external_document, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__353)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3430, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_39adopt_external_document, 0, __pyx_n_s_adopt_external_document, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__353)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__354); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_adopt_external_document, __pyx_t_1) < 0) __PYX_ERR(0, 3430, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_adopt_external_document, __pyx_t_1) < 0) __PYX_ERR(0, 3441, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; /* "src/lxml/readonlytree.pxi":160 @@ -236221,7 +236552,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree__ReadOnlyProxy); /* "src/lxml/readonlytree.pxi":293 - * return None + * return None * * def get(self, key, default=None): # <<<<<<<<<<<<<< * u"""Gets an element attribute. @@ -236839,7 +237170,7 @@ if (!__Pyx_RefNanny) { xmlSetExternalEntityLoader(((xmlExternalEntityLoader)__pyx_f_4lxml_5etree__local_resolver)); /* "src/lxml/parser.pxi":961 - * return u"libxml2 %d.%d.%d" % LIBXML_VERSION + * return u"libxml2 %d.%d.%d" % LIBXML_VERSION * * def setElementClassLookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." @@ -236891,7 +237222,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree__BaseParser); /* "src/lxml/parser.pxi":1242 - * return self._getPushParserContext()._error_log.copy() + * return self._getPushParserContext()._error_log.copy() * * cpdef feed(self, data): # <<<<<<<<<<<<<< * u"""feed(self, data) @@ -237671,7 +238002,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree__MethodChanger); /* "src/lxml/iterparse.pxi":148 - * return self._parser.version + * return self._parser.version * * def set_element_class_lookup(self, ElementClassLookup lookup = None): # <<<<<<<<<<<<<< * u"""set_element_class_lookup(self, lookup = None) @@ -238637,7 +238968,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree_XSLT); /* "src/lxml/xslt.pxi":435 - * return self._error_log.copy() + * return self._error_log.copy() * * @staticmethod # <<<<<<<<<<<<<< * def strparam(strval): @@ -238899,73 +239230,73 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree_XSLTExtension); - /* "lxml/etree.pyx":3511 + /* "lxml/etree.pyx":3522 * self._error_log = _ErrorLog() * * def validate(self, etree): # <<<<<<<<<<<<<< * u"""validate(self, etree) * */ - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_3validate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_validate, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__609)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3511, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_3validate, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_validate, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__609)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_validate, __pyx_t_15) < 0) __PYX_ERR(0, 3511, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_validate, __pyx_t_15) < 0) __PYX_ERR(0, 3522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3520 + /* "lxml/etree.pyx":3531 * return self(etree) * * def assertValid(self, etree): # <<<<<<<<<<<<<< * u"""assertValid(self, etree) * */ - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_5assertValid, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_assertValid, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__611)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3520, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_5assertValid, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_assertValid, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__611)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_assertValid, __pyx_t_15) < 0) __PYX_ERR(0, 3520, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_assertValid, __pyx_t_15) < 0) __PYX_ERR(0, 3531, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3530 + /* "lxml/etree.pyx":3541 * self._error_log) * * def assert_(self, etree): # <<<<<<<<<<<<<< * u"""assert_(self, etree) * */ - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_7assert_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_assert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__613)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3530, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_7assert_, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator_assert, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__613)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_assert, __pyx_t_15) < 0) __PYX_ERR(0, 3530, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_assert, __pyx_t_15) < 0) __PYX_ERR(0, 3541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3539 + /* "lxml/etree.pyx":3550 * u"Document does not comply with schema") * * cpdef _append_log_message(self, int domain, int type, int level, int line, # <<<<<<<<<<<<<< * message, filename): * self._error_log._receiveGeneric(domain, type, level, line, message, */ - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_9_append_log_message, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator__append_log_message, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__615)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3539, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_9_append_log_message, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator__append_log_message, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__615)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_append_log_message, __pyx_t_15) < 0) __PYX_ERR(0, 3539, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_append_log_message, __pyx_t_15) < 0) __PYX_ERR(0, 3550, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); - /* "lxml/etree.pyx":3544 + /* "lxml/etree.pyx":3555 * filename) * * cpdef _clear_error_log(self): # <<<<<<<<<<<<<< * self._error_log.clear() * */ - __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_11_clear_error_log, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator__clear_error_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__617)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3544, __pyx_L1_error) + __pyx_t_15 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_5etree_10_Validator_11_clear_error_log, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Validator__clear_error_log, NULL, __pyx_n_s_lxml_etree, __pyx_d, ((PyObject *)__pyx_codeobj__617)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_clear_error_log, __pyx_t_15) < 0) __PYX_ERR(0, 3544, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_5etree__Validator->tp_dict, __pyx_n_s_clear_error_log, __pyx_t_15) < 0) __PYX_ERR(0, 3555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; PyType_Modified(__pyx_ptype_4lxml_5etree__Validator); /* "src/lxml/dtd.pxi":163 - * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None + * return funicode(self._c_node.defaultValue) if self._c_node.defaultValue is not NULL else None * * def itervalues(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -238991,7 +239322,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree__DTDAttributeDecl); /* "src/lxml/dtd.pxi":223 - * return None + * return None * * def iterattributes(self): # <<<<<<<<<<<<<< * _assertValidDTDNode(self, self._c_node) @@ -239017,7 +239348,7 @@ if (!__Pyx_RefNanny) { PyType_Modified(__pyx_ptype_4lxml_5etree__DTDElementDecl); /* "src/lxml/dtd.pxi":314 - * return funicodeOrNone(self._c_dtd.SystemID) + * return funicodeOrNone(self._c_dtd.SystemID) * * def iterelements(self): # <<<<<<<<<<<<<< * cdef tree.xmlNode *c_node = self._c_dtd.children if self._c_dtd is not NULL else NULL @@ -239316,7 +239647,7 @@ if (!__Pyx_RefNanny) { */ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_XML_line_3165, __pyx_kp_u_XML_text_parser_None_base_url_No) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_XML_line_3176, __pyx_kp_u_XML_text_parser_None_base_url_No) < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_t_2, __pyx_kp_u_FunctionNamespace_line_207, __pyx_kp_u_FunctionNamespace_ns_uri_Retriev) < 0) __PYX_ERR(0, 1, __pyx_L1_error) if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -241782,6 +242113,9 @@ done_or_error: #else #include #endif +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define GCC_DIAGNOSTIC +#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlElementType(xmlElementType value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(xmlElementType)*3+2]; char *dpos, *end = digits + sizeof(xmlElementType)*3+2; @@ -241789,12 +242123,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlElementType(xmlElementTyp Py_ssize_t length, ulength; int prepend_sign, last_one_off; xmlElementType remaining; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const xmlElementType neg_one = (xmlElementType) -1, const_zero = (xmlElementType) 0; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; @@ -242177,6 +242511,9 @@ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) #else #include #endif +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define GCC_DIAGNOSTIC +#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; @@ -242184,12 +242521,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; @@ -242371,6 +242708,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObj #else #include #endif +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define GCC_DIAGNOSTIC +#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(int)*3+2]; char *dpos, *end = digits + sizeof(int)*3+2; @@ -242378,12 +242718,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t wi Py_ssize_t length, ulength; int prepend_sign, last_one_off; int remaining; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const int neg_one = (int) -1, const_zero = (int) 0; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; @@ -242446,22 +242786,26 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_int(int value, Py_ssize_t wi } /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } @@ -245027,6 +245371,9 @@ static CYTHON_INLINE int __Pyx_set_iter_next( #else #include #endif +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define GCC_DIAGNOSTIC +#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathObjectType value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(xmlXPathObjectType)*3+2]; char *dpos, *end = digits + sizeof(xmlXPathObjectType)*3+2; @@ -245034,12 +245381,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_xmlXPathObjectType(xmlXPathO Py_ssize_t length, ulength; int prepend_sign, last_one_off; xmlXPathObjectType remaining; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const xmlXPathObjectType neg_one = (xmlXPathObjectType) -1, const_zero = (xmlXPathObjectType) 0; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; diff --git a/src/lxml/etree.h b/src/lxml/etree.h index b678f70..c30f96a 100644 --- a/src/lxml/etree.h +++ b/src/lxml/etree.h @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ #ifndef __PYX_HAVE__lxml__etree #define __PYX_HAVE__lxml__etree @@ -51,7 +51,7 @@ struct LxmlElement { PyObject *_tag; }; -/* "lxml/etree.pyx":1847 +/* "lxml/etree.pyx":1858 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -65,7 +65,7 @@ struct LxmlElementTree { struct LxmlElement *_context_node; }; -/* "lxml/etree.pyx":2574 +/* "lxml/etree.pyx":2585 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -81,7 +81,7 @@ struct LxmlElementTagMatcher { char *_name; }; -/* "lxml/etree.pyx":2605 +/* "lxml/etree.pyx":2616 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< diff --git a/src/lxml/etree.pyx b/src/lxml/etree.pyx index 3ba5079..ffff950 100644 --- a/src/lxml/etree.pyx +++ b/src/lxml/etree.pyx @@ -515,15 +515,15 @@ cdef class DocInfo: if not root_name and (public_id or system_url): raise ValueError, u"Could not find root node" - property root_name: - u"Returns the name of the root node as defined by the DOCTYPE." - def __get__(self): - root_name, public_id, system_url = self._doc.getdoctype() - return root_name + @property + def root_name(self): + """Returns the name of the root node as defined by the DOCTYPE.""" + root_name, public_id, system_url = self._doc.getdoctype() + return root_name @cython.final cdef tree.xmlDtd* _get_c_dtd(self): - u"""Return the DTD. Create it if it does not yet exist.""" + """"Return the DTD. Create it if it does not yet exist.""" cdef xmlDoc* c_doc = self._doc._c_doc cdef xmlNode* c_root_node cdef const_xmlChar* c_name @@ -604,28 +604,28 @@ cdef class DocInfo: tree.xmlFree(c_dtd.SystemID) c_dtd.SystemID = c_value - property xml_version: - u"Returns the XML version as declared by the document." - def __get__(self): - xml_version, encoding = self._doc.getxmlinfo() - return xml_version - - property encoding: - u"Returns the encoding name as declared by the document." - def __get__(self): - xml_version, encoding = self._doc.getxmlinfo() - return encoding - - property standalone: - u"""Returns the standalone flag as declared by the document. The possible + @property + def xml_version(self): + """Returns the XML version as declared by the document.""" + xml_version, encoding = self._doc.getxmlinfo() + return xml_version + + @property + def encoding(self): + """Returns the encoding name as declared by the document.""" + xml_version, encoding = self._doc.getxmlinfo() + return encoding + + @property + def standalone(self): + """Returns the standalone flag as declared by the document. The possible values are True (``standalone='yes'``), False (``standalone='no'`` or flag not provided in the declaration), and None (unknown or no declaration found). Note that a normal truth test on this value will always tell if the ``standalone`` flag was set to ``'yes'`` or not. """ - def __get__(self): - return self._doc.isstandalone() + return self._doc.isstandalone() property URL: u"The source URL of the document (or None if unknown)." @@ -643,40 +643,40 @@ cdef class DocInfo: if c_oldurl is not NULL: tree.xmlFree(c_oldurl) - property doctype: - u"Returns a DOCTYPE declaration string for the document." - def __get__(self): - root_name, public_id, system_url = self._doc.getdoctype() + @property + def doctype(self): + """Returns a DOCTYPE declaration string for the document.""" + root_name, public_id, system_url = self._doc.getdoctype() + if system_url: + # If '"' in system_url, we must escape it with single + # quotes, otherwise escape with double quotes. If url + # contains both a single quote and a double quote, XML + # standard is being violated. + if '"' in system_url: + quoted_system_url = f"'{system_url}'" + else: + quoted_system_url = f'"{system_url}"' + if public_id: if system_url: - # If '"' in system_url, we must escape it with single - # quotes, otherwise escape with double quotes. If url - # contains both a single quote and a double quote, XML - # standard is being violated. - if '"' in system_url: - quoted_system_url = f"'{system_url}'" - else: - quoted_system_url = f'"{system_url}"' - if public_id: - if system_url: - return f'' - else: - return f'' - elif system_url: - return f'' - elif self._doc.hasdoctype(): - return f'' + return f'' else: - return u'' + return f'' + elif system_url: + return f'' + elif self._doc.hasdoctype(): + return f'' + else: + return u'' - property internalDTD: - u"Returns a DTD validator based on the internal subset of the document." - def __get__(self): - return _dtdFactory(self._doc._c_doc.intSubset) + @property + def internalDTD(self): + """Returns a DTD validator based on the internal subset of the document.""" + return _dtdFactory(self._doc._c_doc.intSubset) - property externalDTD: - u"Returns a DTD validator based on the external subset of the document." - def __get__(self): - return _dtdFactory(self._doc._c_doc.extSubset) + @property + def externalDTD(self): + """Returns a DTD validator based on the external subset of the document.""" + return _dtdFactory(self._doc._c_doc.extSubset) @cython.no_gc_clear @@ -996,12 +996,12 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: else: self._doc._setNodeNs(self._c_node, _xcstr(ns)) - property attrib: - u"""Element attribute dictionary. Where possible, use get(), set(), + @property + def attrib(self): + """Element attribute dictionary. Where possible, use get(), set(), keys(), values() and items() to access element attributes. """ - def __get__(self): - return _Attrib.__new__(_Attrib, self) + return _Attrib.__new__(_Attrib, self) property text: u"""Text before the first subelement. This is either a string or @@ -1039,14 +1039,14 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: # _setTailText(self._c_node, None) # not in ElementTree, read-only - property prefix: - u"""Namespace prefix or None. + @property + def prefix(self): + """Namespace prefix or None. """ - def __get__(self): - if self._c_node.ns is not NULL: - if self._c_node.ns.prefix is not NULL: - return funicode(self._c_node.ns.prefix) - return None + if self._c_node.ns is not NULL: + if self._c_node.ns.prefix is not NULL: + return funicode(self._c_node.ns.prefix) + return None # not in ElementTree, read-only property sourceline: @@ -1066,28 +1066,28 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: self._c_node.line = line # not in ElementTree, read-only - property nsmap: - u"""Namespace prefix->URI mapping known in the context of this + @property + def nsmap(self): + """Namespace prefix->URI mapping known in the context of this Element. This includes all namespace declarations of the parents. Note that changing the returned dict has no effect on the Element. """ - def __get__(self): - cdef xmlNode* c_node - cdef xmlNs* c_ns - _assertValidNode(self) - nsmap = {} - c_node = self._c_node - while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: - c_ns = c_node.nsDef - while c_ns is not NULL: - prefix = funicodeOrNone(c_ns.prefix) - if prefix not in nsmap: - nsmap[prefix] = funicodeOrNone(c_ns.href) - c_ns = c_ns.next - c_node = c_node.parent - return nsmap + cdef xmlNode* c_node + cdef xmlNs* c_ns + _assertValidNode(self) + nsmap = {} + c_node = self._c_node + while c_node is not NULL and c_node.type == tree.XML_ELEMENT_NODE: + c_ns = c_node.nsDef + while c_ns is not NULL: + prefix = funicodeOrNone(c_ns.prefix) + if prefix not in nsmap: + nsmap[prefix] = funicodeOrNone(c_ns.href) + c_ns = c_ns.next + c_node = c_node.parent + return nsmap # not in ElementTree, read-only property base: @@ -1387,6 +1387,11 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: Can be restricted to find only elements with specific tags, see `iter`. """ + if preceding: + if self._c_node and not self._c_node.prev: + return ITER_EMPTY + elif self._c_node and not self._c_node.next: + return ITER_EMPTY if tag is not None: tags += (tag,) return SiblingsIterator(self, tags, preceding=preceding) @@ -1399,6 +1404,8 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: Can be restricted to find only elements with specific tags, see `iter`. """ + if self._c_node and not self._c_node.parent: + return ITER_EMPTY if tag is not None: tags += (tag,) return AncestorsIterator(self, tags) @@ -1412,6 +1419,8 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: itself. The returned elements can be restricted to find only elements with specific tags, see `iter`. """ + if self._c_node and not self._c_node.children: + return ITER_EMPTY if tag is not None: tags += (tag,) return ElementDepthFirstIterator(self, tags, inclusive=False) @@ -1425,6 +1434,8 @@ cdef public class _Element [ type LxmlElementType, object LxmlElement ]: elements can be reversed with the 'reversed' keyword and restricted to find only elements with specific tags, see `iter`. """ + if self._c_node and not self._c_node.children: + return ITER_EMPTY if tag is not None: tags += (tag,) return ElementChildIterator(self, tags, reversed=reversed) @@ -1640,9 +1651,9 @@ cdef class __ContentOnlyElement(_Element): u"__setitem__(self, index, value)" self._raiseImmutable() - property attrib: - def __get__(self): - return IMMUTABLE_EMPTY_MAPPING + @property + def attrib(self): + return IMMUTABLE_EMPTY_MAPPING property text: def __get__(self): @@ -1688,17 +1699,17 @@ cdef class __ContentOnlyElement(_Element): return [] cdef class _Comment(__ContentOnlyElement): - property tag: - def __get__(self): - return Comment + @property + def tag(self): + return Comment def __repr__(self): return "" % strrepr(self.text) cdef class _ProcessingInstruction(__ContentOnlyElement): - property tag: - def __get__(self): - return ProcessingInstruction + @property + def tag(self): + return ProcessingInstruction property target: # not in ElementTree @@ -1734,22 +1745,22 @@ cdef class _ProcessingInstruction(__ContentOnlyElement): """ return self.attrib.get(key, default) - property attrib: - u"""Returns a dict containing all pseudo-attributes that can be + @property + def attrib(self): + """Returns a dict containing all pseudo-attributes that can be parsed from the text content of this processing instruction. Note that modifying the dict currently has no effect on the XML node, although this is not guaranteed to stay this way. """ - def __get__(self): - return { attr : (value1 or value2) - for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } + return { attr : (value1 or value2) + for attr, value1, value2 in _FIND_PI_ATTRIBUTES(u' ' + self.text) } cdef object _FIND_PI_ATTRIBUTES = re.compile(ur'\s+(\w+)\s*=\s*(?:\'([^\']*)\'|"([^"]*)")', re.U).findall cdef class _Entity(__ContentOnlyElement): - property tag: - def __get__(self): - return Entity + @property + def tag(self): + return Entity property name: # not in ElementTree @@ -1764,12 +1775,12 @@ cdef class _Entity(__ContentOnlyElement): raise ValueError, f"Invalid entity name '{value}'" tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) - property text: + @property + def text(self): # FIXME: should this be None or '&[VALUE];' or the resolved # entity value ? - def __get__(self): - _assertValidNode(self) - return f'&{funicode(self._c_node.name)};' + _assertValidNode(self) + return f'&{funicode(self._c_node.name)};' def __repr__(self): return "&%s;" % strrepr(self.name) @@ -1923,23 +1934,23 @@ cdef public class _ElementTree [ type LxmlElementTreeType, return self # not in ElementTree - property docinfo: - u"""Information about the document provided by parser and DTD.""" - def __get__(self): - self._assertHasRoot() - return DocInfo(self._context_node._doc) + @property + def docinfo(self): + """Information about the document provided by parser and DTD.""" + self._assertHasRoot() + return DocInfo(self._context_node._doc) # not in ElementTree, read-only - property parser: - u"""The parser that was used to parse the document in this ElementTree. - """ - def __get__(self): - if self._context_node is not None and \ - self._context_node._doc is not None: - return self._context_node._doc._parser - if self._doc is not None: - return self._doc._parser - return None + @property + def parser(self): + """The parser that was used to parse the document in this ElementTree. + """ + if self._context_node is not None and \ + self._context_node._doc is not None: + return self._context_node._doc._parser + if self._doc is not None: + return self._doc._parser + return None def write(self, file, *, encoding=None, method=u"xml", pretty_print=False, xml_declaration=None, with_tail=True, @@ -3544,11 +3555,11 @@ cdef class _Validator: cpdef _clear_error_log(self): self._error_log.clear() - property error_log: - u"The log of validation errors and warnings." - def __get__(self): - assert self._error_log is not None, "XPath evaluator not initialised" - return self._error_log.copy() + @property + def error_log(self): + """The log of validation errors and warnings.""" + assert self._error_log is not None, "XPath evaluator not initialised" + return self._error_log.copy() include "dtd.pxi" # DTD include "relaxng.pxi" # RelaxNG diff --git a/src/lxml/etree_api.h b/src/lxml/etree_api.h index 51397ac..f6de6b1 100644 --- a/src/lxml/etree_api.h +++ b/src/lxml/etree_api.h @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ #ifndef __PYX_HAVE_API__lxml__etree #define __PYX_HAVE_API__lxml__etree diff --git a/src/lxml/extensions.pxi b/src/lxml/extensions.pxi index d2d059c..35a321b 100644 --- a/src/lxml/extensions.pxi +++ b/src/lxml/extensions.pxi @@ -295,27 +295,27 @@ cdef class _BaseContext: # Python access to the XPath context for extension functions - property context_node: - def __get__(self): - cdef xmlNode* c_node - if self._xpathCtxt is NULL: - raise XPathError, \ - u"XPath context is only usable during the evaluation" - c_node = self._xpathCtxt.node - if c_node is NULL: - raise XPathError, u"no context node" - if c_node.doc != self._xpathCtxt.doc: - raise XPathError, \ - u"document-external context nodes are not supported" - if self._doc is None: - raise XPathError, u"document context is missing" - return _elementFactory(self._doc, c_node) - - property eval_context: - def __get__(self): - if self._eval_context_dict is None: - self._eval_context_dict = {} - return self._eval_context_dict + @property + def context_node(self): + cdef xmlNode* c_node + if self._xpathCtxt is NULL: + raise XPathError, \ + u"XPath context is only usable during the evaluation" + c_node = self._xpathCtxt.node + if c_node is NULL: + raise XPathError, u"no context node" + if c_node.doc != self._xpathCtxt.doc: + raise XPathError, \ + u"document-external context nodes are not supported" + if self._doc is None: + raise XPathError, u"document context is missing" + return _elementFactory(self._doc, c_node) + + @property + def eval_context(self): + if self._eval_context_dict is None: + self._eval_context_dict = {} + return self._eval_context_dict # Python reference keeping during XPath function evaluation diff --git a/src/lxml/html/clean.c b/src/lxml/html/clean.c index 1353495..9baf266 100644 --- a/src/lxml/html/clean.c +++ b/src/lxml/html/clean.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -33,8 +33,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -626,7 +626,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -916,7 +917,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject static PyObject *__Pyx_GetBuiltinName(PyObject *name); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -1222,18 +1223,18 @@ static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #else #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\ __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix)) #endif @@ -16357,22 +16358,26 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { } /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } diff --git a/src/lxml/html/diff.c b/src/lxml/html/diff.c index 5e19fe0..7dd9b02 100644 --- a/src/lxml/html/diff.c +++ b/src/lxml/html/diff.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -33,8 +33,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -626,7 +626,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -994,7 +995,7 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\ const char* function_name); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -1385,18 +1386,18 @@ static PyObject* __Pyx__PyList_PopIndex(PyObject* L, PyObject* py_ix, Py_ssize_t #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ (likely(PyList_CheckExact(L) && __Pyx_fits_Py_ssize_t(ix, type, is_signed))) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ __Pyx_fits_Py_ssize_t(ix, type, is_signed) ?\ __Pyx__PyList_PopIndex(L, py_ix, ix) : (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix))) #else #define __Pyx_PyList_PopIndex(L, py_ix, ix, is_signed, type, to_py_func)\ __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) #define __Pyx_PyObject_PopIndex(L, py_ix, ix, is_signed, type, to_py_func) (\ - (unlikely(py_ix == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ + (unlikely((py_ix) == Py_None)) ? __Pyx__PyObject_PopNewIndex(L, to_py_func(ix)) :\ __Pyx__PyObject_PopIndex(L, py_ix)) #endif @@ -21442,22 +21443,26 @@ bad: } /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } diff --git a/src/lxml/includes/lxml-version.h b/src/lxml/includes/lxml-version.h index 134cc35..3aac423 100644 --- a/src/lxml/includes/lxml-version.h +++ b/src/lxml/includes/lxml-version.h @@ -1,3 +1,3 @@ #ifndef LXML_VERSION_STRING -#define LXML_VERSION_STRING "4.3.1" +#define LXML_VERSION_STRING "4.3.2" #endif diff --git a/src/lxml/iterparse.pxi b/src/lxml/iterparse.pxi index 3a64a27..f0502e6 100644 --- a/src/lxml/iterparse.pxi +++ b/src/lxml/iterparse.pxi @@ -128,22 +128,22 @@ cdef class iterparse: self._parser = parser self._source = source - property error_log: - u"""The error log of the last (or current) parser run. + @property + def error_log(self): + """The error log of the last (or current) parser run. """ - def __get__(self): - return self._parser.feed_error_log + return self._parser.feed_error_log - property resolvers: - u"""The custom resolver registry of the last (or current) parser run. + @property + def resolvers(self): + """The custom resolver registry of the last (or current) parser run. """ - def __get__(self): - return self._parser.resolvers + return self._parser.resolvers - property version: - u"""The version of the underlying XML parser.""" - def __get__(self): - return self._parser.version + @property + def version(self): + """The version of the underlying XML parser.""" + return self._parser.version def set_element_class_lookup(self, ElementClassLookup lookup = None): u"""set_element_class_lookup(self, lookup = None) diff --git a/src/lxml/lxml.etree.h b/src/lxml/lxml.etree.h index b678f70..c30f96a 100644 --- a/src/lxml/lxml.etree.h +++ b/src/lxml/lxml.etree.h @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ #ifndef __PYX_HAVE__lxml__etree #define __PYX_HAVE__lxml__etree @@ -51,7 +51,7 @@ struct LxmlElement { PyObject *_tag; }; -/* "lxml/etree.pyx":1847 +/* "lxml/etree.pyx":1858 * * * cdef public class _ElementTree [ type LxmlElementTreeType, # <<<<<<<<<<<<<< @@ -65,7 +65,7 @@ struct LxmlElementTree { struct LxmlElement *_context_node; }; -/* "lxml/etree.pyx":2574 +/* "lxml/etree.pyx":2585 * * * cdef public class _ElementTagMatcher [ object LxmlElementTagMatcher, # <<<<<<<<<<<<<< @@ -81,7 +81,7 @@ struct LxmlElementTagMatcher { char *_name; }; -/* "lxml/etree.pyx":2605 +/* "lxml/etree.pyx":2616 * self._name = NULL * * cdef public class _ElementIterator(_ElementTagMatcher) [ # <<<<<<<<<<<<<< diff --git a/src/lxml/lxml.etree_api.h b/src/lxml/lxml.etree_api.h index 00a9630..aa3600d 100644 --- a/src/lxml/lxml.etree_api.h +++ b/src/lxml/lxml.etree_api.h @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ #ifndef __PYX_HAVE_API__lxml__etree #define __PYX_HAVE_API__lxml__etree diff --git a/src/lxml/objectify.c b/src/lxml/objectify.c index 7dcc45b..0bc0b63 100644 --- a/src/lxml/objectify.c +++ b/src/lxml/objectify.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -75,8 +75,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -689,7 +689,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -1017,8 +1018,8 @@ struct __pyx_obj_4lxml_9objectify_NoneElement { }; -/* "lxml/objectify.pyx":809 - * return None +/* "lxml/objectify.pyx":810 + * * * cdef class BoolElement(IntElement): # <<<<<<<<<<<<<< * u"""Boolean type base on string values: 'true' or 'false'. @@ -1029,7 +1030,7 @@ struct __pyx_obj_4lxml_9objectify_BoolElement { }; -/* "lxml/objectify.pyx":895 +/* "lxml/objectify.pyx":896 * # Python type registry * * cdef class PyType: # <<<<<<<<<<<<<< @@ -1046,7 +1047,7 @@ struct __pyx_obj_4lxml_9objectify_PyType { }; -/* "lxml/objectify.pyx":1125 +/* "lxml/objectify.pyx":1126 * @cython.final * @cython.internal * cdef class _ObjectifyElementMakerCaller: # <<<<<<<<<<<<<< @@ -1062,7 +1063,7 @@ struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller { }; -/* "lxml/objectify.pyx":1215 +/* "lxml/objectify.pyx":1216 * cetree.setNodeText(elem._c_node, text) * * cdef class ElementMaker: # <<<<<<<<<<<<<< @@ -1080,7 +1081,7 @@ struct __pyx_obj_4lxml_9objectify_ElementMaker { }; -/* "lxml/objectify.pyx":1371 +/* "lxml/objectify.pyx":1372 * # Element class lookup * * cdef class ObjectifyElementClassLookup(ElementClassLookup): # <<<<<<<<<<<<<< @@ -1112,7 +1113,7 @@ struct __pyx_obj_4lxml_9objectify_ObjectPath { -/* "lxml/objectify.pyx":1215 +/* "lxml/objectify.pyx":1216 * cetree.setNodeText(elem._c_node, text) * * cdef class ElementMaker: # <<<<<<<<<<<<<< @@ -1307,7 +1308,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); #endif /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -3778,7 +3779,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(stru * def __reduce__(self): * return fromstring, (etree.tostring(self),) # <<<<<<<<<<<<<< * - * property text: + * @property */ __Pyx_XDECREF(__pyx_r); __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) @@ -3841,9 +3842,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4__reduce__(stru /* "lxml/objectify.pyx":166 * - * property text: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) + * @property + * def text(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) * */ @@ -3867,11 +3868,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(st __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":167 - * property text: - * def __get__(self): - * return textOf(self._c_node) # <<<<<<<<<<<<<< + * @property + * def text(self): + * return textOf(self._c_node) # <<<<<<<<<<<<<< * - * property __dict__: + * @property */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) @@ -3882,9 +3883,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(st /* "lxml/objectify.pyx":166 * - * property text: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) + * @property + * def text(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) * */ @@ -3899,12 +3900,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_4text___get__(st return __pyx_r; } -/* "lxml/objectify.pyx":174 - * Note that this only considers the first child with a given name. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef _Element child - * cdef dict children +/* "lxml/objectify.pyx":170 + * + * @property + * def __dict__(self): # <<<<<<<<<<<<<< + * """A fake implementation for __dict__ to support dir() etc. + * */ /* Python wrapper */ @@ -3939,20 +3940,20 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":177 - * cdef _Element child - * cdef dict children - * c_ns = tree._getNs(self._c_node) # <<<<<<<<<<<<<< - * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None - * children = {} + * cdef _Element child + * cdef dict children + * c_ns = tree._getNs(self._c_node) # <<<<<<<<<<<<<< + * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None + * children = {} */ __pyx_v_c_ns = _getNs(__pyx_v_self->__pyx_base.__pyx_base._c_node); /* "lxml/objectify.pyx":178 - * cdef dict children - * c_ns = tree._getNs(self._c_node) - * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None # <<<<<<<<<<<<<< - * children = {} - * for child in etree.ElementChildIterator(self, tag=tag): + * cdef dict children + * c_ns = tree._getNs(self._c_node) + * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None # <<<<<<<<<<<<<< + * children = {} + * for child in etree.ElementChildIterator(self, tag=tag): */ if (((__pyx_v_c_ns != NULL) != 0)) { __pyx_t_2 = pyunicode(__pyx_v_c_ns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error) @@ -3970,11 +3971,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __pyx_t_1 = 0; /* "lxml/objectify.pyx":179 - * c_ns = tree._getNs(self._c_node) - * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None - * children = {} # <<<<<<<<<<<<<< - * for child in etree.ElementChildIterator(self, tag=tag): - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + * c_ns = tree._getNs(self._c_node) + * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None + * children = {} # <<<<<<<<<<<<<< + * for child in etree.ElementChildIterator(self, tag=tag): + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: */ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -3982,11 +3983,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __pyx_t_1 = 0; /* "lxml/objectify.pyx":180 - * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None - * children = {} - * for child in etree.ElementChildIterator(self, tag=tag): # <<<<<<<<<<<<<< - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: - * continue + * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None + * children = {} + * for child in etree.ElementChildIterator(self, tag=tag): # <<<<<<<<<<<<<< + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + * continue */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementChildIterator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -4048,11 +4049,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __pyx_t_4 = 0; /* "lxml/objectify.pyx":181 - * children = {} - * for child in etree.ElementChildIterator(self, tag=tag): - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: # <<<<<<<<<<<<<< - * continue - * name = pyunicode(child._c_node.name) + * children = {} + * for child in etree.ElementChildIterator(self, tag=tag): + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: # <<<<<<<<<<<<<< + * continue + * name = pyunicode(child._c_node.name) */ __pyx_t_8 = ((__pyx_v_c_ns == NULL) != 0); if (__pyx_t_8) { @@ -4066,29 +4067,29 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ if (__pyx_t_7) { /* "lxml/objectify.pyx":182 - * for child in etree.ElementChildIterator(self, tag=tag): - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: - * continue # <<<<<<<<<<<<<< - * name = pyunicode(child._c_node.name) - * if name not in children: + * for child in etree.ElementChildIterator(self, tag=tag): + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + * continue # <<<<<<<<<<<<<< + * name = pyunicode(child._c_node.name) + * if name not in children: */ goto __pyx_L3_continue; /* "lxml/objectify.pyx":181 - * children = {} - * for child in etree.ElementChildIterator(self, tag=tag): - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: # <<<<<<<<<<<<<< - * continue - * name = pyunicode(child._c_node.name) + * children = {} + * for child in etree.ElementChildIterator(self, tag=tag): + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: # <<<<<<<<<<<<<< + * continue + * name = pyunicode(child._c_node.name) */ } /* "lxml/objectify.pyx":183 - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: - * continue - * name = pyunicode(child._c_node.name) # <<<<<<<<<<<<<< - * if name not in children: - * children[name] = child + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + * continue + * name = pyunicode(child._c_node.name) # <<<<<<<<<<<<<< + * if name not in children: + * children[name] = child */ __pyx_t_4 = pyunicode(__pyx_v_child->_c_node->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -4096,49 +4097,49 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __pyx_t_4 = 0; /* "lxml/objectify.pyx":184 - * continue - * name = pyunicode(child._c_node.name) - * if name not in children: # <<<<<<<<<<<<<< - * children[name] = child - * return children + * continue + * name = pyunicode(child._c_node.name) + * if name not in children: # <<<<<<<<<<<<<< + * children[name] = child + * return children */ __pyx_t_7 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_children, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { /* "lxml/objectify.pyx":185 - * name = pyunicode(child._c_node.name) - * if name not in children: - * children[name] = child # <<<<<<<<<<<<<< - * return children + * name = pyunicode(child._c_node.name) + * if name not in children: + * children[name] = child # <<<<<<<<<<<<<< + * return children * */ if (unlikely(PyDict_SetItem(__pyx_v_children, __pyx_v_name, ((PyObject *)__pyx_v_child)) < 0)) __PYX_ERR(0, 185, __pyx_L1_error) /* "lxml/objectify.pyx":184 - * continue - * name = pyunicode(child._c_node.name) - * if name not in children: # <<<<<<<<<<<<<< - * children[name] = child - * return children + * continue + * name = pyunicode(child._c_node.name) + * if name not in children: # <<<<<<<<<<<<<< + * children[name] = child + * return children */ } /* "lxml/objectify.pyx":180 - * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None - * children = {} - * for child in etree.ElementChildIterator(self, tag=tag): # <<<<<<<<<<<<<< - * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: - * continue + * tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None + * children = {} + * for child in etree.ElementChildIterator(self, tag=tag): # <<<<<<<<<<<<<< + * if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + * continue */ __pyx_L3_continue:; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "lxml/objectify.pyx":186 - * if name not in children: - * children[name] = child - * return children # <<<<<<<<<<<<<< + * if name not in children: + * children[name] = child + * return children # <<<<<<<<<<<<<< * * def __len__(self): */ @@ -4147,12 +4148,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ __pyx_r = __pyx_v_children; goto __pyx_L0; - /* "lxml/objectify.pyx":174 - * Note that this only considers the first child with a given name. - * """ - * def __get__(self): # <<<<<<<<<<<<<< - * cdef _Element child - * cdef dict children + /* "lxml/objectify.pyx":170 + * + * @property + * def __dict__(self): # <<<<<<<<<<<<<< + * """A fake implementation for __dict__ to support dir() etc. + * */ /* function exit code */ @@ -4174,7 +4175,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_18ObjectifiedElement_8__dict_____get_ } /* "lxml/objectify.pyx":188 - * return children + * return children * * def __len__(self): # <<<<<<<<<<<<<< * u"""Count self and siblings with the same tag. @@ -4214,7 +4215,7 @@ static Py_ssize_t __pyx_pf_4lxml_9objectify_18ObjectifiedElement_6__len__(struct goto __pyx_L0; /* "lxml/objectify.pyx":188 - * return children + * return children * * def __len__(self): # <<<<<<<<<<<<<< * u"""Count self and siblings with the same tag. @@ -9311,9 +9312,9 @@ static PyObject *__pyx_f_4lxml_9objectify__setSlice(PyObject *__pyx_v_sliceobjec /* "lxml/objectify.pyx":598 * """ - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) * */ @@ -9337,9 +9338,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":599 - * property pyval: - * def __get__(self): - * return textOf(self._c_node) # <<<<<<<<<<<<<< + * @property + * def pyval(self): + * return textOf(self._c_node) # <<<<<<<<<<<<<< * * def __str__(self): */ @@ -9352,9 +9353,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get /* "lxml/objectify.pyx":598 * """ - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) * */ @@ -9370,7 +9371,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement_5pyval___get } /* "lxml/objectify.pyx":601 - * return textOf(self._c_node) + * return textOf(self._c_node) * * def __str__(self): # <<<<<<<<<<<<<< * return textOf(self._c_node) or '' @@ -9425,7 +9426,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_22ObjectifiedDataElement___str__(stru goto __pyx_L0; /* "lxml/objectify.pyx":601 - * return textOf(self._c_node) + * return textOf(self._c_node) * * def __str__(self): # <<<<<<<<<<<<<< * return textOf(self._c_node) or '' @@ -9613,7 +9614,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struc * """ * self._parse_value = function # <<<<<<<<<<<<<< * - * property pyval: + * @property */ __Pyx_INCREF(__pyx_v_function); __Pyx_GIVEREF(__pyx_v_function); @@ -9638,9 +9639,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement__setValueParser(struc /* "lxml/objectify.pyx":623 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return _parseNumber(self) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return _parseNumber(self) * */ @@ -9664,9 +9665,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":624 - * property pyval: - * def __get__(self): - * return _parseNumber(self) # <<<<<<<<<<<<<< + * @property + * def pyval(self): + * return _parseNumber(self) # <<<<<<<<<<<<<< * * def __int__(self): */ @@ -9679,9 +9680,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct /* "lxml/objectify.pyx":623 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return _parseNumber(self) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return _parseNumber(self) * */ @@ -9697,7 +9698,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_5pyval___get__(struct } /* "lxml/objectify.pyx":626 - * return _parseNumber(self) + * return _parseNumber(self) * * def __int__(self): # <<<<<<<<<<<<<< * return int(_parseNumber(self)) @@ -9742,7 +9743,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_13NumberElement_2__int__(struct __pyx goto __pyx_L0; /* "lxml/objectify.pyx":626 - * return _parseNumber(self) + * return _parseNumber(self) * * def __int__(self): # <<<<<<<<<<<<<< * return int(_parseNumber(self)) @@ -11725,9 +11726,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_12FloatElement__init(struct __pyx_obj /* "lxml/objectify.pyx":730 * """ - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) or u'' + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) or u'' * */ @@ -11753,9 +11754,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":731 - * property pyval: - * def __get__(self): - * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<< + * @property + * def pyval(self): + * return textOf(self._c_node) or u'' # <<<<<<<<<<<<<< * * def __repr__(self): */ @@ -11780,9 +11781,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct /* "lxml/objectify.pyx":730 * """ - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return textOf(self._c_node) or u'' + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return textOf(self._c_node) or u'' * */ @@ -11799,7 +11800,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_13StringElement_5pyval___get__(struct } /* "lxml/objectify.pyx":733 - * return textOf(self._c_node) or u'' + * return textOf(self._c_node) or u'' * * def __repr__(self): # <<<<<<<<<<<<<< * return repr(textOf(self._c_node) or u'') @@ -11857,7 +11858,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_13StringElement___repr__(struct __pyx goto __pyx_L0; /* "lxml/objectify.pyx":733 - * return textOf(self._c_node) or u'' + * return textOf(self._c_node) or u'' * * def __repr__(self): # <<<<<<<<<<<<<< * return repr(textOf(self._c_node) or u'') @@ -13143,7 +13144,7 @@ static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED * def __hash__(self): * return hash(None) # <<<<<<<<<<<<<< * - * property pyval: + * @property */ __pyx_t_1 = PyObject_Hash(Py_None); if (unlikely(__pyx_t_1 == ((Py_hash_t)-1))) __PYX_ERR(0, 803, __pyx_L1_error) __pyx_r = __pyx_t_1; @@ -13169,9 +13170,9 @@ static Py_hash_t __pyx_pf_4lxml_9objectify_11NoneElement_8__hash__(CYTHON_UNUSED /* "lxml/objectify.pyx":806 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return None + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return None * */ @@ -13194,11 +13195,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_U __Pyx_RefNannySetupContext("__get__", 0); /* "lxml/objectify.pyx":807 - * property pyval: - * def __get__(self): - * return None # <<<<<<<<<<<<<< + * @property + * def pyval(self): + * return None # <<<<<<<<<<<<<< + * * - * cdef class BoolElement(IntElement): */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); @@ -13206,9 +13207,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_U /* "lxml/objectify.pyx":806 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return None + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return None * */ @@ -13219,7 +13220,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11NoneElement_5pyval___get__(CYTHON_U return __pyx_r; } -/* "lxml/objectify.pyx":815 +/* "lxml/objectify.pyx":816 * Python's bool type. * """ * def _init(self): # <<<<<<<<<<<<<< @@ -13247,14 +13248,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("_init", 0); - /* "lxml/objectify.pyx":816 + /* "lxml/objectify.pyx":817 * """ * def _init(self): * self._parse_value = __parseBool # <<<<<<<<<<<<<< * * def __nonzero__(self): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_parseBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_parseBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 817, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->__pyx_base.__pyx_base._parse_value); @@ -13262,7 +13263,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_ __pyx_v_self->__pyx_base.__pyx_base._parse_value = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":815 + /* "lxml/objectify.pyx":816 * Python's bool type. * """ * def _init(self): # <<<<<<<<<<<<<< @@ -13283,7 +13284,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement__init(struct __pyx_obj_ return __pyx_r; } -/* "lxml/objectify.pyx":818 +/* "lxml/objectify.pyx":819 * self._parse_value = __parseBool * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -13311,21 +13312,21 @@ static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj int __pyx_t_2; __Pyx_RefNannySetupContext("__nonzero__", 0); - /* "lxml/objectify.pyx":819 + /* "lxml/objectify.pyx":820 * * def __nonzero__(self): * return __parseBool(textOf(self._c_node)) # <<<<<<<<<<<<<< * * def __richcmp__(self, other, int op): */ - __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "lxml/objectify.pyx":818 + /* "lxml/objectify.pyx":819 * self._parse_value = __parseBool * * def __nonzero__(self): # <<<<<<<<<<<<<< @@ -13343,7 +13344,7 @@ static int __pyx_pf_4lxml_9objectify_11BoolElement_2__nonzero__(struct __pyx_obj return __pyx_r; } -/* "lxml/objectify.pyx":821 +/* "lxml/objectify.pyx":822 * return __parseBool(textOf(self._c_node)) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -13370,7 +13371,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(struct __p PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__richcmp__", 0); - /* "lxml/objectify.pyx":822 + /* "lxml/objectify.pyx":823 * * def __richcmp__(self, other, int op): * return _richcmpPyvals(self, other, op) # <<<<<<<<<<<<<< @@ -13378,13 +13379,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(struct __p * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__richcmpPyvals(((PyObject *)__pyx_v_self), __pyx_v_other, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":821 + /* "lxml/objectify.pyx":822 * return __parseBool(textOf(self._c_node)) * * def __richcmp__(self, other, int op): # <<<<<<<<<<<<<< @@ -13403,7 +13404,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_4__richcmp__(struct __p return __pyx_r; } -/* "lxml/objectify.pyx":824 +/* "lxml/objectify.pyx":825 * return _richcmpPyvals(self, other, op) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -13432,25 +13433,25 @@ static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_ Py_hash_t __pyx_t_3; __Pyx_RefNannySetupContext("__hash__", 0); - /* "lxml/objectify.pyx":825 + /* "lxml/objectify.pyx":826 * * def __hash__(self): * return hash(__parseBool(textOf(self._c_node))) # <<<<<<<<<<<<<< * * def __str__(self): */ - __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_hash_t)-1))) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_3 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_hash_t)-1))) __PYX_ERR(0, 826, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; goto __pyx_L0; - /* "lxml/objectify.pyx":824 + /* "lxml/objectify.pyx":825 * return _richcmpPyvals(self, other, op) * * def __hash__(self): # <<<<<<<<<<<<<< @@ -13469,7 +13470,7 @@ static Py_hash_t __pyx_pf_4lxml_9objectify_11BoolElement_6__hash__(struct __pyx_ return __pyx_r; } -/* "lxml/objectify.pyx":827 +/* "lxml/objectify.pyx":828 * return hash(__parseBool(textOf(self._c_node))) * * def __str__(self): # <<<<<<<<<<<<<< @@ -13498,7 +13499,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_o PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "lxml/objectify.pyx":828 + /* "lxml/objectify.pyx":829 * * def __str__(self): * return unicode(__parseBool(textOf(self._c_node))) # <<<<<<<<<<<<<< @@ -13506,20 +13507,20 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_o * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":827 + /* "lxml/objectify.pyx":828 * return hash(__parseBool(textOf(self._c_node))) * * def __str__(self): # <<<<<<<<<<<<<< @@ -13539,7 +13540,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_8__str__(struct __pyx_o return __pyx_r; } -/* "lxml/objectify.pyx":830 +/* "lxml/objectify.pyx":831 * return unicode(__parseBool(textOf(self._c_node))) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13568,28 +13569,28 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/objectify.pyx":831 + /* "lxml/objectify.pyx":832 * * def __repr__(self): * return repr(__parseBool(textOf(self._c_node))) # <<<<<<<<<<<<<< * - * property pyval: + * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":830 + /* "lxml/objectify.pyx":831 * return unicode(__parseBool(textOf(self._c_node))) * * def __repr__(self): # <<<<<<<<<<<<<< @@ -13609,11 +13610,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_10__repr__(struct __pyx return __pyx_r; } -/* "lxml/objectify.pyx":834 +/* "lxml/objectify.pyx":835 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return __parseBool(textOf(self._c_node)) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return __parseBool(textOf(self._c_node)) * */ @@ -13637,29 +13638,29 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct _ int __pyx_t_2; __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/objectify.pyx":835 - * property pyval: - * def __get__(self): - * return __parseBool(textOf(self._c_node)) # <<<<<<<<<<<<<< + /* "lxml/objectify.pyx":836 + * @property + * def pyval(self): + * return __parseBool(textOf(self._c_node)) # <<<<<<<<<<<<<< * * def __checkBool(s): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_self->__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify___parseBool(__pyx_t_1, 0); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 835, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":834 + /* "lxml/objectify.pyx":835 * - * property pyval: - * def __get__(self): # <<<<<<<<<<<<<< - * return __parseBool(textOf(self._c_node)) + * @property + * def pyval(self): # <<<<<<<<<<<<<< + * return __parseBool(textOf(self._c_node)) * */ @@ -13674,8 +13675,8 @@ static PyObject *__pyx_pf_4lxml_9objectify_11BoolElement_5pyval___get__(struct _ return __pyx_r; } -/* "lxml/objectify.pyx":837 - * return __parseBool(textOf(self._c_node)) +/* "lxml/objectify.pyx":838 + * return __parseBool(textOf(self._c_node)) * * def __checkBool(s): # <<<<<<<<<<<<<< * cdef int value = -1 @@ -13705,7 +13706,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * int __pyx_t_3; __Pyx_RefNannySetupContext("__checkBool", 0); - /* "lxml/objectify.pyx":838 + /* "lxml/objectify.pyx":839 * * def __checkBool(s): * cdef int value = -1 # <<<<<<<<<<<<<< @@ -13714,7 +13715,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * */ __pyx_v_value = -1; - /* "lxml/objectify.pyx":839 + /* "lxml/objectify.pyx":840 * def __checkBool(s): * cdef int value = -1 * if s is not None: # <<<<<<<<<<<<<< @@ -13725,17 +13726,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":840 + /* "lxml/objectify.pyx":841 * cdef int value = -1 * if s is not None: * value = __parseBoolAsInt(s) # <<<<<<<<<<<<<< * if value == -1: * raise ValueError */ - __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 841, __pyx_L1_error) __pyx_v_value = __pyx_t_3; - /* "lxml/objectify.pyx":839 + /* "lxml/objectify.pyx":840 * def __checkBool(s): * cdef int value = -1 * if s is not None: # <<<<<<<<<<<<<< @@ -13744,7 +13745,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":841 + /* "lxml/objectify.pyx":842 * if s is not None: * value = __parseBoolAsInt(s) * if value == -1: # <<<<<<<<<<<<<< @@ -13754,7 +13755,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * __pyx_t_2 = ((__pyx_v_value == -1L) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/objectify.pyx":842 + /* "lxml/objectify.pyx":843 * value = __parseBoolAsInt(s) * if value == -1: * raise ValueError # <<<<<<<<<<<<<< @@ -13762,9 +13763,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * * cpdef bint __parseBool(s) except -1: */ __Pyx_Raise(__pyx_builtin_ValueError, 0, 0, 0); - __PYX_ERR(0, 842, __pyx_L1_error) + __PYX_ERR(0, 843, __pyx_L1_error) - /* "lxml/objectify.pyx":841 + /* "lxml/objectify.pyx":842 * if s is not None: * value = __parseBoolAsInt(s) * if value == -1: # <<<<<<<<<<<<<< @@ -13773,8 +13774,8 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":837 - * return __parseBool(textOf(self._c_node)) + /* "lxml/objectify.pyx":838 + * return __parseBool(textOf(self._c_node)) * * def __checkBool(s): # <<<<<<<<<<<<<< * cdef int value = -1 @@ -13793,7 +13794,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_2__checkBool(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":844 +/* "lxml/objectify.pyx":845 * raise ValueError * * cpdef bint __parseBool(s) except -1: # <<<<<<<<<<<<<< @@ -13815,7 +13816,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__parseBool", 0); - /* "lxml/objectify.pyx":846 + /* "lxml/objectify.pyx":847 * cpdef bint __parseBool(s) except -1: * cdef int value * if s is None: # <<<<<<<<<<<<<< @@ -13826,7 +13827,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":847 + /* "lxml/objectify.pyx":848 * cdef int value * if s is None: * return False # <<<<<<<<<<<<<< @@ -13836,7 +13837,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_r = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":846 + /* "lxml/objectify.pyx":847 * cpdef bint __parseBool(s) except -1: * cdef int value * if s is None: # <<<<<<<<<<<<<< @@ -13845,17 +13846,17 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS */ } - /* "lxml/objectify.pyx":848 + /* "lxml/objectify.pyx":849 * if s is None: * return False * value = __parseBoolAsInt(s) # <<<<<<<<<<<<<< * if value == -1: * raise ValueError, f"Invalid boolean value: '{s}'" */ - __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_9objectify___parseBoolAsInt(__pyx_v_s); if (unlikely(__pyx_t_3 == ((int)-2))) __PYX_ERR(0, 849, __pyx_L1_error) __pyx_v_value = __pyx_t_3; - /* "lxml/objectify.pyx":849 + /* "lxml/objectify.pyx":850 * return False * value = __parseBoolAsInt(s) * if value == -1: # <<<<<<<<<<<<<< @@ -13865,14 +13866,14 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_t_2 = ((__pyx_v_value == -1L) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/objectify.pyx":850 + /* "lxml/objectify.pyx":851 * value = __parseBoolAsInt(s) * if value == -1: * raise ValueError, f"Invalid boolean value: '{s}'" # <<<<<<<<<<<<<< * return value * */ - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = 127; @@ -13880,7 +13881,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_t_5 += 24; __Pyx_GIVEREF(__pyx_kp_u_Invalid_boolean_value); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_Invalid_boolean_value); - __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_s, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_s, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_6; __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7); @@ -13891,14 +13892,14 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_t_5 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u__4); - __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_7, 0, 0); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __PYX_ERR(0, 850, __pyx_L1_error) + __PYX_ERR(0, 851, __pyx_L1_error) - /* "lxml/objectify.pyx":849 + /* "lxml/objectify.pyx":850 * return False * value = __parseBoolAsInt(s) * if value == -1: # <<<<<<<<<<<<<< @@ -13907,7 +13908,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS */ } - /* "lxml/objectify.pyx":851 + /* "lxml/objectify.pyx":852 * if value == -1: * raise ValueError, f"Invalid boolean value: '{s}'" * return value # <<<<<<<<<<<<<< @@ -13917,7 +13918,7 @@ static int __pyx_f_4lxml_9objectify___parseBool(PyObject *__pyx_v_s, CYTHON_UNUS __pyx_r = __pyx_v_value; goto __pyx_L0; - /* "lxml/objectify.pyx":844 + /* "lxml/objectify.pyx":845 * raise ValueError * * cpdef bint __parseBool(s) except -1: # <<<<<<<<<<<<<< @@ -13957,8 +13958,8 @@ static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject * PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__parseBool", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 844, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify___parseBool(__pyx_v_s, 0); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; @@ -13975,7 +13976,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_4__parseBool(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":853 +/* "lxml/objectify.pyx":854 * return value * * cdef inline int __parseBoolAsInt(text) except -2: # <<<<<<<<<<<<<< @@ -13989,17 +13990,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p int __pyx_t_1; __Pyx_RefNannySetupContext("__parseBoolAsInt", 0); - /* "lxml/objectify.pyx":854 + /* "lxml/objectify.pyx":855 * * cdef inline int __parseBoolAsInt(text) except -2: * if text == 'false': # <<<<<<<<<<<<<< * return 0 * elif text == 'true': */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_false, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_false, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 855, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/objectify.pyx":855 + /* "lxml/objectify.pyx":856 * cdef inline int __parseBoolAsInt(text) except -2: * if text == 'false': * return 0 # <<<<<<<<<<<<<< @@ -14009,7 +14010,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p __pyx_r = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":854 + /* "lxml/objectify.pyx":855 * * cdef inline int __parseBoolAsInt(text) except -2: * if text == 'false': # <<<<<<<<<<<<<< @@ -14018,17 +14019,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p */ } - /* "lxml/objectify.pyx":856 + /* "lxml/objectify.pyx":857 * if text == 'false': * return 0 * elif text == 'true': # <<<<<<<<<<<<<< * return 1 * elif text == '0': */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 857, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/objectify.pyx":857 + /* "lxml/objectify.pyx":858 * return 0 * elif text == 'true': * return 1 # <<<<<<<<<<<<<< @@ -14038,7 +14039,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p __pyx_r = 1; goto __pyx_L0; - /* "lxml/objectify.pyx":856 + /* "lxml/objectify.pyx":857 * if text == 'false': * return 0 * elif text == 'true': # <<<<<<<<<<<<<< @@ -14047,17 +14048,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p */ } - /* "lxml/objectify.pyx":858 + /* "lxml/objectify.pyx":859 * elif text == 'true': * return 1 * elif text == '0': # <<<<<<<<<<<<<< * return 0 * elif text == '1': */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 858, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_0, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 859, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/objectify.pyx":859 + /* "lxml/objectify.pyx":860 * return 1 * elif text == '0': * return 0 # <<<<<<<<<<<<<< @@ -14067,7 +14068,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p __pyx_r = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":858 + /* "lxml/objectify.pyx":859 * elif text == 'true': * return 1 * elif text == '0': # <<<<<<<<<<<<<< @@ -14076,17 +14077,17 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p */ } - /* "lxml/objectify.pyx":860 + /* "lxml/objectify.pyx":861 * elif text == '0': * return 0 * elif text == '1': # <<<<<<<<<<<<<< * return 1 * return -1 */ - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_1, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_text, __pyx_kp_s_1, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 861, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/objectify.pyx":861 + /* "lxml/objectify.pyx":862 * return 0 * elif text == '1': * return 1 # <<<<<<<<<<<<<< @@ -14096,7 +14097,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p __pyx_r = 1; goto __pyx_L0; - /* "lxml/objectify.pyx":860 + /* "lxml/objectify.pyx":861 * elif text == '0': * return 0 * elif text == '1': # <<<<<<<<<<<<<< @@ -14105,7 +14106,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p */ } - /* "lxml/objectify.pyx":862 + /* "lxml/objectify.pyx":863 * elif text == '1': * return 1 * return -1 # <<<<<<<<<<<<<< @@ -14115,7 +14116,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p __pyx_r = -1; goto __pyx_L0; - /* "lxml/objectify.pyx":853 + /* "lxml/objectify.pyx":854 * return value * * cdef inline int __parseBoolAsInt(text) except -2: # <<<<<<<<<<<<<< @@ -14132,7 +14133,7 @@ static CYTHON_INLINE int __pyx_f_4lxml_9objectify___parseBoolAsInt(PyObject *__p return __pyx_r; } -/* "lxml/objectify.pyx":864 +/* "lxml/objectify.pyx":865 * return -1 * * cdef object _parseNumber(NumberElement element): # <<<<<<<<<<<<<< @@ -14149,7 +14150,7 @@ static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9o PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_parseNumber", 0); - /* "lxml/objectify.pyx":865 + /* "lxml/objectify.pyx":866 * * cdef object _parseNumber(NumberElement element): * return element._parse_value(textOf(element._c_node)) # <<<<<<<<<<<<<< @@ -14157,7 +14158,7 @@ static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9o * cdef object _strValueOf(obj): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error) + __pyx_t_2 = textOf(__pyx_v_element->__pyx_base.__pyx_base.__pyx_base.__pyx_base._c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_element->_parse_value); __pyx_t_3 = __pyx_v_element->_parse_value; __pyx_t_4 = NULL; @@ -14173,14 +14174,14 @@ static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9o __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":864 + /* "lxml/objectify.pyx":865 * return -1 * * cdef object _parseNumber(NumberElement element): # <<<<<<<<<<<<<< @@ -14202,7 +14203,7 @@ static PyObject *__pyx_f_4lxml_9objectify__parseNumber(struct __pyx_obj_4lxml_9o return __pyx_r; } -/* "lxml/objectify.pyx":867 +/* "lxml/objectify.pyx":868 * return element._parse_value(textOf(element._c_node)) * * cdef object _strValueOf(obj): # <<<<<<<<<<<<<< @@ -14219,7 +14220,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("_strValueOf", 0); - /* "lxml/objectify.pyx":868 + /* "lxml/objectify.pyx":869 * * cdef object _strValueOf(obj): * if python._isString(obj): # <<<<<<<<<<<<<< @@ -14229,7 +14230,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_t_1 = (_isString(__pyx_v_obj) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":869 + /* "lxml/objectify.pyx":870 * cdef object _strValueOf(obj): * if python._isString(obj): * return obj # <<<<<<<<<<<<<< @@ -14241,7 +14242,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "lxml/objectify.pyx":868 + /* "lxml/objectify.pyx":869 * * cdef object _strValueOf(obj): * if python._isString(obj): # <<<<<<<<<<<<<< @@ -14250,7 +14251,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { */ } - /* "lxml/objectify.pyx":870 + /* "lxml/objectify.pyx":871 * if python._isString(obj): * return obj * if isinstance(obj, _Element): # <<<<<<<<<<<<<< @@ -14261,7 +14262,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":871 + /* "lxml/objectify.pyx":872 * return obj * if isinstance(obj, _Element): * return textOf((<_Element>obj)._c_node) or u'' # <<<<<<<<<<<<<< @@ -14269,9 +14270,9 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { * return u'' */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_4 = textOf(((struct LxmlElement *)__pyx_v_obj)->_c_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 872, __pyx_L1_error) if (!__pyx_t_2) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -14287,7 +14288,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":870 + /* "lxml/objectify.pyx":871 * if python._isString(obj): * return obj * if isinstance(obj, _Element): # <<<<<<<<<<<<<< @@ -14296,7 +14297,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { */ } - /* "lxml/objectify.pyx":872 + /* "lxml/objectify.pyx":873 * if isinstance(obj, _Element): * return textOf((<_Element>obj)._c_node) or u'' * if obj is None: # <<<<<<<<<<<<<< @@ -14307,7 +14308,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":873 + /* "lxml/objectify.pyx":874 * return textOf((<_Element>obj)._c_node) or u'' * if obj is None: * return u'' # <<<<<<<<<<<<<< @@ -14319,7 +14320,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { __pyx_r = __pyx_kp_u_; goto __pyx_L0; - /* "lxml/objectify.pyx":872 + /* "lxml/objectify.pyx":873 * if isinstance(obj, _Element): * return textOf((<_Element>obj)._c_node) or u'' * if obj is None: # <<<<<<<<<<<<<< @@ -14328,7 +14329,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { */ } - /* "lxml/objectify.pyx":874 + /* "lxml/objectify.pyx":875 * if obj is None: * return u'' * return unicode(obj) # <<<<<<<<<<<<<< @@ -14336,13 +14337,13 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { * cdef object _numericValueOf(obj): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Unicode(__pyx_v_obj); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":867 + /* "lxml/objectify.pyx":868 * return element._parse_value(textOf(element._c_node)) * * cdef object _strValueOf(obj): # <<<<<<<<<<<<<< @@ -14362,7 +14363,7 @@ static PyObject *__pyx_f_4lxml_9objectify__strValueOf(PyObject *__pyx_v_obj) { return __pyx_r; } -/* "lxml/objectify.pyx":876 +/* "lxml/objectify.pyx":877 * return unicode(obj) * * cdef object _numericValueOf(obj): # <<<<<<<<<<<<<< @@ -14382,7 +14383,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) int __pyx_t_7; __Pyx_RefNannySetupContext("_numericValueOf", 0); - /* "lxml/objectify.pyx":877 + /* "lxml/objectify.pyx":878 * * cdef object _numericValueOf(obj): * if isinstance(obj, NumberElement): # <<<<<<<<<<<<<< @@ -14393,7 +14394,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":878 + /* "lxml/objectify.pyx":879 * cdef object _numericValueOf(obj): * if isinstance(obj, NumberElement): * return _parseNumber(obj) # <<<<<<<<<<<<<< @@ -14401,13 +14402,13 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) * # not always numeric, but Python will raise the right exception */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_3 = __pyx_f_4lxml_9objectify__parseNumber(((struct __pyx_obj_4lxml_9objectify_NumberElement *)__pyx_v_obj)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":877 + /* "lxml/objectify.pyx":878 * * cdef object _numericValueOf(obj): * if isinstance(obj, NumberElement): # <<<<<<<<<<<<<< @@ -14416,7 +14417,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) */ } - /* "lxml/objectify.pyx":879 + /* "lxml/objectify.pyx":880 * if isinstance(obj, NumberElement): * return _parseNumber(obj) * try: # <<<<<<<<<<<<<< @@ -14432,7 +14433,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/objectify.pyx":881 + /* "lxml/objectify.pyx":882 * try: * # not always numeric, but Python will raise the right exception * return obj.pyval # <<<<<<<<<<<<<< @@ -14440,13 +14441,13 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) * pass */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_pyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L4_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_pyval); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L8_try_return; - /* "lxml/objectify.pyx":879 + /* "lxml/objectify.pyx":880 * if isinstance(obj, NumberElement): * return _parseNumber(obj) * try: # <<<<<<<<<<<<<< @@ -14457,7 +14458,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) __pyx_L4_error:; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":882 + /* "lxml/objectify.pyx":883 * # not always numeric, but Python will raise the right exception * return obj.pyval * except AttributeError: # <<<<<<<<<<<<<< @@ -14472,7 +14473,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "lxml/objectify.pyx":879 + /* "lxml/objectify.pyx":880 * if isinstance(obj, NumberElement): * return _parseNumber(obj) * try: # <<<<<<<<<<<<<< @@ -14497,7 +14498,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); } - /* "lxml/objectify.pyx":884 + /* "lxml/objectify.pyx":885 * except AttributeError: * pass * return obj # <<<<<<<<<<<<<< @@ -14509,7 +14510,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) __pyx_r = __pyx_v_obj; goto __pyx_L0; - /* "lxml/objectify.pyx":876 + /* "lxml/objectify.pyx":877 * return unicode(obj) * * cdef object _numericValueOf(obj): # <<<<<<<<<<<<<< @@ -14528,7 +14529,7 @@ static PyObject *__pyx_f_4lxml_9objectify__numericValueOf(PyObject *__pyx_v_obj) return __pyx_r; } -/* "lxml/objectify.pyx":886 +/* "lxml/objectify.pyx":887 * return obj * * cdef _richcmpPyvals(left, right, int op): # <<<<<<<<<<<<<< @@ -14544,31 +14545,31 @@ static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, __Pyx_INCREF(__pyx_v_left); __Pyx_INCREF(__pyx_v_right); - /* "lxml/objectify.pyx":887 + /* "lxml/objectify.pyx":888 * * cdef _richcmpPyvals(left, right, int op): * left = getattr(left, 'pyval', left) # <<<<<<<<<<<<<< * right = getattr(right, 'pyval', right) * return python.PyObject_RichCompare(left, right, op) */ - __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, __pyx_n_s_pyval, __pyx_v_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 887, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_left, __pyx_n_s_pyval, __pyx_v_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_left, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":888 + /* "lxml/objectify.pyx":889 * cdef _richcmpPyvals(left, right, int op): * left = getattr(left, 'pyval', left) * right = getattr(right, 'pyval', right) # <<<<<<<<<<<<<< * return python.PyObject_RichCompare(left, right, op) * */ - __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, __pyx_n_s_pyval, __pyx_v_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(__pyx_v_right, __pyx_n_s_pyval, __pyx_v_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_right, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":889 + /* "lxml/objectify.pyx":890 * left = getattr(left, 'pyval', left) * right = getattr(right, 'pyval', right) * return python.PyObject_RichCompare(left, right, op) # <<<<<<<<<<<<<< @@ -14576,13 +14577,13 @@ static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_left, __pyx_v_right, __pyx_v_op); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":886 + /* "lxml/objectify.pyx":887 * return obj * * cdef _richcmpPyvals(left, right, int op): # <<<<<<<<<<<<<< @@ -14603,7 +14604,7 @@ static PyObject *__pyx_f_4lxml_9objectify__richcmpPyvals(PyObject *__pyx_v_left, return __pyx_r; } -/* "lxml/objectify.pyx":920 +/* "lxml/objectify.pyx":921 * cdef object _type * cdef list _schema_types * def __init__(self, name, type_check, type_class, stringify=None): # <<<<<<<<<<<<<< @@ -14649,13 +14650,13 @@ static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_check)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 920, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 921, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_type_class)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 920, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 921, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -14665,7 +14666,7 @@ static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 920, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 921, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -14685,7 +14686,7 @@ static int __pyx_pw_4lxml_9objectify_6PyType_1__init__(PyObject *__pyx_v_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 920, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 921, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.PyType.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -14709,7 +14710,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_INCREF(__pyx_v_name); __Pyx_INCREF(__pyx_v_stringify); - /* "lxml/objectify.pyx":921 + /* "lxml/objectify.pyx":922 * cdef list _schema_types * def __init__(self, name, type_check, type_class, stringify=None): * if isinstance(name, bytes): # <<<<<<<<<<<<<< @@ -14720,7 +14721,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":922 + /* "lxml/objectify.pyx":923 * def __init__(self, name, type_check, type_class, stringify=None): * if isinstance(name, bytes): * name = (name).decode('ascii') # <<<<<<<<<<<<<< @@ -14729,14 +14730,14 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob */ if (unlikely(__pyx_v_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 922, __pyx_L1_error) + __PYX_ERR(0, 923, __pyx_L1_error) } - __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 922, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 923, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":921 + /* "lxml/objectify.pyx":922 * cdef list _schema_types * def __init__(self, name, type_check, type_class, stringify=None): * if isinstance(name, bytes): # <<<<<<<<<<<<<< @@ -14746,7 +14747,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob goto __pyx_L3; } - /* "lxml/objectify.pyx":923 + /* "lxml/objectify.pyx":924 * if isinstance(name, bytes): * name = (name).decode('ascii') * elif not isinstance(name, unicode): # <<<<<<<<<<<<<< @@ -14757,7 +14758,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0); if (unlikely(__pyx_t_1)) { - /* "lxml/objectify.pyx":924 + /* "lxml/objectify.pyx":925 * name = (name).decode('ascii') * elif not isinstance(name, unicode): * raise TypeError, u"Type name must be a string" # <<<<<<<<<<<<<< @@ -14765,9 +14766,9 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob * raise TypeError, u"Type check function must be callable (or None)" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_name_must_be_a_string, 0, 0); - __PYX_ERR(0, 924, __pyx_L1_error) + __PYX_ERR(0, 925, __pyx_L1_error) - /* "lxml/objectify.pyx":923 + /* "lxml/objectify.pyx":924 * if isinstance(name, bytes): * name = (name).decode('ascii') * elif not isinstance(name, unicode): # <<<<<<<<<<<<<< @@ -14777,7 +14778,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob } __pyx_L3:; - /* "lxml/objectify.pyx":925 + /* "lxml/objectify.pyx":926 * elif not isinstance(name, unicode): * raise TypeError, u"Type name must be a string" * if type_check is not None and not callable(type_check): # <<<<<<<<<<<<<< @@ -14791,13 +14792,13 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __pyx_t_1 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_v_type_check); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 925, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyCallable_Check(__pyx_v_type_check); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 926, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_4 != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L5_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "lxml/objectify.pyx":926 + /* "lxml/objectify.pyx":927 * raise TypeError, u"Type name must be a string" * if type_check is not None and not callable(type_check): * raise TypeError, u"Type check function must be callable (or None)" # <<<<<<<<<<<<<< @@ -14805,9 +14806,9 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob * not issubclass(type_class, ObjectifiedDataElement): */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Type_check_function_must_be_call, 0, 0); - __PYX_ERR(0, 926, __pyx_L1_error) + __PYX_ERR(0, 927, __pyx_L1_error) - /* "lxml/objectify.pyx":925 + /* "lxml/objectify.pyx":926 * elif not isinstance(name, unicode): * raise TypeError, u"Type name must be a string" * if type_check is not None and not callable(type_check): # <<<<<<<<<<<<<< @@ -14816,33 +14817,33 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob */ } - /* "lxml/objectify.pyx":927 + /* "lxml/objectify.pyx":928 * if type_check is not None and not callable(type_check): * raise TypeError, u"Type check function must be callable (or None)" * if name != TREE_PYTYPE_NAME and \ # <<<<<<<<<<<<<< * not issubclass(type_class, ObjectifiedDataElement): * raise TypeError, \ */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 927, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 928, __pyx_L1_error) if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L8_bool_binop_done; } - /* "lxml/objectify.pyx":928 + /* "lxml/objectify.pyx":929 * raise TypeError, u"Type check function must be callable (or None)" * if name != TREE_PYTYPE_NAME and \ * not issubclass(type_class, ObjectifiedDataElement): # <<<<<<<<<<<<<< * raise TypeError, \ * u"Data classes must inherit from ObjectifiedDataElement" */ - __pyx_t_2 = PyObject_IsSubclass(__pyx_v_type_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 928, __pyx_L1_error) + __pyx_t_2 = PyObject_IsSubclass(__pyx_v_type_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedDataElement)); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 929, __pyx_L1_error) __pyx_t_4 = ((!(__pyx_t_2 != 0)) != 0); __pyx_t_1 = __pyx_t_4; __pyx_L8_bool_binop_done:; - /* "lxml/objectify.pyx":927 + /* "lxml/objectify.pyx":928 * if type_check is not None and not callable(type_check): * raise TypeError, u"Type check function must be callable (or None)" * if name != TREE_PYTYPE_NAME and \ # <<<<<<<<<<<<<< @@ -14851,7 +14852,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob */ if (unlikely(__pyx_t_1)) { - /* "lxml/objectify.pyx":929 + /* "lxml/objectify.pyx":930 * if name != TREE_PYTYPE_NAME and \ * not issubclass(type_class, ObjectifiedDataElement): * raise TypeError, \ # <<<<<<<<<<<<<< @@ -14859,9 +14860,9 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob * self.name = name */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_Data_classes_must_inherit_from_O, 0, 0); - __PYX_ERR(0, 929, __pyx_L1_error) + __PYX_ERR(0, 930, __pyx_L1_error) - /* "lxml/objectify.pyx":927 + /* "lxml/objectify.pyx":928 * if type_check is not None and not callable(type_check): * raise TypeError, u"Type check function must be callable (or None)" * if name != TREE_PYTYPE_NAME and \ # <<<<<<<<<<<<<< @@ -14870,7 +14871,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob */ } - /* "lxml/objectify.pyx":931 + /* "lxml/objectify.pyx":932 * raise TypeError, \ * u"Data classes must inherit from ObjectifiedDataElement" * self.name = name # <<<<<<<<<<<<<< @@ -14883,7 +14884,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = __pyx_v_name; - /* "lxml/objectify.pyx":932 + /* "lxml/objectify.pyx":933 * u"Data classes must inherit from ObjectifiedDataElement" * self.name = name * self._type = type_class # <<<<<<<<<<<<<< @@ -14896,7 +14897,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_DECREF(__pyx_v_self->_type); __pyx_v_self->_type = __pyx_v_type_class; - /* "lxml/objectify.pyx":933 + /* "lxml/objectify.pyx":934 * self.name = name * self._type = type_class * self.type_check = type_check # <<<<<<<<<<<<<< @@ -14909,7 +14910,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_DECREF(__pyx_v_self->type_check); __pyx_v_self->type_check = __pyx_v_type_check; - /* "lxml/objectify.pyx":934 + /* "lxml/objectify.pyx":935 * self._type = type_class * self.type_check = type_check * if stringify is None: # <<<<<<<<<<<<<< @@ -14920,7 +14921,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __pyx_t_4 = (__pyx_t_1 != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":935 + /* "lxml/objectify.pyx":936 * self.type_check = type_check * if stringify is None: * stringify = unicode # <<<<<<<<<<<<<< @@ -14930,7 +14931,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_INCREF(((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF_SET(__pyx_v_stringify, ((PyObject *)(&PyUnicode_Type))); - /* "lxml/objectify.pyx":934 + /* "lxml/objectify.pyx":935 * self._type = type_class * self.type_check = type_check * if stringify is None: # <<<<<<<<<<<<<< @@ -14939,7 +14940,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob */ } - /* "lxml/objectify.pyx":936 + /* "lxml/objectify.pyx":937 * if stringify is None: * stringify = unicode * self.stringify = stringify # <<<<<<<<<<<<<< @@ -14952,14 +14953,14 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __Pyx_DECREF(__pyx_v_self->stringify); __pyx_v_self->stringify = __pyx_v_stringify; - /* "lxml/objectify.pyx":937 + /* "lxml/objectify.pyx":938 * stringify = unicode * self.stringify = stringify * self._schema_types = [] # <<<<<<<<<<<<<< * * def __repr__(self): */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_schema_types); @@ -14967,7 +14968,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":920 + /* "lxml/objectify.pyx":921 * cdef object _type * cdef list _schema_types * def __init__(self, name, type_check, type_class, stringify=None): # <<<<<<<<<<<<<< @@ -14989,7 +14990,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType___init__(struct __pyx_obj_4lxml_9ob return __pyx_r; } -/* "lxml/objectify.pyx":939 +/* "lxml/objectify.pyx":940 * self._schema_types = [] * * def __repr__(self): # <<<<<<<<<<<<<< @@ -15017,7 +15018,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4l PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "lxml/objectify.pyx":940 + /* "lxml/objectify.pyx":941 * * def __repr__(self): * return "PyType(%s, %s)" % (self.name, self._type.__name__) # <<<<<<<<<<<<<< @@ -15025,9 +15026,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4l * def register(self, before=None, after=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_type, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->_type, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 940, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -15035,14 +15036,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4l __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_PyType_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 940, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_PyType_s_s, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":939 + /* "lxml/objectify.pyx":940 * self._schema_types = [] * * def __repr__(self): # <<<<<<<<<<<<<< @@ -15062,7 +15063,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_2__repr__(struct __pyx_obj_4l return __pyx_r; } -/* "lxml/objectify.pyx":942 +/* "lxml/objectify.pyx":943 * return "PyType(%s, %s)" % (self.name, self._type.__name__) * * def register(self, before=None, after=None): # <<<<<<<<<<<<<< @@ -15111,7 +15112,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) __PYX_ERR(0, 942, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "register") < 0)) __PYX_ERR(0, 943, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -15128,7 +15129,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_6PyType_5register(PyObject *__pyx_v_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 942, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("register", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 943, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.PyType.register", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15168,17 +15169,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_v_before); __Pyx_INCREF(__pyx_v_after); - /* "lxml/objectify.pyx":952 + /* "lxml/objectify.pyx":953 * ignored. Raises ValueError if the dependencies cannot be fulfilled. * """ * if self.name == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< * raise ValueError, u"Cannot register tree type" * if self.type_check is not None: */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 952, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->name, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 953, __pyx_L1_error) if (unlikely(__pyx_t_1)) { - /* "lxml/objectify.pyx":953 + /* "lxml/objectify.pyx":954 * """ * if self.name == TREE_PYTYPE_NAME: * raise ValueError, u"Cannot register tree type" # <<<<<<<<<<<<<< @@ -15186,9 +15187,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l * for item in _TYPE_CHECKS: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Cannot_register_tree_type, 0, 0); - __PYX_ERR(0, 953, __pyx_L1_error) + __PYX_ERR(0, 954, __pyx_L1_error) - /* "lxml/objectify.pyx":952 + /* "lxml/objectify.pyx":953 * ignored. Raises ValueError if the dependencies cannot be fulfilled. * """ * if self.name == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< @@ -15197,7 +15198,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":954 + /* "lxml/objectify.pyx":955 * if self.name == TREE_PYTYPE_NAME: * raise ValueError, u"Cannot register tree type" * if self.type_check is not None: # <<<<<<<<<<<<<< @@ -15208,7 +15209,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":955 + /* "lxml/objectify.pyx":956 * raise ValueError, u"Cannot register tree type" * if self.type_check is not None: * for item in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -15217,46 +15218,46 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 955, __pyx_L1_error) + __PYX_ERR(0, 956, __pyx_L1_error) } __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 955, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 956, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 955, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_item, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":956 + /* "lxml/objectify.pyx":957 * if self.type_check is not None: * for item in _TYPE_CHECKS: * if item[0] is self.type_check: # <<<<<<<<<<<<<< * _TYPE_CHECKS.remove(item) * break */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_item, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = (__pyx_t_5 == __pyx_v_self->type_check); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":957 + /* "lxml/objectify.pyx":958 * for item in _TYPE_CHECKS: * if item[0] is self.type_check: * _TYPE_CHECKS.remove(item) # <<<<<<<<<<<<<< * break * entry = (self.type_check, self) */ - __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 957, __pyx_L1_error) + __pyx_t_5 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_item); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":958 + /* "lxml/objectify.pyx":959 * if item[0] is self.type_check: * _TYPE_CHECKS.remove(item) * break # <<<<<<<<<<<<<< @@ -15265,7 +15266,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ goto __pyx_L6_break; - /* "lxml/objectify.pyx":956 + /* "lxml/objectify.pyx":957 * if self.type_check is not None: * for item in _TYPE_CHECKS: * if item[0] is self.type_check: # <<<<<<<<<<<<<< @@ -15274,7 +15275,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":955 + /* "lxml/objectify.pyx":956 * raise ValueError, u"Cannot register tree type" * if self.type_check is not None: * for item in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -15285,14 +15286,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_L6_break:; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":959 + /* "lxml/objectify.pyx":960 * _TYPE_CHECKS.remove(item) * break * entry = (self.type_check, self) # <<<<<<<<<<<<<< * first_pos = 0 * last_pos = -1 */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 959, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 960, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_self->type_check); __Pyx_GIVEREF(__pyx_v_self->type_check); @@ -15303,7 +15304,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_v_entry = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":960 + /* "lxml/objectify.pyx":961 * break * entry = (self.type_check, self) * first_pos = 0 # <<<<<<<<<<<<<< @@ -15313,7 +15314,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_int_0); __pyx_v_first_pos = __pyx_int_0; - /* "lxml/objectify.pyx":961 + /* "lxml/objectify.pyx":962 * entry = (self.type_check, self) * first_pos = 0 * last_pos = -1 # <<<<<<<<<<<<<< @@ -15323,25 +15324,25 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_int_neg_1); __pyx_v_last_pos = __pyx_int_neg_1; - /* "lxml/objectify.pyx":962 + /* "lxml/objectify.pyx":963 * first_pos = 0 * last_pos = -1 * if before or after: # <<<<<<<<<<<<<< * if before is None: * before = () */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_before); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 963, __pyx_L1_error) if (!__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L9_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_after); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 963, __pyx_L1_error) __pyx_t_1 = __pyx_t_2; __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":963 + /* "lxml/objectify.pyx":964 * last_pos = -1 * if before or after: * if before is None: # <<<<<<<<<<<<<< @@ -15352,7 +15353,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":964 + /* "lxml/objectify.pyx":965 * if before or after: * if before is None: * before = () # <<<<<<<<<<<<<< @@ -15362,7 +15363,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_before, __pyx_empty_tuple); - /* "lxml/objectify.pyx":963 + /* "lxml/objectify.pyx":964 * last_pos = -1 * if before or after: * if before is None: # <<<<<<<<<<<<<< @@ -15372,7 +15373,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l goto __pyx_L11; } - /* "lxml/objectify.pyx":965 + /* "lxml/objectify.pyx":966 * if before is None: * before = () * elif after is None: # <<<<<<<<<<<<<< @@ -15383,7 +15384,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":966 + /* "lxml/objectify.pyx":967 * before = () * elif after is None: * after = () # <<<<<<<<<<<<<< @@ -15393,7 +15394,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_empty_tuple); __Pyx_DECREF_SET(__pyx_v_after, __pyx_empty_tuple); - /* "lxml/objectify.pyx":965 + /* "lxml/objectify.pyx":966 * if before is None: * before = () * elif after is None: # <<<<<<<<<<<<<< @@ -15403,7 +15404,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l } __pyx_L11:; - /* "lxml/objectify.pyx":967 + /* "lxml/objectify.pyx":968 * elif after is None: * after = () * for i, (check, pytype) in enumerate(_TYPE_CHECKS): # <<<<<<<<<<<<<< @@ -15416,9 +15417,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_4); __Pyx_INCREF(__pyx_t_6); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 968, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { @@ -15427,7 +15428,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 967, __pyx_L1_error) + __PYX_ERR(0, 968, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15440,15 +15441,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -15456,7 +15457,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 967, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 968, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L15_unpacking_done; @@ -15464,7 +15465,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 967, __pyx_L1_error) + __PYX_ERR(0, 968, __pyx_L1_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_7); @@ -15473,38 +15474,38 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __pyx_t_8 = 0; __Pyx_INCREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/objectify.pyx":968 + /* "lxml/objectify.pyx":969 * after = () * for i, (check, pytype) in enumerate(_TYPE_CHECKS): * if last_pos == -1 and pytype.name in before: # <<<<<<<<<<<<<< * last_pos = i * if pytype.name in after: */ - __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_2) { } else { __pyx_t_1 = __pyx_t_2; goto __pyx_L17_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_before, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_before, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 969, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = (__pyx_t_2 != 0); __pyx_t_1 = __pyx_t_11; __pyx_L17_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":969 + /* "lxml/objectify.pyx":970 * for i, (check, pytype) in enumerate(_TYPE_CHECKS): * if last_pos == -1 and pytype.name in before: * last_pos = i # <<<<<<<<<<<<<< @@ -15514,7 +15515,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_INCREF(__pyx_v_i); __Pyx_DECREF_SET(__pyx_v_last_pos, __pyx_v_i); - /* "lxml/objectify.pyx":968 + /* "lxml/objectify.pyx":969 * after = () * for i, (check, pytype) in enumerate(_TYPE_CHECKS): * if last_pos == -1 and pytype.name in before: # <<<<<<<<<<<<<< @@ -15523,33 +15524,33 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":970 + /* "lxml/objectify.pyx":971 * if last_pos == -1 and pytype.name in before: * last_pos = i * if pytype.name in after: # <<<<<<<<<<<<<< * first_pos = i+1 * if last_pos == -1: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 970, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_after, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 970, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_v_after, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_11 = (__pyx_t_1 != 0); if (__pyx_t_11) { - /* "lxml/objectify.pyx":971 + /* "lxml/objectify.pyx":972 * last_pos = i * if pytype.name in after: * first_pos = i+1 # <<<<<<<<<<<<<< * if last_pos == -1: * _TYPE_CHECKS.append(entry) */ - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 972, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_first_pos, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":970 + /* "lxml/objectify.pyx":971 * if last_pos == -1 and pytype.name in before: * last_pos = i * if pytype.name in after: # <<<<<<<<<<<<<< @@ -15558,7 +15559,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":967 + /* "lxml/objectify.pyx":968 * elif after is None: * after = () * for i, (check, pytype) in enumerate(_TYPE_CHECKS): # <<<<<<<<<<<<<< @@ -15569,7 +15570,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":962 + /* "lxml/objectify.pyx":963 * first_pos = 0 * last_pos = -1 * if before or after: # <<<<<<<<<<<<<< @@ -15578,20 +15579,20 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":972 + /* "lxml/objectify.pyx":973 * if pytype.name in after: * first_pos = i+1 * if last_pos == -1: # <<<<<<<<<<<<<< * _TYPE_CHECKS.append(entry) * elif first_pos > last_pos: */ - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_last_pos, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 973, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_11) { - /* "lxml/objectify.pyx":973 + /* "lxml/objectify.pyx":974 * first_pos = i+1 * if last_pos == -1: * _TYPE_CHECKS.append(entry) # <<<<<<<<<<<<<< @@ -15600,11 +15601,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 973, __pyx_L1_error) + __PYX_ERR(0, 974, __pyx_L1_error) } - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 974, __pyx_L1_error) - /* "lxml/objectify.pyx":972 + /* "lxml/objectify.pyx":973 * if pytype.name in after: * first_pos = i+1 * if last_pos == -1: # <<<<<<<<<<<<<< @@ -15614,19 +15615,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l goto __pyx_L20; } - /* "lxml/objectify.pyx":974 + /* "lxml/objectify.pyx":975 * if last_pos == -1: * _TYPE_CHECKS.append(entry) * elif first_pos > last_pos: # <<<<<<<<<<<<<< * raise ValueError, u"inconsistent before/after dependencies" * else: */ - __pyx_t_3 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 974, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_first_pos, __pyx_v_last_pos, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 975, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 975, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_t_11)) { - /* "lxml/objectify.pyx":975 + /* "lxml/objectify.pyx":976 * _TYPE_CHECKS.append(entry) * elif first_pos > last_pos: * raise ValueError, u"inconsistent before/after dependencies" # <<<<<<<<<<<<<< @@ -15634,9 +15635,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l * _TYPE_CHECKS.insert(last_pos, entry) */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_inconsistent_before_after_depend, 0, 0); - __PYX_ERR(0, 975, __pyx_L1_error) + __PYX_ERR(0, 976, __pyx_L1_error) - /* "lxml/objectify.pyx":974 + /* "lxml/objectify.pyx":975 * if last_pos == -1: * _TYPE_CHECKS.append(entry) * elif first_pos > last_pos: # <<<<<<<<<<<<<< @@ -15645,7 +15646,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":977 + /* "lxml/objectify.pyx":978 * raise ValueError, u"inconsistent before/after dependencies" * else: * _TYPE_CHECKS.insert(last_pos, entry) # <<<<<<<<<<<<<< @@ -15655,14 +15656,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l /*else*/ { if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "insert"); - __PYX_ERR(0, 977, __pyx_L1_error) + __PYX_ERR(0, 978, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 977, __pyx_L1_error) - __pyx_t_12 = PyList_Insert(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_4, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 977, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyIndex_AsSsize_t(__pyx_v_last_pos); if (unlikely((__pyx_t_4 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_12 = PyList_Insert(__pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_4, __pyx_v_entry); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 978, __pyx_L1_error) } __pyx_L20:; - /* "lxml/objectify.pyx":954 + /* "lxml/objectify.pyx":955 * if self.name == TREE_PYTYPE_NAME: * raise ValueError, u"Cannot register tree type" * if self.type_check is not None: # <<<<<<<<<<<<<< @@ -15671,7 +15672,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":979 + /* "lxml/objectify.pyx":980 * _TYPE_CHECKS.insert(last_pos, entry) * * _PYTYPE_DICT[self.name] = self # <<<<<<<<<<<<<< @@ -15680,11 +15681,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 979, __pyx_L1_error) + __PYX_ERR(0, 980, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 979, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 980, __pyx_L1_error) - /* "lxml/objectify.pyx":980 + /* "lxml/objectify.pyx":981 * * _PYTYPE_DICT[self.name] = self * for xs_type in self._schema_types: # <<<<<<<<<<<<<< @@ -15693,21 +15694,21 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ if (unlikely(__pyx_v_self->_schema_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 980, __pyx_L1_error) + __PYX_ERR(0, 981, __pyx_L1_error) } __pyx_t_3 = __pyx_v_self->_schema_types; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 981, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 980, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":981 + /* "lxml/objectify.pyx":982 * _PYTYPE_DICT[self.name] = self * for xs_type in self._schema_types: * _SCHEMA_TYPE_DICT[xs_type] = self # <<<<<<<<<<<<<< @@ -15716,11 +15717,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 981, __pyx_L1_error) + __PYX_ERR(0, 982, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 981, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type, ((PyObject *)__pyx_v_self)) < 0)) __PYX_ERR(0, 982, __pyx_L1_error) - /* "lxml/objectify.pyx":980 + /* "lxml/objectify.pyx":981 * * _PYTYPE_DICT[self.name] = self * for xs_type in self._schema_types: # <<<<<<<<<<<<<< @@ -15730,7 +15731,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":942 + /* "lxml/objectify.pyx":943 * return "PyType(%s, %s)" % (self.name, self._type.__name__) * * def register(self, before=None, after=None): # <<<<<<<<<<<<<< @@ -15766,7 +15767,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4register(struct __pyx_obj_4l return __pyx_r; } -/* "lxml/objectify.pyx":983 +/* "lxml/objectify.pyx":984 * _SCHEMA_TYPE_DICT[xs_type] = self * * def unregister(self): # <<<<<<<<<<<<<< @@ -15809,7 +15810,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ int __pyx_t_13; __Pyx_RefNannySetupContext("unregister", 0); - /* "lxml/objectify.pyx":985 + /* "lxml/objectify.pyx":986 * def unregister(self): * u"unregister(self)" * if _PYTYPE_DICT.get(self.name) is self: # <<<<<<<<<<<<<< @@ -15818,16 +15819,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 985, __pyx_L1_error) + __PYX_ERR(0, 986, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 985, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = (__pyx_t_1 == ((PyObject *)__pyx_v_self)); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":986 + /* "lxml/objectify.pyx":987 * u"unregister(self)" * if _PYTYPE_DICT.get(self.name) is self: * del _PYTYPE_DICT[self.name] # <<<<<<<<<<<<<< @@ -15836,11 +15837,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 986, __pyx_L1_error) + __PYX_ERR(0, 987, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name) < 0)) __PYX_ERR(0, 986, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_self->name) < 0)) __PYX_ERR(0, 987, __pyx_L1_error) - /* "lxml/objectify.pyx":985 + /* "lxml/objectify.pyx":986 * def unregister(self): * u"unregister(self)" * if _PYTYPE_DICT.get(self.name) is self: # <<<<<<<<<<<<<< @@ -15849,7 +15850,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ } - /* "lxml/objectify.pyx":987 + /* "lxml/objectify.pyx":988 * if _PYTYPE_DICT.get(self.name) is self: * del _PYTYPE_DICT[self.name] * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): # <<<<<<<<<<<<<< @@ -15858,11 +15859,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 987, __pyx_L1_error) + __PYX_ERR(0, 988, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Items(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; @@ -15870,9 +15871,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 988, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -15881,7 +15882,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 987, __pyx_L1_error) + __PYX_ERR(0, 988, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15894,15 +15895,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -15910,7 +15911,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 987, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 988, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -15918,7 +15919,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 987, __pyx_L1_error) + __PYX_ERR(0, 988, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_xs_type, __pyx_t_6); @@ -15926,7 +15927,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":988 + /* "lxml/objectify.pyx":989 * del _PYTYPE_DICT[self.name] * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): * if pytype is self: # <<<<<<<<<<<<<< @@ -15937,7 +15938,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":989 + /* "lxml/objectify.pyx":990 * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): * if pytype is self: * del _SCHEMA_TYPE_DICT[xs_type] # <<<<<<<<<<<<<< @@ -15946,11 +15947,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 989, __pyx_L1_error) + __PYX_ERR(0, 990, __pyx_L1_error) } - if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type) < 0)) __PYX_ERR(0, 989, __pyx_L1_error) + if (unlikely(PyDict_DelItem(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_xs_type) < 0)) __PYX_ERR(0, 990, __pyx_L1_error) - /* "lxml/objectify.pyx":988 + /* "lxml/objectify.pyx":989 * del _PYTYPE_DICT[self.name] * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): * if pytype is self: # <<<<<<<<<<<<<< @@ -15959,7 +15960,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ } - /* "lxml/objectify.pyx":987 + /* "lxml/objectify.pyx":988 * if _PYTYPE_DICT.get(self.name) is self: * del _PYTYPE_DICT[self.name] * for xs_type, pytype in list(_SCHEMA_TYPE_DICT.items()): # <<<<<<<<<<<<<< @@ -15969,7 +15970,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":990 + /* "lxml/objectify.pyx":991 * if pytype is self: * del _SCHEMA_TYPE_DICT[xs_type] * if self.type_check is None: # <<<<<<<<<<<<<< @@ -15980,7 +15981,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":991 + /* "lxml/objectify.pyx":992 * del _SCHEMA_TYPE_DICT[xs_type] * if self.type_check is None: * return # <<<<<<<<<<<<<< @@ -15991,7 +15992,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":990 + /* "lxml/objectify.pyx":991 * if pytype is self: * del _SCHEMA_TYPE_DICT[xs_type] * if self.type_check is None: # <<<<<<<<<<<<<< @@ -16000,7 +16001,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ */ } - /* "lxml/objectify.pyx":992 + /* "lxml/objectify.pyx":993 * if self.type_check is None: * return * try: # <<<<<<<<<<<<<< @@ -16016,14 +16017,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "lxml/objectify.pyx":993 + /* "lxml/objectify.pyx":994 * return * try: * _TYPE_CHECKS.remove( (self.type_check, self) ) # <<<<<<<<<<<<<< * except ValueError: * pass */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 993, __pyx_L10_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 994, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->type_check); __Pyx_GIVEREF(__pyx_v_self->type_check); @@ -16031,12 +16032,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_INCREF(((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); - __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 993, __pyx_L10_error) + __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyList_Type_remove, __pyx_v_4lxml_9objectify__TYPE_CHECKS, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 994, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":992 + /* "lxml/objectify.pyx":993 * if self.type_check is None: * return * try: # <<<<<<<<<<<<<< @@ -16055,7 +16056,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/objectify.pyx":994 + /* "lxml/objectify.pyx":995 * try: * _TYPE_CHECKS.remove( (self.type_check, self) ) * except ValueError: # <<<<<<<<<<<<<< @@ -16070,7 +16071,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ goto __pyx_L12_except_error; __pyx_L12_except_error:; - /* "lxml/objectify.pyx":992 + /* "lxml/objectify.pyx":993 * if self.type_check is None: * return * try: # <<<<<<<<<<<<<< @@ -16090,7 +16091,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ __pyx_L15_try_end:; } - /* "lxml/objectify.pyx":983 + /* "lxml/objectify.pyx":984 * _SCHEMA_TYPE_DICT[xs_type] = self * * def unregister(self): # <<<<<<<<<<<<<< @@ -16117,7 +16118,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_6unregister(struct __pyx_obj_ return __pyx_r; } -/* "lxml/objectify.pyx":1002 +/* "lxml/objectify.pyx":1003 * Note that this must be set before registering the type! * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -16143,7 +16144,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(stru __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "lxml/objectify.pyx":1003 + /* "lxml/objectify.pyx":1004 * """ * def __get__(self): * return self._schema_types # <<<<<<<<<<<<<< @@ -16155,7 +16156,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(stru __pyx_r = __pyx_v_self->_schema_types; goto __pyx_L0; - /* "lxml/objectify.pyx":1002 + /* "lxml/objectify.pyx":1003 * Note that this must be set before registering the type! * """ * def __get__(self): # <<<<<<<<<<<<<< @@ -16170,7 +16171,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes___get__(stru return __pyx_r; } -/* "lxml/objectify.pyx":1004 +/* "lxml/objectify.pyx":1005 * def __get__(self): * return self._schema_types * def __set__(self, types): # <<<<<<<<<<<<<< @@ -16198,14 +16199,14 @@ static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - /* "lxml/objectify.pyx":1005 + /* "lxml/objectify.pyx":1006 * return self._schema_types * def __set__(self, types): * self._schema_types = list(map(unicode, types)) # <<<<<<<<<<<<<< * * */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)(&PyUnicode_Type))); __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type))); @@ -16213,10 +16214,10 @@ static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __ __Pyx_INCREF(__pyx_v_types); __Pyx_GIVEREF(__pyx_v_types); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_types); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_map, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1006, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -16225,7 +16226,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __ __pyx_v_self->_schema_types = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1004 + /* "lxml/objectify.pyx":1005 * def __get__(self): * return self._schema_types * def __set__(self, types): # <<<<<<<<<<<<<< @@ -16246,7 +16247,7 @@ static int __pyx_pf_4lxml_9objectify_6PyType_14xmlSchemaTypes_2__set__(struct __ return __pyx_r; } -/* "lxml/objectify.pyx":915 +/* "lxml/objectify.pyx":916 * matching type will be used. * """ * cdef readonly object name # <<<<<<<<<<<<<< @@ -16283,7 +16284,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_4name___get__(struct __pyx_ob return __pyx_r; } -/* "lxml/objectify.pyx":916 +/* "lxml/objectify.pyx":917 * """ * cdef readonly object name * cdef readonly object type_check # <<<<<<<<<<<<<< @@ -16320,7 +16321,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_10type_check___get__(struct _ return __pyx_r; } -/* "lxml/objectify.pyx":917 +/* "lxml/objectify.pyx":918 * cdef readonly object name * cdef readonly object type_check * cdef readonly object stringify # <<<<<<<<<<<<<< @@ -16357,7 +16358,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6PyType_9stringify___get__(struct __p return __pyx_r; } -/* "lxml/objectify.pyx":1012 +/* "lxml/objectify.pyx":1013 * cdef list _TYPE_CHECKS = [] * * def __lower_bool(b): # <<<<<<<<<<<<<< @@ -16386,7 +16387,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject int __pyx_t_2; __Pyx_RefNannySetupContext("__lower_bool", 0); - /* "lxml/objectify.pyx":1013 + /* "lxml/objectify.pyx":1014 * * def __lower_bool(b): * return u"true" if b else u"false" # <<<<<<<<<<<<<< @@ -16394,7 +16395,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject * cdef _pytypename(obj): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_b); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1014, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_n_u_true); __pyx_t_1 = __pyx_n_u_true; @@ -16406,7 +16407,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1012 + /* "lxml/objectify.pyx":1013 * cdef list _TYPE_CHECKS = [] * * def __lower_bool(b): # <<<<<<<<<<<<<< @@ -16425,7 +16426,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_6__lower_bool(CYTHON_UNUSED PyObject return __pyx_r; } -/* "lxml/objectify.pyx":1015 +/* "lxml/objectify.pyx":1016 * return u"true" if b else u"false" * * cdef _pytypename(obj): # <<<<<<<<<<<<<< @@ -16440,7 +16441,7 @@ static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) { PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_pytypename", 0); - /* "lxml/objectify.pyx":1016 + /* "lxml/objectify.pyx":1017 * * cdef _pytypename(obj): * return u"str" if python._isString(obj) else _typename(obj) # <<<<<<<<<<<<<< @@ -16452,7 +16453,7 @@ static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) { __Pyx_INCREF(__pyx_n_u_str); __pyx_t_1 = __pyx_n_u_str; } else { - __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify__typename(__pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_t_2; __pyx_t_2 = 0; @@ -16461,7 +16462,7 @@ static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) { __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1015 + /* "lxml/objectify.pyx":1016 * return u"true" if b else u"false" * * cdef _pytypename(obj): # <<<<<<<<<<<<<< @@ -16481,7 +16482,7 @@ static PyObject *__pyx_f_4lxml_9objectify__pytypename(PyObject *__pyx_v_obj) { return __pyx_r; } -/* "lxml/objectify.pyx":1018 +/* "lxml/objectify.pyx":1019 * return u"str" if python._isString(obj) else _typename(obj) * * def pytypename(obj): # <<<<<<<<<<<<<< @@ -16510,7 +16511,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("pytypename", 0); - /* "lxml/objectify.pyx":1023 + /* "lxml/objectify.pyx":1024 * Find the name of the corresponding PyType for a Python object. * """ * return _pytypename(obj) # <<<<<<<<<<<<<< @@ -16518,13 +16519,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *_ * cdef _registerPyTypes(): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1018 + /* "lxml/objectify.pyx":1019 * return u"str" if python._isString(obj) else _typename(obj) * * def pytypename(obj): # <<<<<<<<<<<<<< @@ -16543,7 +16544,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_8pytypename(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "lxml/objectify.pyx":1025 +/* "lxml/objectify.pyx":1026 * return _pytypename(obj) * * cdef _registerPyTypes(): # <<<<<<<<<<<<<< @@ -16560,14 +16561,14 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("_registerPyTypes", 0); - /* "lxml/objectify.pyx":1026 + /* "lxml/objectify.pyx":1027 * * cdef _registerPyTypes(): * pytype = PyType(u'int', int, IntElement) # <<<<<<<<<<<<<< * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort", * u"unsignedByte", u"nonPositiveInteger", */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_int); __Pyx_GIVEREF(__pyx_n_u_int); @@ -16578,29 +16579,29 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1027, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1027 + /* "lxml/objectify.pyx":1028 * cdef _registerPyTypes(): * pytype = PyType(u'int', int, IntElement) * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort", # <<<<<<<<<<<<<< * u"unsignedByte", u"nonPositiveInteger", * u"negativeInteger", u"long", u"nonNegativeInteger", */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__5) < 0) __PYX_ERR(0, 1027, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__5) < 0) __PYX_ERR(0, 1028, __pyx_L1_error) - /* "lxml/objectify.pyx":1031 + /* "lxml/objectify.pyx":1032 * u"negativeInteger", u"long", u"nonNegativeInteger", * u"unsignedLong", u"unsignedInt", u"positiveInteger",) * pytype.register() # <<<<<<<<<<<<<< * * # 'long' type just for backwards compatibility */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -16614,19 +16615,19 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1034 + /* "lxml/objectify.pyx":1035 * * # 'long' type just for backwards compatibility * pytype = PyType(u'long', None, IntElement) # <<<<<<<<<<<<<< * pytype.register() * */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_long); __Pyx_GIVEREF(__pyx_n_u_long); @@ -16637,20 +16638,20 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_IntElement)); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1035 + /* "lxml/objectify.pyx":1036 * # 'long' type just for backwards compatibility * pytype = PyType(u'long', None, IntElement) * pytype.register() # <<<<<<<<<<<<<< * * pytype = PyType(u'float', float, FloatElement, repr) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16664,21 +16665,21 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1037 + /* "lxml/objectify.pyx":1038 * pytype.register() * * pytype = PyType(u'float', float, FloatElement, repr) # <<<<<<<<<<<<<< * pytype.xmlSchemaTypes = (u"double", u"float") * pytype.register() */ - __pyx_t_1 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetBuiltinName(__pyx_n_s_repr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_float); __Pyx_GIVEREF(__pyx_n_u_float); @@ -16692,29 +16693,29 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1038 + /* "lxml/objectify.pyx":1039 * * pytype = PyType(u'float', float, FloatElement, repr) * pytype.xmlSchemaTypes = (u"double", u"float") # <<<<<<<<<<<<<< * pytype.register() * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__6) < 0) __PYX_ERR(0, 1038, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__6) < 0) __PYX_ERR(0, 1039, __pyx_L1_error) - /* "lxml/objectify.pyx":1039 + /* "lxml/objectify.pyx":1040 * pytype = PyType(u'float', float, FloatElement, repr) * pytype.xmlSchemaTypes = (u"double", u"float") * pytype.register() # <<<<<<<<<<<<<< * * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16728,23 +16729,23 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1041 + /* "lxml/objectify.pyx":1042 * pytype.register() * * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) # <<<<<<<<<<<<<< * pytype.xmlSchemaTypes = (u"boolean",) * pytype.register() */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_checkBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_checkBool); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lower_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_lower_bool); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_bool); __Pyx_GIVEREF(__pyx_n_u_bool); @@ -16758,29 +16759,29 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1041, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1042, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2)); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1042 + /* "lxml/objectify.pyx":1043 * * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) * pytype.xmlSchemaTypes = (u"boolean",) # <<<<<<<<<<<<<< * pytype.register() * */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__7) < 0) __PYX_ERR(0, 1042, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__7) < 0) __PYX_ERR(0, 1043, __pyx_L1_error) - /* "lxml/objectify.pyx":1043 + /* "lxml/objectify.pyx":1044 * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) * pytype.xmlSchemaTypes = (u"boolean",) * pytype.register() # <<<<<<<<<<<<<< * * pytype = PyType(u'str', None, StringElement) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -16794,19 +16795,19 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1045 + /* "lxml/objectify.pyx":1046 * pytype.register() * * pytype = PyType(u'str', None, StringElement) # <<<<<<<<<<<<<< * pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language", * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY", */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1045, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_str); __Pyx_GIVEREF(__pyx_n_u_str); @@ -16817,29 +16818,29 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1045, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3)); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1046 + /* "lxml/objectify.pyx":1047 * * pytype = PyType(u'str', None, StringElement) * pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language", # <<<<<<<<<<<<<< * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY", * u"NMTOKEN", ) */ - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__8) < 0) __PYX_ERR(0, 1046, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_xmlSchemaTypes, __pyx_tuple__8) < 0) __PYX_ERR(0, 1047, __pyx_L1_error) - /* "lxml/objectify.pyx":1049 + /* "lxml/objectify.pyx":1050 * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY", * u"NMTOKEN", ) * pytype.register() # <<<<<<<<<<<<<< * * # since lxml 2.0 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1049, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16853,19 +16854,19 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1049, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1052 + /* "lxml/objectify.pyx":1053 * * # since lxml 2.0 * pytype = PyType(u'NoneType', None, NoneElement) # <<<<<<<<<<<<<< * pytype.register() * */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_NoneType); __Pyx_GIVEREF(__pyx_n_u_NoneType); @@ -16876,20 +16877,20 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1052, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_2)); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1053 + /* "lxml/objectify.pyx":1054 * # since lxml 2.0 * pytype = PyType(u'NoneType', None, NoneElement) * pytype.register() # <<<<<<<<<<<<<< * * # backwards compatibility */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -16903,19 +16904,19 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1054, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1056 + /* "lxml/objectify.pyx":1057 * * # backwards compatibility * pytype = PyType(u'none', None, NoneElement) # <<<<<<<<<<<<<< * pytype.register() * */ - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_none); __Pyx_GIVEREF(__pyx_n_u_none); @@ -16926,20 +16927,20 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); PyTuple_SET_ITEM(__pyx_t_2, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement)); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3)); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1057 + /* "lxml/objectify.pyx":1058 * # backwards compatibility * pytype = PyType(u'none', None, NoneElement) * pytype.register() # <<<<<<<<<<<<<< * * # non-registered PyType for inner tree elements */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1057, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_pytype), __pyx_n_s_register); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -16953,12 +16954,12 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1057, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1025 + /* "lxml/objectify.pyx":1026 * return _pytypename(obj) * * cdef _registerPyTypes(): # <<<<<<<<<<<<<< @@ -16982,7 +16983,7 @@ static PyObject *__pyx_f_4lxml_9objectify__registerPyTypes(void) { return __pyx_r; } -/* "lxml/objectify.pyx":1064 +/* "lxml/objectify.pyx":1065 * _registerPyTypes() * * def getRegisteredTypes(): # <<<<<<<<<<<<<< @@ -17026,31 +17027,31 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py PyObject *(*__pyx_t_11)(PyObject *); __Pyx_RefNannySetupContext("getRegisteredTypes", 0); - /* "lxml/objectify.pyx":1079 + /* "lxml/objectify.pyx":1080 * end of the type list. * """ * cdef list types = [] # <<<<<<<<<<<<<< * cdef set known = set() * for check, pytype in _TYPE_CHECKS: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_types = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1080 + /* "lxml/objectify.pyx":1081 * """ * cdef list types = [] * cdef set known = set() # <<<<<<<<<<<<<< * for check, pytype in _TYPE_CHECKS: * name = pytype.name */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_known = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1081 + /* "lxml/objectify.pyx":1082 * cdef list types = [] * cdef set known = set() * for check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17059,15 +17060,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py */ if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1081, __pyx_L1_error) + __PYX_ERR(0, 1082, __pyx_L1_error) } __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1082, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -17076,7 +17077,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1081, __pyx_L1_error) + __PYX_ERR(0, 1082, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17089,15 +17090,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -17105,7 +17106,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1081, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1082, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -17113,7 +17114,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1081, __pyx_L1_error) + __PYX_ERR(0, 1082, __pyx_L1_error) __pyx_L6_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_check, __pyx_t_4); @@ -17121,48 +17122,48 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1082 + /* "lxml/objectify.pyx":1083 * cdef set known = set() * for check, pytype in _TYPE_CHECKS: * name = pytype.name # <<<<<<<<<<<<<< * if name not in known: * known.add(name) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1082, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1083 + /* "lxml/objectify.pyx":1084 * for check, pytype in _TYPE_CHECKS: * name = pytype.name * if name not in known: # <<<<<<<<<<<<<< * known.add(name) * types.append(pytype) */ - __pyx_t_8 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1084, __pyx_L1_error) __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "lxml/objectify.pyx":1084 + /* "lxml/objectify.pyx":1085 * name = pytype.name * if name not in known: * known.add(name) # <<<<<<<<<<<<<< * types.append(pytype) * for pytype in _PYTYPE_DICT.values(): */ - __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1085, __pyx_L1_error) - /* "lxml/objectify.pyx":1085 + /* "lxml/objectify.pyx":1086 * if name not in known: * known.add(name) * types.append(pytype) # <<<<<<<<<<<<<< * for pytype in _PYTYPE_DICT.values(): * name = pytype.name */ - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1086, __pyx_L1_error) - /* "lxml/objectify.pyx":1083 + /* "lxml/objectify.pyx":1084 * for check, pytype in _TYPE_CHECKS: * name = pytype.name * if name not in known: # <<<<<<<<<<<<<< @@ -17171,7 +17172,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py */ } - /* "lxml/objectify.pyx":1081 + /* "lxml/objectify.pyx":1082 * cdef list types = [] * cdef set known = set() * for check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17181,7 +17182,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1086 + /* "lxml/objectify.pyx":1087 * known.add(name) * types.append(pytype) * for pytype in _PYTYPE_DICT.values(): # <<<<<<<<<<<<<< @@ -17190,17 +17191,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 1086, __pyx_L1_error) + __PYX_ERR(0, 1087, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_4lxml_9objectify__PYTYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_4lxml_9objectify__PYTYPE_DICT); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_2 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1087, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -17208,17 +17209,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1087, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -17228,7 +17229,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1086, __pyx_L1_error) + else __PYX_ERR(0, 1087, __pyx_L1_error) } break; } @@ -17237,48 +17238,48 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1087 + /* "lxml/objectify.pyx":1088 * types.append(pytype) * for pytype in _PYTYPE_DICT.values(): * name = pytype.name # <<<<<<<<<<<<<< * if name not in known: * known.add(name) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pytype, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1088 + /* "lxml/objectify.pyx":1089 * for pytype in _PYTYPE_DICT.values(): * name = pytype.name * if name not in known: # <<<<<<<<<<<<<< * known.add(name) * types.append(pytype) */ - __pyx_t_9 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySet_ContainsTF(__pyx_v_name, __pyx_v_known, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1089, __pyx_L1_error) __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "lxml/objectify.pyx":1089 + /* "lxml/objectify.pyx":1090 * name = pytype.name * if name not in known: * known.add(name) # <<<<<<<<<<<<<< * types.append(pytype) * return types */ - __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_10 = PySet_Add(__pyx_v_known, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1090, __pyx_L1_error) - /* "lxml/objectify.pyx":1090 + /* "lxml/objectify.pyx":1091 * if name not in known: * known.add(name) * types.append(pytype) # <<<<<<<<<<<<<< * return types * */ - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1090, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_types, __pyx_v_pytype); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1091, __pyx_L1_error) - /* "lxml/objectify.pyx":1088 + /* "lxml/objectify.pyx":1089 * for pytype in _PYTYPE_DICT.values(): * name = pytype.name * if name not in known: # <<<<<<<<<<<<<< @@ -17287,7 +17288,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py */ } - /* "lxml/objectify.pyx":1086 + /* "lxml/objectify.pyx":1087 * known.add(name) * types.append(pytype) * for pytype in _PYTYPE_DICT.values(): # <<<<<<<<<<<<<< @@ -17297,7 +17298,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1091 + /* "lxml/objectify.pyx":1092 * known.add(name) * types.append(pytype) * return types # <<<<<<<<<<<<<< @@ -17309,7 +17310,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py __pyx_r = __pyx_v_types; goto __pyx_L0; - /* "lxml/objectify.pyx":1064 + /* "lxml/objectify.pyx":1065 * _registerPyTypes() * * def getRegisteredTypes(): # <<<<<<<<<<<<<< @@ -17337,7 +17338,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_10getRegisteredTypes(CYTHON_UNUSED Py return __pyx_r; } -/* "lxml/objectify.pyx":1093 +/* "lxml/objectify.pyx":1094 * return types * * cdef PyType _guessPyType(value, PyType defaulttype): # <<<<<<<<<<<<<< @@ -17365,7 +17366,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess int __pyx_t_13; __Pyx_RefNannySetupContext("_guessPyType", 0); - /* "lxml/objectify.pyx":1094 + /* "lxml/objectify.pyx":1095 * * cdef PyType _guessPyType(value, PyType defaulttype): * if value is None: # <<<<<<<<<<<<<< @@ -17376,7 +17377,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1095 + /* "lxml/objectify.pyx":1096 * cdef PyType _guessPyType(value, PyType defaulttype): * if value is None: * return None # <<<<<<<<<<<<<< @@ -17387,7 +17388,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1094 + /* "lxml/objectify.pyx":1095 * * cdef PyType _guessPyType(value, PyType defaulttype): * if value is None: # <<<<<<<<<<<<<< @@ -17396,7 +17397,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess */ } - /* "lxml/objectify.pyx":1096 + /* "lxml/objectify.pyx":1097 * if value is None: * return None * for type_check, tested_pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17405,15 +17406,15 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess */ if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1096, __pyx_L1_error) + __PYX_ERR(0, 1097, __pyx_L1_error) } __pyx_t_3 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1097, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -17422,7 +17423,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1096, __pyx_L1_error) + __PYX_ERR(0, 1097, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17435,15 +17436,15 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -17451,7 +17452,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1097, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L7_unpacking_done; @@ -17459,7 +17460,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1096, __pyx_L1_error) + __PYX_ERR(0, 1097, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6); @@ -17467,7 +17468,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_XDECREF_SET(__pyx_v_tested_pytype, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1097 + /* "lxml/objectify.pyx":1098 * return None * for type_check, tested_pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17483,7 +17484,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "lxml/objectify.pyx":1098 + /* "lxml/objectify.pyx":1099 * for type_check, tested_pytype in _TYPE_CHECKS: * try: * type_check(value) # <<<<<<<<<<<<<< @@ -17503,12 +17504,12 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1098, __pyx_L8_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1099, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1099 + /* "lxml/objectify.pyx":1100 * try: * type_check(value) * return tested_pytype # <<<<<<<<<<<<<< @@ -17521,7 +17522,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; goto __pyx_L12_try_return; - /* "lxml/objectify.pyx":1097 + /* "lxml/objectify.pyx":1098 * return None * for type_check, tested_pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17535,7 +17536,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/objectify.pyx":1100 + /* "lxml/objectify.pyx":1101 * type_check(value) * return tested_pytype * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<< @@ -17550,7 +17551,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "lxml/objectify.pyx":1097 + /* "lxml/objectify.pyx":1098 * return None * for type_check, tested_pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17575,7 +17576,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } - /* "lxml/objectify.pyx":1096 + /* "lxml/objectify.pyx":1097 * if value is None: * return None * for type_check, tested_pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17585,7 +17586,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1103 + /* "lxml/objectify.pyx":1104 * # could not be parsed as the specified type => ignore * pass * return defaulttype # <<<<<<<<<<<<<< @@ -17597,7 +17598,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess __pyx_r = __pyx_v_defaulttype; goto __pyx_L0; - /* "lxml/objectify.pyx":1093 + /* "lxml/objectify.pyx":1094 * return types * * cdef PyType _guessPyType(value, PyType defaulttype): # <<<<<<<<<<<<<< @@ -17622,7 +17623,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__guess return __pyx_r; } -/* "lxml/objectify.pyx":1105 +/* "lxml/objectify.pyx":1106 * return defaulttype * * cdef object _guessElementClass(tree.xmlNode* c_node): # <<<<<<<<<<<<<< @@ -17651,19 +17652,19 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ int __pyx_t_13; __Pyx_RefNannySetupContext("_guessElementClass", 0); - /* "lxml/objectify.pyx":1106 + /* "lxml/objectify.pyx":1107 * * cdef object _guessElementClass(tree.xmlNode* c_node): * value = textOf(c_node) # <<<<<<<<<<<<<< * if value is None: * return None */ - __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1107 + /* "lxml/objectify.pyx":1108 * cdef object _guessElementClass(tree.xmlNode* c_node): * value = textOf(c_node) * if value is None: # <<<<<<<<<<<<<< @@ -17674,7 +17675,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1108 + /* "lxml/objectify.pyx":1109 * value = textOf(c_node) * if value is None: * return None # <<<<<<<<<<<<<< @@ -17685,7 +17686,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1107 + /* "lxml/objectify.pyx":1108 * cdef object _guessElementClass(tree.xmlNode* c_node): * value = textOf(c_node) * if value is None: # <<<<<<<<<<<<<< @@ -17694,17 +17695,17 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ */ } - /* "lxml/objectify.pyx":1109 + /* "lxml/objectify.pyx":1110 * if value is None: * return None * if value == '': # <<<<<<<<<<<<<< * return StringElement * */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_value, __pyx_kp_s_, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1110, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/objectify.pyx":1110 + /* "lxml/objectify.pyx":1111 * return None * if value == '': * return StringElement # <<<<<<<<<<<<<< @@ -17716,7 +17717,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement); goto __pyx_L0; - /* "lxml/objectify.pyx":1109 + /* "lxml/objectify.pyx":1110 * if value is None: * return None * if value == '': # <<<<<<<<<<<<<< @@ -17725,7 +17726,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ */ } - /* "lxml/objectify.pyx":1112 + /* "lxml/objectify.pyx":1113 * return StringElement * * for type_check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17734,15 +17735,15 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ */ if (unlikely(__pyx_v_4lxml_9objectify__TYPE_CHECKS == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1112, __pyx_L1_error) + __PYX_ERR(0, 1113, __pyx_L1_error) } __pyx_t_1 = __pyx_v_4lxml_9objectify__TYPE_CHECKS; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1113, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -17751,7 +17752,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1112, __pyx_L1_error) + __PYX_ERR(0, 1113, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -17764,15 +17765,15 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1112, __pyx_L1_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -17780,7 +17781,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1112, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L8_unpacking_done; @@ -17788,7 +17789,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1112, __pyx_L1_error) + __PYX_ERR(0, 1113, __pyx_L1_error) __pyx_L8_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_type_check, __pyx_t_6); @@ -17796,7 +17797,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1113 + /* "lxml/objectify.pyx":1114 * * for type_check, pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17812,7 +17813,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "lxml/objectify.pyx":1114 + /* "lxml/objectify.pyx":1115 * for type_check, pytype in _TYPE_CHECKS: * try: * type_check(value) # <<<<<<<<<<<<<< @@ -17832,12 +17833,12 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ } __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_6, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L9_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1115 + /* "lxml/objectify.pyx":1116 * try: * type_check(value) * return (pytype)._type # <<<<<<<<<<<<<< @@ -17850,7 +17851,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L13_try_return; - /* "lxml/objectify.pyx":1113 + /* "lxml/objectify.pyx":1114 * * for type_check, pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17864,7 +17865,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/objectify.pyx":1116 + /* "lxml/objectify.pyx":1117 * type_check(value) * return (pytype)._type * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<< @@ -17879,7 +17880,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ goto __pyx_L11_except_error; __pyx_L11_except_error:; - /* "lxml/objectify.pyx":1113 + /* "lxml/objectify.pyx":1114 * * for type_check, pytype in _TYPE_CHECKS: * try: # <<<<<<<<<<<<<< @@ -17904,7 +17905,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12); } - /* "lxml/objectify.pyx":1112 + /* "lxml/objectify.pyx":1113 * return StringElement * * for type_check, pytype in _TYPE_CHECKS: # <<<<<<<<<<<<<< @@ -17914,7 +17915,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1118 + /* "lxml/objectify.pyx":1119 * except IGNORABLE_ERRORS: * pass * return None # <<<<<<<<<<<<<< @@ -17925,7 +17926,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1105 + /* "lxml/objectify.pyx":1106 * return defaulttype * * cdef object _guessElementClass(tree.xmlNode* c_node): # <<<<<<<<<<<<<< @@ -17951,7 +17952,7 @@ static PyObject *__pyx_f_4lxml_9objectify__guessElementClass(xmlNode *__pyx_v_c_ return __pyx_r; } -/* "lxml/objectify.pyx":1131 +/* "lxml/objectify.pyx":1132 * cdef bint _annotate * * def __call__(self, *children, **attrib): # <<<<<<<<<<<<<< @@ -18013,7 +18014,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call PyObject *(*__pyx_t_13)(PyObject *); __Pyx_RefNannySetupContext("__call__", 0); - /* "lxml/objectify.pyx":1138 + /* "lxml/objectify.pyx":1139 * cdef bint has_children * cdef bint has_string_value * if self._element_factory is None: # <<<<<<<<<<<<<< @@ -18024,7 +18025,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1139 + /* "lxml/objectify.pyx":1140 * cdef bint has_string_value * if self._element_factory is None: * element = _makeElement(self._tag, None, attrib, self._nsmap) # <<<<<<<<<<<<<< @@ -18035,14 +18036,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = __pyx_v_self->_nsmap; __Pyx_INCREF(__pyx_t_4); - __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_t_3, Py_None, __pyx_v_attrib, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_t_5 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_t_3, Py_None, __pyx_v_attrib, __pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1140, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_element = ((struct LxmlElement *)__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1138 + /* "lxml/objectify.pyx":1139 * cdef bint has_children * cdef bint has_string_value * if self._element_factory is None: # <<<<<<<<<<<<<< @@ -18052,7 +18053,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L3; } - /* "lxml/objectify.pyx":1141 + /* "lxml/objectify.pyx":1142 * element = _makeElement(self._tag, None, attrib, self._nsmap) * else: * element = self._element_factory(self._tag, attrib, self._nsmap) # <<<<<<<<<<<<<< @@ -18076,7 +18077,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -18084,13 +18085,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->_tag, __pyx_v_attrib, __pyx_v_self->_nsmap}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -18104,18 +18105,18 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_INCREF(__pyx_v_self->_nsmap); __Pyx_GIVEREF(__pyx_v_self->_nsmap); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_self->_nsmap); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1141, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1142, __pyx_L1_error) __pyx_v_element = ((struct LxmlElement *)__pyx_t_5); __pyx_t_5 = 0; } __pyx_L3:; - /* "lxml/objectify.pyx":1143 + /* "lxml/objectify.pyx":1144 * element = self._element_factory(self._tag, attrib, self._nsmap) * * pytype_name = None # <<<<<<<<<<<<<< @@ -18125,7 +18126,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_INCREF(Py_None); __pyx_v_pytype_name = Py_None; - /* "lxml/objectify.pyx":1144 + /* "lxml/objectify.pyx":1145 * * pytype_name = None * has_children = False # <<<<<<<<<<<<<< @@ -18134,7 +18135,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_children = 0; - /* "lxml/objectify.pyx":1145 + /* "lxml/objectify.pyx":1146 * pytype_name = None * has_children = False * has_string_value = False # <<<<<<<<<<<<<< @@ -18143,7 +18144,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_string_value = 0; - /* "lxml/objectify.pyx":1146 + /* "lxml/objectify.pyx":1147 * has_children = False * has_string_value = False * for child in children: # <<<<<<<<<<<<<< @@ -18154,15 +18155,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call for (;;) { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1147, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1147 + /* "lxml/objectify.pyx":1148 * has_string_value = False * for child in children: * if child is None: # <<<<<<<<<<<<<< @@ -18173,18 +18174,18 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1148 + /* "lxml/objectify.pyx":1149 * for child in children: * if child is None: * if len(children) == 1: # <<<<<<<<<<<<<< * cetree.setAttributeValue( * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") */ - __pyx_t_9 = PyTuple_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_9 == 1) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1150 + /* "lxml/objectify.pyx":1151 * if len(children) == 1: * cetree.setAttributeValue( * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") # <<<<<<<<<<<<<< @@ -18194,17 +18195,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_4 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR; __Pyx_INCREF(__pyx_t_4); - /* "lxml/objectify.pyx":1149 + /* "lxml/objectify.pyx":1150 * if child is None: * if len(children) == 1: * cetree.setAttributeValue( # <<<<<<<<<<<<<< * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") * elif python._isString(child): */ - __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_4, __pyx_n_u_true); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_4, __pyx_n_u_true); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1148 + /* "lxml/objectify.pyx":1149 * for child in children: * if child is None: * if len(children) == 1: # <<<<<<<<<<<<<< @@ -18213,7 +18214,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ } - /* "lxml/objectify.pyx":1147 + /* "lxml/objectify.pyx":1148 * has_string_value = False * for child in children: * if child is None: # <<<<<<<<<<<<<< @@ -18223,7 +18224,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L6; } - /* "lxml/objectify.pyx":1151 + /* "lxml/objectify.pyx":1152 * cetree.setAttributeValue( * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") * elif python._isString(child): # <<<<<<<<<<<<<< @@ -18233,18 +18234,18 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (_isString(__pyx_v_child) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1152 + /* "lxml/objectify.pyx":1153 * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") * elif python._isString(child): * _add_text(element, child) # <<<<<<<<<<<<<< * has_string_value = True * elif isinstance(child, _Element): */ - __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1153 + /* "lxml/objectify.pyx":1154 * elif python._isString(child): * _add_text(element, child) * has_string_value = True # <<<<<<<<<<<<<< @@ -18253,7 +18254,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_string_value = 1; - /* "lxml/objectify.pyx":1151 + /* "lxml/objectify.pyx":1152 * cetree.setAttributeValue( * element, XML_SCHEMA_INSTANCE_NIL_ATTR, u"true") * elif python._isString(child): # <<<<<<<<<<<<<< @@ -18263,7 +18264,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L6; } - /* "lxml/objectify.pyx":1154 + /* "lxml/objectify.pyx":1155 * _add_text(element, child) * has_string_value = True * elif isinstance(child, _Element): # <<<<<<<<<<<<<< @@ -18274,16 +18275,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1155 + /* "lxml/objectify.pyx":1156 * has_string_value = True * elif isinstance(child, _Element): * cetree.appendChildToElement(element, <_Element>child) # <<<<<<<<<<<<<< * has_children = True * elif isinstance(child, _ObjectifyElementMakerCaller): */ - __pyx_t_6 = appendChildToElement(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_6 = appendChildToElement(__pyx_v_element, ((struct LxmlElement *)__pyx_v_child)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1156, __pyx_L1_error) - /* "lxml/objectify.pyx":1156 + /* "lxml/objectify.pyx":1157 * elif isinstance(child, _Element): * cetree.appendChildToElement(element, <_Element>child) * has_children = True # <<<<<<<<<<<<<< @@ -18292,7 +18293,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_children = 1; - /* "lxml/objectify.pyx":1154 + /* "lxml/objectify.pyx":1155 * _add_text(element, child) * has_string_value = True * elif isinstance(child, _Element): # <<<<<<<<<<<<<< @@ -18302,7 +18303,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L6; } - /* "lxml/objectify.pyx":1157 + /* "lxml/objectify.pyx":1158 * cetree.appendChildToElement(element, <_Element>child) * has_children = True * elif isinstance(child, _ObjectifyElementMakerCaller): # <<<<<<<<<<<<<< @@ -18313,7 +18314,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1158 + /* "lxml/objectify.pyx":1159 * has_children = True * elif isinstance(child, _ObjectifyElementMakerCaller): * elementMaker = <_ObjectifyElementMakerCaller>child # <<<<<<<<<<<<<< @@ -18325,7 +18326,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_XDECREF_SET(__pyx_v_elementMaker, ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_4)); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1159 + /* "lxml/objectify.pyx":1160 * elif isinstance(child, _ObjectifyElementMakerCaller): * elementMaker = <_ObjectifyElementMakerCaller>child * if elementMaker._element_factory is None: # <<<<<<<<<<<<<< @@ -18336,7 +18337,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1160 + /* "lxml/objectify.pyx":1161 * elementMaker = <_ObjectifyElementMakerCaller>child * if elementMaker._element_factory is None: * cetree.makeSubElement(element, elementMaker._tag, # <<<<<<<<<<<<<< @@ -18346,19 +18347,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_4 = __pyx_v_elementMaker->_tag; __Pyx_INCREF(__pyx_t_4); - /* "lxml/objectify.pyx":1161 + /* "lxml/objectify.pyx":1162 * if elementMaker._element_factory is None: * cetree.makeSubElement(element, elementMaker._tag, * None, None, None, None) # <<<<<<<<<<<<<< * else: * childElement = elementMaker._element_factory( */ - __pyx_t_7 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_7 = ((PyObject *)makeSubElement(__pyx_v_element, __pyx_t_4, Py_None, Py_None, Py_None, Py_None)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1161, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1159 + /* "lxml/objectify.pyx":1160 * elif isinstance(child, _ObjectifyElementMakerCaller): * elementMaker = <_ObjectifyElementMakerCaller>child * if elementMaker._element_factory is None: # <<<<<<<<<<<<<< @@ -18368,7 +18369,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L8; } - /* "lxml/objectify.pyx":1163 + /* "lxml/objectify.pyx":1164 * None, None, None, None) * else: * childElement = elementMaker._element_factory( # <<<<<<<<<<<<<< @@ -18377,7 +18378,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ /*else*/ { - /* "lxml/objectify.pyx":1164 + /* "lxml/objectify.pyx":1165 * else: * childElement = elementMaker._element_factory( * elementMaker._tag) # <<<<<<<<<<<<<< @@ -18397,33 +18398,33 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_elementMaker->_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_elementMaker->_tag); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1163, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1163 + /* "lxml/objectify.pyx":1164 * None, None, None, None) * else: * childElement = elementMaker._element_factory( # <<<<<<<<<<<<<< * elementMaker._tag) * cetree.appendChildToElement(element, childElement) */ - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1163, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_childElement, ((struct LxmlElement *)__pyx_t_7)); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1165 + /* "lxml/objectify.pyx":1166 * childElement = elementMaker._element_factory( * elementMaker._tag) * cetree.appendChildToElement(element, childElement) # <<<<<<<<<<<<<< * has_children = True * elif isinstance(child, dict): */ - __pyx_t_6 = appendChildToElement(__pyx_v_element, __pyx_v_childElement); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_6 = appendChildToElement(__pyx_v_element, __pyx_v_childElement); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1166, __pyx_L1_error) } __pyx_L8:; - /* "lxml/objectify.pyx":1166 + /* "lxml/objectify.pyx":1167 * elementMaker._tag) * cetree.appendChildToElement(element, childElement) * has_children = True # <<<<<<<<<<<<<< @@ -18432,7 +18433,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_children = 1; - /* "lxml/objectify.pyx":1157 + /* "lxml/objectify.pyx":1158 * cetree.appendChildToElement(element, <_Element>child) * has_children = True * elif isinstance(child, _ObjectifyElementMakerCaller): # <<<<<<<<<<<<<< @@ -18442,7 +18443,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L6; } - /* "lxml/objectify.pyx":1167 + /* "lxml/objectify.pyx":1168 * cetree.appendChildToElement(element, childElement) * has_children = True * elif isinstance(child, dict): # <<<<<<<<<<<<<< @@ -18453,14 +18454,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1168 + /* "lxml/objectify.pyx":1169 * has_children = True * elif isinstance(child, dict): * for name, value in child.items(): # <<<<<<<<<<<<<< * # keyword arguments in attrib take precedence * if name in attrib: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_child, __pyx_n_s_items); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -18474,16 +18475,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_t_7 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_4 = __pyx_t_7; __Pyx_INCREF(__pyx_t_4); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1169, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -18491,17 +18492,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_9); __Pyx_INCREF(__pyx_t_7); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1169, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -18511,7 +18512,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1168, __pyx_L1_error) + else __PYX_ERR(0, 1169, __pyx_L1_error) } break; } @@ -18523,7 +18524,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1168, __pyx_L1_error) + __PYX_ERR(0, 1169, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -18536,15 +18537,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_12 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_12)->tp_iternext; @@ -18552,7 +18553,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_12); if (unlikely(!__pyx_t_11)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 1168, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_12), 2) < 0) __PYX_ERR(0, 1169, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L12_unpacking_done; @@ -18560,7 +18561,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1168, __pyx_L1_error) + __PYX_ERR(0, 1169, __pyx_L1_error) __pyx_L12_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3); @@ -18568,18 +18569,18 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/objectify.pyx":1170 + /* "lxml/objectify.pyx":1171 * for name, value in child.items(): * # keyword arguments in attrib take precedence * if name in attrib: # <<<<<<<<<<<<<< * continue * pytype = _PYTYPE_DICT.get(_typename(value)) */ - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_attrib, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_v_name, __pyx_v_attrib, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1171, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1171 + /* "lxml/objectify.pyx":1172 * # keyword arguments in attrib take precedence * if name in attrib: * continue # <<<<<<<<<<<<<< @@ -18588,7 +18589,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ goto __pyx_L9_continue; - /* "lxml/objectify.pyx":1170 + /* "lxml/objectify.pyx":1171 * for name, value in child.items(): * # keyword arguments in attrib take precedence * if name in attrib: # <<<<<<<<<<<<<< @@ -18597,7 +18598,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ } - /* "lxml/objectify.pyx":1172 + /* "lxml/objectify.pyx":1173 * if name in attrib: * continue * pytype = _PYTYPE_DICT.get(_typename(value)) # <<<<<<<<<<<<<< @@ -18606,17 +18607,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1172, __pyx_L1_error) + __PYX_ERR(0, 1173, __pyx_L1_error) } - __pyx_t_7 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_7 = __pyx_f_4lxml_9objectify__typename(__pyx_v_value); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/objectify.pyx":1173 + /* "lxml/objectify.pyx":1174 * continue * pytype = _PYTYPE_DICT.get(_typename(value)) * if pytype is not None: # <<<<<<<<<<<<<< @@ -18627,7 +18628,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1174 + /* "lxml/objectify.pyx":1175 * pytype = _PYTYPE_DICT.get(_typename(value)) * if pytype is not None: * value = (pytype).stringify(value) # <<<<<<<<<<<<<< @@ -18647,13 +18648,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_t_11 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1174, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/objectify.pyx":1173 + /* "lxml/objectify.pyx":1174 * continue * pytype = _PYTYPE_DICT.get(_typename(value)) * if pytype is not None: # <<<<<<<<<<<<<< @@ -18663,7 +18664,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L14; } - /* "lxml/objectify.pyx":1175 + /* "lxml/objectify.pyx":1176 * if pytype is not None: * value = (pytype).stringify(value) * elif not python._isString(value): # <<<<<<<<<<<<<< @@ -18673,19 +18674,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = ((!(_isString(__pyx_v_value) != 0)) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1176 + /* "lxml/objectify.pyx":1177 * value = (pytype).stringify(value) * elif not python._isString(value): * value = unicode(value) # <<<<<<<<<<<<<< * cetree.setAttributeValue(element, name, value) * else: */ - __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_Unicode(__pyx_v_value); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/objectify.pyx":1175 + /* "lxml/objectify.pyx":1176 * if pytype is not None: * value = (pytype).stringify(value) * elif not python._isString(value): # <<<<<<<<<<<<<< @@ -18695,16 +18696,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_L14:; - /* "lxml/objectify.pyx":1177 + /* "lxml/objectify.pyx":1178 * elif not python._isString(value): * value = unicode(value) * cetree.setAttributeValue(element, name, value) # <<<<<<<<<<<<<< * else: * if pytype_name is not None: */ - __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_v_name, __pyx_v_value); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1178, __pyx_L1_error) - /* "lxml/objectify.pyx":1168 + /* "lxml/objectify.pyx":1169 * has_children = True * elif isinstance(child, dict): * for name, value in child.items(): # <<<<<<<<<<<<<< @@ -18715,7 +18716,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1167 + /* "lxml/objectify.pyx":1168 * cetree.appendChildToElement(element, childElement) * has_children = True * elif isinstance(child, dict): # <<<<<<<<<<<<<< @@ -18725,7 +18726,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L6; } - /* "lxml/objectify.pyx":1179 + /* "lxml/objectify.pyx":1180 * cetree.setAttributeValue(element, name, value) * else: * if pytype_name is not None: # <<<<<<<<<<<<<< @@ -18737,7 +18738,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1181 + /* "lxml/objectify.pyx":1182 * if pytype_name is not None: * # concatenation always makes the result a string * has_string_value = True # <<<<<<<<<<<<<< @@ -18746,7 +18747,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ __pyx_v_has_string_value = 1; - /* "lxml/objectify.pyx":1179 + /* "lxml/objectify.pyx":1180 * cetree.setAttributeValue(element, name, value) * else: * if pytype_name is not None: # <<<<<<<<<<<<<< @@ -18755,19 +18756,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ } - /* "lxml/objectify.pyx":1182 + /* "lxml/objectify.pyx":1183 * # concatenation always makes the result a string * has_string_value = True * pytype_name = _typename(child) # <<<<<<<<<<<<<< * pytype = _PYTYPE_DICT.get(_typename(child)) * if pytype is not None: */ - __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_pytype_name, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1183 + /* "lxml/objectify.pyx":1184 * has_string_value = True * pytype_name = _typename(child) * pytype = _PYTYPE_DICT.get(_typename(child)) # <<<<<<<<<<<<<< @@ -18776,17 +18777,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1183, __pyx_L1_error) + __PYX_ERR(0, 1184, __pyx_L1_error) } - __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_9objectify__typename(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1183, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_t_4, Py_None); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_pytype, __pyx_t_11); __pyx_t_11 = 0; - /* "lxml/objectify.pyx":1184 + /* "lxml/objectify.pyx":1185 * pytype_name = _typename(child) * pytype = _PYTYPE_DICT.get(_typename(child)) * if pytype is not None: # <<<<<<<<<<<<<< @@ -18797,7 +18798,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1185 + /* "lxml/objectify.pyx":1186 * pytype = _PYTYPE_DICT.get(_typename(child)) * if pytype is not None: * _add_text(element, (pytype).stringify(child)) # <<<<<<<<<<<<<< @@ -18817,15 +18818,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_t_11 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_7, __pyx_v_child) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_child); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1185, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1184 + /* "lxml/objectify.pyx":1185 * pytype_name = _typename(child) * pytype = _PYTYPE_DICT.get(_typename(child)) * if pytype is not None: # <<<<<<<<<<<<<< @@ -18835,7 +18836,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L16; } - /* "lxml/objectify.pyx":1187 + /* "lxml/objectify.pyx":1188 * _add_text(element, (pytype).stringify(child)) * else: * has_string_value = True # <<<<<<<<<<<<<< @@ -18845,26 +18846,26 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call /*else*/ { __pyx_v_has_string_value = 1; - /* "lxml/objectify.pyx":1188 + /* "lxml/objectify.pyx":1189 * else: * has_string_value = True * child = unicode(child) # <<<<<<<<<<<<<< * _add_text(element, child) * */ - __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Unicode(__pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_child, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1189 + /* "lxml/objectify.pyx":1190 * has_string_value = True * child = unicode(child) * _add_text(element, child) # <<<<<<<<<<<<<< * * if self._annotate and not has_children: */ - __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_4 = __pyx_f_4lxml_9objectify__add_text(__pyx_v_element, __pyx_v_child); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -18872,7 +18873,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_L6:; - /* "lxml/objectify.pyx":1146 + /* "lxml/objectify.pyx":1147 * has_children = False * has_string_value = False * for child in children: # <<<<<<<<<<<<<< @@ -18882,7 +18883,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1191 + /* "lxml/objectify.pyx":1192 * _add_text(element, child) * * if self._annotate and not has_children: # <<<<<<<<<<<<<< @@ -18900,7 +18901,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_L18_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":1192 + /* "lxml/objectify.pyx":1193 * * if self._annotate and not has_children: * if has_string_value: # <<<<<<<<<<<<<< @@ -18910,19 +18911,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_1 = (__pyx_v_has_string_value != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1193 + /* "lxml/objectify.pyx":1194 * if self._annotate and not has_children: * if has_string_value: * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str") # <<<<<<<<<<<<<< * elif pytype_name is not None: * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name) */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_n_u_str); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_n_u_str); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1192 + /* "lxml/objectify.pyx":1193 * * if self._annotate and not has_children: * if has_string_value: # <<<<<<<<<<<<<< @@ -18932,7 +18933,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call goto __pyx_L20; } - /* "lxml/objectify.pyx":1194 + /* "lxml/objectify.pyx":1195 * if has_string_value: * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str") * elif pytype_name is not None: # <<<<<<<<<<<<<< @@ -18943,19 +18944,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1195 + /* "lxml/objectify.pyx":1196 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str") * elif pytype_name is not None: * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name) # <<<<<<<<<<<<<< * * return element */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_v_pytype_name); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_6 = setAttributeValue(__pyx_v_element, __pyx_t_5, __pyx_v_pytype_name); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1194 + /* "lxml/objectify.pyx":1195 * if has_string_value: * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, u"str") * elif pytype_name is not None: # <<<<<<<<<<<<<< @@ -18965,7 +18966,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call } __pyx_L20:; - /* "lxml/objectify.pyx":1191 + /* "lxml/objectify.pyx":1192 * _add_text(element, child) * * if self._annotate and not has_children: # <<<<<<<<<<<<<< @@ -18974,7 +18975,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call */ } - /* "lxml/objectify.pyx":1197 + /* "lxml/objectify.pyx":1198 * cetree.setAttributeValue(element, PYTYPE_ATTRIBUTE, pytype_name) * * return element # <<<<<<<<<<<<<< @@ -18986,7 +18987,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call __pyx_r = ((PyObject *)__pyx_v_element); goto __pyx_L0; - /* "lxml/objectify.pyx":1131 + /* "lxml/objectify.pyx":1132 * cdef bint _annotate * * def __call__(self, *children, **attrib): # <<<<<<<<<<<<<< @@ -19018,7 +19019,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28_ObjectifyElementMakerCaller___call return __pyx_r; } -/* "lxml/objectify.pyx":1199 +/* "lxml/objectify.pyx":1200 * return element * * cdef _add_text(_Element elem, text): # <<<<<<<<<<<<<< @@ -19038,7 +19039,7 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ __Pyx_RefNannySetupContext("_add_text", 0); __Pyx_INCREF(__pyx_v_text); - /* "lxml/objectify.pyx":1203 + /* "lxml/objectify.pyx":1204 * # tail text, depending on the current tree state * cdef tree.xmlNode* c_child * c_child = cetree.findChildBackwards(elem._c_node, 0) # <<<<<<<<<<<<<< @@ -19047,7 +19048,7 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ */ __pyx_v_c_child = findChildBackwards(__pyx_v_elem->_c_node, 0); - /* "lxml/objectify.pyx":1204 + /* "lxml/objectify.pyx":1205 * cdef tree.xmlNode* c_child * c_child = cetree.findChildBackwards(elem._c_node, 0) * if c_child is not NULL: # <<<<<<<<<<<<<< @@ -19057,19 +19058,19 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ __pyx_t_1 = ((__pyx_v_c_child != NULL) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1205 + /* "lxml/objectify.pyx":1206 * c_child = cetree.findChildBackwards(elem._c_node, 0) * if c_child is not NULL: * old = cetree.tailOf(c_child) # <<<<<<<<<<<<<< * if old is not None: * text = old + text */ - __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_2 = tailOf(__pyx_v_c_child); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_old = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1206 + /* "lxml/objectify.pyx":1207 * if c_child is not NULL: * old = cetree.tailOf(c_child) * if old is not None: # <<<<<<<<<<<<<< @@ -19080,19 +19081,19 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ __pyx_t_3 = (__pyx_t_1 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1207 + /* "lxml/objectify.pyx":1208 * old = cetree.tailOf(c_child) * if old is not None: * text = old + text # <<<<<<<<<<<<<< * cetree.setTailText(c_child, text) * else: */ - __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1206 + /* "lxml/objectify.pyx":1207 * if c_child is not NULL: * old = cetree.tailOf(c_child) * if old is not None: # <<<<<<<<<<<<<< @@ -19101,16 +19102,16 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1208 + /* "lxml/objectify.pyx":1209 * if old is not None: * text = old + text * cetree.setTailText(c_child, text) # <<<<<<<<<<<<<< * else: * old = cetree.textOf(elem._c_node) */ - __pyx_t_4 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_t_4 = setTailText(__pyx_v_c_child, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1209, __pyx_L1_error) - /* "lxml/objectify.pyx":1204 + /* "lxml/objectify.pyx":1205 * cdef tree.xmlNode* c_child * c_child = cetree.findChildBackwards(elem._c_node, 0) * if c_child is not NULL: # <<<<<<<<<<<<<< @@ -19120,7 +19121,7 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ goto __pyx_L3; } - /* "lxml/objectify.pyx":1210 + /* "lxml/objectify.pyx":1211 * cetree.setTailText(c_child, text) * else: * old = cetree.textOf(elem._c_node) # <<<<<<<<<<<<<< @@ -19128,12 +19129,12 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ * text = old + text */ /*else*/ { - __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1210, __pyx_L1_error) + __pyx_t_2 = textOf(__pyx_v_elem->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_old = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1211 + /* "lxml/objectify.pyx":1212 * else: * old = cetree.textOf(elem._c_node) * if old is not None: # <<<<<<<<<<<<<< @@ -19144,19 +19145,19 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ __pyx_t_1 = (__pyx_t_3 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1212 + /* "lxml/objectify.pyx":1213 * old = cetree.textOf(elem._c_node) * if old is not None: * text = old + text # <<<<<<<<<<<<<< * cetree.setNodeText(elem._c_node, text) * */ - __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_old, __pyx_v_text); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_text, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1211 + /* "lxml/objectify.pyx":1212 * else: * old = cetree.textOf(elem._c_node) * if old is not None: # <<<<<<<<<<<<<< @@ -19165,18 +19166,18 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1213 + /* "lxml/objectify.pyx":1214 * if old is not None: * text = old + text * cetree.setNodeText(elem._c_node, text) # <<<<<<<<<<<<<< * * cdef class ElementMaker: */ - __pyx_t_4 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_4 = setNodeText(__pyx_v_elem->_c_node, __pyx_v_text); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 1214, __pyx_L1_error) } __pyx_L3:; - /* "lxml/objectify.pyx":1199 + /* "lxml/objectify.pyx":1200 * return element * * cdef _add_text(_Element elem, text): # <<<<<<<<<<<<<< @@ -19199,7 +19200,7 @@ static PyObject *__pyx_f_4lxml_9objectify__add_text(struct LxmlElement *__pyx_v_ return __pyx_r; } -/* "lxml/objectify.pyx":1246 +/* "lxml/objectify.pyx":1247 * cdef bint _annotate * cdef dict _cache * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<< @@ -19224,7 +19225,7 @@ static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_True); - /* "lxml/objectify.pyx":1247 + /* "lxml/objectify.pyx":1248 * cdef dict _cache * def __init__(self, *, namespace=None, nsmap=None, annotate=True, * makeelement=None): # <<<<<<<<<<<<<< @@ -19248,7 +19249,7 @@ static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(0, 1246, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, 0, "__init__") < 0)) __PYX_ERR(0, 1247, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 0) { goto __pyx_L5_argtuple_error; @@ -19261,7 +19262,7 @@ static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1246, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1247, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.ElementMaker.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -19269,7 +19270,7 @@ static int __pyx_pw_4lxml_9objectify_12ElementMaker_1__init__(PyObject *__pyx_v_ __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_9objectify_12ElementMaker___init__(((struct __pyx_obj_4lxml_9objectify_ElementMaker *)__pyx_v_self), __pyx_v_namespace, __pyx_v_nsmap, __pyx_v_annotate, __pyx_v_makeelement); - /* "lxml/objectify.pyx":1246 + /* "lxml/objectify.pyx":1247 * cdef bint _annotate * cdef dict _cache * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<< @@ -19292,7 +19293,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_nsmap); - /* "lxml/objectify.pyx":1248 + /* "lxml/objectify.pyx":1249 * def __init__(self, *, namespace=None, nsmap=None, annotate=True, * makeelement=None): * if nsmap is None: # <<<<<<<<<<<<<< @@ -19303,19 +19304,19 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1249 + /* "lxml/objectify.pyx":1250 * makeelement=None): * if nsmap is None: * nsmap = _DEFAULT_NSMAP if annotate else {} # <<<<<<<<<<<<<< * self._nsmap = nsmap * self._namespace = None if namespace is None else u"{%s}" % namespace */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1250, __pyx_L1_error) if (__pyx_t_2) { __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __pyx_t_3 = __pyx_v_4lxml_9objectify__DEFAULT_NSMAP; } else { - __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -19323,7 +19324,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1248 + /* "lxml/objectify.pyx":1249 * def __init__(self, *, namespace=None, nsmap=None, annotate=True, * makeelement=None): * if nsmap is None: # <<<<<<<<<<<<<< @@ -19332,7 +19333,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":1250 + /* "lxml/objectify.pyx":1251 * if nsmap is None: * nsmap = _DEFAULT_NSMAP if annotate else {} * self._nsmap = nsmap # <<<<<<<<<<<<<< @@ -19345,7 +19346,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __Pyx_DECREF(__pyx_v_self->_nsmap); __pyx_v_self->_nsmap = __pyx_v_nsmap; - /* "lxml/objectify.pyx":1251 + /* "lxml/objectify.pyx":1252 * nsmap = _DEFAULT_NSMAP if annotate else {} * self._nsmap = nsmap * self._namespace = None if namespace is None else u"{%s}" % namespace # <<<<<<<<<<<<<< @@ -19357,7 +19358,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __Pyx_INCREF(Py_None); __pyx_t_3 = Py_None; } else { - __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_namespace); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __pyx_t_4 = 0; @@ -19368,17 +19369,17 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __pyx_v_self->_namespace = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1252 + /* "lxml/objectify.pyx":1253 * self._nsmap = nsmap * self._namespace = None if namespace is None else u"{%s}" % namespace * self._annotate = annotate # <<<<<<<<<<<<<< * if makeelement is not None: * if not callable(makeelement): */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1253, __pyx_L1_error) __pyx_v_self->_annotate = __pyx_t_2; - /* "lxml/objectify.pyx":1253 + /* "lxml/objectify.pyx":1254 * self._namespace = None if namespace is None else u"{%s}" % namespace * self._annotate = annotate * if makeelement is not None: # <<<<<<<<<<<<<< @@ -19389,45 +19390,45 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1254 + /* "lxml/objectify.pyx":1255 * self._annotate = annotate * if makeelement is not None: * if not callable(makeelement): # <<<<<<<<<<<<<< * raise TypeError( * f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}") */ - __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCallable_Check(__pyx_v_makeelement); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1255, __pyx_L1_error) __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0); if (unlikely(__pyx_t_2)) { - /* "lxml/objectify.pyx":1256 + /* "lxml/objectify.pyx":1257 * if not callable(makeelement): * raise TypeError( * f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}") # <<<<<<<<<<<<<< * self._makeelement = makeelement * else: */ - __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_makeelement)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_FormatSimple(((PyObject *)Py_TYPE(__pyx_v_makeelement)), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_argument_of_makeelement_paramete, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Concat(__pyx_kp_u_argument_of_makeelement_paramete, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1255 + /* "lxml/objectify.pyx":1256 * if makeelement is not None: * if not callable(makeelement): * raise TypeError( # <<<<<<<<<<<<<< * f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}") * self._makeelement = makeelement */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_TypeError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(0, 1255, __pyx_L1_error) + __PYX_ERR(0, 1256, __pyx_L1_error) - /* "lxml/objectify.pyx":1254 + /* "lxml/objectify.pyx":1255 * self._annotate = annotate * if makeelement is not None: * if not callable(makeelement): # <<<<<<<<<<<<<< @@ -19436,7 +19437,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l */ } - /* "lxml/objectify.pyx":1257 + /* "lxml/objectify.pyx":1258 * raise TypeError( * f"argument of 'makeelement' parameter must be callable, got {type(makeelement)}") * self._makeelement = makeelement # <<<<<<<<<<<<<< @@ -19449,7 +19450,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __Pyx_DECREF(__pyx_v_self->_makeelement); __pyx_v_self->_makeelement = __pyx_v_makeelement; - /* "lxml/objectify.pyx":1253 + /* "lxml/objectify.pyx":1254 * self._namespace = None if namespace is None else u"{%s}" % namespace * self._annotate = annotate * if makeelement is not None: # <<<<<<<<<<<<<< @@ -19459,7 +19460,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l goto __pyx_L4; } - /* "lxml/objectify.pyx":1259 + /* "lxml/objectify.pyx":1260 * self._makeelement = makeelement * else: * self._makeelement = None # <<<<<<<<<<<<<< @@ -19475,14 +19476,14 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l } __pyx_L4:; - /* "lxml/objectify.pyx":1260 + /* "lxml/objectify.pyx":1261 * else: * self._makeelement = None * self._cache = {} # <<<<<<<<<<<<<< * * @cython.final */ - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_cache); @@ -19490,7 +19491,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l __pyx_v_self->_cache = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1246 + /* "lxml/objectify.pyx":1247 * cdef bint _annotate * cdef dict _cache * def __init__(self, *, namespace=None, nsmap=None, annotate=True, # <<<<<<<<<<<<<< @@ -19512,7 +19513,7 @@ static int __pyx_pf_4lxml_9objectify_12ElementMaker___init__(struct __pyx_obj_4l return __pyx_r; } -/* "lxml/objectify.pyx":1263 +/* "lxml/objectify.pyx":1264 * * @cython.final * cdef _build_element_maker(self, tag, bint caching): # <<<<<<<<<<<<<< @@ -19532,19 +19533,19 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st int __pyx_t_6; __Pyx_RefNannySetupContext("_build_element_maker", 0); - /* "lxml/objectify.pyx":1265 + /* "lxml/objectify.pyx":1266 * cdef _build_element_maker(self, tag, bint caching): * cdef _ObjectifyElementMakerCaller element_maker * element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller) # <<<<<<<<<<<<<< * if self._namespace is not None and tag[0] != u"{": * element_maker._tag = self._namespace + tag */ - __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(((PyTypeObject *)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_tp_new_4lxml_9objectify__ObjectifyElementMakerCaller(((PyTypeObject *)__pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(((PyObject *)__pyx_t_1)); __pyx_v_element_maker = ((struct __pyx_obj_4lxml_9objectify__ObjectifyElementMakerCaller *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1266 + /* "lxml/objectify.pyx":1267 * cdef _ObjectifyElementMakerCaller element_maker * element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller) * if self._namespace is not None and tag[0] != u"{": # <<<<<<<<<<<<<< @@ -19558,22 +19559,22 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tag, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_tag, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1267 + /* "lxml/objectify.pyx":1268 * element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller) * if self._namespace is not None and tag[0] != u"{": * element_maker._tag = self._namespace + tag # <<<<<<<<<<<<<< * else: * element_maker._tag = tag */ - __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_self->_namespace, __pyx_v_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_element_maker->_tag); @@ -19581,7 +19582,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_v_element_maker->_tag = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1266 + /* "lxml/objectify.pyx":1267 * cdef _ObjectifyElementMakerCaller element_maker * element_maker = _ObjectifyElementMakerCaller.__new__(_ObjectifyElementMakerCaller) * if self._namespace is not None and tag[0] != u"{": # <<<<<<<<<<<<<< @@ -19591,7 +19592,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st goto __pyx_L3; } - /* "lxml/objectify.pyx":1269 + /* "lxml/objectify.pyx":1270 * element_maker._tag = self._namespace + tag * else: * element_maker._tag = tag # <<<<<<<<<<<<<< @@ -19607,7 +19608,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st } __pyx_L3:; - /* "lxml/objectify.pyx":1270 + /* "lxml/objectify.pyx":1271 * else: * element_maker._tag = tag * element_maker._nsmap = self._nsmap # <<<<<<<<<<<<<< @@ -19622,7 +19623,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_v_element_maker->_nsmap = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1271 + /* "lxml/objectify.pyx":1272 * element_maker._tag = tag * element_maker._nsmap = self._nsmap * element_maker._annotate = self._annotate # <<<<<<<<<<<<<< @@ -19632,7 +19633,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_t_2 = __pyx_v_self->_annotate; __pyx_v_element_maker->_annotate = __pyx_t_2; - /* "lxml/objectify.pyx":1272 + /* "lxml/objectify.pyx":1273 * element_maker._nsmap = self._nsmap * element_maker._annotate = self._annotate * element_maker._element_factory = self._makeelement # <<<<<<<<<<<<<< @@ -19647,7 +19648,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_v_element_maker->_element_factory = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1273 + /* "lxml/objectify.pyx":1274 * element_maker._annotate = self._annotate * element_maker._element_factory = self._makeelement * if caching: # <<<<<<<<<<<<<< @@ -19657,7 +19658,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_t_2 = (__pyx_v_caching != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1274 + /* "lxml/objectify.pyx":1275 * element_maker._element_factory = self._makeelement * if caching: * if len(self._cache) > 200: # <<<<<<<<<<<<<< @@ -19668,14 +19669,14 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1274, __pyx_L1_error) + __PYX_ERR(0, 1275, __pyx_L1_error) } - __pyx_t_5 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_5 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((__pyx_t_5 > 0xC8) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1275 + /* "lxml/objectify.pyx":1276 * if caching: * if len(self._cache) > 200: * self._cache.clear() # <<<<<<<<<<<<<< @@ -19684,11 +19685,11 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st */ if (unlikely(__pyx_v_self->_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "clear"); - __PYX_ERR(0, 1275, __pyx_L1_error) + __PYX_ERR(0, 1276, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_Clear(__pyx_v_self->_cache); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1275, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_Clear(__pyx_v_self->_cache); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1276, __pyx_L1_error) - /* "lxml/objectify.pyx":1274 + /* "lxml/objectify.pyx":1275 * element_maker._element_factory = self._makeelement * if caching: * if len(self._cache) > 200: # <<<<<<<<<<<<<< @@ -19697,7 +19698,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st */ } - /* "lxml/objectify.pyx":1276 + /* "lxml/objectify.pyx":1277 * if len(self._cache) > 200: * self._cache.clear() * self._cache[tag] = element_maker # <<<<<<<<<<<<<< @@ -19706,11 +19707,11 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st */ if (unlikely(__pyx_v_self->_cache == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1276, __pyx_L1_error) + __PYX_ERR(0, 1277, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->_cache, __pyx_v_tag, ((PyObject *)__pyx_v_element_maker)) < 0)) __PYX_ERR(0, 1276, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->_cache, __pyx_v_tag, ((PyObject *)__pyx_v_element_maker)) < 0)) __PYX_ERR(0, 1277, __pyx_L1_error) - /* "lxml/objectify.pyx":1273 + /* "lxml/objectify.pyx":1274 * element_maker._annotate = self._annotate * element_maker._element_factory = self._makeelement * if caching: # <<<<<<<<<<<<<< @@ -19719,7 +19720,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st */ } - /* "lxml/objectify.pyx":1277 + /* "lxml/objectify.pyx":1278 * self._cache.clear() * self._cache[tag] = element_maker * return element_maker # <<<<<<<<<<<<<< @@ -19731,7 +19732,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st __pyx_r = ((PyObject *)__pyx_v_element_maker); goto __pyx_L0; - /* "lxml/objectify.pyx":1263 + /* "lxml/objectify.pyx":1264 * * @cython.final * cdef _build_element_maker(self, tag, bint caching): # <<<<<<<<<<<<<< @@ -19751,7 +19752,7 @@ static PyObject *__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(st return __pyx_r; } -/* "lxml/objectify.pyx":1279 +/* "lxml/objectify.pyx":1280 * return element_maker * * def __getattr__(self, tag): # <<<<<<<<<<<<<< @@ -19785,7 +19786,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__getattr__", 0); - /* "lxml/objectify.pyx":1280 + /* "lxml/objectify.pyx":1281 * * def __getattr__(self, tag): * element_maker = self._cache.get(tag) # <<<<<<<<<<<<<< @@ -19794,14 +19795,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ */ if (unlikely(__pyx_v_self->_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1280, __pyx_L1_error) + __PYX_ERR(0, 1281, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1280, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1281, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element_maker = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1281 + /* "lxml/objectify.pyx":1282 * def __getattr__(self, tag): * element_maker = self._cache.get(tag) * if element_maker is None: # <<<<<<<<<<<<<< @@ -19812,7 +19813,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1282 + /* "lxml/objectify.pyx":1283 * element_maker = self._cache.get(tag) * if element_maker is None: * if is_special_method(tag): # <<<<<<<<<<<<<< @@ -19832,14 +19833,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_tag); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1283 + /* "lxml/objectify.pyx":1284 * if element_maker is None: * if is_special_method(tag): * return object.__getattr__(self, tag) # <<<<<<<<<<<<<< @@ -19847,7 +19848,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ * return element_maker */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_getattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_getattr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -19864,7 +19865,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -19872,13 +19873,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_v_tag}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -19889,7 +19890,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ __Pyx_INCREF(__pyx_v_tag); __Pyx_GIVEREF(__pyx_v_tag); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_tag); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } @@ -19898,7 +19899,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1282 + /* "lxml/objectify.pyx":1283 * element_maker = self._cache.get(tag) * if element_maker is None: * if is_special_method(tag): # <<<<<<<<<<<<<< @@ -19907,7 +19908,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ */ } - /* "lxml/objectify.pyx":1284 + /* "lxml/objectify.pyx":1285 * if is_special_method(tag): * return object.__getattr__(self, tag) * return self._build_element_maker(tag, caching=True) # <<<<<<<<<<<<<< @@ -19915,13 +19916,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1281 + /* "lxml/objectify.pyx":1282 * def __getattr__(self, tag): * element_maker = self._cache.get(tag) * if element_maker is None: # <<<<<<<<<<<<<< @@ -19930,7 +19931,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ */ } - /* "lxml/objectify.pyx":1285 + /* "lxml/objectify.pyx":1286 * return object.__getattr__(self, tag) * return self._build_element_maker(tag, caching=True) * return element_maker # <<<<<<<<<<<<<< @@ -19942,7 +19943,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ __pyx_r = __pyx_v_element_maker; goto __pyx_L0; - /* "lxml/objectify.pyx":1279 + /* "lxml/objectify.pyx":1280 * return element_maker * * def __getattr__(self, tag): # <<<<<<<<<<<<<< @@ -19965,7 +19966,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_2__getattr__(struct __ return __pyx_r; } -/* "lxml/objectify.pyx":1287 +/* "lxml/objectify.pyx":1288 * return element_maker * * def __call__(self, tag, *args, **kwargs): # <<<<<<<<<<<<<< @@ -20015,7 +20016,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__ } if (unlikely(kw_args > 0)) { const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1; - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 1287, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwargs, values, used_pos_args, "__call__") < 0)) __PYX_ERR(0, 1288, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) < 1) { goto __pyx_L5_argtuple_error; @@ -20026,7 +20027,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_12ElementMaker_5__call__(PyObject *__ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1287, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1288, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0; __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0; @@ -20054,7 +20055,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__call__", 0); - /* "lxml/objectify.pyx":1288 + /* "lxml/objectify.pyx":1289 * * def __call__(self, tag, *args, **kwargs): * element_maker = self._cache.get(tag) # <<<<<<<<<<<<<< @@ -20063,14 +20064,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx */ if (unlikely(__pyx_v_self->_cache == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1288, __pyx_L1_error) + __PYX_ERR(0, 1289, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->_cache, __pyx_v_tag, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element_maker = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1289 + /* "lxml/objectify.pyx":1290 * def __call__(self, tag, *args, **kwargs): * element_maker = self._cache.get(tag) * if element_maker is None: # <<<<<<<<<<<<<< @@ -20081,7 +20082,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1291 + /* "lxml/objectify.pyx":1292 * if element_maker is None: * element_maker = self._build_element_maker( * tag, caching=not is_special_method(tag)) # <<<<<<<<<<<<<< @@ -20101,25 +20102,25 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx } __pyx_t_1 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_tag) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_tag); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1290 + /* "lxml/objectify.pyx":1291 * element_maker = self._cache.get(tag) * if element_maker is None: * element_maker = self._build_element_maker( # <<<<<<<<<<<<<< * tag, caching=not is_special_method(tag)) * return element_maker(*args, **kwargs) */ - __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, (!__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker(__pyx_v_self, __pyx_v_tag, (!__pyx_t_3)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_element_maker, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1289 + /* "lxml/objectify.pyx":1290 * def __call__(self, tag, *args, **kwargs): * element_maker = self._cache.get(tag) * if element_maker is None: # <<<<<<<<<<<<<< @@ -20128,7 +20129,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx */ } - /* "lxml/objectify.pyx":1292 + /* "lxml/objectify.pyx":1293 * element_maker = self._build_element_maker( * tag, caching=not is_special_method(tag)) * return element_maker(*args, **kwargs) # <<<<<<<<<<<<<< @@ -20136,13 +20137,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx * ################################################################################ */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_element_maker, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_element_maker, __pyx_v_args, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1287 + /* "lxml/objectify.pyx":1288 * return element_maker * * def __call__(self, tag, *args, **kwargs): # <<<<<<<<<<<<<< @@ -20164,7 +20165,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12ElementMaker_4__call__(struct __pyx return __pyx_r; } -/* "lxml/objectify.pyx":1299 +/* "lxml/objectify.pyx":1300 * cdef bint __RECURSIVE_STR = 0 # default: off * * def enable_recursive_str(on=True): # <<<<<<<<<<<<<< @@ -20203,7 +20204,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_recursive_str") < 0)) __PYX_ERR(0, 1299, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "enable_recursive_str") < 0)) __PYX_ERR(0, 1300, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -20217,7 +20218,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_13enable_recursive_str(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1299, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("enable_recursive_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1300, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.enable_recursive_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -20236,17 +20237,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED int __pyx_t_1; __Pyx_RefNannySetupContext("enable_recursive_str", 0); - /* "lxml/objectify.pyx":1306 + /* "lxml/objectify.pyx":1307 * """ * global __RECURSIVE_STR * __RECURSIVE_STR = on # <<<<<<<<<<<<<< * * def dump(_Element element not None): */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1306, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_on); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1307, __pyx_L1_error) __pyx_v_4lxml_9objectify___RECURSIVE_STR = __pyx_t_1; - /* "lxml/objectify.pyx":1299 + /* "lxml/objectify.pyx":1300 * cdef bint __RECURSIVE_STR = 0 # default: off * * def enable_recursive_str(on=True): # <<<<<<<<<<<<<< @@ -20266,7 +20267,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_12enable_recursive_str(CYTHON_UNUSED return __pyx_r; } -/* "lxml/objectify.pyx":1308 +/* "lxml/objectify.pyx":1309 * __RECURSIVE_STR = on * * def dump(_Element element not None): # <<<<<<<<<<<<<< @@ -20282,7 +20283,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_15dump(PyObject *__pyx_self, PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("dump (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "element", 0))) __PYX_ERR(0, 1308, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_element), __pyx_ptype_4lxml_8includes_11etreepublic__Element, 0, "element", 0))) __PYX_ERR(0, 1309, __pyx_L1_error) __pyx_r = __pyx_pf_4lxml_9objectify_14dump(__pyx_self, ((struct LxmlElement *)__pyx_v_element)); /* function exit code */ @@ -20300,7 +20301,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("dump", 0); - /* "lxml/objectify.pyx":1313 + /* "lxml/objectify.pyx":1314 * Return a recursively generated string representation of an element. * """ * return _dump(element, 0) # <<<<<<<<<<<<<< @@ -20308,13 +20309,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_ * cdef object _dump(_Element element, int indent): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(__pyx_v_element, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__dump(__pyx_v_element, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1308 + /* "lxml/objectify.pyx":1309 * __RECURSIVE_STR = on * * def dump(_Element element not None): # <<<<<<<<<<<<<< @@ -20333,7 +20334,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_14dump(CYTHON_UNUSED PyObject *__pyx_ return __pyx_r; } -/* "lxml/objectify.pyx":1315 +/* "lxml/objectify.pyx":1316 * return _dump(element, 0) * * cdef object _dump(_Element element, int indent): # <<<<<<<<<<<<<< @@ -20366,23 +20367,23 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("_dump", 0); - /* "lxml/objectify.pyx":1316 + /* "lxml/objectify.pyx":1317 * * cdef object _dump(_Element element, int indent): * indentstr = u" " * indent # <<<<<<<<<<<<<< * if isinstance(element, ObjectifiedDataElement): * value = repr(element) */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_indent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_indent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Multiply(__pyx_kp_u__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_kp_u__10, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1316, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1317, __pyx_L1_error) __pyx_v_indentstr = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1317 + /* "lxml/objectify.pyx":1318 * cdef object _dump(_Element element, int indent): * indentstr = u" " * indent * if isinstance(element, ObjectifiedDataElement): # <<<<<<<<<<<<<< @@ -20393,19 +20394,19 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1318 + /* "lxml/objectify.pyx":1319 * indentstr = u" " * indent * if isinstance(element, ObjectifiedDataElement): * value = repr(element) # <<<<<<<<<<<<<< * else: * value = textOf(element._c_node) */ - __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1317 + /* "lxml/objectify.pyx":1318 * cdef object _dump(_Element element, int indent): * indentstr = u" " * indent * if isinstance(element, ObjectifiedDataElement): # <<<<<<<<<<<<<< @@ -20415,7 +20416,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem goto __pyx_L3; } - /* "lxml/objectify.pyx":1320 + /* "lxml/objectify.pyx":1321 * value = repr(element) * else: * value = textOf(element._c_node) # <<<<<<<<<<<<<< @@ -20423,12 +20424,12 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem * if not value.strip(): */ /*else*/ { - __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_2 = textOf(__pyx_v_element->_c_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_value = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1321 + /* "lxml/objectify.pyx":1322 * else: * value = textOf(element._c_node) * if value is not None: # <<<<<<<<<<<<<< @@ -20439,14 +20440,14 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1322 + /* "lxml/objectify.pyx":1323 * value = textOf(element._c_node) * if value is not None: * if not value.strip(): # <<<<<<<<<<<<<< * value = None * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_strip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -20460,15 +20461,15 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem } __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1323 + /* "lxml/objectify.pyx":1324 * if value is not None: * if not value.strip(): * value = None # <<<<<<<<<<<<<< @@ -20478,7 +20479,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_value, Py_None); - /* "lxml/objectify.pyx":1322 + /* "lxml/objectify.pyx":1323 * value = textOf(element._c_node) * if value is not None: * if not value.strip(): # <<<<<<<<<<<<<< @@ -20488,7 +20489,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem goto __pyx_L5; } - /* "lxml/objectify.pyx":1325 + /* "lxml/objectify.pyx":1326 * value = None * else: * value = repr(value) # <<<<<<<<<<<<<< @@ -20496,14 +20497,14 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS */ /*else*/ { - __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_2 = PyObject_Repr(__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_2); __pyx_t_2 = 0; } __pyx_L5:; - /* "lxml/objectify.pyx":1321 + /* "lxml/objectify.pyx":1322 * else: * value = textOf(element._c_node) * if value is not None: # <<<<<<<<<<<<<< @@ -20514,27 +20515,27 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem } __pyx_L3:; - /* "lxml/objectify.pyx":1326 + /* "lxml/objectify.pyx":1327 * else: * value = repr(value) * result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n" # <<<<<<<<<<<<<< * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE */ - __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_7 = 127; - __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7; @@ -20546,7 +20547,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_6 += 3; __Pyx_GIVEREF(__pyx_kp_u__11); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__11); - __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_value, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -20557,9 +20558,9 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_6 += 2; __Pyx_GIVEREF(__pyx_kp_u__12); PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_kp_u__12); - __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_5 = __pyx_f_4lxml_9objectify__typename(((PyObject *)__pyx_v_element)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_t_5, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7; @@ -20571,52 +20572,52 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_6 += 2; __Pyx_GIVEREF(__pyx_kp_u__13); PyTuple_SET_ITEM(__pyx_t_2, 6, __pyx_kp_u__13); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 7, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_result = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1327 + /* "lxml/objectify.pyx":1328 * value = repr(value) * result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n" * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS # <<<<<<<<<<<<<< * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE * for name, value in cetree.iterattributes(element, 3): */ - __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_xsi_ns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1328 + /* "lxml/objectify.pyx":1329 * result = f"{indentstr}{element.tag} = {value} [{_typename(element)}]\n" * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE # <<<<<<<<<<<<<< * for name, value in cetree.iterattributes(element, 3): * if u'{' in name: */ - __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_pytype_ns = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1329 + /* "lxml/objectify.pyx":1330 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE * for name, value in cetree.iterattributes(element, 3): # <<<<<<<<<<<<<< * if u'{' in name: * if name == PYTYPE_ATTRIBUTE: */ - __pyx_t_1 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = iterattributes(__pyx_v_element, 3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1330, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -20624,17 +20625,17 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1330, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1330, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -20644,7 +20645,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1329, __pyx_L1_error) + else __PYX_ERR(0, 1330, __pyx_L1_error) } break; } @@ -20656,7 +20657,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1329, __pyx_L1_error) + __PYX_ERR(0, 1330, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20669,15 +20670,15 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -20685,7 +20686,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1329, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1330, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L9_unpacking_done; @@ -20693,7 +20694,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1329, __pyx_L1_error) + __PYX_ERR(0, 1330, __pyx_L1_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_5); @@ -20701,43 +20702,43 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/objectify.pyx":1330 + /* "lxml/objectify.pyx":1331 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE * for name, value in cetree.iterattributes(element, 3): * if u'{' in name: # <<<<<<<<<<<<<< * if name == PYTYPE_ATTRIBUTE: * if value == TREE_PYTYPE_NAME: */ - __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__9, __pyx_v_name, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1330, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__9, __pyx_v_name, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1331, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1331 + /* "lxml/objectify.pyx":1332 * for name, value in cetree.iterattributes(element, 3): * if u'{' in name: * if name == PYTYPE_ATTRIBUTE: # <<<<<<<<<<<<<< * if value == TREE_PYTYPE_NAME: * continue */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyObject_RichCompare(__pyx_v_name, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_t_9 = PyObject_RichCompare(__pyx_v_name, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1332, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1332 + /* "lxml/objectify.pyx":1333 * if u'{' in name: * if name == PYTYPE_ATTRIBUTE: * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< * continue * else: */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1333, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/objectify.pyx":1333 + /* "lxml/objectify.pyx":1334 * if name == PYTYPE_ATTRIBUTE: * if value == TREE_PYTYPE_NAME: * continue # <<<<<<<<<<<<<< @@ -20746,7 +20747,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ goto __pyx_L6_continue; - /* "lxml/objectify.pyx":1332 + /* "lxml/objectify.pyx":1333 * if u'{' in name: * if name == PYTYPE_ATTRIBUTE: * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< @@ -20755,7 +20756,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ } - /* "lxml/objectify.pyx":1335 + /* "lxml/objectify.pyx":1336 * continue * else: * name = name.replace(pytype_ns, u'py:') # <<<<<<<<<<<<<< @@ -20763,7 +20764,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem * result += f"{indentstr} * {name} = {value!r}\n" */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = NULL; __pyx_t_12 = 0; @@ -20780,7 +20781,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pytype_ns, __pyx_kp_u_py}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -20788,13 +20789,13 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_pytype_ns, __pyx_kp_u_py}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -20805,7 +20806,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_INCREF(__pyx_kp_u_py); __Pyx_GIVEREF(__pyx_kp_u_py); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_kp_u_py); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -20814,7 +20815,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_9 = 0; } - /* "lxml/objectify.pyx":1331 + /* "lxml/objectify.pyx":1332 * for name, value in cetree.iterattributes(element, 3): * if u'{' in name: * if name == PYTYPE_ATTRIBUTE: # <<<<<<<<<<<<<< @@ -20823,14 +20824,14 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ } - /* "lxml/objectify.pyx":1336 + /* "lxml/objectify.pyx":1337 * else: * name = name.replace(pytype_ns, u'py:') * name = name.replace(xsi_ns, u'xsi:') # <<<<<<<<<<<<<< * result += f"{indentstr} * {name} = {value!r}\n" * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_name, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = NULL; __pyx_t_12 = 0; @@ -20847,7 +20848,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi}; - __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else @@ -20855,13 +20856,13 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_xsi_ns, __pyx_kp_u_xsi}; - __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_9); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -20872,7 +20873,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_INCREF(__pyx_kp_u_xsi); __Pyx_GIVEREF(__pyx_kp_u_xsi); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_12, __pyx_kp_u_xsi); - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } @@ -20880,7 +20881,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/objectify.pyx":1330 + /* "lxml/objectify.pyx":1331 * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE * for name, value in cetree.iterattributes(element, 3): * if u'{' in name: # <<<<<<<<<<<<<< @@ -20889,18 +20890,18 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ } - /* "lxml/objectify.pyx":1337 + /* "lxml/objectify.pyx":1338 * name = name.replace(pytype_ns, u'py:') * name = name.replace(xsi_ns, u'xsi:') * result += f"{indentstr} * {name} = {value!r}\n" # <<<<<<<<<<<<<< * * indent += 1 */ - __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_13 = 0; __pyx_t_7 = 127; - __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Unicode(__pyx_v_indentstr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7; __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); @@ -20911,7 +20912,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_13 += 4; __Pyx_GIVEREF(__pyx_kp_u__14); PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u__14); - __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7; __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); @@ -20922,7 +20923,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_13 += 3; __Pyx_GIVEREF(__pyx_kp_u__11); PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u__11); - __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Repr(__pyx_v_value), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_7; __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); @@ -20933,16 +20934,16 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_13 += 1; __Pyx_GIVEREF(__pyx_kp_u__15); PyTuple_SET_ITEM(__pyx_t_9, 5, __pyx_kp_u__15); - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_9, 6, __pyx_t_13, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_result, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_9); __pyx_t_9 = 0; - /* "lxml/objectify.pyx":1329 + /* "lxml/objectify.pyx":1330 * xsi_ns = u"{%s}" % XML_SCHEMA_INSTANCE_NS * pytype_ns = u"{%s}" % PYTYPE_NAMESPACE * for name, value in cetree.iterattributes(element, 3): # <<<<<<<<<<<<<< @@ -20953,7 +20954,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1339 + /* "lxml/objectify.pyx":1340 * result += f"{indentstr} * {name} = {value!r}\n" * * indent += 1 # <<<<<<<<<<<<<< @@ -20962,14 +20963,14 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ __pyx_v_indent = (__pyx_v_indent + 1); - /* "lxml/objectify.pyx":1340 + /* "lxml/objectify.pyx":1341 * * indent += 1 * for child in element.iterchildren(): # <<<<<<<<<<<<<< * result += _dump(child, indent) * if indent == 1: */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_element), __pyx_n_s_iterchildren); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -20983,16 +20984,16 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9); __pyx_t_6 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1341, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -21000,17 +21001,17 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1341, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1341, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_9, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -21020,7 +21021,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1340, __pyx_L1_error) + else __PYX_ERR(0, 1341, __pyx_L1_error) } break; } @@ -21029,23 +21030,23 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __Pyx_XDECREF_SET(__pyx_v_child, __pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1341 + /* "lxml/objectify.pyx":1342 * indent += 1 * for child in element.iterchildren(): * result += _dump(child, indent) # <<<<<<<<<<<<<< * if indent == 1: * return result[:-1] # strip last '\n' */ - if (!(likely(((__pyx_v_child) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1341, __pyx_L1_error) - __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) + if (!(likely(((__pyx_v_child) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_child, __pyx_ptype_4lxml_8includes_11etreepublic__Element))))) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify__dump(((struct LxmlElement *)__pyx_v_child), __pyx_v_indent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_result, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_result, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1340 + /* "lxml/objectify.pyx":1341 * * indent += 1 * for child in element.iterchildren(): # <<<<<<<<<<<<<< @@ -21055,7 +21056,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "lxml/objectify.pyx":1342 + /* "lxml/objectify.pyx":1343 * for child in element.iterchildren(): * result += _dump(child, indent) * if indent == 1: # <<<<<<<<<<<<<< @@ -21065,7 +21066,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem __pyx_t_3 = ((__pyx_v_indent == 1) != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1343 + /* "lxml/objectify.pyx":1344 * result += _dump(child, indent) * if indent == 1: * return result[:-1] # strip last '\n' # <<<<<<<<<<<<<< @@ -21073,13 +21074,13 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem * return result */ __Pyx_XDECREF(__pyx_r); - __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_result, 0, -1L, NULL, NULL, &__pyx_slice__16, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_v_result, 0, -1L, NULL, NULL, &__pyx_slice__16, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1342 + /* "lxml/objectify.pyx":1343 * for child in element.iterchildren(): * result += _dump(child, indent) * if indent == 1: # <<<<<<<<<<<<<< @@ -21088,7 +21089,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem */ } - /* "lxml/objectify.pyx":1345 + /* "lxml/objectify.pyx":1346 * return result[:-1] # strip last '\n' * else: * return result # <<<<<<<<<<<<<< @@ -21102,7 +21103,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem goto __pyx_L0; } - /* "lxml/objectify.pyx":1315 + /* "lxml/objectify.pyx":1316 * return _dump(element, 0) * * cdef object _dump(_Element element, int indent): # <<<<<<<<<<<<<< @@ -21132,7 +21133,7 @@ static PyObject *__pyx_f_4lxml_9objectify__dump(struct LxmlElement *__pyx_v_elem return __pyx_r; } -/* "lxml/objectify.pyx":1351 +/* "lxml/objectify.pyx":1352 * # Pickle support for objectified ElementTree * * def __unpickleElementTree(data): # <<<<<<<<<<<<<< @@ -21164,7 +21165,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__unpickleElementTree", 0); - /* "lxml/objectify.pyx":1352 + /* "lxml/objectify.pyx":1353 * * def __unpickleElementTree(data): * return etree.ElementTree(fromstring(data)) # <<<<<<<<<<<<<< @@ -21172,9 +21173,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED * cdef _setupPickle(elementTreeReduceFunction): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { @@ -21188,7 +21189,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v_data) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_data); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1352, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -21204,14 +21205,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1351 + /* "lxml/objectify.pyx":1352 * # Pickle support for objectified ElementTree * * def __unpickleElementTree(data): # <<<<<<<<<<<<<< @@ -21234,7 +21235,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_16__unpickleElementTree(CYTHON_UNUSED return __pyx_r; } -/* "lxml/objectify.pyx":1354 +/* "lxml/objectify.pyx":1355 * return etree.ElementTree(fromstring(data)) * * cdef _setupPickle(elementTreeReduceFunction): # <<<<<<<<<<<<<< @@ -21256,7 +21257,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("_setupPickle", 0); - /* "lxml/objectify.pyx":1355 + /* "lxml/objectify.pyx":1356 * * cdef _setupPickle(elementTreeReduceFunction): * if python.IS_PYTHON2: # <<<<<<<<<<<<<< @@ -21266,19 +21267,19 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element __pyx_t_1 = (IS_PYTHON2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1356 + /* "lxml/objectify.pyx":1357 * cdef _setupPickle(elementTreeReduceFunction): * if python.IS_PYTHON2: * import copy_reg as copyreg # <<<<<<<<<<<<<< * else: * import copyreg */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy_reg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy_reg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_copyreg = __pyx_t_2; __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1355 + /* "lxml/objectify.pyx":1356 * * cdef _setupPickle(elementTreeReduceFunction): * if python.IS_PYTHON2: # <<<<<<<<<<<<<< @@ -21288,7 +21289,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element goto __pyx_L3; } - /* "lxml/objectify.pyx":1358 + /* "lxml/objectify.pyx":1359 * import copy_reg as copyreg * else: * import copyreg # <<<<<<<<<<<<<< @@ -21296,33 +21297,33 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element * elementTreeReduceFunction, __unpickleElementTree) */ /*else*/ { - __pyx_t_2 = __Pyx_Import(__pyx_n_s_copyreg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_copyreg, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_copyreg = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; - /* "lxml/objectify.pyx":1359 + /* "lxml/objectify.pyx":1360 * else: * import copyreg * copyreg.pickle(etree._ElementTree, # <<<<<<<<<<<<<< * elementTreeReduceFunction, __unpickleElementTree) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copyreg, __pyx_n_s_pickle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_copyreg, __pyx_n_s_pickle); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_ElementTree_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "lxml/objectify.pyx":1360 + /* "lxml/objectify.pyx":1361 * import copyreg * copyreg.pickle(etree._ElementTree, * elementTreeReduceFunction, __unpickleElementTree) # <<<<<<<<<<<<<< * * def pickleReduceElementTree(obj): */ - __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1360, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -21339,7 +21340,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21349,7 +21350,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_4, __pyx_v_elementTreeReduceFunction, __pyx_t_5}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -21357,7 +21358,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -21371,14 +21372,14 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_5); __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1354 + /* "lxml/objectify.pyx":1355 * return etree.ElementTree(fromstring(data)) * * cdef _setupPickle(elementTreeReduceFunction): # <<<<<<<<<<<<<< @@ -21405,7 +21406,7 @@ static PyObject *__pyx_f_4lxml_9objectify__setupPickle(PyObject *__pyx_v_element return __pyx_r; } -/* "lxml/objectify.pyx":1362 +/* "lxml/objectify.pyx":1363 * elementTreeReduceFunction, __unpickleElementTree) * * def pickleReduceElementTree(obj): # <<<<<<<<<<<<<< @@ -21436,7 +21437,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUS PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("pickleReduceElementTree", 0); - /* "lxml/objectify.pyx":1363 + /* "lxml/objectify.pyx":1364 * * def pickleReduceElementTree(obj): * return __unpickleElementTree, (etree.tostring(obj),) # <<<<<<<<<<<<<< @@ -21444,9 +21445,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUS * _setupPickle(pickleReduceElementTree) */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_unpickleElementTree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_tostring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_tostring); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -21460,15 +21461,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUS } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_obj) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_obj); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -21480,7 +21481,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUS __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1362 + /* "lxml/objectify.pyx":1363 * elementTreeReduceFunction, __unpickleElementTree) * * def pickleReduceElementTree(obj): # <<<<<<<<<<<<<< @@ -21502,7 +21503,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_18pickleReduceElementTree(CYTHON_UNUS return __pyx_r; } -/* "lxml/objectify.pyx":1377 +/* "lxml/objectify.pyx":1378 * cdef object empty_data_class * cdef object tree_class * def __init__(self, tree_class=None, empty_data_class=None): # <<<<<<<<<<<<<< @@ -21553,7 +21554,7 @@ static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1377, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1378, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21570,7 +21571,7 @@ static int __pyx_pw_4lxml_9objectify_27ObjectifyElementClassLookup_1__init__(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1377, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1378, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.ObjectifyElementClassLookup.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21592,7 +21593,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __Pyx_INCREF(__pyx_v_tree_class); __Pyx_INCREF(__pyx_v_empty_data_class); - /* "lxml/objectify.pyx":1386 + /* "lxml/objectify.pyx":1387 * empty data elements (defaults to StringElement). * """ * self._lookup_function = _lookupElementClass # <<<<<<<<<<<<<< @@ -21601,7 +21602,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru */ __pyx_v_self->__pyx_base._lookup_function = __pyx_f_4lxml_9objectify__lookupElementClass; - /* "lxml/objectify.pyx":1387 + /* "lxml/objectify.pyx":1388 * """ * self._lookup_function = _lookupElementClass * if tree_class is None: # <<<<<<<<<<<<<< @@ -21612,7 +21613,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1388 + /* "lxml/objectify.pyx":1389 * self._lookup_function = _lookupElementClass * if tree_class is None: * tree_class = ObjectifiedElement # <<<<<<<<<<<<<< @@ -21622,7 +21623,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); __Pyx_DECREF_SET(__pyx_v_tree_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); - /* "lxml/objectify.pyx":1387 + /* "lxml/objectify.pyx":1388 * """ * self._lookup_function = _lookupElementClass * if tree_class is None: # <<<<<<<<<<<<<< @@ -21631,7 +21632,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru */ } - /* "lxml/objectify.pyx":1389 + /* "lxml/objectify.pyx":1390 * if tree_class is None: * tree_class = ObjectifiedElement * self.tree_class = tree_class # <<<<<<<<<<<<<< @@ -21644,7 +21645,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __Pyx_DECREF(__pyx_v_self->tree_class); __pyx_v_self->tree_class = __pyx_v_tree_class; - /* "lxml/objectify.pyx":1390 + /* "lxml/objectify.pyx":1391 * tree_class = ObjectifiedElement * self.tree_class = tree_class * if empty_data_class is None: # <<<<<<<<<<<<<< @@ -21655,7 +21656,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1391 + /* "lxml/objectify.pyx":1392 * self.tree_class = tree_class * if empty_data_class is None: * empty_data_class = StringElement # <<<<<<<<<<<<<< @@ -21665,7 +21666,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement)); __Pyx_DECREF_SET(__pyx_v_empty_data_class, ((PyObject *)__pyx_ptype_4lxml_9objectify_StringElement)); - /* "lxml/objectify.pyx":1390 + /* "lxml/objectify.pyx":1391 * tree_class = ObjectifiedElement * self.tree_class = tree_class * if empty_data_class is None: # <<<<<<<<<<<<<< @@ -21674,7 +21675,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru */ } - /* "lxml/objectify.pyx":1392 + /* "lxml/objectify.pyx":1393 * if empty_data_class is None: * empty_data_class = StringElement * self.empty_data_class = empty_data_class # <<<<<<<<<<<<<< @@ -21687,7 +21688,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru __Pyx_DECREF(__pyx_v_self->empty_data_class); __pyx_v_self->empty_data_class = __pyx_v_empty_data_class; - /* "lxml/objectify.pyx":1377 + /* "lxml/objectify.pyx":1378 * cdef object empty_data_class * cdef object tree_class * def __init__(self, tree_class=None, empty_data_class=None): # <<<<<<<<<<<<<< @@ -21703,7 +21704,7 @@ static int __pyx_pf_4lxml_9objectify_27ObjectifyElementClassLookup___init__(stru return __pyx_r; } -/* "lxml/objectify.pyx":1394 +/* "lxml/objectify.pyx":1395 * self.empty_data_class = empty_data_class * * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node): # <<<<<<<<<<<<<< @@ -21730,7 +21731,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_lookupElementClass", 0); - /* "lxml/objectify.pyx":1396 + /* "lxml/objectify.pyx":1397 * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node): * cdef ObjectifyElementClassLookup lookup * lookup = state # <<<<<<<<<<<<<< @@ -21742,7 +21743,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_v_lookup = ((struct __pyx_obj_4lxml_9objectify_ObjectifyElementClassLookup *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1398 + /* "lxml/objectify.pyx":1399 * lookup = state * # if element has children => no data class * if cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -21752,7 +21753,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_2 = (hasChild(__pyx_v_c_node) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1399 + /* "lxml/objectify.pyx":1400 * # if element has children => no data class * if cetree.hasChild(c_node): * return lookup.tree_class # <<<<<<<<<<<<<< @@ -21764,7 +21765,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_lookup->tree_class; goto __pyx_L0; - /* "lxml/objectify.pyx":1398 + /* "lxml/objectify.pyx":1399 * lookup = state * # if element has children => no data class * if cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -21773,20 +21774,20 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1402 + /* "lxml/objectify.pyx":1403 * * # if element is defined as xsi:nil, return NoneElement class * if u"true" == cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _XML_SCHEMA_INSTANCE_NS, "nil"): * return NoneElement */ - __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_n_u_true, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_n_u_true, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1404 + /* "lxml/objectify.pyx":1405 * if u"true" == cetree.attributeValueFromNsName( * c_node, _XML_SCHEMA_INSTANCE_NS, "nil"): * return NoneElement # <<<<<<<<<<<<<< @@ -21798,7 +21799,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = ((PyObject *)__pyx_ptype_4lxml_9objectify_NoneElement); goto __pyx_L0; - /* "lxml/objectify.pyx":1402 + /* "lxml/objectify.pyx":1403 * * # if element is defined as xsi:nil, return NoneElement class * if u"true" == cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< @@ -21807,19 +21808,19 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1407 + /* "lxml/objectify.pyx":1408 * * # check for Python type hint * value = cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if value is not None: */ - __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error) + __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_value = __pyx_t_1; __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1409 + /* "lxml/objectify.pyx":1410 * value = cetree.attributeValueFromNsName( * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if value is not None: # <<<<<<<<<<<<<< @@ -21830,17 +21831,17 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1410 + /* "lxml/objectify.pyx":1411 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if value is not None: * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< * return lookup.tree_class * py_type = _PYTYPE_DICT.get(value) */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1410, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_value, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1411, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/objectify.pyx":1411 + /* "lxml/objectify.pyx":1412 * if value is not None: * if value == TREE_PYTYPE_NAME: * return lookup.tree_class # <<<<<<<<<<<<<< @@ -21852,7 +21853,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_lookup->tree_class; goto __pyx_L0; - /* "lxml/objectify.pyx":1410 + /* "lxml/objectify.pyx":1411 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if value is not None: * if value == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< @@ -21861,7 +21862,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1412 + /* "lxml/objectify.pyx":1413 * if value == TREE_PYTYPE_NAME: * return lookup.tree_class * py_type = _PYTYPE_DICT.get(value) # <<<<<<<<<<<<<< @@ -21870,9 +21871,9 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1412, __pyx_L1_error) + __PYX_ERR(0, 1413, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); @@ -21880,7 +21881,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1413 + /* "lxml/objectify.pyx":1414 * return lookup.tree_class * py_type = _PYTYPE_DICT.get(value) * if py_type is not None: # <<<<<<<<<<<<<< @@ -21891,7 +21892,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1414 + /* "lxml/objectify.pyx":1415 * py_type = _PYTYPE_DICT.get(value) * if py_type is not None: * return py_type._type # <<<<<<<<<<<<<< @@ -21903,7 +21904,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_py_type->_type; goto __pyx_L0; - /* "lxml/objectify.pyx":1413 + /* "lxml/objectify.pyx":1414 * return lookup.tree_class * py_type = _PYTYPE_DICT.get(value) * if py_type is not None: # <<<<<<<<<<<<<< @@ -21912,7 +21913,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1409 + /* "lxml/objectify.pyx":1410 * value = cetree.attributeValueFromNsName( * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if value is not None: # <<<<<<<<<<<<<< @@ -21921,19 +21922,19 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1418 + /* "lxml/objectify.pyx":1419 * * # check for XML Schema type hint * value = cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * */ - __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1418, __pyx_L1_error) + __pyx_t_4 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1421 + /* "lxml/objectify.pyx":1422 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * * if value is not None: # <<<<<<<<<<<<<< @@ -21944,7 +21945,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1422 + /* "lxml/objectify.pyx":1423 * * if value is not None: * schema_type = _SCHEMA_TYPE_DICT.get(value) # <<<<<<<<<<<<<< @@ -21953,9 +21954,9 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1422, __pyx_L1_error) + __PYX_ERR(0, 1423, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = __pyx_t_4; __Pyx_INCREF(__pyx_t_1); @@ -21963,7 +21964,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_v_schema_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1423 + /* "lxml/objectify.pyx":1424 * if value is not None: * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is None and u':' in value: # <<<<<<<<<<<<<< @@ -21977,22 +21978,22 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_3 = __pyx_t_5; goto __pyx_L10_bool_binop_done; } - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_value, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1424, __pyx_L1_error) __pyx_t_2 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_2; __pyx_L10_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1424 + /* "lxml/objectify.pyx":1425 * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is None and u':' in value: * prefix, value = value.split(u':', 1) # <<<<<<<<<<<<<< * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is not None: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_value, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -22001,7 +22002,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1424, __pyx_L1_error) + __PYX_ERR(0, 1425, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -22014,15 +22015,15 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -22030,7 +22031,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1425, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L13_unpacking_done; @@ -22038,7 +22039,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1424, __pyx_L1_error) + __PYX_ERR(0, 1425, __pyx_L1_error) __pyx_L13_unpacking_done:; } __pyx_v_prefix = __pyx_t_1; @@ -22046,7 +22047,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1425 + /* "lxml/objectify.pyx":1426 * if schema_type is None and u':' in value: * prefix, value = value.split(u':', 1) * schema_type = _SCHEMA_TYPE_DICT.get(value) # <<<<<<<<<<<<<< @@ -22055,9 +22056,9 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1425, __pyx_L1_error) + __PYX_ERR(0, 1426, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_value, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_t_4; __Pyx_INCREF(__pyx_t_6); @@ -22065,7 +22066,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __Pyx_DECREF_SET(__pyx_v_schema_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1423 + /* "lxml/objectify.pyx":1424 * if value is not None: * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is None and u':' in value: # <<<<<<<<<<<<<< @@ -22074,7 +22075,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1426 + /* "lxml/objectify.pyx":1427 * prefix, value = value.split(u':', 1) * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is not None: # <<<<<<<<<<<<<< @@ -22085,7 +22086,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1427 + /* "lxml/objectify.pyx":1428 * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is not None: * return schema_type._type # <<<<<<<<<<<<<< @@ -22097,7 +22098,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_schema_type->_type; goto __pyx_L0; - /* "lxml/objectify.pyx":1426 + /* "lxml/objectify.pyx":1427 * prefix, value = value.split(u':', 1) * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is not None: # <<<<<<<<<<<<<< @@ -22106,7 +22107,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1421 + /* "lxml/objectify.pyx":1422 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * * if value is not None: # <<<<<<<<<<<<<< @@ -22115,19 +22116,19 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1430 + /* "lxml/objectify.pyx":1431 * * # otherwise determine class based on text content type * el_class = _guessElementClass(c_node) # <<<<<<<<<<<<<< * if el_class is not None: * return el_class */ - __pyx_t_6 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_9objectify__guessElementClass(__pyx_v_c_node); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_el_class = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1431 + /* "lxml/objectify.pyx":1432 * # otherwise determine class based on text content type * el_class = _guessElementClass(c_node) * if el_class is not None: # <<<<<<<<<<<<<< @@ -22138,7 +22139,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1432 + /* "lxml/objectify.pyx":1433 * el_class = _guessElementClass(c_node) * if el_class is not None: * return el_class # <<<<<<<<<<<<<< @@ -22150,7 +22151,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_el_class; goto __pyx_L0; - /* "lxml/objectify.pyx":1431 + /* "lxml/objectify.pyx":1432 * # otherwise determine class based on text content type * el_class = _guessElementClass(c_node) * if el_class is not None: # <<<<<<<<<<<<<< @@ -22159,7 +22160,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1435 + /* "lxml/objectify.pyx":1436 * * # if element is a root node => default to tree node * if c_node.parent is NULL or not tree._isElement(c_node.parent): # <<<<<<<<<<<<<< @@ -22177,7 +22178,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_L17_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1436 + /* "lxml/objectify.pyx":1437 * # if element is a root node => default to tree node * if c_node.parent is NULL or not tree._isElement(c_node.parent): * return lookup.tree_class # <<<<<<<<<<<<<< @@ -22189,7 +22190,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_lookup->tree_class; goto __pyx_L0; - /* "lxml/objectify.pyx":1435 + /* "lxml/objectify.pyx":1436 * * # if element is a root node => default to tree node * if c_node.parent is NULL or not tree._isElement(c_node.parent): # <<<<<<<<<<<<<< @@ -22198,7 +22199,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ */ } - /* "lxml/objectify.pyx":1438 + /* "lxml/objectify.pyx":1439 * return lookup.tree_class * * return lookup.empty_data_class # <<<<<<<<<<<<<< @@ -22210,7 +22211,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ __pyx_r = __pyx_v_lookup->empty_data_class; goto __pyx_L0; - /* "lxml/objectify.pyx":1394 + /* "lxml/objectify.pyx":1395 * self.empty_data_class = empty_data_class * * cdef object _lookupElementClass(state, _Document doc, tree.xmlNode* c_node): # <<<<<<<<<<<<<< @@ -22238,7 +22239,7 @@ static PyObject *__pyx_f_4lxml_9objectify__lookupElementClass(PyObject *__pyx_v_ return __pyx_r; } -/* "lxml/objectify.pyx":1444 +/* "lxml/objectify.pyx":1445 * # Type annotations * * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): # <<<<<<<<<<<<<< @@ -22261,7 +22262,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check int __pyx_t_9; __Pyx_RefNannySetupContext("_check_type", 0); - /* "lxml/objectify.pyx":1445 + /* "lxml/objectify.pyx":1446 * * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): * if pytype is None: # <<<<<<<<<<<<<< @@ -22272,7 +22273,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1446 + /* "lxml/objectify.pyx":1447 * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): * if pytype is None: * return None # <<<<<<<<<<<<<< @@ -22283,7 +22284,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1445 + /* "lxml/objectify.pyx":1446 * * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): * if pytype is None: # <<<<<<<<<<<<<< @@ -22292,19 +22293,19 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check */ } - /* "lxml/objectify.pyx":1447 + /* "lxml/objectify.pyx":1448 * if pytype is None: * return None * value = textOf(c_node) # <<<<<<<<<<<<<< * try: * pytype.type_check(value) */ - __pyx_t_3 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_3 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_value = __pyx_t_3; __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1448 + /* "lxml/objectify.pyx":1449 * return None * value = textOf(c_node) * try: # <<<<<<<<<<<<<< @@ -22320,7 +22321,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "lxml/objectify.pyx":1449 + /* "lxml/objectify.pyx":1450 * value = textOf(c_node) * try: * pytype.type_check(value) # <<<<<<<<<<<<<< @@ -22340,12 +22341,12 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check } __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_value); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1449, __pyx_L4_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1450, __pyx_L4_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1450 + /* "lxml/objectify.pyx":1451 * try: * pytype.type_check(value) * return pytype # <<<<<<<<<<<<<< @@ -22357,7 +22358,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __pyx_r = __pyx_v_pytype; goto __pyx_L8_try_return; - /* "lxml/objectify.pyx":1448 + /* "lxml/objectify.pyx":1449 * return None * value = textOf(c_node) * try: # <<<<<<<<<<<<<< @@ -22370,7 +22371,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "lxml/objectify.pyx":1451 + /* "lxml/objectify.pyx":1452 * pytype.type_check(value) * return pytype * except IGNORABLE_ERRORS: # <<<<<<<<<<<<<< @@ -22385,7 +22386,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check goto __pyx_L6_except_error; __pyx_L6_except_error:; - /* "lxml/objectify.pyx":1448 + /* "lxml/objectify.pyx":1449 * return None * value = textOf(c_node) * try: # <<<<<<<<<<<<<< @@ -22410,7 +22411,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6); } - /* "lxml/objectify.pyx":1454 + /* "lxml/objectify.pyx":1455 * # could not be parsed as the specified type => ignore * pass * return None # <<<<<<<<<<<<<< @@ -22421,7 +22422,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check __pyx_r = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1444 + /* "lxml/objectify.pyx":1445 * # Type annotations * * cdef PyType _check_type(tree.xmlNode* c_node, PyType pytype): # <<<<<<<<<<<<<< @@ -22443,7 +22444,7 @@ static struct __pyx_obj_4lxml_9objectify_PyType *__pyx_f_4lxml_9objectify__check return __pyx_r; } -/* "lxml/objectify.pyx":1456 +/* "lxml/objectify.pyx":1457 * return None * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22469,7 +22470,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, Py values[1] = ((PyObject *)((PyObject *)Py_False)); values[2] = ((PyObject *)((PyObject *)Py_False)); - /* "lxml/objectify.pyx":1457 + /* "lxml/objectify.pyx":1458 * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, * empty_pytype=None): # <<<<<<<<<<<<<< @@ -22500,7 +22501,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pyannotate") < 0)) __PYX_ERR(0, 1456, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pyannotate") < 0)) __PYX_ERR(0, 1457, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -22514,7 +22515,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1456, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pyannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1457, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.pyannotate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22522,7 +22523,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_21pyannotate(PyObject *__pyx_self, Py __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_9objectify_20pyannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype); - /* "lxml/objectify.pyx":1456 + /* "lxml/objectify.pyx":1457 * return None * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22544,32 +22545,32 @@ static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject * int __pyx_t_3; __Pyx_RefNannySetupContext("pyannotate", 0); - /* "lxml/objectify.pyx":1476 + /* "lxml/objectify.pyx":1477 * """ * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<< * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * */ - __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1476, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1477 + /* "lxml/objectify.pyx":1478 * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) # <<<<<<<<<<<<<< * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1477, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1477, __pyx_L1_error) - __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1477, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 0, 1, __pyx_t_2, __pyx_t_3, Py_None, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1478, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1456 + /* "lxml/objectify.pyx":1457 * return None * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22591,7 +22592,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_20pyannotate(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":1479 +/* "lxml/objectify.pyx":1480 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<< @@ -22617,7 +22618,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, P values[1] = ((PyObject *)((PyObject *)Py_False)); values[2] = ((PyObject *)((PyObject *)Py_False)); - /* "lxml/objectify.pyx":1480 + /* "lxml/objectify.pyx":1481 * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, * empty_type=None): # <<<<<<<<<<<<<< @@ -22648,7 +22649,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsiannotate") < 0)) __PYX_ERR(0, 1479, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xsiannotate") < 0)) __PYX_ERR(0, 1480, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -22662,7 +22663,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1479, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("xsiannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1480, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.xsiannotate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22670,7 +22671,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_23xsiannotate(PyObject *__pyx_self, P __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_9objectify_22xsiannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_pytype, __pyx_v_empty_type); - /* "lxml/objectify.pyx":1479 + /* "lxml/objectify.pyx":1480 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<< @@ -22692,32 +22693,32 @@ static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject int __pyx_t_3; __Pyx_RefNannySetupContext("xsiannotate", 0); - /* "lxml/objectify.pyx":1504 + /* "lxml/objectify.pyx":1505 * """ * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<< * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * */ - __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1505 + /* "lxml/objectify.pyx":1506 * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) # <<<<<<<<<<<<<< * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1505, __pyx_L1_error) - __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, 1, 0, __pyx_t_2, __pyx_t_3, __pyx_v_empty_type, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1479 + /* "lxml/objectify.pyx":1480 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<< @@ -22739,7 +22740,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_22xsiannotate(CYTHON_UNUSED PyObject return __pyx_r; } -/* "lxml/objectify.pyx":1507 +/* "lxml/objectify.pyx":1508 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22768,7 +22769,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyOb values[1] = ((PyObject *)((PyObject *)Py_True)); values[2] = ((PyObject *)((PyObject *)Py_False)); - /* "lxml/objectify.pyx":1508 + /* "lxml/objectify.pyx":1509 * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, * empty_pytype=None, empty_type=None, annotate_xsi=0, # <<<<<<<<<<<<<< @@ -22802,7 +22803,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "annotate") < 0)) __PYX_ERR(0, 1507, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "annotate") < 0)) __PYX_ERR(0, 1508, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -22819,7 +22820,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyOb } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1507, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("annotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1508, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.annotate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -22827,7 +22828,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_25annotate(PyObject *__pyx_self, PyOb __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_9objectify_24annotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_ignore_old, __pyx_v_ignore_xsi, __pyx_v_empty_pytype, __pyx_v_empty_type, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype); - /* "lxml/objectify.pyx":1507 + /* "lxml/objectify.pyx":1508 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22851,50 +22852,50 @@ static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__ int __pyx_t_5; __Pyx_RefNannySetupContext("annotate", 0); - /* "lxml/objectify.pyx":1541 + /* "lxml/objectify.pyx":1542 * """ * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) # <<<<<<<<<<<<<< * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi, * ignore_old, empty_type, empty_pytype) */ - __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)rootNodeOrRaise(__pyx_v_element_or_tree)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_element = ((struct LxmlElement *)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1542 + /* "lxml/objectify.pyx":1543 * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi, # <<<<<<<<<<<<<< * ignore_old, empty_type, empty_pytype) * */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_xsi); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_annotate_pytype); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_xsi); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error) - /* "lxml/objectify.pyx":1543 + /* "lxml/objectify.pyx":1544 * element = cetree.rootNodeOrRaise(element_or_tree) * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi, * ignore_old, empty_type, empty_pytype) # <<<<<<<<<<<<<< * * */ - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1543, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_ignore_old); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1544, __pyx_L1_error) - /* "lxml/objectify.pyx":1542 + /* "lxml/objectify.pyx":1543 * cdef _Element element * element = cetree.rootNodeOrRaise(element_or_tree) * _annotate(element, annotate_xsi, annotate_pytype, ignore_xsi, # <<<<<<<<<<<<<< * ignore_old, empty_type, empty_pytype) * */ - __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__annotate(__pyx_v_element, __pyx_t_2, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_v_empty_type, __pyx_v_empty_pytype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1507 + /* "lxml/objectify.pyx":1508 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<< @@ -22916,7 +22917,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_24annotate(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "lxml/objectify.pyx":1546 +/* "lxml/objectify.pyx":1547 * * * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype, # <<<<<<<<<<<<<< @@ -22942,7 +22943,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __Pyx_INCREF(__pyx_v_empty_type_name); __Pyx_INCREF(__pyx_v_empty_pytype_name); - /* "lxml/objectify.pyx":1553 + /* "lxml/objectify.pyx":1554 * cdef PyType empty_pytype, StrType, NoneType * * if not annotate_xsi and not annotate_pytype: # <<<<<<<<<<<<<< @@ -22960,7 +22961,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":1554 + /* "lxml/objectify.pyx":1555 * * if not annotate_xsi and not annotate_pytype: * return # <<<<<<<<<<<<<< @@ -22971,7 +22972,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "lxml/objectify.pyx":1553 + /* "lxml/objectify.pyx":1554 * cdef PyType empty_pytype, StrType, NoneType * * if not annotate_xsi and not annotate_pytype: # <<<<<<<<<<<<<< @@ -22980,7 +22981,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1556 + /* "lxml/objectify.pyx":1557 * return * * if empty_type_name is not None: # <<<<<<<<<<<<<< @@ -22991,7 +22992,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1557 + /* "lxml/objectify.pyx":1558 * * if empty_type_name is not None: * if isinstance(empty_type_name, bytes): # <<<<<<<<<<<<<< @@ -23002,7 +23003,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1558 + /* "lxml/objectify.pyx":1559 * if empty_type_name is not None: * if isinstance(empty_type_name, bytes): * empty_type_name = (empty_type_name).decode("ascii") # <<<<<<<<<<<<<< @@ -23011,14 +23012,14 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_empty_type_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1558, __pyx_L1_error) + __PYX_ERR(0, 1559, __pyx_L1_error) } - __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_type_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error) + __pyx_t_3 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_type_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_empty_type_name, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1557 + /* "lxml/objectify.pyx":1558 * * if empty_type_name is not None: * if isinstance(empty_type_name, bytes): # <<<<<<<<<<<<<< @@ -23027,7 +23028,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1559 + /* "lxml/objectify.pyx":1560 * if isinstance(empty_type_name, bytes): * empty_type_name = (empty_type_name).decode("ascii") * empty_pytype = _SCHEMA_TYPE_DICT.get(empty_type_name) # <<<<<<<<<<<<<< @@ -23036,9 +23037,9 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1559, __pyx_L1_error) + __PYX_ERR(0, 1560, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_empty_type_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_empty_type_name, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); @@ -23046,7 +23047,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1556 + /* "lxml/objectify.pyx":1557 * return * * if empty_type_name is not None: # <<<<<<<<<<<<<< @@ -23056,7 +23057,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ goto __pyx_L6; } - /* "lxml/objectify.pyx":1560 + /* "lxml/objectify.pyx":1561 * empty_type_name = (empty_type_name).decode("ascii") * empty_pytype = _SCHEMA_TYPE_DICT.get(empty_type_name) * elif empty_pytype_name is not None: # <<<<<<<<<<<<<< @@ -23067,7 +23068,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1561 + /* "lxml/objectify.pyx":1562 * empty_pytype = _SCHEMA_TYPE_DICT.get(empty_type_name) * elif empty_pytype_name is not None: * if isinstance(empty_pytype_name, bytes): # <<<<<<<<<<<<<< @@ -23078,7 +23079,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1562 + /* "lxml/objectify.pyx":1563 * elif empty_pytype_name is not None: * if isinstance(empty_pytype_name, bytes): * empty_pytype_name = (empty_pytype_name).decode("ascii") # <<<<<<<<<<<<<< @@ -23087,14 +23088,14 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_empty_pytype_name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1562, __pyx_L1_error) + __PYX_ERR(0, 1563, __pyx_L1_error) } - __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_pytype_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error) + __pyx_t_4 = __Pyx_decode_bytes(((PyObject*)__pyx_v_empty_pytype_name), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_empty_pytype_name, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1561 + /* "lxml/objectify.pyx":1562 * empty_pytype = _SCHEMA_TYPE_DICT.get(empty_type_name) * elif empty_pytype_name is not None: * if isinstance(empty_pytype_name, bytes): # <<<<<<<<<<<<<< @@ -23103,7 +23104,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1563 + /* "lxml/objectify.pyx":1564 * if isinstance(empty_pytype_name, bytes): * empty_pytype_name = (empty_pytype_name).decode("ascii") * empty_pytype = _PYTYPE_DICT.get(empty_pytype_name) # <<<<<<<<<<<<<< @@ -23112,9 +23113,9 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1563, __pyx_L1_error) + __PYX_ERR(0, 1564, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_empty_pytype_name, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_empty_pytype_name, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); @@ -23122,7 +23123,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_v_empty_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1560 + /* "lxml/objectify.pyx":1561 * empty_type_name = (empty_type_name).decode("ascii") * empty_pytype = _SCHEMA_TYPE_DICT.get(empty_type_name) * elif empty_pytype_name is not None: # <<<<<<<<<<<<<< @@ -23132,7 +23133,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ goto __pyx_L6; } - /* "lxml/objectify.pyx":1565 + /* "lxml/objectify.pyx":1566 * empty_pytype = _PYTYPE_DICT.get(empty_pytype_name) * else: * empty_pytype = None # <<<<<<<<<<<<<< @@ -23145,7 +23146,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ } __pyx_L6:; - /* "lxml/objectify.pyx":1567 + /* "lxml/objectify.pyx":1568 * empty_pytype = None * * StrType = _PYTYPE_DICT.get(u'str') # <<<<<<<<<<<<<< @@ -23154,9 +23155,9 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1567, __pyx_L1_error) + __PYX_ERR(0, 1568, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_str, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_str, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); @@ -23164,7 +23165,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_v_StrType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1568 + /* "lxml/objectify.pyx":1569 * * StrType = _PYTYPE_DICT.get(u'str') * NoneType = _PYTYPE_DICT.get(u'NoneType') # <<<<<<<<<<<<<< @@ -23173,9 +23174,9 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1568, __pyx_L1_error) + __PYX_ERR(0, 1569, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_NoneType, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_n_u_NoneType, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); @@ -23183,7 +23184,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_v_NoneType = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1570 + /* "lxml/objectify.pyx":1571 * NoneType = _PYTYPE_DICT.get(u'NoneType') * * doc = element._doc # <<<<<<<<<<<<<< @@ -23195,7 +23196,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_v_doc = ((struct LxmlDocument *)__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1571 + /* "lxml/objectify.pyx":1572 * * doc = element._doc * c_node = element._c_node # <<<<<<<<<<<<<< @@ -23205,7 +23206,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_5 = __pyx_v_element->_c_node; __pyx_v_c_node = __pyx_t_5; - /* "lxml/objectify.pyx":1572 + /* "lxml/objectify.pyx":1573 * doc = element._doc * c_node = element._c_node * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1) # <<<<<<<<<<<<<< @@ -23214,7 +23215,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ BEGIN_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node, __pyx_v_c_node, 1); - /* "lxml/objectify.pyx":1573 + /* "lxml/objectify.pyx":1574 * c_node = element._c_node * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1) * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -23224,16 +23225,16 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ __pyx_t_1 = ((__pyx_v_c_node->type == XML_ELEMENT_NODE) != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1574 + /* "lxml/objectify.pyx":1575 * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1) * if c_node.type == tree.XML_ELEMENT_NODE: * _annotate_element(c_node, doc, annotate_xsi, annotate_pytype, # <<<<<<<<<<<<<< * ignore_xsi, ignore_pytype, * empty_type_name, empty_pytype, StrType, NoneType) */ - __pyx_t_6 = __pyx_f_4lxml_9objectify__annotate_element(__pyx_v_c_node, __pyx_v_doc, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype, __pyx_v_ignore_xsi, __pyx_v_ignore_pytype, __pyx_v_empty_type_name, __pyx_v_empty_pytype, __pyx_v_StrType, __pyx_v_NoneType); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_9objectify__annotate_element(__pyx_v_c_node, __pyx_v_doc, __pyx_v_annotate_xsi, __pyx_v_annotate_pytype, __pyx_v_ignore_xsi, __pyx_v_ignore_pytype, __pyx_v_empty_type_name, __pyx_v_empty_pytype, __pyx_v_StrType, __pyx_v_NoneType); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1575, __pyx_L1_error) - /* "lxml/objectify.pyx":1573 + /* "lxml/objectify.pyx":1574 * c_node = element._c_node * tree.BEGIN_FOR_EACH_ELEMENT_FROM(c_node, c_node, 1) * if c_node.type == tree.XML_ELEMENT_NODE: # <<<<<<<<<<<<<< @@ -23242,7 +23243,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ } - /* "lxml/objectify.pyx":1577 + /* "lxml/objectify.pyx":1578 * ignore_xsi, ignore_pytype, * empty_type_name, empty_pytype, StrType, NoneType) * tree.END_FOR_EACH_ELEMENT_FROM(c_node) # <<<<<<<<<<<<<< @@ -23251,7 +23252,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ */ END_FOR_EACH_ELEMENT_FROM(__pyx_v_c_node); - /* "lxml/objectify.pyx":1546 + /* "lxml/objectify.pyx":1547 * * * cdef _annotate(_Element element, bint annotate_xsi, bint annotate_pytype, # <<<<<<<<<<<<<< @@ -23279,7 +23280,7 @@ static PyObject *__pyx_f_4lxml_9objectify__annotate(struct LxmlElement *__pyx_v_ return __pyx_r; } -/* "lxml/objectify.pyx":1579 +/* "lxml/objectify.pyx":1580 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc, # <<<<<<<<<<<<<< @@ -23309,7 +23310,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s PyObject *(*__pyx_t_8)(PyObject *); __Pyx_RefNannySetupContext("_annotate_element", 0); - /* "lxml/objectify.pyx":1585 + /* "lxml/objectify.pyx":1586 * PyType StrType, PyType NoneType) except -1: * cdef tree.xmlNs* c_ns * cdef PyType pytype = None # <<<<<<<<<<<<<< @@ -23319,7 +23320,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(Py_None); __pyx_v_pytype = ((struct __pyx_obj_4lxml_9objectify_PyType *)Py_None); - /* "lxml/objectify.pyx":1586 + /* "lxml/objectify.pyx":1587 * cdef tree.xmlNs* c_ns * cdef PyType pytype = None * typename = None # <<<<<<<<<<<<<< @@ -23329,7 +23330,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(Py_None); __pyx_v_typename = Py_None; - /* "lxml/objectify.pyx":1587 + /* "lxml/objectify.pyx":1588 * cdef PyType pytype = None * typename = None * istree = 0 # <<<<<<<<<<<<<< @@ -23338,20 +23339,20 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_v_istree = 0; - /* "lxml/objectify.pyx":1590 + /* "lxml/objectify.pyx":1591 * * # if element is defined as xsi:nil, represent it as None * if cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == "true": * pytype = NoneType */ - __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"nil")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_n_s_true, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1592 + /* "lxml/objectify.pyx":1593 * if cetree.attributeValueFromNsName( * c_node, _XML_SCHEMA_INSTANCE_NS, "nil") == "true": * pytype = NoneType # <<<<<<<<<<<<<< @@ -23361,7 +23362,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(((PyObject *)__pyx_v_NoneType)); __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_NoneType); - /* "lxml/objectify.pyx":1590 + /* "lxml/objectify.pyx":1591 * * # if element is defined as xsi:nil, represent it as None * if cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< @@ -23370,7 +23371,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1594 + /* "lxml/objectify.pyx":1595 * pytype = NoneType * * if pytype is None and not ignore_xsi: # <<<<<<<<<<<<<< @@ -23389,19 +23390,19 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1596 + /* "lxml/objectify.pyx":1597 * if pytype is None and not ignore_xsi: * # check that old xsi type value is valid * typename = cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * if typename is not None: */ - __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1596, __pyx_L1_error) + __pyx_t_1 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type")))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1598 + /* "lxml/objectify.pyx":1599 * typename = cetree.attributeValueFromNsName( * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * if typename is not None: # <<<<<<<<<<<<<< @@ -23412,7 +23413,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_4 = (__pyx_t_2 != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1599 + /* "lxml/objectify.pyx":1600 * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * if typename is not None: * pytype = _SCHEMA_TYPE_DICT.get(typename) # <<<<<<<<<<<<<< @@ -23421,9 +23422,9 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1599, __pyx_L1_error) + __PYX_ERR(0, 1600, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1599, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); @@ -23431,7 +23432,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_5)); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1600 + /* "lxml/objectify.pyx":1601 * if typename is not None: * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is None and u':' in typename: # <<<<<<<<<<<<<< @@ -23445,22 +23446,22 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_4 = __pyx_t_3; goto __pyx_L9_bool_binop_done; } - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_typename, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1600, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v_typename, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1601, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); __pyx_t_4 = __pyx_t_2; __pyx_L9_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/objectify.pyx":1601 + /* "lxml/objectify.pyx":1602 * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is None and u':' in typename: * prefix, typename = typename.split(u':', 1) # <<<<<<<<<<<<<< * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is not None and pytype is not StrType: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_typename, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -23469,7 +23470,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1601, __pyx_L1_error) + __PYX_ERR(0, 1602, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -23482,15 +23483,15 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1602, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -23498,7 +23499,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_GOTREF(__pyx_t_5); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1601, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1602, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L12_unpacking_done; @@ -23506,7 +23507,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1601, __pyx_L1_error) + __PYX_ERR(0, 1602, __pyx_L1_error) __pyx_L12_unpacking_done:; } __pyx_v_prefix = __pyx_t_5; @@ -23514,7 +23515,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1602 + /* "lxml/objectify.pyx":1603 * if pytype is None and u':' in typename: * prefix, typename = typename.split(u':', 1) * pytype = _SCHEMA_TYPE_DICT.get(typename) # <<<<<<<<<<<<<< @@ -23523,9 +23524,9 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1602, __pyx_L1_error) + __PYX_ERR(0, 1603, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1602, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_typename, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); @@ -23533,7 +23534,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1600 + /* "lxml/objectify.pyx":1601 * if typename is not None: * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is None and u':' in typename: # <<<<<<<<<<<<<< @@ -23542,7 +23543,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1603 + /* "lxml/objectify.pyx":1604 * prefix, typename = typename.split(u':', 1) * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is not None and pytype is not StrType: # <<<<<<<<<<<<<< @@ -23562,19 +23563,19 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L14_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/objectify.pyx":1607 + /* "lxml/objectify.pyx":1608 * # anyway, so just accept it if given as type * # information * pytype = _check_type(c_node, pytype) # <<<<<<<<<<<<<< * if pytype is None: * typename = None */ - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1607, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1608, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1608 + /* "lxml/objectify.pyx":1609 * # information * pytype = _check_type(c_node, pytype) * if pytype is None: # <<<<<<<<<<<<<< @@ -23585,7 +23586,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = (__pyx_t_4 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1609 + /* "lxml/objectify.pyx":1610 * pytype = _check_type(c_node, pytype) * if pytype is None: * typename = None # <<<<<<<<<<<<<< @@ -23595,7 +23596,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_typename, Py_None); - /* "lxml/objectify.pyx":1608 + /* "lxml/objectify.pyx":1609 * # information * pytype = _check_type(c_node, pytype) * if pytype is None: # <<<<<<<<<<<<<< @@ -23604,7 +23605,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1603 + /* "lxml/objectify.pyx":1604 * prefix, typename = typename.split(u':', 1) * pytype = _SCHEMA_TYPE_DICT.get(typename) * if pytype is not None and pytype is not StrType: # <<<<<<<<<<<<<< @@ -23613,7 +23614,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1598 + /* "lxml/objectify.pyx":1599 * typename = cetree.attributeValueFromNsName( * c_node, _XML_SCHEMA_INSTANCE_NS, "type") * if typename is not None: # <<<<<<<<<<<<<< @@ -23622,7 +23623,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1594 + /* "lxml/objectify.pyx":1595 * pytype = NoneType * * if pytype is None and not ignore_xsi: # <<<<<<<<<<<<<< @@ -23631,7 +23632,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1611 + /* "lxml/objectify.pyx":1612 * typename = None * * if pytype is None and not ignore_pytype: # <<<<<<<<<<<<<< @@ -23650,19 +23651,19 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L18_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1613 + /* "lxml/objectify.pyx":1614 * if pytype is None and not ignore_pytype: * # check that old pytype value is valid * old_pytypename = cetree.attributeValueFromNsName( # <<<<<<<<<<<<<< * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if old_pytypename is not None: */ - __pyx_t_6 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1613, __pyx_L1_error) + __pyx_t_6 = attributeValueFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1614, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_old_pytypename = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1615 + /* "lxml/objectify.pyx":1616 * old_pytypename = cetree.attributeValueFromNsName( * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if old_pytypename is not None: # <<<<<<<<<<<<<< @@ -23673,17 +23674,17 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1616 + /* "lxml/objectify.pyx":1617 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if old_pytypename is not None: * if old_pytypename == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< * if not cetree.hasChild(c_node): * # only case where we should keep it, */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1616, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_old_pytypename, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1617, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/objectify.pyx":1617 + /* "lxml/objectify.pyx":1618 * if old_pytypename is not None: * if old_pytypename == TREE_PYTYPE_NAME: * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -23693,7 +23694,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1620 + /* "lxml/objectify.pyx":1621 * # only case where we should keep it, * # everything else is clear enough * pytype = TREE_PYTYPE # <<<<<<<<<<<<<< @@ -23703,7 +23704,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE)); __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE); - /* "lxml/objectify.pyx":1617 + /* "lxml/objectify.pyx":1618 * if old_pytypename is not None: * if old_pytypename == TREE_PYTYPE_NAME: * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -23712,7 +23713,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1616 + /* "lxml/objectify.pyx":1617 * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if old_pytypename is not None: * if old_pytypename == TREE_PYTYPE_NAME: # <<<<<<<<<<<<<< @@ -23722,7 +23723,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L21; } - /* "lxml/objectify.pyx":1622 + /* "lxml/objectify.pyx":1623 * pytype = TREE_PYTYPE * else: * if old_pytypename == 'none': # <<<<<<<<<<<<<< @@ -23730,10 +23731,10 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s * old_pytypename = "NoneType" */ /*else*/ { - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_old_pytypename, __pyx_n_s_none, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_old_pytypename, __pyx_n_s_none, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1623, __pyx_L1_error) if (__pyx_t_3) { - /* "lxml/objectify.pyx":1624 + /* "lxml/objectify.pyx":1625 * if old_pytypename == 'none': * # transition from lxml 1.x * old_pytypename = "NoneType" # <<<<<<<<<<<<<< @@ -23743,7 +23744,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(__pyx_n_s_NoneType); __Pyx_DECREF_SET(__pyx_v_old_pytypename, __pyx_n_s_NoneType); - /* "lxml/objectify.pyx":1622 + /* "lxml/objectify.pyx":1623 * pytype = TREE_PYTYPE * else: * if old_pytypename == 'none': # <<<<<<<<<<<<<< @@ -23752,7 +23753,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1625 + /* "lxml/objectify.pyx":1626 * # transition from lxml 1.x * old_pytypename = "NoneType" * pytype = _PYTYPE_DICT.get(old_pytypename) # <<<<<<<<<<<<<< @@ -23761,9 +23762,9 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1625, __pyx_L1_error) + __PYX_ERR(0, 1626, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_old_pytypename, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v_old_pytypename, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); @@ -23771,7 +23772,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1626 + /* "lxml/objectify.pyx":1627 * old_pytypename = "NoneType" * pytype = _PYTYPE_DICT.get(old_pytypename) * if pytype is not None and pytype is not StrType: # <<<<<<<<<<<<<< @@ -23791,19 +23792,19 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L25_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1630 + /* "lxml/objectify.pyx":1631 * # default anyway, so just accept it if given as * # type information * pytype = _check_type(c_node, pytype) # <<<<<<<<<<<<<< * * if pytype is None: */ - __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1630, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_4lxml_9objectify__check_type(__pyx_v_c_node, __pyx_v_pytype)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_1)); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1626 + /* "lxml/objectify.pyx":1627 * old_pytypename = "NoneType" * pytype = _PYTYPE_DICT.get(old_pytypename) * if pytype is not None and pytype is not StrType: # <<<<<<<<<<<<<< @@ -23814,7 +23815,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L21:; - /* "lxml/objectify.pyx":1615 + /* "lxml/objectify.pyx":1616 * old_pytypename = cetree.attributeValueFromNsName( * c_node, _PYTYPE_NAMESPACE, _PYTYPE_ATTRIBUTE_NAME) * if old_pytypename is not None: # <<<<<<<<<<<<<< @@ -23823,7 +23824,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1611 + /* "lxml/objectify.pyx":1612 * typename = None * * if pytype is None and not ignore_pytype: # <<<<<<<<<<<<<< @@ -23832,7 +23833,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1632 + /* "lxml/objectify.pyx":1633 * pytype = _check_type(c_node, pytype) * * if pytype is None: # <<<<<<<<<<<<<< @@ -23843,7 +23844,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1634 + /* "lxml/objectify.pyx":1635 * if pytype is None: * # try to guess type * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -23853,22 +23854,22 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = ((!(hasChild(__pyx_v_c_node) != 0)) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1636 + /* "lxml/objectify.pyx":1637 * if not cetree.hasChild(c_node): * # element has no children => data class * pytype = _guessPyType(textOf(c_node), StrType) # <<<<<<<<<<<<<< * else: * istree = 1 */ - __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1636, __pyx_L1_error) + __pyx_t_1 = textOf(__pyx_v_c_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_1, __pyx_v_StrType)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1636, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__guessPyType(__pyx_t_1, __pyx_v_StrType)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_pytype, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1634 + /* "lxml/objectify.pyx":1635 * if pytype is None: * # try to guess type * if not cetree.hasChild(c_node): # <<<<<<<<<<<<<< @@ -23878,7 +23879,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L28; } - /* "lxml/objectify.pyx":1638 + /* "lxml/objectify.pyx":1639 * pytype = _guessPyType(textOf(c_node), StrType) * else: * istree = 1 # <<<<<<<<<<<<<< @@ -23890,7 +23891,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L28:; - /* "lxml/objectify.pyx":1632 + /* "lxml/objectify.pyx":1633 * pytype = _check_type(c_node, pytype) * * if pytype is None: # <<<<<<<<<<<<<< @@ -23899,7 +23900,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1640 + /* "lxml/objectify.pyx":1641 * istree = 1 * * if pytype is None: # <<<<<<<<<<<<<< @@ -23910,7 +23911,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1642 + /* "lxml/objectify.pyx":1643 * if pytype is None: * # use default type for empty elements * if cetree.hasText(c_node): # <<<<<<<<<<<<<< @@ -23920,7 +23921,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (hasText(__pyx_v_c_node) != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1643 + /* "lxml/objectify.pyx":1644 * # use default type for empty elements * if cetree.hasText(c_node): * pytype = StrType # <<<<<<<<<<<<<< @@ -23930,7 +23931,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(((PyObject *)__pyx_v_StrType)); __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_StrType); - /* "lxml/objectify.pyx":1642 + /* "lxml/objectify.pyx":1643 * if pytype is None: * # use default type for empty elements * if cetree.hasText(c_node): # <<<<<<<<<<<<<< @@ -23940,7 +23941,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L30; } - /* "lxml/objectify.pyx":1645 + /* "lxml/objectify.pyx":1646 * pytype = StrType * else: * pytype = empty_pytype # <<<<<<<<<<<<<< @@ -23951,7 +23952,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(((PyObject *)__pyx_v_empty_pytype)); __Pyx_DECREF_SET(__pyx_v_pytype, __pyx_v_empty_pytype); - /* "lxml/objectify.pyx":1646 + /* "lxml/objectify.pyx":1647 * else: * pytype = empty_pytype * if typename is None: # <<<<<<<<<<<<<< @@ -23962,7 +23963,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1647 + /* "lxml/objectify.pyx":1648 * pytype = empty_pytype * if typename is None: * typename = empty_type_name # <<<<<<<<<<<<<< @@ -23972,7 +23973,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(__pyx_v_empty_type_name); __Pyx_DECREF_SET(__pyx_v_typename, __pyx_v_empty_type_name); - /* "lxml/objectify.pyx":1646 + /* "lxml/objectify.pyx":1647 * else: * pytype = empty_pytype * if typename is None: # <<<<<<<<<<<<<< @@ -23983,7 +23984,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L30:; - /* "lxml/objectify.pyx":1640 + /* "lxml/objectify.pyx":1641 * istree = 1 * * if pytype is None: # <<<<<<<<<<<<<< @@ -23992,7 +23993,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1649 + /* "lxml/objectify.pyx":1650 * typename = empty_type_name * * if pytype is not None: # <<<<<<<<<<<<<< @@ -24003,7 +24004,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1650 + /* "lxml/objectify.pyx":1651 * * if pytype is not None: * if typename is None: # <<<<<<<<<<<<<< @@ -24014,7 +24015,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1651 + /* "lxml/objectify.pyx":1652 * if pytype is not None: * if typename is None: * if not istree: # <<<<<<<<<<<<<< @@ -24024,7 +24025,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = ((!(__pyx_v_istree != 0)) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1652 + /* "lxml/objectify.pyx":1653 * if typename is None: * if not istree: * if pytype._schema_types: # <<<<<<<<<<<<<< @@ -24034,7 +24035,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_2 = (__pyx_v_pytype->_schema_types != Py_None)&&(PyList_GET_SIZE(__pyx_v_pytype->_schema_types) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1655 + /* "lxml/objectify.pyx":1656 * # pytype->xsi:type is a 1:n mapping * # simply take the first * typename = pytype._schema_types[0] # <<<<<<<<<<<<<< @@ -24043,14 +24044,14 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1655, __pyx_L1_error) + __PYX_ERR(0, 1656, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1655, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1656, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1652 + /* "lxml/objectify.pyx":1653 * if typename is None: * if not istree: * if pytype._schema_types: # <<<<<<<<<<<<<< @@ -24059,7 +24060,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1651 + /* "lxml/objectify.pyx":1652 * if pytype is not None: * if typename is None: * if not istree: # <<<<<<<<<<<<<< @@ -24068,7 +24069,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1650 + /* "lxml/objectify.pyx":1651 * * if pytype is not None: * if typename is None: # <<<<<<<<<<<<<< @@ -24078,18 +24079,18 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L33; } - /* "lxml/objectify.pyx":1656 + /* "lxml/objectify.pyx":1657 * # simply take the first * typename = pytype._schema_types[0] * elif typename not in pytype._schema_types: # <<<<<<<<<<<<<< * typename = pytype._schema_types[0] * */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_typename, __pyx_v_pytype->_schema_types, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1656, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_typename, __pyx_v_pytype->_schema_types, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1657, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1657 + /* "lxml/objectify.pyx":1658 * typename = pytype._schema_types[0] * elif typename not in pytype._schema_types: * typename = pytype._schema_types[0] # <<<<<<<<<<<<<< @@ -24098,14 +24099,14 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ if (unlikely(__pyx_v_pytype->_schema_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1657, __pyx_L1_error) + __PYX_ERR(0, 1658, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1657, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_pytype->_schema_types, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1658, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_typename, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1656 + /* "lxml/objectify.pyx":1657 * # simply take the first * typename = pytype._schema_types[0] * elif typename not in pytype._schema_types: # <<<<<<<<<<<<<< @@ -24115,7 +24116,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L33:; - /* "lxml/objectify.pyx":1649 + /* "lxml/objectify.pyx":1650 * typename = empty_type_name * * if pytype is not None: # <<<<<<<<<<<<<< @@ -24124,7 +24125,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1659 + /* "lxml/objectify.pyx":1660 * typename = pytype._schema_types[0] * * if annotate_xsi: # <<<<<<<<<<<<<< @@ -24134,7 +24135,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (__pyx_v_annotate_xsi != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1660 + /* "lxml/objectify.pyx":1661 * * if annotate_xsi: * if typename is None or istree: # <<<<<<<<<<<<<< @@ -24153,7 +24154,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L38_bool_binop_done:; if (__pyx_t_3) { - /* "lxml/objectify.pyx":1661 + /* "lxml/objectify.pyx":1662 * if annotate_xsi: * if typename is None or istree: * cetree.delAttributeFromNsName( # <<<<<<<<<<<<<< @@ -24162,7 +24163,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"type"))))); - /* "lxml/objectify.pyx":1660 + /* "lxml/objectify.pyx":1661 * * if annotate_xsi: * if typename is None or istree: # <<<<<<<<<<<<<< @@ -24172,7 +24173,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L37; } - /* "lxml/objectify.pyx":1665 + /* "lxml/objectify.pyx":1666 * else: * # update or create attribute * typename_utf8 = cetree.utf8(typename) # <<<<<<<<<<<<<< @@ -24180,12 +24181,12 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s * doc, c_node, _XML_SCHEMA_NS, 'xsd') */ /*else*/ { - __pyx_t_6 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1665, __pyx_L1_error) + __pyx_t_6 = utf8(__pyx_v_typename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1666, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_typename_utf8 = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1666 + /* "lxml/objectify.pyx":1667 * # update or create attribute * typename_utf8 = cetree.utf8(typename) * c_ns = cetree.findOrBuildNodeNsPrefix( # <<<<<<<<<<<<<< @@ -24194,7 +24195,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_NS, ((unsigned char *)((unsigned char *)((char const *)"xsd")))); - /* "lxml/objectify.pyx":1668 + /* "lxml/objectify.pyx":1669 * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _XML_SCHEMA_NS, 'xsd') * if c_ns is not NULL: # <<<<<<<<<<<<<< @@ -24204,25 +24205,25 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = ((__pyx_v_c_ns != NULL) != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1669 + /* "lxml/objectify.pyx":1670 * doc, c_node, _XML_SCHEMA_NS, 'xsd') * if c_ns is not NULL: * if b':' in typename_utf8: # <<<<<<<<<<<<<< * prefix, name = typename_utf8.split(b':', 1) * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': */ - __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__17, __pyx_v_typename_utf8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1669, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_kp_b__17, __pyx_v_typename_utf8, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1670, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1670 + /* "lxml/objectify.pyx":1671 * if c_ns is not NULL: * if b':' in typename_utf8: * prefix, name = typename_utf8.split(b':', 1) # <<<<<<<<<<<<<< * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': * typename_utf8 = name */ - __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_split, __pyx_v_typename_utf8, __pyx_kp_b__17, __pyx_int_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1670, __pyx_L1_error) + __pyx_t_6 = __Pyx_CallUnboundCMethod2(&__pyx_umethod_PyBytes_Type_split, __pyx_v_typename_utf8, __pyx_kp_b__17, __pyx_int_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { PyObject* sequence = __pyx_t_6; @@ -24230,7 +24231,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1670, __pyx_L1_error) + __PYX_ERR(0, 1671, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -24243,15 +24244,15 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1670, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1670, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -24259,7 +24260,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L42_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1670, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1671, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L43_unpacking_done; @@ -24267,7 +24268,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1670, __pyx_L1_error) + __PYX_ERR(0, 1671, __pyx_L1_error) __pyx_L43_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_1); @@ -24275,7 +24276,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_v_name = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1671 + /* "lxml/objectify.pyx":1672 * if b':' in typename_utf8: * prefix, name = typename_utf8.split(b':', 1) * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': # <<<<<<<<<<<<<< @@ -24293,7 +24294,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L45_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/objectify.pyx":1672 + /* "lxml/objectify.pyx":1673 * prefix, name = typename_utf8.split(b':', 1) * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': * typename_utf8 = name # <<<<<<<<<<<<<< @@ -24303,7 +24304,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __Pyx_INCREF(__pyx_v_name); __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_v_name); - /* "lxml/objectify.pyx":1671 + /* "lxml/objectify.pyx":1672 * if b':' in typename_utf8: * prefix, name = typename_utf8.split(b':', 1) * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': # <<<<<<<<<<<<<< @@ -24313,7 +24314,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L44; } - /* "lxml/objectify.pyx":1673 + /* "lxml/objectify.pyx":1674 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': * typename_utf8 = name * elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0: # <<<<<<<<<<<<<< @@ -24323,25 +24324,25 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_4 = ((xmlStrcmp((const xmlChar*)PyBytes_AS_STRING(__pyx_v_prefix), __pyx_v_c_ns->prefix) != 0) != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1674 + /* "lxml/objectify.pyx":1675 * typename_utf8 = name * elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0: * typename_utf8 = (c_ns.prefix) + b':' + name # <<<<<<<<<<<<<< * elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0': * typename_utf8 = (c_ns.prefix) + b':' + typename_utf8 */ - __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1674, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1673 + /* "lxml/objectify.pyx":1674 * if c_ns.prefix is NULL or c_ns.prefix[0] == c'\0': * typename_utf8 = name * elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0: # <<<<<<<<<<<<<< @@ -24351,7 +24352,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L44:; - /* "lxml/objectify.pyx":1669 + /* "lxml/objectify.pyx":1670 * doc, c_node, _XML_SCHEMA_NS, 'xsd') * if c_ns is not NULL: * if b':' in typename_utf8: # <<<<<<<<<<<<<< @@ -24361,7 +24362,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L41; } - /* "lxml/objectify.pyx":1675 + /* "lxml/objectify.pyx":1676 * elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0: * typename_utf8 = (c_ns.prefix) + b':' + name * elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0': # <<<<<<<<<<<<<< @@ -24379,25 +24380,25 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_L47_bool_binop_done:; if (__pyx_t_4) { - /* "lxml/objectify.pyx":1676 + /* "lxml/objectify.pyx":1677 * typename_utf8 = (c_ns.prefix) + b':' + name * elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0': * typename_utf8 = (c_ns.prefix) + b':' + typename_utf8 # <<<<<<<<<<<<<< * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi') */ - __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBytes_FromCString(((unsigned char *)__pyx_v_c_ns->prefix)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1676, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_kp_b__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1676, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_v_typename_utf8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1677, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_typename_utf8, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1675 + /* "lxml/objectify.pyx":1676 * elif tree.xmlStrcmp(_xcstr(prefix), c_ns.prefix) != 0: * typename_utf8 = (c_ns.prefix) + b':' + name * elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0': # <<<<<<<<<<<<<< @@ -24407,7 +24408,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L41:; - /* "lxml/objectify.pyx":1668 + /* "lxml/objectify.pyx":1669 * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _XML_SCHEMA_NS, 'xsd') * if c_ns is not NULL: # <<<<<<<<<<<<<< @@ -24416,7 +24417,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1677 + /* "lxml/objectify.pyx":1678 * elif c_ns.prefix is not NULL and c_ns.prefix[0] != c'\0': * typename_utf8 = (c_ns.prefix) + b':' + typename_utf8 * c_ns = cetree.findOrBuildNodeNsPrefix( # <<<<<<<<<<<<<< @@ -24425,7 +24426,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"xsi")))); - /* "lxml/objectify.pyx":1679 + /* "lxml/objectify.pyx":1680 * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi') * tree.xmlSetNsProp(c_node, c_ns, "type", _xcstr(typename_utf8)) # <<<<<<<<<<<<<< @@ -24436,7 +24437,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L37:; - /* "lxml/objectify.pyx":1659 + /* "lxml/objectify.pyx":1660 * typename = pytype._schema_types[0] * * if annotate_xsi: # <<<<<<<<<<<<<< @@ -24445,7 +24446,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1681 + /* "lxml/objectify.pyx":1682 * tree.xmlSetNsProp(c_node, c_ns, "type", _xcstr(typename_utf8)) * * if annotate_pytype: # <<<<<<<<<<<<<< @@ -24455,7 +24456,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_4 = (__pyx_v_annotate_pytype != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1682 + /* "lxml/objectify.pyx":1683 * * if annotate_pytype: * if pytype is None: # <<<<<<<<<<<<<< @@ -24466,7 +24467,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1684 + /* "lxml/objectify.pyx":1685 * if pytype is None: * # delete attribute if it exists * cetree.delAttributeFromNsName( # <<<<<<<<<<<<<< @@ -24475,7 +24476,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ (void)(delAttributeFromNsName(__pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME)); - /* "lxml/objectify.pyx":1682 + /* "lxml/objectify.pyx":1683 * * if annotate_pytype: * if pytype is None: # <<<<<<<<<<<<<< @@ -24485,7 +24486,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s goto __pyx_L50; } - /* "lxml/objectify.pyx":1688 + /* "lxml/objectify.pyx":1689 * else: * # update or create attribute * c_ns = cetree.findOrBuildNodeNsPrefix( # <<<<<<<<<<<<<< @@ -24494,7 +24495,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ /*else*/ { - /* "lxml/objectify.pyx":1689 + /* "lxml/objectify.pyx":1690 * # update or create attribute * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _PYTYPE_NAMESPACE, 'py') # <<<<<<<<<<<<<< @@ -24503,7 +24504,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__PYTYPE_NAMESPACE, ((unsigned char *)((unsigned char *)((char const *)"py")))); - /* "lxml/objectify.pyx":1690 + /* "lxml/objectify.pyx":1691 * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _PYTYPE_NAMESPACE, 'py') * pytype_name = cetree.utf8(pytype.name) # <<<<<<<<<<<<<< @@ -24512,13 +24513,13 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_t_6 = __pyx_v_pytype->name; __Pyx_INCREF(__pyx_t_6); - __pyx_t_5 = utf8(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error) + __pyx_t_5 = utf8(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_pytype_name = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1691 + /* "lxml/objectify.pyx":1692 * doc, c_node, _PYTYPE_NAMESPACE, 'py') * pytype_name = cetree.utf8(pytype.name) * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME, # <<<<<<<<<<<<<< @@ -24527,7 +24528,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, __pyx_v_4lxml_9objectify__PYTYPE_ATTRIBUTE_NAME, (const xmlChar*)PyBytes_AS_STRING(__pyx_v_pytype_name))); - /* "lxml/objectify.pyx":1693 + /* "lxml/objectify.pyx":1694 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME, * _xcstr(pytype_name)) * if pytype is NoneType: # <<<<<<<<<<<<<< @@ -24538,7 +24539,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "lxml/objectify.pyx":1694 + /* "lxml/objectify.pyx":1695 * _xcstr(pytype_name)) * if pytype is NoneType: * c_ns = cetree.findOrBuildNodeNsPrefix( # <<<<<<<<<<<<<< @@ -24547,7 +24548,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ __pyx_v_c_ns = findOrBuildNodeNsPrefix(__pyx_v_doc, __pyx_v_c_node, __pyx_v_4lxml_9objectify__XML_SCHEMA_INSTANCE_NS, ((unsigned char *)((unsigned char *)((char const *)"xsi")))); - /* "lxml/objectify.pyx":1696 + /* "lxml/objectify.pyx":1697 * c_ns = cetree.findOrBuildNodeNsPrefix( * doc, c_node, _XML_SCHEMA_INSTANCE_NS, 'xsi') * tree.xmlSetNsProp(c_node, c_ns, "nil", "true") # <<<<<<<<<<<<<< @@ -24556,7 +24557,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ (void)(xmlSetNsProp(__pyx_v_c_node, __pyx_v_c_ns, ((unsigned char *)((unsigned char *)((char const *)"nil"))), ((unsigned char *)((unsigned char *)((char const *)"true"))))); - /* "lxml/objectify.pyx":1693 + /* "lxml/objectify.pyx":1694 * tree.xmlSetNsProp(c_node, c_ns, _PYTYPE_ATTRIBUTE_NAME, * _xcstr(pytype_name)) * if pytype is NoneType: # <<<<<<<<<<<<<< @@ -24567,7 +24568,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s } __pyx_L50:; - /* "lxml/objectify.pyx":1681 + /* "lxml/objectify.pyx":1682 * tree.xmlSetNsProp(c_node, c_ns, "type", _xcstr(typename_utf8)) * * if annotate_pytype: # <<<<<<<<<<<<<< @@ -24576,7 +24577,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s */ } - /* "lxml/objectify.pyx":1698 + /* "lxml/objectify.pyx":1699 * tree.xmlSetNsProp(c_node, c_ns, "nil", "true") * * return 0 # <<<<<<<<<<<<<< @@ -24586,7 +24587,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s __pyx_r = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1579 + /* "lxml/objectify.pyx":1580 * tree.END_FOR_EACH_ELEMENT_FROM(c_node) * * cdef int _annotate_element(tree.xmlNode* c_node, _Document doc, # <<<<<<<<<<<<<< @@ -24614,7 +24615,7 @@ static int __pyx_f_4lxml_9objectify__annotate_element(xmlNode *__pyx_v_c_node, s return __pyx_r; } -/* "lxml/objectify.pyx":1703 +/* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< @@ -24661,7 +24662,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, Py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deannotate") < 0)) __PYX_ERR(0, 1703, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "deannotate") < 0)) __PYX_ERR(0, 1704, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -24670,20 +24671,20 @@ static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, Py } __pyx_v_element_or_tree = values[0]; if (values[1]) { - __pyx_v_pytype = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pytype == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1703, __pyx_L3_error) + __pyx_v_pytype = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_pytype == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) } else { __pyx_v_pytype = ((int)((int)1)); } if (values[2]) { - __pyx_v_xsi = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_xsi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1703, __pyx_L3_error) + __pyx_v_xsi = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_xsi == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) } else { __pyx_v_xsi = ((int)((int)1)); } if (values[3]) { - __pyx_v_xsi_nil = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_xsi_nil == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + __pyx_v_xsi_nil = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_xsi_nil == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1705, __pyx_L3_error) } else { - /* "lxml/objectify.pyx":1704 + /* "lxml/objectify.pyx":1705 * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, * bint xsi_nil=False, bint cleanup_namespaces=False): # <<<<<<<<<<<<<< @@ -24693,14 +24694,14 @@ static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, Py __pyx_v_xsi_nil = ((int)((int)0)); } if (values[4]) { - __pyx_v_cleanup_namespaces = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_cleanup_namespaces == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1704, __pyx_L3_error) + __pyx_v_cleanup_namespaces = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_cleanup_namespaces == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1705, __pyx_L3_error) } else { __pyx_v_cleanup_namespaces = ((int)((int)0)); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1703, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("deannotate", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1704, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.deannotate", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -24708,7 +24709,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_27deannotate(PyObject *__pyx_self, Py __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_4lxml_9objectify_26deannotate(__pyx_self, __pyx_v_element_or_tree, __pyx_v_pytype, __pyx_v_xsi, __pyx_v_xsi_nil, __pyx_v_cleanup_namespaces); - /* "lxml/objectify.pyx":1703 + /* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< @@ -24732,19 +24733,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("deannotate", 0); - /* "lxml/objectify.pyx":1720 + /* "lxml/objectify.pyx":1721 * the tree, pass the option ``cleanup_namespaces=True``. * """ * cdef list attribute_names = [] # <<<<<<<<<<<<<< * * if pytype: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attribute_names = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1722 + /* "lxml/objectify.pyx":1723 * cdef list attribute_names = [] * * if pytype: # <<<<<<<<<<<<<< @@ -24754,19 +24755,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_v_pytype != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1723 + /* "lxml/objectify.pyx":1724 * * if pytype: * attribute_names.append(PYTYPE_ATTRIBUTE) # <<<<<<<<<<<<<< * if xsi: * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1723, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1723, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1724, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1722 + /* "lxml/objectify.pyx":1723 * cdef list attribute_names = [] * * if pytype: # <<<<<<<<<<<<<< @@ -24775,7 +24776,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1724 + /* "lxml/objectify.pyx":1725 * if pytype: * attribute_names.append(PYTYPE_ATTRIBUTE) * if xsi: # <<<<<<<<<<<<<< @@ -24785,7 +24786,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_v_xsi != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1725 + /* "lxml/objectify.pyx":1726 * attribute_names.append(PYTYPE_ATTRIBUTE) * if xsi: * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) # <<<<<<<<<<<<<< @@ -24794,10 +24795,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1725, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1726, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1724 + /* "lxml/objectify.pyx":1725 * if pytype: * attribute_names.append(PYTYPE_ATTRIBUTE) * if xsi: # <<<<<<<<<<<<<< @@ -24806,7 +24807,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1726 + /* "lxml/objectify.pyx":1727 * if xsi: * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) * if xsi_nil: # <<<<<<<<<<<<<< @@ -24816,7 +24817,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_v_xsi_nil != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1727 + /* "lxml/objectify.pyx":1728 * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) * if xsi_nil: * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR) # <<<<<<<<<<<<<< @@ -24825,10 +24826,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ __pyx_t_1 = __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1727, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_Append(__pyx_v_attribute_names, __pyx_t_1); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1728, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1726 + /* "lxml/objectify.pyx":1727 * if xsi: * attribute_names.append(XML_SCHEMA_INSTANCE_TYPE_ATTR) * if xsi_nil: # <<<<<<<<<<<<<< @@ -24837,30 +24838,30 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1729 + /* "lxml/objectify.pyx":1730 * attribute_names.append(XML_SCHEMA_INSTANCE_NIL_ATTR) * * _strip_attributes(element_or_tree, *attribute_names) # <<<<<<<<<<<<<< * if cleanup_namespaces: * _cleanup_namespaces(element_or_tree) */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_element_or_tree); __Pyx_GIVEREF(__pyx_v_element_or_tree); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_element_or_tree); - __pyx_t_4 = PySequence_Tuple(__pyx_v_attribute_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_t_4 = PySequence_Tuple(__pyx_v_attribute_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1729, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1730 + /* "lxml/objectify.pyx":1731 * * _strip_attributes(element_or_tree, *attribute_names) * if cleanup_namespaces: # <<<<<<<<<<<<<< @@ -24870,7 +24871,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_v_cleanup_namespaces != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1731 + /* "lxml/objectify.pyx":1732 * _strip_attributes(element_or_tree, *attribute_names) * if cleanup_namespaces: * _cleanup_namespaces(element_or_tree) # <<<<<<<<<<<<<< @@ -24890,12 +24891,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * } __pyx_t_4 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_1, __pyx_v_element_or_tree) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_element_or_tree); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1730 + /* "lxml/objectify.pyx":1731 * * _strip_attributes(element_or_tree, *attribute_names) * if cleanup_namespaces: # <<<<<<<<<<<<<< @@ -24904,7 +24905,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1703 + /* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< @@ -24928,7 +24929,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_26deannotate(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":1743 +/* "lxml/objectify.pyx":1744 * objectify_parser = __DEFAULT_PARSER * * def set_default_parser(new_parser = None): # <<<<<<<<<<<<<< @@ -24967,7 +24968,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) __PYX_ERR(0, 1743, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "set_default_parser") < 0)) __PYX_ERR(0, 1744, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -24981,7 +24982,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_29set_default_parser(PyObject *__pyx_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1743, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("set_default_parser", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1744, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.set_default_parser", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25002,7 +25003,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("set_default_parser", 0); - /* "lxml/objectify.pyx":1754 + /* "lxml/objectify.pyx":1755 * """ * global objectify_parser * if new_parser is None: # <<<<<<<<<<<<<< @@ -25013,7 +25014,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1755 + /* "lxml/objectify.pyx":1756 * global objectify_parser * if new_parser is None: * objectify_parser = __DEFAULT_PARSER # <<<<<<<<<<<<<< @@ -25025,7 +25026,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER); __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER); - /* "lxml/objectify.pyx":1754 + /* "lxml/objectify.pyx":1755 * """ * global objectify_parser * if new_parser is None: # <<<<<<<<<<<<<< @@ -25035,21 +25036,21 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py goto __pyx_L3; } - /* "lxml/objectify.pyx":1756 + /* "lxml/objectify.pyx":1757 * if new_parser is None: * objectify_parser = __DEFAULT_PARSER * elif isinstance(new_parser, etree.XMLParser): # <<<<<<<<<<<<<< * objectify_parser = new_parser * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1756, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1757, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1756, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v_new_parser, __pyx_t_3); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1757, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (likely(__pyx_t_1)) { - /* "lxml/objectify.pyx":1757 + /* "lxml/objectify.pyx":1758 * objectify_parser = __DEFAULT_PARSER * elif isinstance(new_parser, etree.XMLParser): * objectify_parser = new_parser # <<<<<<<<<<<<<< @@ -25061,7 +25062,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_new_parser); __Pyx_GIVEREF(__pyx_v_new_parser); - /* "lxml/objectify.pyx":1756 + /* "lxml/objectify.pyx":1757 * if new_parser is None: * objectify_parser = __DEFAULT_PARSER * elif isinstance(new_parser, etree.XMLParser): # <<<<<<<<<<<<<< @@ -25071,7 +25072,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py goto __pyx_L3; } - /* "lxml/objectify.pyx":1759 + /* "lxml/objectify.pyx":1760 * objectify_parser = new_parser * else: * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" # <<<<<<<<<<<<<< @@ -25080,11 +25081,11 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py */ /*else*/ { __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_parser_must_inherit_from_lxml_et, 0, 0); - __PYX_ERR(0, 1759, __pyx_L1_error) + __PYX_ERR(0, 1760, __pyx_L1_error) } __pyx_L3:; - /* "lxml/objectify.pyx":1743 + /* "lxml/objectify.pyx":1744 * objectify_parser = __DEFAULT_PARSER * * def set_default_parser(new_parser = None): # <<<<<<<<<<<<<< @@ -25105,7 +25106,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_28set_default_parser(CYTHON_UNUSED Py return __pyx_r; } -/* "lxml/objectify.pyx":1761 +/* "lxml/objectify.pyx":1762 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" * * def makeparser(**kw): # <<<<<<<<<<<<<< @@ -25147,27 +25148,27 @@ static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject * PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("makeparser", 0); - /* "lxml/objectify.pyx":1771 + /* "lxml/objectify.pyx":1772 * ``remove_blank_text`` boolean keyword option yourself. * """ * if 'remove_blank_text' not in kw: # <<<<<<<<<<<<<< * kw['remove_blank_text'] = True * parser = etree.XMLParser(**kw) */ - __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_remove_blank_text, __pyx_v_kw, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1771, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_remove_blank_text, __pyx_v_kw, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1772, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1772 + /* "lxml/objectify.pyx":1773 * """ * if 'remove_blank_text' not in kw: * kw['remove_blank_text'] = True # <<<<<<<<<<<<<< * parser = etree.XMLParser(**kw) * parser.set_element_class_lookup( ObjectifyElementClassLookup() ) */ - if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_remove_blank_text, Py_True) < 0)) __PYX_ERR(0, 1772, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_kw, __pyx_n_s_remove_blank_text, Py_True) < 0)) __PYX_ERR(0, 1773, __pyx_L1_error) - /* "lxml/objectify.pyx":1771 + /* "lxml/objectify.pyx":1772 * ``remove_blank_text`` boolean keyword option yourself. * """ * if 'remove_blank_text' not in kw: # <<<<<<<<<<<<<< @@ -25176,31 +25177,31 @@ static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1773 + /* "lxml/objectify.pyx":1774 * if 'remove_blank_text' not in kw: * kw['remove_blank_text'] = True * parser = etree.XMLParser(**kw) # <<<<<<<<<<<<<< * parser.set_element_class_lookup( ObjectifyElementClassLookup() ) * return parser */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1773, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_v_kw); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_parser = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1774 + /* "lxml/objectify.pyx":1775 * kw['remove_blank_text'] = True * parser = etree.XMLParser(**kw) * parser.set_element_class_lookup( ObjectifyElementClassLookup() ) # <<<<<<<<<<<<<< * return parser * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1774, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_parser, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1774, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -25215,12 +25216,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject * __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1774, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1775, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1775 + /* "lxml/objectify.pyx":1776 * parser = etree.XMLParser(**kw) * parser.set_element_class_lookup( ObjectifyElementClassLookup() ) * return parser # <<<<<<<<<<<<<< @@ -25232,7 +25233,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject * __pyx_r = __pyx_v_parser; goto __pyx_L0; - /* "lxml/objectify.pyx":1761 + /* "lxml/objectify.pyx":1762 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" * * def makeparser(**kw): # <<<<<<<<<<<<<< @@ -25255,7 +25256,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_30makeparser(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":1777 +/* "lxml/objectify.pyx":1778 * return parser * * cdef _Element _makeElement(tag, text, attrib, nsmap): # <<<<<<<<<<<<<< @@ -25270,7 +25271,7 @@ static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("_makeElement", 0); - /* "lxml/objectify.pyx":1778 + /* "lxml/objectify.pyx":1779 * * cdef _Element _makeElement(tag, text, attrib, nsmap): * return cetree.makeElement(tag, None, objectify_parser, text, None, attrib, nsmap) # <<<<<<<<<<<<<< @@ -25280,14 +25281,14 @@ static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = __pyx_v_4lxml_9objectify_objectify_parser; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)Py_None), __pyx_t_1, __pyx_v_text, Py_None, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1778, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)makeElement(__pyx_v_tag, ((struct LxmlDocument *)Py_None), __pyx_t_1, __pyx_v_text, Py_None, __pyx_v_attrib, __pyx_v_nsmap)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct LxmlElement *)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1777 + /* "lxml/objectify.pyx":1778 * return parser * * cdef _Element _makeElement(tag, text, attrib, nsmap): # <<<<<<<<<<<<<< @@ -25307,7 +25308,7 @@ static struct LxmlElement *__pyx_f_4lxml_9objectify__makeElement(PyObject *__pyx return __pyx_r; } -/* "lxml/objectify.pyx":1788 +/* "lxml/objectify.pyx":1789 * SubElement = etree.SubElement * * def fromstring(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25360,7 +25361,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, Py if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 1788, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "fromstring") < 0)) __PYX_ERR(0, 1789, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25377,7 +25378,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_33fromstring(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1788, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("fromstring", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1789, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.fromstring", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25401,7 +25402,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * __Pyx_RefNannySetupContext("fromstring", 0); __Pyx_INCREF(__pyx_v_parser); - /* "lxml/objectify.pyx":1800 + /* "lxml/objectify.pyx":1801 * (DTD, XInclude, ...). * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25412,7 +25413,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1801 + /* "lxml/objectify.pyx":1802 * """ * if parser is None: * parser = objectify_parser # <<<<<<<<<<<<<< @@ -25422,7 +25423,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser); __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser); - /* "lxml/objectify.pyx":1800 + /* "lxml/objectify.pyx":1801 * (DTD, XInclude, ...). * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25431,7 +25432,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * */ } - /* "lxml/objectify.pyx":1802 + /* "lxml/objectify.pyx":1803 * if parser is None: * parser = objectify_parser * return _fromstring(xml, parser, base_url=base_url) # <<<<<<<<<<<<<< @@ -25439,7 +25440,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * * def XML(xml, parser=None, *, base_url=None): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_xml); __Pyx_GIVEREF(__pyx_v_xml); @@ -25447,10 +25448,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * __Pyx_INCREF(__pyx_v_parser); __Pyx_GIVEREF(__pyx_v_parser); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1802, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1803, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1803, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -25458,7 +25459,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1788 + /* "lxml/objectify.pyx":1789 * SubElement = etree.SubElement * * def fromstring(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25480,7 +25481,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_32fromstring(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "lxml/objectify.pyx":1804 +/* "lxml/objectify.pyx":1805 * return _fromstring(xml, parser, base_url=base_url) * * def XML(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25533,7 +25534,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 1804, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "XML") < 0)) __PYX_ERR(0, 1805, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25550,7 +25551,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_35XML(PyObject *__pyx_self, PyObject } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1804, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("XML", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1805, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.XML", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25574,7 +25575,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s __Pyx_RefNannySetupContext("XML", 0); __Pyx_INCREF(__pyx_v_parser); - /* "lxml/objectify.pyx":1816 + /* "lxml/objectify.pyx":1817 * (DTD, XInclude, ...). * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25585,7 +25586,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1817 + /* "lxml/objectify.pyx":1818 * """ * if parser is None: * parser = objectify_parser # <<<<<<<<<<<<<< @@ -25595,7 +25596,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser); __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser); - /* "lxml/objectify.pyx":1816 + /* "lxml/objectify.pyx":1817 * (DTD, XInclude, ...). * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25604,7 +25605,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s */ } - /* "lxml/objectify.pyx":1818 + /* "lxml/objectify.pyx":1819 * if parser is None: * parser = objectify_parser * return _fromstring(xml, parser, base_url=base_url) # <<<<<<<<<<<<<< @@ -25612,7 +25613,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s * cdef object _parse */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_xml); __Pyx_GIVEREF(__pyx_v_xml); @@ -25620,10 +25621,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s __Pyx_INCREF(__pyx_v_parser); __Pyx_GIVEREF(__pyx_v_parser); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1818, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1818, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1819, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1819, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -25631,7 +25632,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1804 + /* "lxml/objectify.pyx":1805 * return _fromstring(xml, parser, base_url=base_url) * * def XML(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25653,7 +25654,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_34XML(CYTHON_UNUSED PyObject *__pyx_s return __pyx_r; } -/* "lxml/objectify.pyx":1823 +/* "lxml/objectify.pyx":1824 * _parse = etree.parse * * def parse(f, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25706,7 +25707,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObjec if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1823, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse") < 0)) __PYX_ERR(0, 1824, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25723,7 +25724,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_37parse(PyObject *__pyx_self, PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1823, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1824, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("lxml.objectify.parse", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25747,7 +25748,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx __Pyx_RefNannySetupContext("parse", 0); __Pyx_INCREF(__pyx_v_parser); - /* "lxml/objectify.pyx":1834 + /* "lxml/objectify.pyx":1835 * up external entities (DTD, XInclude, ...) with relative paths. * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25758,7 +25759,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1835 + /* "lxml/objectify.pyx":1836 * """ * if parser is None: * parser = objectify_parser # <<<<<<<<<<<<<< @@ -25768,7 +25769,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx __Pyx_INCREF(__pyx_v_4lxml_9objectify_objectify_parser); __Pyx_DECREF_SET(__pyx_v_parser, __pyx_v_4lxml_9objectify_objectify_parser); - /* "lxml/objectify.pyx":1834 + /* "lxml/objectify.pyx":1835 * up external entities (DTD, XInclude, ...) with relative paths. * """ * if parser is None: # <<<<<<<<<<<<<< @@ -25777,7 +25778,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx */ } - /* "lxml/objectify.pyx":1836 + /* "lxml/objectify.pyx":1837 * if parser is None: * parser = objectify_parser * return _parse(f, parser, base_url=base_url) # <<<<<<<<<<<<<< @@ -25785,7 +25786,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx * cdef dict _DEFAULT_NSMAP = { */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_f); __Pyx_GIVEREF(__pyx_v_f); @@ -25793,10 +25794,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx __Pyx_INCREF(__pyx_v_parser); __Pyx_GIVEREF(__pyx_v_parser); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_parser); - __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1836, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__parse, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_base_url, __pyx_v_base_url) < 0) __PYX_ERR(0, 1837, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_v_4lxml_9objectify__parse, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1837, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -25804,7 +25805,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx __pyx_t_5 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1823 + /* "lxml/objectify.pyx":1824 * _parse = etree.parse * * def parse(f, parser=None, *, base_url=None): # <<<<<<<<<<<<<< @@ -25826,7 +25827,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_36parse(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "lxml/objectify.pyx":1846 +/* "lxml/objectify.pyx":1847 * E = ElementMaker() * * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): # <<<<<<<<<<<<<< @@ -25892,7 +25893,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObj if (value) { values[index] = value; kw_args--; } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "Element") < 0)) __PYX_ERR(0, 1846, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "Element") < 0)) __PYX_ERR(0, 1847, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -25912,7 +25913,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_39Element(PyObject *__pyx_self, PyObj } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1846, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("Element", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1847, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0; __Pyx_AddTraceback("lxml.objectify.Element", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -25941,7 +25942,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __Pyx_INCREF(__pyx_v__pytype); __Pyx_INCREF(__pyx_v__attributes); - /* "lxml/objectify.pyx":1854 + /* "lxml/objectify.pyx":1855 * NOTE: requires parser based element class lookup activated in lxml.etree! * """ * if attrib is not None: # <<<<<<<<<<<<<< @@ -25952,36 +25953,36 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1855 + /* "lxml/objectify.pyx":1856 * """ * if attrib is not None: * if _attributes: # <<<<<<<<<<<<<< * attrib = dict(attrib) * attrib.update(_attributes) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1856, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/objectify.pyx":1856 + /* "lxml/objectify.pyx":1857 * if attrib is not None: * if _attributes: * attrib = dict(attrib) # <<<<<<<<<<<<<< * attrib.update(_attributes) * _attributes = attrib */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1857, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1857 + /* "lxml/objectify.pyx":1858 * if _attributes: * attrib = dict(attrib) * attrib.update(_attributes) # <<<<<<<<<<<<<< * _attributes = attrib * if _pytype is None: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1857, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -25995,12 +25996,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v__attributes); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1857, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1855 + /* "lxml/objectify.pyx":1856 * """ * if attrib is not None: * if _attributes: # <<<<<<<<<<<<<< @@ -26009,7 +26010,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p */ } - /* "lxml/objectify.pyx":1858 + /* "lxml/objectify.pyx":1859 * attrib = dict(attrib) * attrib.update(_attributes) * _attributes = attrib # <<<<<<<<<<<<<< @@ -26019,7 +26020,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __Pyx_INCREF(__pyx_v_attrib); __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib); - /* "lxml/objectify.pyx":1854 + /* "lxml/objectify.pyx":1855 * NOTE: requires parser based element class lookup activated in lxml.etree! * """ * if attrib is not None: # <<<<<<<<<<<<<< @@ -26028,7 +26029,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p */ } - /* "lxml/objectify.pyx":1859 + /* "lxml/objectify.pyx":1860 * attrib.update(_attributes) * _attributes = attrib * if _pytype is None: # <<<<<<<<<<<<<< @@ -26039,7 +26040,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1860 + /* "lxml/objectify.pyx":1861 * _attributes = attrib * if _pytype is None: * _pytype = TREE_PYTYPE_NAME # <<<<<<<<<<<<<< @@ -26049,7 +26050,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); - /* "lxml/objectify.pyx":1859 + /* "lxml/objectify.pyx":1860 * attrib.update(_attributes) * _attributes = attrib * if _pytype is None: # <<<<<<<<<<<<<< @@ -26058,7 +26059,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p */ } - /* "lxml/objectify.pyx":1861 + /* "lxml/objectify.pyx":1862 * if _pytype is None: * _pytype = TREE_PYTYPE_NAME * if nsmap is None: # <<<<<<<<<<<<<< @@ -26069,7 +26070,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1862 + /* "lxml/objectify.pyx":1863 * _pytype = TREE_PYTYPE_NAME * if nsmap is None: * nsmap = _DEFAULT_NSMAP # <<<<<<<<<<<<<< @@ -26079,7 +26080,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP); - /* "lxml/objectify.pyx":1861 + /* "lxml/objectify.pyx":1862 * if _pytype is None: * _pytype = TREE_PYTYPE_NAME * if nsmap is None: # <<<<<<<<<<<<<< @@ -26088,19 +26089,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p */ } - /* "lxml/objectify.pyx":1863 + /* "lxml/objectify.pyx":1864 * if nsmap is None: * nsmap = _DEFAULT_NSMAP * _attributes[PYTYPE_ATTRIBUTE] = _pytype # <<<<<<<<<<<<<< * return _makeElement(_tag, None, _attributes, nsmap) * */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1863, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_3, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1863, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_3, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1864, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "lxml/objectify.pyx":1864 + /* "lxml/objectify.pyx":1865 * nsmap = _DEFAULT_NSMAP * _attributes[PYTYPE_ATTRIBUTE] = _pytype * return _makeElement(_tag, None, _attributes, nsmap) # <<<<<<<<<<<<<< @@ -26108,13 +26109,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_v__tag, Py_None, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1846 + /* "lxml/objectify.pyx":1847 * E = ElementMaker() * * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): # <<<<<<<<<<<<<< @@ -26139,7 +26140,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_38Element(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "lxml/objectify.pyx":1866 +/* "lxml/objectify.pyx":1867 * return _makeElement(_tag, None, _attributes, nsmap) * * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, # <<<<<<<<<<<<<< @@ -26209,7 +26210,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, P } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "DataElement") < 0)) __PYX_ERR(0, 1866, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v__attributes, values, pos_args, "DataElement") < 0)) __PYX_ERR(0, 1867, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -26230,7 +26231,7 @@ static PyObject *__pyx_pw_4lxml_9objectify_41DataElement(PyObject *__pyx_self, P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1866, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("DataElement", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1867, __pyx_L3_error) __pyx_L3_error:; __Pyx_DECREF(__pyx_v__attributes); __pyx_v__attributes = 0; __Pyx_AddTraceback("lxml.objectify.DataElement", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -26273,7 +26274,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v__xsi); __Pyx_INCREF(__pyx_v__attributes); - /* "lxml/objectify.pyx":1881 + /* "lxml/objectify.pyx":1882 * in attrib and/or keyword arguments. * """ * if nsmap is None: # <<<<<<<<<<<<<< @@ -26284,7 +26285,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1882 + /* "lxml/objectify.pyx":1883 * """ * if nsmap is None: * nsmap = _DEFAULT_NSMAP # <<<<<<<<<<<<<< @@ -26294,7 +26295,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_4lxml_9objectify__DEFAULT_NSMAP); - /* "lxml/objectify.pyx":1881 + /* "lxml/objectify.pyx":1882 * in attrib and/or keyword arguments. * """ * if nsmap is None: # <<<<<<<<<<<<<< @@ -26303,7 +26304,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1883 + /* "lxml/objectify.pyx":1884 * if nsmap is None: * nsmap = _DEFAULT_NSMAP * if attrib is not None and attrib: # <<<<<<<<<<<<<< @@ -26317,41 +26318,41 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = __pyx_t_3; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1883, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_attrib); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1884, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1884 + /* "lxml/objectify.pyx":1885 * nsmap = _DEFAULT_NSMAP * if attrib is not None and attrib: * if _attributes: # <<<<<<<<<<<<<< * attrib = dict(attrib) * attrib.update(_attributes) */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1885, __pyx_L1_error) if (__pyx_t_2) { - /* "lxml/objectify.pyx":1885 + /* "lxml/objectify.pyx":1886 * if attrib is not None and attrib: * if _attributes: * attrib = dict(attrib) # <<<<<<<<<<<<<< * attrib.update(_attributes) * _attributes = attrib */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_attrib, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1886 + /* "lxml/objectify.pyx":1887 * if _attributes: * attrib = dict(attrib) * attrib.update(_attributes) # <<<<<<<<<<<<<< * _attributes = attrib * if isinstance(_value, ObjectifiedElement): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1886, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_attrib, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26365,12 +26366,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v__attributes); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1886, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1884 + /* "lxml/objectify.pyx":1885 * nsmap = _DEFAULT_NSMAP * if attrib is not None and attrib: * if _attributes: # <<<<<<<<<<<<<< @@ -26379,7 +26380,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1887 + /* "lxml/objectify.pyx":1888 * attrib = dict(attrib) * attrib.update(_attributes) * _attributes = attrib # <<<<<<<<<<<<<< @@ -26389,7 +26390,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_attrib); __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_attrib); - /* "lxml/objectify.pyx":1883 + /* "lxml/objectify.pyx":1884 * if nsmap is None: * nsmap = _DEFAULT_NSMAP * if attrib is not None and attrib: # <<<<<<<<<<<<<< @@ -26398,7 +26399,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1888 + /* "lxml/objectify.pyx":1889 * attrib.update(_attributes) * _attributes = attrib * if isinstance(_value, ObjectifiedElement): # <<<<<<<<<<<<<< @@ -26409,7 +26410,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1889 + /* "lxml/objectify.pyx":1890 * _attributes = attrib * if isinstance(_value, ObjectifiedElement): * if _pytype is None: # <<<<<<<<<<<<<< @@ -26420,7 +26421,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1890 + /* "lxml/objectify.pyx":1891 * if isinstance(_value, ObjectifiedElement): * if _pytype is None: * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<< @@ -26434,7 +26435,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = __pyx_t_1; goto __pyx_L11_bool_binop_done; } - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1890, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__attributes); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1891, __pyx_L1_error) __pyx_t_3 = ((!__pyx_t_1) != 0); if (__pyx_t_3) { } else { @@ -26447,7 +26448,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_L11_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1892 + /* "lxml/objectify.pyx":1893 * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP: * # special case: no change! * return _value.__copy__() # <<<<<<<<<<<<<< @@ -26455,7 +26456,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject * # reuse existing nsmap unless redefined in nsmap parameter */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1892, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_copy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26469,14 +26470,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1890 + /* "lxml/objectify.pyx":1891 * if isinstance(_value, ObjectifiedElement): * if _pytype is None: * if _xsi is None and not _attributes and nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<< @@ -26485,7 +26486,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1889 + /* "lxml/objectify.pyx":1890 * _attributes = attrib * if isinstance(_value, ObjectifiedElement): * if _pytype is None: # <<<<<<<<<<<<<< @@ -26494,7 +26495,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1888 + /* "lxml/objectify.pyx":1889 * attrib.update(_attributes) * _attributes = attrib * if isinstance(_value, ObjectifiedElement): # <<<<<<<<<<<<<< @@ -26503,7 +26504,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1893 + /* "lxml/objectify.pyx":1894 * # special case: no change! * return _value.__copy__() * if isinstance(_value, ObjectifiedDataElement): # <<<<<<<<<<<<<< @@ -26514,19 +26515,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1895 + /* "lxml/objectify.pyx":1896 * if isinstance(_value, ObjectifiedDataElement): * # reuse existing nsmap unless redefined in nsmap parameter * temp = _value.nsmap # <<<<<<<<<<<<<< * if temp is not None and temp: * temp = dict(temp) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_nsmap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_nsmap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_temp = __pyx_t_4; __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1896 + /* "lxml/objectify.pyx":1897 * # reuse existing nsmap unless redefined in nsmap parameter * temp = _value.nsmap * if temp is not None and temp: # <<<<<<<<<<<<<< @@ -26540,31 +26541,31 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_1 = __pyx_t_3; goto __pyx_L16_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1896, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1897, __pyx_L1_error) __pyx_t_1 = __pyx_t_3; __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":1897 + /* "lxml/objectify.pyx":1898 * temp = _value.nsmap * if temp is not None and temp: * temp = dict(temp) # <<<<<<<<<<<<<< * temp.update(nsmap) * nsmap = temp */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1897, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1898 + /* "lxml/objectify.pyx":1899 * if temp is not None and temp: * temp = dict(temp) * temp.update(nsmap) # <<<<<<<<<<<<<< * nsmap = temp * # reuse existing attributes unless redefined in attrib/_attributes */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1898, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26578,12 +26579,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_nsmap) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_nsmap); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1898, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1899 + /* "lxml/objectify.pyx":1900 * temp = dict(temp) * temp.update(nsmap) * nsmap = temp # <<<<<<<<<<<<<< @@ -26593,7 +26594,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_temp); __Pyx_DECREF_SET(__pyx_v_nsmap, __pyx_v_temp); - /* "lxml/objectify.pyx":1896 + /* "lxml/objectify.pyx":1897 * # reuse existing nsmap unless redefined in nsmap parameter * temp = _value.nsmap * if temp is not None and temp: # <<<<<<<<<<<<<< @@ -26602,19 +26603,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1901 + /* "lxml/objectify.pyx":1902 * nsmap = temp * # reuse existing attributes unless redefined in attrib/_attributes * temp = _value.attrib # <<<<<<<<<<<<<< * if temp is not None and temp: * temp = dict(temp) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__value, __pyx_n_s_attrib); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1902 + /* "lxml/objectify.pyx":1903 * # reuse existing attributes unless redefined in attrib/_attributes * temp = _value.attrib * if temp is not None and temp: # <<<<<<<<<<<<<< @@ -26628,31 +26629,31 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_1 = __pyx_t_2; goto __pyx_L19_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1902, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_temp); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1903, __pyx_L1_error) __pyx_t_1 = __pyx_t_2; __pyx_L19_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":1903 + /* "lxml/objectify.pyx":1904 * temp = _value.attrib * if temp is not None and temp: * temp = dict(temp) # <<<<<<<<<<<<<< * temp.update(_attributes) * _attributes = temp */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1903, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_v_temp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1904 + /* "lxml/objectify.pyx":1905 * if temp is not None and temp: * temp = dict(temp) * temp.update(_attributes) # <<<<<<<<<<<<<< * _attributes = temp * # reuse existing xsi:type or py:pytype attributes, unless provided as */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_update); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26666,12 +26667,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v__attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v__attributes); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1905 + /* "lxml/objectify.pyx":1906 * temp = dict(temp) * temp.update(_attributes) * _attributes = temp # <<<<<<<<<<<<<< @@ -26681,7 +26682,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v_temp); __Pyx_DECREF_SET(__pyx_v__attributes, __pyx_v_temp); - /* "lxml/objectify.pyx":1902 + /* "lxml/objectify.pyx":1903 * # reuse existing attributes unless redefined in attrib/_attributes * temp = _value.attrib * if temp is not None and temp: # <<<<<<<<<<<<<< @@ -26690,7 +26691,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1908 + /* "lxml/objectify.pyx":1909 * # reuse existing xsi:type or py:pytype attributes, unless provided as * # arguments * if _xsi is None and _pytype is None: # <<<<<<<<<<<<<< @@ -26710,14 +26711,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_L22_bool_binop_done:; if (__pyx_t_1) { - /* "lxml/objectify.pyx":1909 + /* "lxml/objectify.pyx":1910 * # arguments * if _xsi is None and _pytype is None: * _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) # <<<<<<<<<<<<<< * _pytype = _attributes.get(PYTYPE_ATTRIBUTE) * */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1909, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26731,22 +26732,22 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1909, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1910 + /* "lxml/objectify.pyx":1911 * if _xsi is None and _pytype is None: * _xsi = _attributes.get(XML_SCHEMA_INSTANCE_TYPE_ATTR) * _pytype = _attributes.get(PYTYPE_ATTRIBUTE) # <<<<<<<<<<<<<< * * if _xsi is not None: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1910, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v__attributes, __pyx_n_s_get); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1910, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -26761,13 +26762,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1908 + /* "lxml/objectify.pyx":1909 * # reuse existing xsi:type or py:pytype attributes, unless provided as * # arguments * if _xsi is None and _pytype is None: # <<<<<<<<<<<<<< @@ -26776,7 +26777,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1893 + /* "lxml/objectify.pyx":1894 * # special case: no change! * return _value.__copy__() * if isinstance(_value, ObjectifiedDataElement): # <<<<<<<<<<<<<< @@ -26785,7 +26786,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1912 + /* "lxml/objectify.pyx":1913 * _pytype = _attributes.get(PYTYPE_ATTRIBUTE) * * if _xsi is not None: # <<<<<<<<<<<<<< @@ -26796,27 +26797,27 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1913 + /* "lxml/objectify.pyx":1914 * * if _xsi is not None: * if u':' in _xsi: # <<<<<<<<<<<<<< * prefix, name = _xsi.split(u':', 1) * ns = nsmap.get(prefix) */ - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v__xsi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1913, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_kp_u__17, __pyx_v__xsi, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1914, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1914 + /* "lxml/objectify.pyx":1915 * if _xsi is not None: * if u':' in _xsi: * prefix, name = _xsi.split(u':', 1) # <<<<<<<<<<<<<< * ns = nsmap.get(prefix) * if ns != XML_SCHEMA_NS: */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__xsi, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v__xsi, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1914, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { @@ -26825,7 +26826,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1914, __pyx_L1_error) + __PYX_ERR(0, 1915, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -26838,15 +26839,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1914, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1914, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1914, __pyx_L1_error) + __pyx_t_7 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext; @@ -26854,7 +26855,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L26_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1914, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 1915, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L27_unpacking_done; @@ -26862,7 +26863,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1914, __pyx_L1_error) + __PYX_ERR(0, 1915, __pyx_L1_error) __pyx_L27_unpacking_done:; } __pyx_v_prefix = __pyx_t_4; @@ -26870,14 +26871,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_v_name = __pyx_t_6; __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1915 + /* "lxml/objectify.pyx":1916 * if u':' in _xsi: * prefix, name = _xsi.split(u':', 1) * ns = nsmap.get(prefix) # <<<<<<<<<<<<<< * if ns != XML_SCHEMA_NS: * raise ValueError, u"XSD types require the XSD namespace" */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1915, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -26891,25 +26892,25 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_4, __pyx_v_prefix) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_prefix); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1915, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1916, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_ns = __pyx_t_5; __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1916 + /* "lxml/objectify.pyx":1917 * prefix, name = _xsi.split(u':', 1) * ns = nsmap.get(prefix) * if ns != XML_SCHEMA_NS: # <<<<<<<<<<<<<< * raise ValueError, u"XSD types require the XSD namespace" * elif nsmap is _DEFAULT_NSMAP: */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1916, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1916, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1917, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1917, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_t_1)) { - /* "lxml/objectify.pyx":1917 + /* "lxml/objectify.pyx":1918 * ns = nsmap.get(prefix) * if ns != XML_SCHEMA_NS: * raise ValueError, u"XSD types require the XSD namespace" # <<<<<<<<<<<<<< @@ -26917,9 +26918,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject * name = _xsi */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0); - __PYX_ERR(0, 1917, __pyx_L1_error) + __PYX_ERR(0, 1918, __pyx_L1_error) - /* "lxml/objectify.pyx":1916 + /* "lxml/objectify.pyx":1917 * prefix, name = _xsi.split(u':', 1) * ns = nsmap.get(prefix) * if ns != XML_SCHEMA_NS: # <<<<<<<<<<<<<< @@ -26928,7 +26929,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1913 + /* "lxml/objectify.pyx":1914 * * if _xsi is not None: * if u':' in _xsi: # <<<<<<<<<<<<<< @@ -26938,7 +26939,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L25; } - /* "lxml/objectify.pyx":1918 + /* "lxml/objectify.pyx":1919 * if ns != XML_SCHEMA_NS: * raise ValueError, u"XSD types require the XSD namespace" * elif nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<< @@ -26949,7 +26950,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1919 + /* "lxml/objectify.pyx":1920 * raise ValueError, u"XSD types require the XSD namespace" * elif nsmap is _DEFAULT_NSMAP: * name = _xsi # <<<<<<<<<<<<<< @@ -26959,19 +26960,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v__xsi); __pyx_v_name = __pyx_v__xsi; - /* "lxml/objectify.pyx":1920 + /* "lxml/objectify.pyx":1921 * elif nsmap is _DEFAULT_NSMAP: * name = _xsi * _xsi = u'xsd:' + _xsi # <<<<<<<<<<<<<< * else: * name = _xsi */ - __pyx_t_5 = PyNumber_Add(__pyx_kp_u_xsd, __pyx_v__xsi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1920, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_kp_u_xsd, __pyx_v__xsi); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1921, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_5); __pyx_t_5 = 0; - /* "lxml/objectify.pyx":1918 + /* "lxml/objectify.pyx":1919 * if ns != XML_SCHEMA_NS: * raise ValueError, u"XSD types require the XSD namespace" * elif nsmap is _DEFAULT_NSMAP: # <<<<<<<<<<<<<< @@ -26981,7 +26982,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L25; } - /* "lxml/objectify.pyx":1922 + /* "lxml/objectify.pyx":1923 * _xsi = u'xsd:' + _xsi * else: * name = _xsi # <<<<<<<<<<<<<< @@ -26992,14 +26993,14 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v__xsi); __pyx_v_name = __pyx_v__xsi; - /* "lxml/objectify.pyx":1923 + /* "lxml/objectify.pyx":1924 * else: * name = _xsi * for prefix, ns in nsmap.items(): # <<<<<<<<<<<<<< * if ns == XML_SCHEMA_NS: * if prefix is not None and prefix: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_nsmap, __pyx_n_s_items); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -27013,16 +27014,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_5 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0; __pyx_t_10 = NULL; } else { - __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_10 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1924, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -27030,17 +27031,17 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1924, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 1924, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -27050,7 +27051,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1923, __pyx_L1_error) + else __PYX_ERR(0, 1924, __pyx_L1_error) } break; } @@ -27062,7 +27063,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1923, __pyx_L1_error) + __PYX_ERR(0, 1924, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -27075,15 +27076,15 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1923, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -27091,7 +27092,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L31_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1923, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1924, __pyx_L1_error) __pyx_t_8 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L32_unpacking_done; @@ -27099,7 +27100,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_8 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1923, __pyx_L1_error) + __PYX_ERR(0, 1924, __pyx_L1_error) __pyx_L32_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_prefix, __pyx_t_4); @@ -27107,19 +27108,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_ns, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1924 + /* "lxml/objectify.pyx":1925 * name = _xsi * for prefix, ns in nsmap.items(): * if ns == XML_SCHEMA_NS: # <<<<<<<<<<<<<< * if prefix is not None and prefix: * _xsi = prefix + u':' + _xsi */ - __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1924, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_ns, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1925, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1925, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1925 + /* "lxml/objectify.pyx":1926 * for prefix, ns in nsmap.items(): * if ns == XML_SCHEMA_NS: * if prefix is not None and prefix: # <<<<<<<<<<<<<< @@ -27133,27 +27134,27 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = __pyx_t_3; goto __pyx_L35_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1925, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_prefix); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error) __pyx_t_2 = __pyx_t_3; __pyx_L35_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1926 + /* "lxml/objectify.pyx":1927 * if ns == XML_SCHEMA_NS: * if prefix is not None and prefix: * _xsi = prefix + u':' + _xsi # <<<<<<<<<<<<<< * break * else: */ - __pyx_t_5 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_u__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1926, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_v_prefix, __pyx_kp_u__17); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v__xsi); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1926, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_5, __pyx_v__xsi); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v__xsi, __pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1925 + /* "lxml/objectify.pyx":1926 * for prefix, ns in nsmap.items(): * if ns == XML_SCHEMA_NS: * if prefix is not None and prefix: # <<<<<<<<<<<<<< @@ -27162,7 +27163,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1927 + /* "lxml/objectify.pyx":1928 * if prefix is not None and prefix: * _xsi = prefix + u':' + _xsi * break # <<<<<<<<<<<<<< @@ -27171,7 +27172,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ goto __pyx_L30_break; - /* "lxml/objectify.pyx":1924 + /* "lxml/objectify.pyx":1925 * name = _xsi * for prefix, ns in nsmap.items(): * if ns == XML_SCHEMA_NS: # <<<<<<<<<<<<<< @@ -27180,7 +27181,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1923 + /* "lxml/objectify.pyx":1924 * else: * name = _xsi * for prefix, ns in nsmap.items(): # <<<<<<<<<<<<<< @@ -27190,7 +27191,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } /*else*/ { - /* "lxml/objectify.pyx":1929 + /* "lxml/objectify.pyx":1930 * break * else: * raise ValueError, u"XSD types require the XSD namespace" # <<<<<<<<<<<<<< @@ -27198,10 +27199,10 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject * if _pytype is None: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_XSD_types_require_the_XSD_namesp, 0, 0); - __PYX_ERR(0, 1929, __pyx_L1_error) + __PYX_ERR(0, 1930, __pyx_L1_error) } - /* "lxml/objectify.pyx":1923 + /* "lxml/objectify.pyx":1924 * else: * name = _xsi * for prefix, ns in nsmap.items(): # <<<<<<<<<<<<<< @@ -27213,16 +27214,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_L25:; - /* "lxml/objectify.pyx":1930 + /* "lxml/objectify.pyx":1931 * else: * raise ValueError, u"XSD types require the XSD namespace" * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi # <<<<<<<<<<<<<< * if _pytype is None: * # allow using unregistered or even wrong xsi:type names */ - if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0)) __PYX_ERR(0, 1930, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_TYPE_ATTR, __pyx_v__xsi) < 0)) __PYX_ERR(0, 1931, __pyx_L1_error) - /* "lxml/objectify.pyx":1931 + /* "lxml/objectify.pyx":1932 * raise ValueError, u"XSD types require the XSD namespace" * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi * if _pytype is None: # <<<<<<<<<<<<<< @@ -27233,7 +27234,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1933 + /* "lxml/objectify.pyx":1934 * if _pytype is None: * # allow using unregistered or even wrong xsi:type names * py_type = _SCHEMA_TYPE_DICT.get(_xsi) # <<<<<<<<<<<<<< @@ -27242,9 +27243,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1933, __pyx_L1_error) + __PYX_ERR(0, 1934, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v__xsi, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1933, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v__xsi, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); @@ -27252,7 +27253,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_v_py_type = ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1934 + /* "lxml/objectify.pyx":1935 * # allow using unregistered or even wrong xsi:type names * py_type = _SCHEMA_TYPE_DICT.get(_xsi) * if py_type is None: # <<<<<<<<<<<<<< @@ -27263,7 +27264,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1935 + /* "lxml/objectify.pyx":1936 * py_type = _SCHEMA_TYPE_DICT.get(_xsi) * if py_type is None: * py_type = _SCHEMA_TYPE_DICT.get(name) # <<<<<<<<<<<<<< @@ -27272,9 +27273,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ if (unlikely(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1935, __pyx_L1_error) + __PYX_ERR(0, 1936, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1935, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, __pyx_v_name, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1936, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); @@ -27282,7 +27283,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1934 + /* "lxml/objectify.pyx":1935 * # allow using unregistered or even wrong xsi:type names * py_type = _SCHEMA_TYPE_DICT.get(_xsi) * if py_type is None: # <<<<<<<<<<<<<< @@ -27291,7 +27292,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1936 + /* "lxml/objectify.pyx":1937 * if py_type is None: * py_type = _SCHEMA_TYPE_DICT.get(name) * if py_type is not None: # <<<<<<<<<<<<<< @@ -27302,7 +27303,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "lxml/objectify.pyx":1937 + /* "lxml/objectify.pyx":1938 * py_type = _SCHEMA_TYPE_DICT.get(name) * if py_type is not None: * _pytype = py_type.name # <<<<<<<<<<<<<< @@ -27314,7 +27315,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1936 + /* "lxml/objectify.pyx":1937 * if py_type is None: * py_type = _SCHEMA_TYPE_DICT.get(name) * if py_type is not None: # <<<<<<<<<<<<<< @@ -27323,7 +27324,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1931 + /* "lxml/objectify.pyx":1932 * raise ValueError, u"XSD types require the XSD namespace" * _attributes[XML_SCHEMA_INSTANCE_TYPE_ATTR] = _xsi * if _pytype is None: # <<<<<<<<<<<<<< @@ -27332,7 +27333,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1912 + /* "lxml/objectify.pyx":1913 * _pytype = _attributes.get(PYTYPE_ATTRIBUTE) * * if _xsi is not None: # <<<<<<<<<<<<<< @@ -27341,7 +27342,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1939 + /* "lxml/objectify.pyx":1940 * _pytype = py_type.name * * if _pytype is None: # <<<<<<<<<<<<<< @@ -27352,19 +27353,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1940 + /* "lxml/objectify.pyx":1941 * * if _pytype is None: * _pytype = _pytypename(_value) # <<<<<<<<<<<<<< * * if _value is None and _pytype != u"str": */ - __pyx_t_6 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1940, __pyx_L1_error) + __pyx_t_6 = __pyx_f_4lxml_9objectify__pytypename(__pyx_v__value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1941, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1939 + /* "lxml/objectify.pyx":1940 * _pytype = py_type.name * * if _pytype is None: # <<<<<<<<<<<<<< @@ -27373,7 +27374,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1942 + /* "lxml/objectify.pyx":1943 * _pytype = _pytypename(_value) * * if _value is None and _pytype != u"str": # <<<<<<<<<<<<<< @@ -27387,19 +27388,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = __pyx_t_1; goto __pyx_L43_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_str, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1942, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_str, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1943, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __pyx_L43_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1943 + /* "lxml/objectify.pyx":1944 * * if _value is None and _pytype != u"str": * _pytype = _pytype or u"NoneType" # <<<<<<<<<<<<<< * strval = None * elif python._isString(_value): */ - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1943, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v__pytype); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1944, __pyx_L1_error) if (!__pyx_t_2) { } else { __Pyx_INCREF(__pyx_v__pytype); @@ -27412,7 +27413,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_DECREF_SET(__pyx_v__pytype, __pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1944 + /* "lxml/objectify.pyx":1945 * if _value is None and _pytype != u"str": * _pytype = _pytype or u"NoneType" * strval = None # <<<<<<<<<<<<<< @@ -27422,7 +27423,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(Py_None); __pyx_v_strval = Py_None; - /* "lxml/objectify.pyx":1942 + /* "lxml/objectify.pyx":1943 * _pytype = _pytypename(_value) * * if _value is None and _pytype != u"str": # <<<<<<<<<<<<<< @@ -27432,7 +27433,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L42; } - /* "lxml/objectify.pyx":1945 + /* "lxml/objectify.pyx":1946 * _pytype = _pytype or u"NoneType" * strval = None * elif python._isString(_value): # <<<<<<<<<<<<<< @@ -27442,7 +27443,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (_isString(__pyx_v__value) != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1946 + /* "lxml/objectify.pyx":1947 * strval = None * elif python._isString(_value): * strval = _value # <<<<<<<<<<<<<< @@ -27452,7 +27453,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_v__value); __pyx_v_strval = __pyx_v__value; - /* "lxml/objectify.pyx":1945 + /* "lxml/objectify.pyx":1946 * _pytype = _pytype or u"NoneType" * strval = None * elif python._isString(_value): # <<<<<<<<<<<<<< @@ -27462,7 +27463,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L42; } - /* "lxml/objectify.pyx":1947 + /* "lxml/objectify.pyx":1948 * elif python._isString(_value): * strval = _value * elif isinstance(_value, bool): # <<<<<<<<<<<<<< @@ -27471,22 +27472,22 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ __pyx_t_6 = ((PyObject*)&PyBool_Type); __Pyx_INCREF(__pyx_t_6); - __pyx_t_2 = PyObject_IsInstance(__pyx_v__value, __pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1947, __pyx_L1_error) + __pyx_t_2 = PyObject_IsInstance(__pyx_v__value, __pyx_t_6); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 1948, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1948 + /* "lxml/objectify.pyx":1949 * strval = _value * elif isinstance(_value, bool): * if _value: # <<<<<<<<<<<<<< * strval = u"true" * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1948, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v__value); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error) if (__pyx_t_1) { - /* "lxml/objectify.pyx":1949 + /* "lxml/objectify.pyx":1950 * elif isinstance(_value, bool): * if _value: * strval = u"true" # <<<<<<<<<<<<<< @@ -27496,7 +27497,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_n_u_true); __pyx_v_strval = __pyx_n_u_true; - /* "lxml/objectify.pyx":1948 + /* "lxml/objectify.pyx":1949 * strval = _value * elif isinstance(_value, bool): * if _value: # <<<<<<<<<<<<<< @@ -27506,7 +27507,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L47; } - /* "lxml/objectify.pyx":1951 + /* "lxml/objectify.pyx":1952 * strval = u"true" * else: * strval = u"false" # <<<<<<<<<<<<<< @@ -27519,7 +27520,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_L47:; - /* "lxml/objectify.pyx":1947 + /* "lxml/objectify.pyx":1948 * elif python._isString(_value): * strval = _value * elif isinstance(_value, bool): # <<<<<<<<<<<<<< @@ -27529,7 +27530,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L42; } - /* "lxml/objectify.pyx":1953 + /* "lxml/objectify.pyx":1954 * strval = u"false" * else: * py_type = _PYTYPE_DICT.get(_pytype) # <<<<<<<<<<<<<< @@ -27539,9 +27540,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject /*else*/ { if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1953, __pyx_L1_error) + __PYX_ERR(0, 1954, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1953, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1954, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); @@ -27549,7 +27550,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_7)); __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1954 + /* "lxml/objectify.pyx":1955 * else: * py_type = _PYTYPE_DICT.get(_pytype) * stringify = unicode if py_type is None else py_type.stringify # <<<<<<<<<<<<<< @@ -27567,7 +27568,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_v_stringify = __pyx_t_7; __pyx_t_7 = 0; - /* "lxml/objectify.pyx":1955 + /* "lxml/objectify.pyx":1956 * py_type = _PYTYPE_DICT.get(_pytype) * stringify = unicode if py_type is None else py_type.stringify * strval = stringify(_value) # <<<<<<<<<<<<<< @@ -27587,7 +27588,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_7 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_5, __pyx_v__value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v__value); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1955, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1956, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_strval = __pyx_t_7; @@ -27595,7 +27596,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_L42:; - /* "lxml/objectify.pyx":1957 + /* "lxml/objectify.pyx":1958 * strval = stringify(_value) * * if _pytype is not None: # <<<<<<<<<<<<<< @@ -27606,25 +27607,25 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1958 + /* "lxml/objectify.pyx":1959 * * if _pytype is not None: * if _pytype == u"NoneType" or _pytype == u"none": # <<<<<<<<<<<<<< * strval = None * _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true" */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_NoneType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_NoneType, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1959, __pyx_L1_error) if (!__pyx_t_1) { } else { __pyx_t_2 = __pyx_t_1; goto __pyx_L50_bool_binop_done; } - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_none, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v__pytype, __pyx_n_u_none, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1959, __pyx_L1_error) __pyx_t_2 = __pyx_t_1; __pyx_L50_bool_binop_done:; if (__pyx_t_2) { - /* "lxml/objectify.pyx":1959 + /* "lxml/objectify.pyx":1960 * if _pytype is not None: * if _pytype == u"NoneType" or _pytype == u"none": * strval = None # <<<<<<<<<<<<<< @@ -27634,16 +27635,16 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_INCREF(Py_None); __Pyx_DECREF_SET(__pyx_v_strval, Py_None); - /* "lxml/objectify.pyx":1960 + /* "lxml/objectify.pyx":1961 * if _pytype == u"NoneType" or _pytype == u"none": * strval = None * _attributes[XML_SCHEMA_INSTANCE_NIL_ATTR] = u"true" # <<<<<<<<<<<<<< * else: * # check if type information from arguments is valid */ - if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, __pyx_n_u_true) < 0)) __PYX_ERR(0, 1960, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NIL_ATTR, __pyx_n_u_true) < 0)) __PYX_ERR(0, 1961, __pyx_L1_error) - /* "lxml/objectify.pyx":1958 + /* "lxml/objectify.pyx":1959 * * if _pytype is not None: * if _pytype == u"NoneType" or _pytype == u"none": # <<<<<<<<<<<<<< @@ -27653,7 +27654,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject goto __pyx_L49; } - /* "lxml/objectify.pyx":1963 + /* "lxml/objectify.pyx":1964 * else: * # check if type information from arguments is valid * py_type = _PYTYPE_DICT.get(_pytype) # <<<<<<<<<<<<<< @@ -27663,9 +27664,9 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject /*else*/ { if (unlikely(__pyx_v_4lxml_9objectify__PYTYPE_DICT == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1963, __pyx_L1_error) + __PYX_ERR(0, 1964, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1963, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_4lxml_9objectify__PYTYPE_DICT, __pyx_v__pytype, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1964, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); @@ -27673,7 +27674,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __Pyx_XDECREF_SET(__pyx_v_py_type, ((struct __pyx_obj_4lxml_9objectify_PyType *)__pyx_t_6)); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1964 + /* "lxml/objectify.pyx":1965 * # check if type information from arguments is valid * py_type = _PYTYPE_DICT.get(_pytype) * if py_type is not None: # <<<<<<<<<<<<<< @@ -27684,7 +27685,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "lxml/objectify.pyx":1965 + /* "lxml/objectify.pyx":1966 * py_type = _PYTYPE_DICT.get(_pytype) * if py_type is not None: * if py_type.type_check is not None: # <<<<<<<<<<<<<< @@ -27695,7 +27696,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "lxml/objectify.pyx":1966 + /* "lxml/objectify.pyx":1967 * if py_type is not None: * if py_type.type_check is not None: * py_type.type_check(strval) # <<<<<<<<<<<<<< @@ -27715,12 +27716,12 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_5, __pyx_v_strval) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_strval); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1966, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1967, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1965 + /* "lxml/objectify.pyx":1966 * py_type = _PYTYPE_DICT.get(_pytype) * if py_type is not None: * if py_type.type_check is not None: # <<<<<<<<<<<<<< @@ -27729,19 +27730,19 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1967 + /* "lxml/objectify.pyx":1968 * if py_type.type_check is not None: * py_type.type_check(strval) * _attributes[PYTYPE_ATTRIBUTE] = _pytype # <<<<<<<<<<<<<< * * return _makeElement(u"value", strval, _attributes, nsmap) */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1967, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_PYTYPE_ATTRIBUTE); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1967, __pyx_L1_error) + if (unlikely(PyObject_SetItem(__pyx_v__attributes, __pyx_t_6, __pyx_v__pytype) < 0)) __PYX_ERR(0, 1968, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "lxml/objectify.pyx":1964 + /* "lxml/objectify.pyx":1965 * # check if type information from arguments is valid * py_type = _PYTYPE_DICT.get(_pytype) * if py_type is not None: # <<<<<<<<<<<<<< @@ -27752,7 +27753,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject } __pyx_L49:; - /* "lxml/objectify.pyx":1957 + /* "lxml/objectify.pyx":1958 * strval = stringify(_value) * * if _pytype is not None: # <<<<<<<<<<<<<< @@ -27761,7 +27762,7 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject */ } - /* "lxml/objectify.pyx":1969 + /* "lxml/objectify.pyx":1970 * _attributes[PYTYPE_ATTRIBUTE] = _pytype * * return _makeElement(u"value", strval, _attributes, nsmap) # <<<<<<<<<<<<<< @@ -27769,13 +27770,13 @@ static PyObject *__pyx_pf_4lxml_9objectify_40DataElement(CYTHON_UNUSED PyObject * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_n_u_value, __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1969, __pyx_L1_error) + __pyx_t_6 = ((PyObject *)__pyx_f_4lxml_9objectify__makeElement(__pyx_n_u_value, __pyx_v_strval, __pyx_v__attributes, __pyx_v_nsmap)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1970, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "lxml/objectify.pyx":1866 + /* "lxml/objectify.pyx":1867 * return _makeElement(_tag, None, _attributes, nsmap) * * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, # <<<<<<<<<<<<<< @@ -34158,8 +34159,8 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 451, __pyx_L1_error) __pyx_builtin_oct = __Pyx_GetBuiltinName(__pyx_n_s_oct); if (!__pyx_builtin_oct) __PYX_ERR(0, 645, __pyx_L1_error) __pyx_builtin_hex = __Pyx_GetBuiltinName(__pyx_n_s_hex); if (!__pyx_builtin_hex) __PYX_ERR(0, 648, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 967, __pyx_L1_error) - __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1005, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 968, __pyx_L1_error) + __pyx_builtin_map = __Pyx_GetBuiltinName(__pyx_n_s_map); if (!__pyx_builtin_map) __PYX_ERR(0, 1006, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(1, 169, __pyx_L1_error) return 0; __pyx_L1_error:; @@ -34181,69 +34182,69 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_slice__3); __Pyx_GIVEREF(__pyx_slice__3); - /* "lxml/objectify.pyx":1027 + /* "lxml/objectify.pyx":1028 * cdef _registerPyTypes(): * pytype = PyType(u'int', int, IntElement) * pytype.xmlSchemaTypes = (u"integer", u"int", u"short", u"byte", u"unsignedShort", # <<<<<<<<<<<<<< * u"unsignedByte", u"nonPositiveInteger", * u"negativeInteger", u"long", u"nonNegativeInteger", */ - __pyx_tuple__5 = PyTuple_Pack(13, __pyx_n_u_integer, __pyx_n_u_int, __pyx_n_u_short, __pyx_n_u_byte, __pyx_n_u_unsignedShort, __pyx_n_u_unsignedByte, __pyx_n_u_nonPositiveInteger, __pyx_n_u_negativeInteger, __pyx_n_u_long, __pyx_n_u_nonNegativeInteger, __pyx_n_u_unsignedLong, __pyx_n_u_unsignedInt, __pyx_n_u_positiveInteger); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_tuple__5 = PyTuple_Pack(13, __pyx_n_u_integer, __pyx_n_u_int, __pyx_n_u_short, __pyx_n_u_byte, __pyx_n_u_unsignedShort, __pyx_n_u_unsignedByte, __pyx_n_u_nonPositiveInteger, __pyx_n_u_negativeInteger, __pyx_n_u_long, __pyx_n_u_nonNegativeInteger, __pyx_n_u_unsignedLong, __pyx_n_u_unsignedInt, __pyx_n_u_positiveInteger); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__5); __Pyx_GIVEREF(__pyx_tuple__5); - /* "lxml/objectify.pyx":1038 + /* "lxml/objectify.pyx":1039 * * pytype = PyType(u'float', float, FloatElement, repr) * pytype.xmlSchemaTypes = (u"double", u"float") # <<<<<<<<<<<<<< * pytype.register() * */ - __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_u_double, __pyx_n_u_float); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_tuple__6 = PyTuple_Pack(2, __pyx_n_u_double, __pyx_n_u_float); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__6); __Pyx_GIVEREF(__pyx_tuple__6); - /* "lxml/objectify.pyx":1042 + /* "lxml/objectify.pyx":1043 * * pytype = PyType(u'bool', __checkBool, BoolElement, __lower_bool) * pytype.xmlSchemaTypes = (u"boolean",) # <<<<<<<<<<<<<< * pytype.register() * */ - __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u_boolean); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1042, __pyx_L1_error) + __pyx_tuple__7 = PyTuple_Pack(1, __pyx_n_u_boolean); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__7); __Pyx_GIVEREF(__pyx_tuple__7); - /* "lxml/objectify.pyx":1046 + /* "lxml/objectify.pyx":1047 * * pytype = PyType(u'str', None, StringElement) * pytype.xmlSchemaTypes = (u"string", u"normalizedString", u"token", u"language", # <<<<<<<<<<<<<< * u"Name", u"NCName", u"ID", u"IDREF", u"ENTITY", * u"NMTOKEN", ) */ - __pyx_tuple__8 = PyTuple_Pack(10, __pyx_n_u_string, __pyx_n_u_normalizedString, __pyx_n_u_token, __pyx_n_u_language, __pyx_n_u_Name, __pyx_n_u_NCName, __pyx_n_u_ID, __pyx_n_u_IDREF, __pyx_n_u_ENTITY, __pyx_n_u_NMTOKEN); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_tuple__8 = PyTuple_Pack(10, __pyx_n_u_string, __pyx_n_u_normalizedString, __pyx_n_u_token, __pyx_n_u_language, __pyx_n_u_Name, __pyx_n_u_NCName, __pyx_n_u_ID, __pyx_n_u_IDREF, __pyx_n_u_ENTITY, __pyx_n_u_NMTOKEN); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 1047, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__8); __Pyx_GIVEREF(__pyx_tuple__8); - /* "lxml/objectify.pyx":1343 + /* "lxml/objectify.pyx":1344 * result += _dump(child, indent) * if indent == 1: * return result[:-1] # strip last '\n' # <<<<<<<<<<<<<< * else: * return result */ - __pyx_slice__16 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_slice__16 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__16); __Pyx_GIVEREF(__pyx_slice__16); - /* "lxml/objectify.pyx":1424 + /* "lxml/objectify.pyx":1425 * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is None and u':' in value: * prefix, value = value.split(u':', 1) # <<<<<<<<<<<<<< * schema_type = _SCHEMA_TYPE_DICT.get(value) * if schema_type is not None: */ - __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_u__17, __pyx_int_1); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(2, __pyx_kp_u__17, __pyx_int_1); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); @@ -34440,300 +34441,300 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GIVEREF(__pyx_tuple__52); __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_complex, 781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 781, __pyx_L1_error) - /* "lxml/objectify.pyx":815 + /* "lxml/objectify.pyx":816 * Python's bool type. * """ * def _init(self): # <<<<<<<<<<<<<< * self._parse_value = __parseBool * */ - __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 815, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_init, 816, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(0, 816, __pyx_L1_error) - /* "lxml/objectify.pyx":837 - * return __parseBool(textOf(self._c_node)) + /* "lxml/objectify.pyx":838 + * return __parseBool(textOf(self._c_node)) * * def __checkBool(s): # <<<<<<<<<<<<<< * cdef int value = -1 * if s is not None: */ - __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_s_3, __pyx_n_s_value); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_s_3, __pyx_n_s_value); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__56); __Pyx_GIVEREF(__pyx_tuple__56); - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_checkBool, 837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_checkBool, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 838, __pyx_L1_error) - /* "lxml/objectify.pyx":844 + /* "lxml/objectify.pyx":845 * raise ValueError * * cpdef bint __parseBool(s) except -1: # <<<<<<<<<<<<<< * cdef int value * if s is None: */ - __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_s_3); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_s_3); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__58); __Pyx_GIVEREF(__pyx_tuple__58); - __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parseBool, 844, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parseBool, 845, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 845, __pyx_L1_error) - /* "lxml/objectify.pyx":942 + /* "lxml/objectify.pyx":943 * return "PyType(%s, %s)" % (self.name, self._type.__name__) * * def register(self, before=None, after=None): # <<<<<<<<<<<<<< * u"""register(self, before=None, after=None) * */ - __pyx_tuple__60 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_before, __pyx_n_s_after, __pyx_n_s_item, __pyx_n_s_entry, __pyx_n_s_first_pos, __pyx_n_s_last_pos, __pyx_n_s_i, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_xs_type); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(11, __pyx_n_s_self, __pyx_n_s_before, __pyx_n_s_after, __pyx_n_s_item, __pyx_n_s_entry, __pyx_n_s_first_pos, __pyx_n_s_last_pos, __pyx_n_s_i, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_xs_type); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); - __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_register, 942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_register, 943, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 943, __pyx_L1_error) - /* "lxml/objectify.pyx":983 + /* "lxml/objectify.pyx":984 * _SCHEMA_TYPE_DICT[xs_type] = self * * def unregister(self): # <<<<<<<<<<<<<< * u"unregister(self)" * if _PYTYPE_DICT.get(self.name) is self: */ - __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xs_type, __pyx_n_s_pytype); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_xs_type, __pyx_n_s_pytype); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__62); __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unregister, 983, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unregister, 984, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 984, __pyx_L1_error) - /* "lxml/objectify.pyx":1012 + /* "lxml/objectify.pyx":1013 * cdef list _TYPE_CHECKS = [] * * def __lower_bool(b): # <<<<<<<<<<<<<< * return u"true" if b else u"false" * */ - __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_b); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_b); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__64); __Pyx_GIVEREF(__pyx_tuple__64); - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_lower_bool, 1012, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_lower_bool, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 1013, __pyx_L1_error) - /* "lxml/objectify.pyx":1018 + /* "lxml/objectify.pyx":1019 * return u"str" if python._isString(obj) else _typename(obj) * * def pytypename(obj): # <<<<<<<<<<<<<< * u"""pytypename(obj) * */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__66); __Pyx_GIVEREF(__pyx_tuple__66); - __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pytypename, 1018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pytypename, 1019, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 1019, __pyx_L1_error) - /* "lxml/objectify.pyx":1064 + /* "lxml/objectify.pyx":1065 * _registerPyTypes() * * def getRegisteredTypes(): # <<<<<<<<<<<<<< * u"""getRegisteredTypes() * */ - __pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_types, __pyx_n_s_known, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_name); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_tuple__68 = PyTuple_Pack(5, __pyx_n_s_types, __pyx_n_s_known, __pyx_n_s_check, __pyx_n_s_pytype, __pyx_n_s_name); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__68); __Pyx_GIVEREF(__pyx_tuple__68); - __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_getRegisteredTypes, 1064, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_getRegisteredTypes, 1065, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1065, __pyx_L1_error) - /* "lxml/objectify.pyx":1299 + /* "lxml/objectify.pyx":1300 * cdef bint __RECURSIVE_STR = 0 # default: off * * def enable_recursive_str(on=True): # <<<<<<<<<<<<<< * u"""enable_recursive_str(on=True) * */ - __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_on); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_on); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__70); __Pyx_GIVEREF(__pyx_tuple__70); - __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_enable_recursive_str, 1299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 1299, __pyx_L1_error) - __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_enable_recursive_str, 1300, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 1300, __pyx_L1_error) + __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__72); __Pyx_GIVEREF(__pyx_tuple__72); - /* "lxml/objectify.pyx":1308 + /* "lxml/objectify.pyx":1309 * __RECURSIVE_STR = on * * def dump(_Element element not None): # <<<<<<<<<<<<<< * u"""dump(_Element element not None) * */ - __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_tuple__73 = PyTuple_Pack(1, __pyx_n_s_element); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__73); __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_dump, 1308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_dump, 1309, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1309, __pyx_L1_error) - /* "lxml/objectify.pyx":1351 + /* "lxml/objectify.pyx":1352 * # Pickle support for objectified ElementTree * * def __unpickleElementTree(data): # <<<<<<<<<<<<<< * return etree.ElementTree(fromstring(data)) * */ - __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_tuple__75 = PyTuple_Pack(1, __pyx_n_s_data); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__75); __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unpickleElementTree, 1351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_unpickleElementTree, 1352, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(0, 1352, __pyx_L1_error) - /* "lxml/objectify.pyx":1362 + /* "lxml/objectify.pyx":1363 * elementTreeReduceFunction, __unpickleElementTree) * * def pickleReduceElementTree(obj): # <<<<<<<<<<<<<< * return __unpickleElementTree, (etree.tostring(obj),) * */ - __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_tuple__77 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__77); __Pyx_GIVEREF(__pyx_tuple__77); - __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pickleReduceElementTree, 1362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pickleReduceElementTree, 1363, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1363, __pyx_L1_error) - /* "lxml/objectify.pyx":1456 + /* "lxml/objectify.pyx":1457 * return None * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<< * empty_pytype=None): * u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None) */ - __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_tuple__79 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__79); __Pyx_GIVEREF(__pyx_tuple__79); - __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pyannotate, 1456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_pyannotate, 1457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1457, __pyx_L1_error) - /* "lxml/objectify.pyx":1479 + /* "lxml/objectify.pyx":1480 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<< * empty_type=None): * u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None) */ - __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_pytype, __pyx_n_s_empty_type, __pyx_n_s_element); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_tuple__81 = PyTuple_Pack(5, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_pytype, __pyx_n_s_empty_type, __pyx_n_s_element); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__81); __Pyx_GIVEREF(__pyx_tuple__81); - __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_xsiannotate, 1479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(1, 3, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_xsiannotate, 1480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1480, __pyx_L1_error) - /* "lxml/objectify.pyx":1507 + /* "lxml/objectify.pyx":1508 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<< * empty_pytype=None, empty_type=None, annotate_xsi=0, * annotate_pytype=1): */ - __pyx_tuple__83 = PyTuple_Pack(8, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_empty_type, __pyx_n_s_annotate_xsi, __pyx_n_s_annotate_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_tuple__83 = PyTuple_Pack(8, __pyx_n_s_element_or_tree, __pyx_n_s_ignore_old, __pyx_n_s_ignore_xsi, __pyx_n_s_empty_pytype, __pyx_n_s_empty_type, __pyx_n_s_annotate_xsi, __pyx_n_s_annotate_pytype, __pyx_n_s_element); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__83); __Pyx_GIVEREF(__pyx_tuple__83); - __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 6, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_annotate, 1507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(1, 6, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_annotate, 1508, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1508, __pyx_L1_error) - /* "lxml/objectify.pyx":1703 + /* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< * bint xsi_nil=False, bint cleanup_namespaces=False): * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False) */ - __pyx_tuple__85 = PyTuple_Pack(6, __pyx_n_s_element_or_tree, __pyx_n_s_pytype, __pyx_n_s_xsi_2, __pyx_n_s_xsi_nil, __pyx_n_s_cleanup_namespaces, __pyx_n_s_attribute_names); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_tuple__85 = PyTuple_Pack(6, __pyx_n_s_element_or_tree, __pyx_n_s_pytype, __pyx_n_s_xsi_2, __pyx_n_s_xsi_nil, __pyx_n_s_cleanup_namespaces, __pyx_n_s_attribute_names); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__85); __Pyx_GIVEREF(__pyx_tuple__85); - __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_deannotate, 1703, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(1, 4, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_deannotate, 1704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1704, __pyx_L1_error) - /* "lxml/objectify.pyx":1743 + /* "lxml/objectify.pyx":1744 * objectify_parser = __DEFAULT_PARSER * * def set_default_parser(new_parser = None): # <<<<<<<<<<<<<< * u"""set_default_parser(new_parser = None) * */ - __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_new_parser); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1743, __pyx_L1_error) + __pyx_tuple__87 = PyTuple_Pack(1, __pyx_n_s_new_parser); if (unlikely(!__pyx_tuple__87)) __PYX_ERR(0, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__87); __Pyx_GIVEREF(__pyx_tuple__87); - __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_set_default_parser, 1743, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1743, __pyx_L1_error) - __pyx_tuple__89 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1743, __pyx_L1_error) + __pyx_codeobj__88 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__87, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_set_default_parser, 1744, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__88)) __PYX_ERR(0, 1744, __pyx_L1_error) + __pyx_tuple__89 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); - /* "lxml/objectify.pyx":1761 + /* "lxml/objectify.pyx":1762 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" * * def makeparser(**kw): # <<<<<<<<<<<<<< * u"""makeparser(remove_blank_text=True, **kw) * */ - __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_kw, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1761, __pyx_L1_error) + __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_kw, __pyx_n_s_parser); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__90); __Pyx_GIVEREF(__pyx_tuple__90); - __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_makeparser, 1761, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1761, __pyx_L1_error) + __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_makeparser, 1762, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 1762, __pyx_L1_error) - /* "lxml/objectify.pyx":1788 + /* "lxml/objectify.pyx":1789 * SubElement = etree.SubElement * * def fromstring(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(xml, parser=None, base_url=None) * */ - __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_tuple__92 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); - __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_fromstring, 1788, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1788, __pyx_L1_error) - __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_fromstring, 1789, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 1789, __pyx_L1_error) + __pyx_tuple__94 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); - /* "lxml/objectify.pyx":1804 + /* "lxml/objectify.pyx":1805 * return _fromstring(xml, parser, base_url=base_url) * * def XML(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(xml, parser=None, base_url=None) * */ - __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1804, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_xml, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); - __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_XML, 1804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1804, __pyx_L1_error) - __pyx_tuple__97 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1804, __pyx_L1_error) + __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_XML, 1805, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 1805, __pyx_L1_error) + __pyx_tuple__97 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__97); __Pyx_GIVEREF(__pyx_tuple__97); - /* "lxml/objectify.pyx":1823 + /* "lxml/objectify.pyx":1824 * _parse = etree.parse * * def parse(f, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(f, parser=None, base_url=None) * */ - __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_f, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_tuple__98 = PyTuple_Pack(3, __pyx_n_s_f, __pyx_n_s_parser, __pyx_n_s_base_url); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__98); __Pyx_GIVEREF(__pyx_tuple__98); - __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parse, 1823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1823, __pyx_L1_error) - __pyx_tuple__100 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 1, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_parse, 1824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 1824, __pyx_L1_error) + __pyx_tuple__100 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__100); __Pyx_GIVEREF(__pyx_tuple__100); - /* "lxml/objectify.pyx":1846 + /* "lxml/objectify.pyx":1847 * E = ElementMaker() * * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes) * */ - __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_attributes); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1846, __pyx_L1_error) + __pyx_tuple__101 = PyTuple_Pack(5, __pyx_n_s_tag_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_attributes); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 1847, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__101); __Pyx_GIVEREF(__pyx_tuple__101); - __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_Element, 1846, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1846, __pyx_L1_error) - __pyx_tuple__103 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1846, __pyx_L1_error) + __pyx_codeobj__102 = (PyObject*)__Pyx_PyCode_New(3, 1, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__101, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_Element, 1847, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__102)) __PYX_ERR(0, 1847, __pyx_L1_error) + __pyx_tuple__103 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 1847, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__103); __Pyx_GIVEREF(__pyx_tuple__103); - /* "lxml/objectify.pyx":1866 + /* "lxml/objectify.pyx":1867 * return _makeElement(_tag, None, _attributes, nsmap) * * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, # <<<<<<<<<<<<<< * **_attributes): * u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes) */ - __pyx_tuple__104 = PyTuple_Pack(13, __pyx_n_s_value_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_xsi_3, __pyx_n_s_attributes, __pyx_n_s_temp, __pyx_n_s_prefix, __pyx_n_s_name, __pyx_n_s_ns, __pyx_n_s_py_type, __pyx_n_s_strval, __pyx_n_s_stringify); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_tuple__104 = PyTuple_Pack(13, __pyx_n_s_value_2, __pyx_n_s_attrib, __pyx_n_s_nsmap, __pyx_n_s_pytype_2, __pyx_n_s_xsi_3, __pyx_n_s_attributes, __pyx_n_s_temp, __pyx_n_s_prefix, __pyx_n_s_name, __pyx_n_s_ns, __pyx_n_s_py_type, __pyx_n_s_strval, __pyx_n_s_stringify); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__104); __Pyx_GIVEREF(__pyx_tuple__104); - __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 2, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_DataElement, 1866, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1866, __pyx_L1_error) - __pyx_tuple__106 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(3, 2, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_src_lxml_objectify_pyx, __pyx_n_s_DataElement, 1867, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 1867, __pyx_L1_error) + __pyx_tuple__106 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__106); __Pyx_GIVEREF(__pyx_tuple__106); @@ -34998,28 +34999,28 @@ static int __Pyx_modinit_type_init_code(void) { if (PyObject_SetAttr(__pyx_m, __pyx_n_s_NoneElement, (PyObject *)&__pyx_type_4lxml_9objectify_NoneElement) < 0) __PYX_ERR(0, 784, __pyx_L1_error) __pyx_ptype_4lxml_9objectify_NoneElement = &__pyx_type_4lxml_9objectify_NoneElement; __pyx_type_4lxml_9objectify_BoolElement.tp_base = __pyx_ptype_4lxml_9objectify_IntElement; - if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 809, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 810, __pyx_L1_error) __pyx_type_4lxml_9objectify_BoolElement.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_BoolElement.tp_dictoffset && __pyx_type_4lxml_9objectify_BoolElement.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_9objectify_BoolElement.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolElement, (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 809, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BoolElement, (PyObject *)&__pyx_type_4lxml_9objectify_BoolElement) < 0) __PYX_ERR(0, 810, __pyx_L1_error) __pyx_ptype_4lxml_9objectify_BoolElement = &__pyx_type_4lxml_9objectify_BoolElement; - if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 896, __pyx_L1_error) __pyx_type_4lxml_9objectify_PyType.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_PyType.tp_dictoffset && __pyx_type_4lxml_9objectify_PyType.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_9objectify_PyType.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyType, (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_PyType, (PyObject *)&__pyx_type_4lxml_9objectify_PyType) < 0) __PYX_ERR(0, 896, __pyx_L1_error) __pyx_ptype_4lxml_9objectify_PyType = &__pyx_type_4lxml_9objectify_PyType; - if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) __PYX_ERR(0, 1125, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller) < 0) __PYX_ERR(0, 1126, __pyx_L1_error) __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_dictoffset && __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1125, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller, "__call__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1126, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__.doc = __pyx_doc_4lxml_9objectify_28_ObjectifyElementMakerCaller___call__; @@ -35030,22 +35031,22 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_ptype_4lxml_9objectify__ObjectifyElementMakerCaller = &__pyx_type_4lxml_9objectify__ObjectifyElementMakerCaller; __pyx_vtabptr_4lxml_9objectify_ElementMaker = &__pyx_vtable_4lxml_9objectify_ElementMaker; __pyx_vtable_4lxml_9objectify_ElementMaker._build_element_maker = (PyObject *(*)(struct __pyx_obj_4lxml_9objectify_ElementMaker *, PyObject *, int))__pyx_f_4lxml_9objectify_12ElementMaker__build_element_maker; - if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1216, __pyx_L1_error) __pyx_type_4lxml_9objectify_ElementMaker.tp_print = 0; - if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_ElementMaker.tp_dict, __pyx_vtabptr_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMaker, (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1215, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_4lxml_9objectify_ElementMaker.tp_dict, __pyx_vtabptr_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1216, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ElementMaker, (PyObject *)&__pyx_type_4lxml_9objectify_ElementMaker) < 0) __PYX_ERR(0, 1216, __pyx_L1_error) __pyx_ptype_4lxml_9objectify_ElementMaker = &__pyx_type_4lxml_9objectify_ElementMaker; __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup = __Pyx_ImportType(__pyx_t_1, "lxml.etree", "ElementClassLookup", sizeof(struct LxmlElementClassLookup), __Pyx_ImportType_CheckSize_Warn); if (!__pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_base = __pyx_ptype_4lxml_8includes_11etreepublic_ElementClassLookup; - if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1371, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1372, __pyx_L1_error) __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_dictoffset && __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_4lxml_9objectify_ObjectifyElementClassLookup.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1371, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1372, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_4lxml_9objectify_27ObjectifyElementClassLookup___init__.doc = __pyx_doc_4lxml_9objectify_27ObjectifyElementClassLookup___init__; @@ -35053,7 +35054,7 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifyElementClassLookup, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1371, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ObjectifyElementClassLookup, (PyObject *)&__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup) < 0) __PYX_ERR(0, 1372, __pyx_L1_error) __pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup = &__pyx_type_4lxml_9objectify_ObjectifyElementClassLookup; if (PyType_Ready(&__pyx_type_4lxml_9objectify_ObjectPath) < 0) __PYX_ERR(1, 13, __pyx_L1_error) __pyx_type_4lxml_9objectify_ObjectPath.tp_print = 0; @@ -35892,143 +35893,143 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_9objectify_StringElement); - /* "lxml/objectify.pyx":815 + /* "lxml/objectify.pyx":816 * Python's bool type. * """ * def _init(self): # <<<<<<<<<<<<<< * self._parse_value = __parseBool * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_11BoolElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_11BoolElement_1_init, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_BoolElement__init, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__55)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 815, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_BoolElement->tp_dict, __pyx_n_s_init, __pyx_t_1) < 0) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_9objectify_BoolElement); - /* "lxml/objectify.pyx":837 - * return __parseBool(textOf(self._c_node)) + /* "lxml/objectify.pyx":838 + * return __parseBool(textOf(self._c_node)) * * def __checkBool(s): # <<<<<<<<<<<<<< * cdef int value = -1 * if s is not None: */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_3__checkBool, 0, __pyx_n_s_checkBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_3__checkBool, 0, __pyx_n_s_checkBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkBool, __pyx_t_1) < 0) __PYX_ERR(0, 837, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_checkBool, __pyx_t_1) < 0) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":844 + /* "lxml/objectify.pyx":845 * raise ValueError * * cpdef bint __parseBool(s) except -1: # <<<<<<<<<<<<<< * cdef int value * if s is None: */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_5__parseBool, 0, __pyx_n_s_parseBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_5__parseBool, 0, __pyx_n_s_parseBool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseBool, __pyx_t_1) < 0) __PYX_ERR(0, 844, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parseBool, __pyx_t_1) < 0) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":942 + /* "lxml/objectify.pyx":943 * return "PyType(%s, %s)" % (self.name, self._type.__name__) * * def register(self, before=None, after=None): # <<<<<<<<<<<<<< * u"""register(self, before=None, after=None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_6PyType_5register, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_register, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_6PyType_5register, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_register, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_register, __pyx_t_1) < 0) __PYX_ERR(0, 942, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_register, __pyx_t_1) < 0) __PYX_ERR(0, 943, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType); - /* "lxml/objectify.pyx":983 + /* "lxml/objectify.pyx":984 * _SCHEMA_TYPE_DICT[xs_type] = self * * def unregister(self): # <<<<<<<<<<<<<< * u"unregister(self)" * if _PYTYPE_DICT.get(self.name) is self: */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_6PyType_7unregister, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_unregister, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_6PyType_7unregister, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_PyType_unregister, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_unregister, __pyx_t_1) < 0) __PYX_ERR(0, 983, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_4lxml_9objectify_PyType->tp_dict, __pyx_n_s_unregister, __pyx_t_1) < 0) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_4lxml_9objectify_PyType); - /* "lxml/objectify.pyx":1008 + /* "lxml/objectify.pyx":1009 * * * cdef dict _PYTYPE_DICT = {} # <<<<<<<<<<<<<< * cdef dict _SCHEMA_TYPE_DICT = {} * cdef list _TYPE_CHECKS = [] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__PYTYPE_DICT); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__PYTYPE_DICT, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1009 + /* "lxml/objectify.pyx":1010 * * cdef dict _PYTYPE_DICT = {} * cdef dict _SCHEMA_TYPE_DICT = {} # <<<<<<<<<<<<<< * cdef list _TYPE_CHECKS = [] * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__SCHEMA_TYPE_DICT, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1010 + /* "lxml/objectify.pyx":1011 * cdef dict _PYTYPE_DICT = {} * cdef dict _SCHEMA_TYPE_DICT = {} * cdef list _TYPE_CHECKS = [] # <<<<<<<<<<<<<< * * def __lower_bool(b): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__TYPE_CHECKS); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__TYPE_CHECKS, ((PyObject*)__pyx_t_1)); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1012 + /* "lxml/objectify.pyx":1013 * cdef list _TYPE_CHECKS = [] * * def __lower_bool(b): # <<<<<<<<<<<<<< * return u"true" if b else u"false" * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_7__lower_bool, 0, __pyx_n_s_lower_bool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_7__lower_bool, 0, __pyx_n_s_lower_bool, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_lower_bool, __pyx_t_1) < 0) __PYX_ERR(0, 1012, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_lower_bool, __pyx_t_1) < 0) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1018 + /* "lxml/objectify.pyx":1019 * return u"str" if python._isString(obj) else _typename(obj) * * def pytypename(obj): # <<<<<<<<<<<<<< * u"""pytypename(obj) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_9pytypename, 0, __pyx_n_s_pytypename, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_9pytypename, 0, __pyx_n_s_pytypename, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1019, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytypename, __pyx_t_1) < 0) __PYX_ERR(0, 1018, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pytypename, __pyx_t_1) < 0) __PYX_ERR(0, 1019, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1060 + /* "lxml/objectify.pyx":1061 * * # non-registered PyType for inner tree elements * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement) # <<<<<<<<<<<<<< * * _registerPyTypes() */ - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); __Pyx_GIVEREF(__pyx_v_4lxml_9objectify_TREE_PYTYPE_NAME); @@ -36039,7 +36040,7 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); __Pyx_GIVEREF(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifiedElement)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_4lxml_9objectify_PyType), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1061, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XGOTREF(((PyObject *)__pyx_v_4lxml_9objectify_TREE_PYTYPE)); @@ -36047,30 +36048,30 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1062 + /* "lxml/objectify.pyx":1063 * cdef PyType TREE_PYTYPE = PyType(TREE_PYTYPE_NAME, None, ObjectifiedElement) * * _registerPyTypes() # <<<<<<<<<<<<<< * * def getRegisteredTypes(): */ - __pyx_t_2 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_2 = __pyx_f_4lxml_9objectify__registerPyTypes(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1063, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1064 + /* "lxml/objectify.pyx":1065 * _registerPyTypes() * * def getRegisteredTypes(): # <<<<<<<<<<<<<< * u"""getRegisteredTypes() * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_11getRegisteredTypes, 0, __pyx_n_s_getRegisteredTypes, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_11getRegisteredTypes, 0, __pyx_n_s_getRegisteredTypes, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_getRegisteredTypes, __pyx_t_2) < 0) __PYX_ERR(0, 1064, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_getRegisteredTypes, __pyx_t_2) < 0) __PYX_ERR(0, 1065, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1297 + /* "lxml/objectify.pyx":1298 * # Recursive element dumping * * cdef bint __RECURSIVE_STR = 0 # default: off # <<<<<<<<<<<<<< @@ -36079,227 +36080,227 @@ if (!__Pyx_RefNanny) { */ __pyx_v_4lxml_9objectify___RECURSIVE_STR = 0; - /* "lxml/objectify.pyx":1299 + /* "lxml/objectify.pyx":1300 * cdef bint __RECURSIVE_STR = 0 # default: off * * def enable_recursive_str(on=True): # <<<<<<<<<<<<<< * u"""enable_recursive_str(on=True) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_13enable_recursive_str, 0, __pyx_n_s_enable_recursive_str, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_13enable_recursive_str, 0, __pyx_n_s_enable_recursive_str, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__72); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_enable_recursive_str, __pyx_t_2) < 0) __PYX_ERR(0, 1299, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_enable_recursive_str, __pyx_t_2) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1308 + /* "lxml/objectify.pyx":1309 * __RECURSIVE_STR = on * * def dump(_Element element not None): # <<<<<<<<<<<<<< * u"""dump(_Element element not None) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_15dump, 0, __pyx_n_s_dump, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_15dump, 0, __pyx_n_s_dump, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 1308, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_dump, __pyx_t_2) < 0) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1351 + /* "lxml/objectify.pyx":1352 * # Pickle support for objectified ElementTree * * def __unpickleElementTree(data): # <<<<<<<<<<<<<< * return etree.ElementTree(fromstring(data)) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_17__unpickleElementTree, 0, __pyx_n_s_unpickleElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_17__unpickleElementTree, 0, __pyx_n_s_unpickleElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__76)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickleElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1351, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_unpickleElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1362 + /* "lxml/objectify.pyx":1363 * elementTreeReduceFunction, __unpickleElementTree) * * def pickleReduceElementTree(obj): # <<<<<<<<<<<<<< * return __unpickleElementTree, (etree.tostring(obj),) * */ - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_19pickleReduceElementTree, 0, __pyx_n_s_pickleReduceElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_19pickleReduceElementTree, 0, __pyx_n_s_pickleReduceElementTree, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickleReduceElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1362, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pickleReduceElementTree, __pyx_t_2) < 0) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1365 + /* "lxml/objectify.pyx":1366 * return __unpickleElementTree, (etree.tostring(obj),) * * _setupPickle(pickleReduceElementTree) # <<<<<<<<<<<<<< * del pickleReduceElementTree * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickleReduceElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1365, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pickleReduceElementTree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_1 = __pyx_f_4lxml_9objectify__setupPickle(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1366 + /* "lxml/objectify.pyx":1367 * * _setupPickle(pickleReduceElementTree) * del pickleReduceElementTree # <<<<<<<<<<<<<< * * ################################################################################ */ - if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_pickleReduceElementTree) < 0) __PYX_ERR(0, 1366, __pyx_L1_error) + if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_pickleReduceElementTree) < 0) __PYX_ERR(0, 1367, __pyx_L1_error) - /* "lxml/objectify.pyx":1456 + /* "lxml/objectify.pyx":1457 * return None * * def pyannotate(element_or_tree, *, ignore_old=False, ignore_xsi=False, # <<<<<<<<<<<<<< * empty_pytype=None): * u"""pyannotate(element_or_tree, ignore_old=False, ignore_xsi=False, empty_pytype=None) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1456, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_21pyannotate, 0, __pyx_n_s_pyannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1456, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_21pyannotate, 0, __pyx_n_s_pyannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyannotate, __pyx_t_2) < 0) __PYX_ERR(0, 1456, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyannotate, __pyx_t_2) < 0) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1479 + /* "lxml/objectify.pyx":1480 * _annotate(element, 0, 1, ignore_xsi, ignore_old, None, empty_pytype) * * def xsiannotate(element_or_tree, *, ignore_old=False, ignore_pytype=False, # <<<<<<<<<<<<<< * empty_type=None): * u"""xsiannotate(element_or_tree, ignore_old=False, ignore_pytype=False, empty_type=None) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1479, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_pytype, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_23xsiannotate, 0, __pyx_n_s_xsiannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_old, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1480, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ignore_pytype, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1480, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1480, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_23xsiannotate, 0, __pyx_n_s_xsiannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_xsiannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1479, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_xsiannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1507 + /* "lxml/objectify.pyx":1508 * _annotate(element, 1, 0, ignore_old, ignore_pytype, empty_type, None) * * def annotate(element_or_tree, *, ignore_old=True, ignore_xsi=False, # <<<<<<<<<<<<<< * empty_pytype=None, empty_type=None, annotate_xsi=0, * annotate_pytype=1): */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_xsi, ((PyObject *)__pyx_int_0)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_pytype, ((PyObject *)__pyx_int_1)) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_25annotate, 0, __pyx_n_s_annotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_old, ((PyObject *)Py_True)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ignore_xsi, ((PyObject *)Py_False)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_pytype, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_empty_type, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_xsi, ((PyObject *)__pyx_int_0)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_annotate_pytype, ((PyObject *)__pyx_int_1)) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_25annotate, 0, __pyx_n_s_annotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_annotate, __pyx_t_2) < 0) __PYX_ERR(0, 1507, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_annotate, __pyx_t_2) < 0) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1700 + /* "lxml/objectify.pyx":1701 * return 0 * * cdef object _strip_attributes = etree.strip_attributes # <<<<<<<<<<<<<< * cdef object _cleanup_namespaces = etree.cleanup_namespaces * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_strip_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_strip_attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__strip_attributes); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__strip_attributes, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1701 + /* "lxml/objectify.pyx":1702 * * cdef object _strip_attributes = etree.strip_attributes * cdef object _cleanup_namespaces = etree.cleanup_namespaces # <<<<<<<<<<<<<< * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_cleanup_namespaces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1701, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_cleanup_namespaces); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__cleanup_namespaces); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__cleanup_namespaces, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1703 + /* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< * bint xsi_nil=False, bint cleanup_namespaces=False): * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype, __pyx_t_1) < 0) __PYX_ERR(0, 1703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype, __pyx_t_1) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_t_1) < 0) __PYX_ERR(0, 1703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_t_1) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1704 + /* "lxml/objectify.pyx":1705 * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, * bint xsi_nil=False, bint cleanup_namespaces=False): # <<<<<<<<<<<<<< * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False) * */ - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_nil, __pyx_t_1) < 0) __PYX_ERR(0, 1703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_nil, __pyx_t_1) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(((int)0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cleanup_namespaces, __pyx_t_1) < 0) __PYX_ERR(0, 1703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_cleanup_namespaces, __pyx_t_1) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1703 + /* "lxml/objectify.pyx":1704 * cdef object _cleanup_namespaces = etree.cleanup_namespaces * * def deannotate(element_or_tree, *, bint pytype=True, bint xsi=True, # <<<<<<<<<<<<<< * bint xsi_nil=False, bint cleanup_namespaces=False): * u"""deannotate(element_or_tree, pytype=True, xsi=True, xsi_nil=False, cleanup_namespaces=False) */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_27deannotate, 0, __pyx_n_s_deannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_27deannotate, 0, __pyx_n_s_deannotate, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_deannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1703, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_deannotate, __pyx_t_1) < 0) __PYX_ERR(0, 1704, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1737 + /* "lxml/objectify.pyx":1738 * * cdef object __DEFAULT_PARSER * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True) # <<<<<<<<<<<<<< * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() ) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_XMLParser); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_remove_blank_text, Py_True) < 0) __PYX_ERR(0, 1737, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1737, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_remove_blank_text, Py_True) < 0) __PYX_ERR(0, 1738, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -36308,24 +36309,24 @@ if (!__Pyx_RefNanny) { __Pyx_GIVEREF(__pyx_t_4); __pyx_t_4 = 0; - /* "lxml/objectify.pyx":1738 + /* "lxml/objectify.pyx":1739 * cdef object __DEFAULT_PARSER * __DEFAULT_PARSER = etree.XMLParser(remove_blank_text=True) * __DEFAULT_PARSER.set_element_class_lookup( ObjectifyElementClassLookup() ) # <<<<<<<<<<<<<< * * cdef object objectify_parser */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1738, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify___DEFAULT_PARSER, __pyx_n_s_set_element_class_lookup); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ObjectifyElementClassLookup)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1741 + /* "lxml/objectify.pyx":1742 * * cdef object objectify_parser * objectify_parser = __DEFAULT_PARSER # <<<<<<<<<<<<<< @@ -36337,205 +36338,205 @@ if (!__Pyx_RefNanny) { __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify_objectify_parser, __pyx_v_4lxml_9objectify___DEFAULT_PARSER); __Pyx_GIVEREF(__pyx_v_4lxml_9objectify___DEFAULT_PARSER); - /* "lxml/objectify.pyx":1743 + /* "lxml/objectify.pyx":1744 * objectify_parser = __DEFAULT_PARSER * * def set_default_parser(new_parser = None): # <<<<<<<<<<<<<< * u"""set_default_parser(new_parser = None) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_29set_default_parser, 0, __pyx_n_s_set_default_parser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1743, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_29set_default_parser, 0, __pyx_n_s_set_default_parser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__88)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__89); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) __PYX_ERR(0, 1743, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_default_parser, __pyx_t_1) < 0) __PYX_ERR(0, 1744, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1761 + /* "lxml/objectify.pyx":1762 * raise TypeError, u"parser must inherit from lxml.etree.XMLParser" * * def makeparser(**kw): # <<<<<<<<<<<<<< * u"""makeparser(remove_blank_text=True, **kw) * */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_31makeparser, 0, __pyx_n_s_makeparser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_31makeparser, 0, __pyx_n_s_makeparser, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_makeparser, __pyx_t_1) < 0) __PYX_ERR(0, 1761, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_makeparser, __pyx_t_1) < 0) __PYX_ERR(0, 1762, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1784 + /* "lxml/objectify.pyx":1785 * * cdef object _fromstring * _fromstring = etree.fromstring # <<<<<<<<<<<<<< * * SubElement = etree.SubElement */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1784, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_fromstring); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1785, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__fromstring); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__fromstring, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1786 + /* "lxml/objectify.pyx":1787 * _fromstring = etree.fromstring * * SubElement = etree.SubElement # <<<<<<<<<<<<<< * * def fromstring(xml, parser=None, *, base_url=None): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1786, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_SubElement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 1786, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_SubElement, __pyx_t_1) < 0) __PYX_ERR(0, 1787, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1788 + /* "lxml/objectify.pyx":1789 * SubElement = etree.SubElement * * def fromstring(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""fromstring(xml, parser=None, base_url=None) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1788, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_33fromstring, 0, __pyx_n_s_fromstring, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1789, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_33fromstring, 0, __pyx_n_s_fromstring, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__94); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) __PYX_ERR(0, 1788, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fromstring, __pyx_t_2) < 0) __PYX_ERR(0, 1789, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1804 + /* "lxml/objectify.pyx":1805 * return _fromstring(xml, parser, base_url=base_url) * * def XML(xml, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""XML(xml, parser=None, base_url=None) * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1804, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1804, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_35XML, 0, __pyx_n_s_XML, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1805, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_35XML, 0, __pyx_n_s_XML, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__97); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_1) < 0) __PYX_ERR(0, 1804, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_XML, __pyx_t_1) < 0) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1821 + /* "lxml/objectify.pyx":1822 * * cdef object _parse * _parse = etree.parse # <<<<<<<<<<<<<< * * def parse(f, parser=None, *, base_url=None): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_4lxml_9objectify_etree, __pyx_n_s_parse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__parse); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__parse, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1823 + /* "lxml/objectify.pyx":1824 * _parse = etree.parse * * def parse(f, parser=None, *, base_url=None): # <<<<<<<<<<<<<< * u"""parse(f, parser=None, base_url=None) * */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1823, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_37parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1823, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_base_url, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1824, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_37parse, 0, __pyx_n_s_parse, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__100); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_2) < 0) __PYX_ERR(0, 1823, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse, __pyx_t_2) < 0) __PYX_ERR(0, 1824, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1839 + /* "lxml/objectify.pyx":1840 * * cdef dict _DEFAULT_NSMAP = { * "py" : PYTYPE_NAMESPACE, # <<<<<<<<<<<<<< * "xsi" : XML_SCHEMA_INSTANCE_NS, * "xsd" : XML_SCHEMA_NS */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1839, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_py_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) __PYX_ERR(0, 1839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_py_2, __pyx_v_4lxml_9objectify_PYTYPE_NAMESPACE) < 0) __PYX_ERR(0, 1840, __pyx_L1_error) - /* "lxml/objectify.pyx":1840 + /* "lxml/objectify.pyx":1841 * cdef dict _DEFAULT_NSMAP = { * "py" : PYTYPE_NAMESPACE, * "xsi" : XML_SCHEMA_INSTANCE_NS, # <<<<<<<<<<<<<< * "xsd" : XML_SCHEMA_NS * } */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) __PYX_ERR(0, 1839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsi_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_INSTANCE_NS) < 0) __PYX_ERR(0, 1840, __pyx_L1_error) - /* "lxml/objectify.pyx":1841 + /* "lxml/objectify.pyx":1842 * "py" : PYTYPE_NAMESPACE, * "xsi" : XML_SCHEMA_INSTANCE_NS, * "xsd" : XML_SCHEMA_NS # <<<<<<<<<<<<<< * } * */ - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsd_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) __PYX_ERR(0, 1839, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_xsd_2, __pyx_v_4lxml_9objectify_XML_SCHEMA_NS) < 0) __PYX_ERR(0, 1840, __pyx_L1_error) __Pyx_XGOTREF(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP); __Pyx_DECREF_SET(__pyx_v_4lxml_9objectify__DEFAULT_NSMAP, ((PyObject*)__pyx_t_2)); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1844 + /* "lxml/objectify.pyx":1845 * } * * E = ElementMaker() # <<<<<<<<<<<<<< * * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): */ - __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ElementMaker)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1844, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4lxml_9objectify_ElementMaker)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_2) < 0) __PYX_ERR(0, 1844, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_E, __pyx_t_2) < 0) __PYX_ERR(0, 1845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "lxml/objectify.pyx":1846 + /* "lxml/objectify.pyx":1847 * E = ElementMaker() * * def Element(_tag, attrib=None, nsmap=None, *, _pytype=None, **_attributes): # <<<<<<<<<<<<<< * u"""Element(_tag, attrib=None, nsmap=None, _pytype=None, **_attributes) * */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1846, __pyx_L1_error) - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_39Element, 0, __pyx_n_s_Element, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1847, __pyx_L1_error) + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_39Element, 0, __pyx_n_s_Element, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__102)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_1, __pyx_tuple__103); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_1, __pyx_t_2); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 1846, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Element, __pyx_t_1) < 0) __PYX_ERR(0, 1847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "lxml/objectify.pyx":1866 + /* "lxml/objectify.pyx":1867 * return _makeElement(_tag, None, _attributes, nsmap) * * def DataElement(_value, attrib=None, nsmap=None, *, _pytype=None, _xsi=None, # <<<<<<<<<<<<<< * **_attributes): * u"""DataElement(_value, attrib=None, nsmap=None, _pytype=None, _xsi=None, **_attributes) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1866, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xsi_3, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1866, __pyx_L1_error) - __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_41DataElement, 0, __pyx_n_s_DataElement, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_pytype_2, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1867, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_xsi_3, ((PyObject *)Py_None)) < 0) __PYX_ERR(0, 1867, __pyx_L1_error) + __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_4lxml_9objectify_41DataElement, 0, __pyx_n_s_DataElement, NULL, __pyx_n_s_lxml_objectify, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__106); __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_2, __pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataElement, __pyx_t_2) < 0) __PYX_ERR(0, 1866, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataElement, __pyx_t_2) < 0) __PYX_ERR(0, 1867, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "src/lxml/objectpath.pxi":10 @@ -37381,22 +37382,26 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { #endif /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } @@ -38344,6 +38349,9 @@ done_or_error: #else #include #endif +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) +#define GCC_DIAGNOSTIC +#endif static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t width, char padding_char, char format_char) { char digits[sizeof(Py_ssize_t)*3+2]; char *dpos, *end = digits + sizeof(Py_ssize_t)*3+2; @@ -38351,12 +38359,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_Py_ssize_t(Py_ssize_t value, Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wconversion" #endif const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; -#ifdef __GNUC__ +#ifdef GCC_DIAGNOSTIC #pragma GCC diagnostic pop #endif const int is_unsigned = neg_one > const_zero; diff --git a/src/lxml/objectify.pyx b/src/lxml/objectify.pyx index f5204e6..f5fe7b5 100644 --- a/src/lxml/objectify.pyx +++ b/src/lxml/objectify.pyx @@ -162,28 +162,28 @@ cdef class ObjectifiedElement(ElementBase): def __reduce__(self): return fromstring, (etree.tostring(self),) - property text: - def __get__(self): - return textOf(self._c_node) + @property + def text(self): + return textOf(self._c_node) - property __dict__: - u"""A fake implementation for __dict__ to support dir() etc. + @property + def __dict__(self): + """A fake implementation for __dict__ to support dir() etc. Note that this only considers the first child with a given name. """ - def __get__(self): - cdef _Element child - cdef dict children - c_ns = tree._getNs(self._c_node) - tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None - children = {} - for child in etree.ElementChildIterator(self, tag=tag): - if c_ns is NULL and tree._getNs(child._c_node) is not NULL: - continue - name = pyunicode(child._c_node.name) - if name not in children: - children[name] = child - return children + cdef _Element child + cdef dict children + c_ns = tree._getNs(self._c_node) + tag = u"{%s}*" % pyunicode(c_ns) if c_ns is not NULL else None + children = {} + for child in etree.ElementChildIterator(self, tag=tag): + if c_ns is NULL and tree._getNs(child._c_node) is not NULL: + continue + name = pyunicode(child._c_node.name) + if name not in children: + children[name] = child + return children def __len__(self): u"""Count self and siblings with the same tag. @@ -594,9 +594,9 @@ cdef class ObjectifiedDataElement(ObjectifiedElement): u"""This is the base class for all data type Elements. Subclasses should override the 'pyval' property and possibly the __str__ method. """ - property pyval: - def __get__(self): - return textOf(self._c_node) + @property + def pyval(self): + return textOf(self._c_node) def __str__(self): return textOf(self._c_node) or '' @@ -619,9 +619,9 @@ cdef class NumberElement(ObjectifiedDataElement): """ self._parse_value = function - property pyval: - def __get__(self): - return _parseNumber(self) + @property + def pyval(self): + return _parseNumber(self) def __int__(self): return int(_parseNumber(self)) @@ -726,9 +726,9 @@ cdef class StringElement(ObjectifiedDataElement): len(), iter(), str_attr[0], str_attr[0:1], etc. are *not* supported. Instead, use the .text attribute to get a 'real' string. """ - property pyval: - def __get__(self): - return textOf(self._c_node) or u'' + @property + def pyval(self): + return textOf(self._c_node) or u'' def __repr__(self): return repr(textOf(self._c_node) or u'') @@ -802,9 +802,10 @@ cdef class NoneElement(ObjectifiedDataElement): def __hash__(self): return hash(None) - property pyval: - def __get__(self): - return None + @property + def pyval(self): + return None + cdef class BoolElement(IntElement): u"""Boolean type base on string values: 'true' or 'false'. @@ -830,9 +831,9 @@ cdef class BoolElement(IntElement): def __repr__(self): return repr(__parseBool(textOf(self._c_node))) - property pyval: - def __get__(self): - return __parseBool(textOf(self._c_node)) + @property + def pyval(self): + return __parseBool(textOf(self._c_node)) def __checkBool(s): cdef int value = -1 diff --git a/src/lxml/parser.pxi b/src/lxml/parser.pxi index f6f4fe6..ded2fd3 100644 --- a/src/lxml/parser.pxi +++ b/src/lxml/parser.pxi @@ -620,7 +620,7 @@ cdef void _receiveParserError(void* c_context, xmlerror.xmlError* error) nogil: _forwardParserError(c_context, error) cdef int _raiseParseError(xmlparser.xmlParserCtxt* ctxt, filename, - _ErrorLog error_log) except 0: + _ErrorLog error_log) except -1: if filename is not None and \ ctxt.lastError.domain == xmlerror.XML_FROM_IO: if isinstance(filename, bytes): @@ -940,23 +940,23 @@ cdef class _BaseParser: c_ctxt.sax.startDocument = _initSaxDocument return c_ctxt - property error_log: - u"""The error log of the last parser run. + @property + def error_log(self): + """The error log of the last parser run. """ - def __get__(self): - cdef _ParserContext context - context = self._getParserContext() - return context._error_log.copy() + cdef _ParserContext context + context = self._getParserContext() + return context._error_log.copy() - property resolvers: - u"The custom resolver registry of this parser." - def __get__(self): - return self._resolvers + @property + def resolvers(self): + """The custom resolver registry of this parser.""" + return self._resolvers - property version: - u"The version of the underlying XML parser." - def __get__(self): - return u"libxml2 %d.%d.%d" % LIBXML_VERSION + @property + def version(self): + """The version of the underlying XML parser.""" + return u"libxml2 %d.%d.%d" % LIBXML_VERSION def setElementClassLookup(self, ElementClassLookup lookup = None): u":deprecated: use ``parser.set_element_class_lookup(lookup)`` instead." @@ -1230,14 +1230,14 @@ cdef void _initSaxDocument(void* ctxt) with gil: cdef class _FeedParser(_BaseParser): cdef bint _feed_parser_running - property feed_error_log: - u"""The error log of the last (or current) run of the feed parser. + @property + def feed_error_log(self): + """The error log of the last (or current) run of the feed parser. Note that this is local to the feed parser and thus is different from what the ``error_log`` property returns. """ - def __get__(self): - return self._getPushParserContext()._error_log.copy() + return self._getPushParserContext()._error_log.copy() cpdef feed(self, data): u"""feed(self, data) diff --git a/src/lxml/proxy.pxi b/src/lxml/proxy.pxi index fd00bb6..ff277c5 100644 --- a/src/lxml/proxy.pxi +++ b/src/lxml/proxy.pxi @@ -337,9 +337,6 @@ cdef int moveNodeToDocument(_Document doc, xmlDoc* c_source_doc, c_start_node = c_element tree.BEGIN_FOR_EACH_FROM(c_element, c_element, 1) - # 0) set C doc link - c_element.doc = c_doc - if tree._isElementOrXInclude(c_element): if hasProxy(c_element): proxy_count += 1 @@ -362,14 +359,6 @@ cdef int moveNodeToDocument(_Document doc, xmlDoc* c_source_doc, while c_node is not NULL: if c_node.ns is not NULL: _fixCNs(doc, c_start_node, c_node, &c_ns_cache, c_del_ns_list) - - # remove attribute from ID table (see xmlSetTreeDoc() in libxml2's tree.c) - c_attr = c_node - if c_attr.atype == tree.XML_ATTRIBUTE_ID: - tree.xmlRemoveID(c_source_doc, c_attr) - # set C doc link also for attributes - c_node.doc = c_doc - _fixDocChildren(c_node.children, c_doc) c_node = c_node.next tree.END_FOR_EACH_FROM(c_element) @@ -402,10 +391,29 @@ cdef int moveNodeToDocument(_Document doc, xmlDoc* c_source_doc, return 0 +cdef void _setTreeDoc(xmlNode* c_node, xmlDoc* c_doc): + """Adaptation of 'xmlSetTreeDoc()' that deep-fix the document links iteratively. + It avoids https://gitlab.gnome.org/GNOME/libxml2/issues/42 + """ + tree.BEGIN_FOR_EACH_FROM(c_node, c_node, 1) + if c_node.type == tree.XML_ELEMENT_NODE: + c_attr = c_node.properties + while c_attr: + if c_attr.atype == tree.XML_ATTRIBUTE_ID: + tree.xmlRemoveID(c_node.doc, c_attr) + c_attr.doc = c_doc + _fixDocChildren(c_attr.children, c_doc) + c_attr = c_attr.next + # Set doc link for all nodes, not only elements. + c_node.doc = c_doc + tree.END_FOR_EACH_FROM(c_node) + + cdef inline void _fixDocChildren(xmlNode* c_child, xmlDoc* c_doc): while c_child: c_child.doc = c_doc - _fixDocChildren(c_child.children, c_doc) + if c_child.children: + _fixDocChildren(c_child.children, c_doc) c_child = c_child.next diff --git a/src/lxml/readonlytree.pxi b/src/lxml/readonlytree.pxi index e532895..41e2d0c 100644 --- a/src/lxml/readonlytree.pxi +++ b/src/lxml/readonlytree.pxi @@ -26,61 +26,61 @@ cdef class _ReadOnlyProxy: """ self._free_after_use = 1 - property tag: - u"""Element tag + @property + def tag(self): + """Element tag """ - def __get__(self): - self._assertNode() - if self._c_node.type == tree.XML_ELEMENT_NODE: - return _namespacedName(self._c_node) - elif self._c_node.type == tree.XML_PI_NODE: - return ProcessingInstruction - elif self._c_node.type == tree.XML_COMMENT_NODE: - return Comment - elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - return Entity - else: - self._raise_unsupported_type() + self._assertNode() + if self._c_node.type == tree.XML_ELEMENT_NODE: + return _namespacedName(self._c_node) + elif self._c_node.type == tree.XML_PI_NODE: + return ProcessingInstruction + elif self._c_node.type == tree.XML_COMMENT_NODE: + return Comment + elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + return Entity + else: + self._raise_unsupported_type() - property text: - u"""Text before the first subelement. This is either a string or + @property + def text(self): + """Text before the first subelement. This is either a string or the value None, if there was no text. """ - def __get__(self): - self._assertNode() - if self._c_node.type == tree.XML_ELEMENT_NODE: - return _collectText(self._c_node.children) - elif self._c_node.type in (tree.XML_PI_NODE, - tree.XML_COMMENT_NODE): - if self._c_node.content is NULL: - return '' - else: - return funicode(self._c_node.content) - elif self._c_node.type == tree.XML_ENTITY_REF_NODE: - return f'&{funicode(self._c_node.name)};' + self._assertNode() + if self._c_node.type == tree.XML_ELEMENT_NODE: + return _collectText(self._c_node.children) + elif self._c_node.type in (tree.XML_PI_NODE, + tree.XML_COMMENT_NODE): + if self._c_node.content is NULL: + return '' else: - self._raise_unsupported_type() + return funicode(self._c_node.content) + elif self._c_node.type == tree.XML_ENTITY_REF_NODE: + return f'&{funicode(self._c_node.name)};' + else: + self._raise_unsupported_type() - property tail: - u"""Text after this element's end tag, but before the next sibling + @property + def tail(self): + """Text after this element's end tag, but before the next sibling element's start tag. This is either a string or the value None, if there was no text. """ - def __get__(self): - self._assertNode() - return _collectText(self._c_node.next) + self._assertNode() + return _collectText(self._c_node.next) - property sourceline: - u"""Original line number as found by the parser or None if unknown. + @property + def sourceline(self): + """Original line number as found by the parser or None if unknown. """ - def __get__(self): - cdef long line - self._assertNode() - line = tree.xmlGetLineNo(self._c_node) - if line > 0: - return line - else: - return None + cdef long line + self._assertNode() + line = tree.xmlGetLineNo(self._c_node) + if line > 0: + return line + else: + return None def __repr__(self): self._assertNode() @@ -246,16 +246,16 @@ cdef class _ReadOnlyProxy: @cython.final @cython.internal cdef class _ReadOnlyPIProxy(_ReadOnlyProxy): - u"A read-only proxy for processing instructions (for internal use only!)" - property target: - def __get__(self): - self._assertNode() - return funicode(self._c_node.name) + """A read-only proxy for processing instructions (for internal use only!)""" + @property + def target(self): + self._assertNode() + return funicode(self._c_node.name) @cython.final @cython.internal cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): - u"A read-only proxy for entity references (for internal use only!)" + """A read-only proxy for entity references (for internal use only!)""" property name: def __get__(self): return funicode(self._c_node.name) @@ -266,29 +266,29 @@ cdef class _ReadOnlyEntityProxy(_ReadOnlyProxy): raise ValueError(f"Invalid entity name '{value}'") tree.xmlNodeSetName(self._c_node, _xcstr(value_utf)) - property text: - def __get__(self): - return f'&{funicode(self._c_node.name)};' + @property + def text(self): + return f'&{funicode(self._c_node.name)};' @cython.internal cdef class _ReadOnlyElementProxy(_ReadOnlyProxy): - u"The main read-only Element proxy class (for internal use only!)." + """The main read-only Element proxy class (for internal use only!).""" - property attrib: - def __get__(self): - self._assertNode() - return dict(_collectAttributes(self._c_node, 3)) + @property + def attrib(self): + self._assertNode() + return dict(_collectAttributes(self._c_node, 3)) - property prefix: - u"""Namespace prefix or None. + @property + def prefix(self): + """Namespace prefix or None. """ - def __get__(self): - self._assertNode() - if self._c_node.ns is not NULL: - if self._c_node.ns.prefix is not NULL: - return funicode(self._c_node.ns.prefix) - return None + self._assertNode() + if self._c_node.ns is not NULL: + if self._c_node.ns.prefix is not NULL: + return funicode(self._c_node.ns.prefix) + return None def get(self, key, default=None): u"""Gets an element attribute. @@ -437,7 +437,7 @@ cdef class _ModifyContentOnlyProxy(_ReadOnlyProxy): @cython.final @cython.internal cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): - u"""A read-only proxy that allows changing the text/target content of a + """A read-only proxy that allows changing the text/target content of a processing instruction. """ property target: @@ -454,7 +454,7 @@ cdef class _ModifyContentOnlyPIProxy(_ModifyContentOnlyProxy): @cython.final @cython.internal cdef class _ModifyContentOnlyEntityProxy(_ModifyContentOnlyProxy): - u"A read-only proxy for entity references (for internal use only!)" + "A read-only proxy for entity references (for internal use only!)" property name: def __get__(self): return funicode(self._c_node.name) @@ -494,7 +494,7 @@ cdef class _AppendOnlyElementProxy(_ReadOnlyElementProxy): self.append(element) property text: - u"""Text before the first subelement. This is either a string or the + """Text before the first subelement. This is either a string or the value None, if there was no text. """ def __get__(self): diff --git a/src/lxml/sax.c b/src/lxml/sax.c index 114126d..e39384a 100644 --- a/src/lxml/sax.c +++ b/src/lxml/sax.c @@ -1,4 +1,4 @@ -/* Generated by Cython 0.29.5 */ +/* Generated by Cython 0.29.6 */ /* BEGIN: Cython Metadata { @@ -33,8 +33,8 @@ END: Cython Metadata */ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_29_5" -#define CYTHON_HEX_VERSION 0x001D05F0 +#define CYTHON_ABI "0_29_6" +#define CYTHON_HEX_VERSION 0x001D06F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -626,7 +626,8 @@ typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* enc const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 -#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8) #define __PYX_DEFAULT_STRING_ENCODING "" #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize @@ -1000,7 +1001,7 @@ static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /* PyDictVersioning.proto */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1) #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ @@ -10839,22 +10840,26 @@ static void __Pyx_RaiseArgtupleInvalid( } /* PyDictVersioning */ -#if CYTHON_USE_DICT_VERSIONS +#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) { PyObject *dict = Py_TYPE(obj)->tp_dict; - return dict ? __PYX_GET_DICT_VERSION(dict) : 0; + return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0; } static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) { PyObject **dictptr = NULL; Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset; if (offset) { - dictptr = (offset > 0) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#if CYTHON_COMPILING_IN_CPYTHON + dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj); +#else + dictptr = _PyObject_GetDictPtr(obj); +#endif } return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0; } static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) { PyObject *dict = Py_TYPE(obj)->tp_dict; - if (!dict || tp_dict_version != __PYX_GET_DICT_VERSION(dict)) + if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict))) return 0; return obj_dict_version == __Pyx_get_object_dict_version(obj); } diff --git a/src/lxml/tests/test_elementtree.py b/src/lxml/tests/test_elementtree.py index 0b82a57..7bd3325 100644 --- a/src/lxml/tests/test_elementtree.py +++ b/src/lxml/tests/test_elementtree.py @@ -789,13 +789,20 @@ class _ETreeTestCaseBase(HelperTestCase): result.append(el.tag) self.assertEqual([], result) - def test_iteration_crash(self): + def test_iteration_set_tail_empty(self): # this would cause a crash in the past fromstring = self.etree.fromstring - root = etree.fromstring('

    x') + root = fromstring('

    x') for elem in root: elem.tail = '' + def test_iteration_clear_tail(self): + # this would cause a crash in the past + fromstring = self.etree.fromstring + root = fromstring('

    x') + for elem in root: + elem.tail = None + def test_iteration_reversed(self): XML = self.etree.XML root = XML(_bytes('TwoHm')) @@ -1735,7 +1742,21 @@ class _ETreeTestCaseBase(HelperTestCase): a) self.assertEqual('b2', b.tail) - def _test_getchildren(self): + def test_remove_while_iterating(self): + # There is no guarantee that this "works", but it should + # remove at least one child and not crash. + Element = self.etree.Element + SubElement = self.etree.SubElement + + a = Element('a') + SubElement(a, 'b') + SubElement(a, 'c') + SubElement(a, 'd') + for el in a: + a.remove(el) + self.assertLess(len(a), 3) + + def test_getchildren(self): Element = self.etree.Element SubElement = self.etree.SubElement @@ -1784,6 +1805,34 @@ class _ETreeTestCaseBase(HelperTestCase): [d], list(d.iter())) + def test_iter_remove_tail(self): + Element = self.etree.Element + SubElement = self.etree.SubElement + + a = Element('a') + a.text = 'a' + a.tail = 'a1' * 100 + b = SubElement(a, 'b') + b.text = 'b' + b.tail = 'b1' * 100 + c = SubElement(a, 'c') + c.text = 'c' + c.tail = 'c1' * 100 + d = SubElement(b, 'd') + d.text = 'd' + d.tail = 'd1' * 100 + e = SubElement(c, 'e') + e.text = 'e' + e.tail = 'e1' * 100 + + for el in a.iter(): + el.tail = None + el = None + + self.assertEqual( + [None] * 5, + [el.tail for el in a.iter()]) + def test_getiterator(self): Element = self.etree.Element SubElement = self.etree.SubElement @@ -1919,8 +1968,8 @@ class _ETreeTestCaseBase(HelperTestCase): c.text = 'c' c.tail = 'c1' d = SubElement(b, 'd') - c.text = 'd' - c.tail = 'd1' + d.text = 'd' + d.tail = 'd1' e = SubElement(c, 'e') e.text = 'e' e.tail = 'e1' @@ -1945,8 +1994,8 @@ class _ETreeTestCaseBase(HelperTestCase): c.text = 'c' c.tail = 'c1' d = SubElement(b, 'd') - c.text = 'd' - c.tail = 'd1' + d.text = 'd' + d.tail = 'd1' e = SubElement(c, 'e') e.text = 'e' e.tail = 'e1' diff --git a/src/lxml/xinclude.pxi b/src/lxml/xinclude.pxi index 77fdb41..f73afee 100644 --- a/src/lxml/xinclude.pxi +++ b/src/lxml/xinclude.pxi @@ -19,10 +19,10 @@ cdef class XInclude: def __init__(self): self._error_log = _ErrorLog() - property error_log: - def __get__(self): - assert self._error_log is not None, "XInclude instance not initialised" - return self._error_log.copy() + @property + def error_log(self): + assert self._error_log is not None, "XInclude instance not initialised" + return self._error_log.copy() def __call__(self, _Element node not None): u"__call__(self, node)" diff --git a/src/lxml/xmlerror.pxi b/src/lxml/xmlerror.pxi index 3a7cacc..ff31437 100644 --- a/src/lxml/xmlerror.pxi +++ b/src/lxml/xmlerror.pxi @@ -112,69 +112,73 @@ cdef class _LogEntry: self.filename, self.line, self.column, self.level_name, self.domain_name, self.type_name, self.message) - property domain_name: + @property + def domain_name(self): """The name of the error domain. See lxml.etree.ErrorDomains """ - def __get__(self): - return ErrorDomains._getName(self.domain, u"unknown") + return ErrorDomains._getName(self.domain, u"unknown") - property type_name: + @property + def type_name(self): """The name of the error type. See lxml.etree.ErrorTypes """ - def __get__(self): - if self.domain == ErrorDomains.RELAXNGV: - getName = RelaxNGErrorTypes._getName - else: - getName = ErrorTypes._getName - return getName(self.type, u"unknown") + if self.domain == ErrorDomains.RELAXNGV: + getName = RelaxNGErrorTypes._getName + else: + getName = ErrorTypes._getName + return getName(self.type, u"unknown") - property level_name: + @property + def level_name(self): """The name of the error level. See lxml.etree.ErrorLevels """ - def __get__(self): - return ErrorLevels._getName(self.level, u"unknown") - - property message: - def __get__(self): - cdef size_t size - if self._message is not None: - return self._message - if self._c_message is NULL: - return None - size = cstring_h.strlen(self._c_message) - if size > 0 and self._c_message[size-1] == '\n': - size -= 1 # strip EOL - # cannot use funicode() here because the message may contain - # byte encoded file paths etc. + return ErrorLevels._getName(self.level, u"unknown") + + @property + def message(self): + """The log message string. + """ + cdef size_t size + if self._message is not None: + return self._message + if self._c_message is NULL: + return None + size = cstring_h.strlen(self._c_message) + if size > 0 and self._c_message[size-1] == '\n': + size -= 1 # strip EOL + # cannot use funicode() here because the message may contain + # byte encoded file paths etc. + try: + self._message = self._c_message[:size].decode('utf8') + except UnicodeDecodeError: try: - self._message = self._c_message[:size].decode('utf8') + self._message = self._c_message[:size].decode( + 'ascii', 'backslashreplace') except UnicodeDecodeError: - try: - self._message = self._c_message[:size].decode( - 'ascii', 'backslashreplace') - except UnicodeDecodeError: - self._message = u'' - if self._c_message: + self._message = u'' + if self._c_message: + # clean up early + tree.xmlFree(self._c_message) + self._c_message = NULL + return self._message + + @property + def filename(self): + """The file path where the report originated, if any. + """ + if self._filename is None: + if self._c_filename is not NULL: + self._filename = _decodeFilename(self._c_filename) # clean up early - tree.xmlFree(self._c_message) - self._c_message = NULL - return self._message + tree.xmlFree(self._c_filename) + self._c_filename = NULL + return self._filename - property filename: - def __get__(self): - if self._filename is None: - if self._c_filename is not NULL: - self._filename = _decodeFilename(self._c_filename) - # clean up early - tree.xmlFree(self._c_filename) - self._c_filename = NULL - return self._filename - - property path: + @property + def path(self): """The XPath for the node where the error was detected. """ - def __get__(self): - return funicode(self._c_path) if self._c_path is not NULL else None + return funicode(self._c_path) if self._c_path is not NULL else None cdef class _BaseErrorLog: diff --git a/src/lxml/xpath.pxi b/src/lxml/xpath.pxi index 784987d..b926d55 100644 --- a/src/lxml/xpath.pxi +++ b/src/lxml/xpath.pxi @@ -133,10 +133,10 @@ cdef class _XPathEvaluatorBase: self._context = _XPathContext(namespaces, extensions, self._error_log, enable_regexp, None, smart_strings) - property error_log: - def __get__(self): - assert self._error_log is not None, "XPath evaluator not initialised" - return self._error_log.copy() + @property + def error_log(self): + assert self._error_log is not None, "XPath evaluator not initialised" + return self._error_log.copy() def __dealloc__(self): if self._xpathCtxt is not NULL: @@ -448,11 +448,11 @@ cdef class XPath(_XPathEvaluatorBase): self._unlock() return result - property path: - u"""The literal XPath expression. + @property + def path(self): + """The literal XPath expression. """ - def __get__(self): - return self._path.decode(u'UTF-8') + return self._path.decode(u'UTF-8') def __dealloc__(self): if self._xpath is not NULL: diff --git a/src/lxml/xslt.pxi b/src/lxml/xslt.pxi index 54e5655..d63a65e 100644 --- a/src/lxml/xslt.pxi +++ b/src/lxml/xslt.pxi @@ -226,16 +226,16 @@ cdef class XSLTAccessControl: cdef void _register_in_context(self, xslt.xsltTransformContext* ctxt): xslt.xsltSetCtxtSecurityPrefs(self._prefs, ctxt) - property options: - u"The access control configuration as a map of options." - def __get__(self): - return { - u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), - u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), - u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), - u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), - u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), - } + @property + def options(self): + """The access control configuration as a map of options.""" + return { + u'read_file': self._optval(xslt.XSLT_SECPREF_READ_FILE), + u'write_file': self._optval(xslt.XSLT_SECPREF_WRITE_FILE), + u'create_dir': self._optval(xslt.XSLT_SECPREF_CREATE_DIRECTORY), + u'read_network': self._optval(xslt.XSLT_SECPREF_READ_NETWORK), + u'write_network': self._optval(xslt.XSLT_SECPREF_WRITE_NETWORK), + } @cython.final cdef _optval(self, xslt.xsltSecurityOption option): @@ -427,10 +427,10 @@ cdef class XSLT: if self._c_style is not NULL: xslt.xsltFreeStylesheet(self._c_style) - property error_log: - u"The log of errors and warnings of an XSLT execution." - def __get__(self): - return self._error_log.copy() + @property + def error_log(self): + """The log of errors and warnings of an XSLT execution.""" + return self._error_log.copy() @staticmethod def strparam(strval): @@ -847,7 +847,7 @@ cdef class _XSLTResultTree(_ElementTree): buffer.buf = NULL property xslt_profile: - u"""Return an ElementTree with profiling data for the stylesheet run. + """Return an ElementTree with profiling data for the stylesheet run. """ def __get__(self): cdef object root diff --git a/version.txt b/version.txt index f77856a..cc2fbe8 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -4.3.1 +4.3.2 -- 2.7.4